跳到主要內容

發表文章

解決Homepod mini升級16.4後無法TTS的問題

  【】 homepod mini升級到16.4後,delay時間由4秒變為7秒 【解決步驟】 open ha cli then type login it should give you a prompt # type: docker exec -it $(docker ps -f name=homeassistant -q) bash now you should be inside the homeassistant container open the pyatv file: vi /usr/local/lib/python3.10/site-packages/pyatv/support/http.py change the timeout from 4 to 10 before: async with async_timeout.timeout(4): after: async with async_timeout.timeout(10): restart your homeassistant and you should be good to go! 【參考文章】 https://github.com/home-assistant/core/issues/88014
最近的文章

TP-Link Archer C7 V2由DD-WRT改安裝 Openwrt

最近DD-WRT的DHCP突然掛掉,決定改用Open-WRT  1.改為TP-Link原廠韌體- ArcherC7v2_webrevert.rar DD-WRT TP-Link Archer C7 (AC1750) 2.x 2.登錄192.168.0.1(admin/admin),升級Open-WRT(openwrt-22.03.2-ath79-generic-tplink_archer-c7-v2-squashfs-factory) https://openwrt.org/toh/tp-link/archer-c5-c7-wdr7500 3.登錄192.168.1.1 4.停用IPv6 uci set 'network.lan.ipv6=0' uci set 'network.wan.ipv6=0' uci set 'dhcp.lan.dhcpv6=disabled' /etc/init.d/odhcpd disable uci commit uci -q delete dhcp.lan.dhcpv6 uci -q delete dhcp.lan.ra uci commit dhcp /etc/init.d/odhcpd restart uci set network.lan.delegate="0" uci commit network /etc/init.d/network restart /etc/init.d/odhcpd disable /etc/init.d/odhcpd stop uci -q delete network.globals.ula_prefix uci commit network /etc/init.d/network restart

透過Node-Red來撥放天氣預報TTS

1.去 氣象資料開放平台 註冊,並取得 API授權碼 2.以下例子是取得新北市土城區未來一週天氣預報的API網址 https://opendata.cwb.gov.tw/dist/opendata-swagger.html?urls.primaryName=openAPI#/%E9%A0%90%E5%A0%B1/get_v1_rest_datastore_F_D0047_071 3.建立Node-Red,記得更新URL Node-Red Code [{"id":"de12f26a26ae775c","type":"tab","label":"流程4","disabled":false,"info":"","env":[]},{"id":"6b33595bc6a16e20","type":"inject","z":"de12f26a26ae775c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":200,"wires":[["540d0db5b62256fd"]]},{&

透過Node-Red來使用HomePod Mini TTS(Microsoft Edge TTS)

1.在HACS安裝Microsoft Edge TTS 2.在configuration.yaml新增以下文字,並重新啟動HA tts:   - platform: edge_tts     language: zh-CN # Default language or voice (Optional) 3.先到Media \ Text to Speech \ Edge TTS 測試訊息 4.設定Node-Red TTS Node-Red Code [{"id":"04e98de49f7c87e7","type":"tab","label":"流程3","disabled":false,"info":"","env":[]},{"id":"22d845f946fbba59","type":"function","z":"04e98de49f7c87e7","name":"fn_Microsoft Edge TTS","func":"var message = \"Node-Red 測試 Microsoft Edge TTS\";\n\nmsg.payload_tts = {\n    \"message\": message, \n    \"cache\": true,\n    \"options\": {\n        \"volume\": \"+50%\",\n        \"voice\": \"zh-TW-HsiaoChenNeural\",\n        \"pitch\": \"+0Hz\",\n        \"rate\": \&quo

cc2530 + cc2591整合Wemos D1-mini(ESP8266)

cc2530 + cc2591透過Wemos D1-mini(ESP8266),直接具備Wifi功能 1. 刷cc2530 + cc2591韌體 2.接線(燒錄前CPIO0要接到GND) ESP8266 CC2530 3v3 VCC GND GND TX P02 RX P03 GND P20 GND P04 GND P05 3.燒錄ESPEasy到Wemos D1-mini(ESP8266) 下載 ESPEasy_binaries.zip ,取出ESP_Easy_mega_20221105_normal_ESP8266_4M1M.bin 下載ESPEasy_dist.zip 執行 ESPEasy_dist\FlashESP8266.exe 燒錄 ESP_Easy_mega_20221105_normal_ESP8266_4M1M.bin 4.設定ESPEasy 尋找Wifi(ESP-Easy) Wifi default password:configesp ESPEasy web interface Devices \  Communication - Serial Server a.    Name: ZIGBEE2MQTT b.    Enabled: checked c.    TCP Port: a number between 1000 and 9999 "1775" d.    Baud Rate: 115200 e.    Data bits: 8 f.    Parity: No Parity g.    Stop bits: 1 h.    Reset target after boot: - none – i.    RX receive timeout: 0 j.    Event processing: Generic Submit 5.設定Zigbee2MQTT serial:     port: 'tcp://192.168.1.xx:1775'     adapter: zstack 註:Tasmota刷了zbbridge版本,但是一直沒有出現Wifi設定畫面,連不上網路,就放棄了 參考文章 https://www.zigbee2mqtt.io/guide/adapters/flashing/conn

透過Wemos D1-mini(ESP8266)刷cc2530 + cc2591韌體

  1.下載 CCLoader   2.準備Z-Stack Firmware      燒錄 CCLoader_Arduino.bin 到Wemos D1-mini(ESP8266)      下載 CC2530_CC2591_20190523.zip      下載 objcopy.exe, binutils-2.28-1-mingw32-bin.tar.xz      下載  libiconv  ,並解壓縮到 \ binutils-2.28-1-mingw32-bin\bin           objcopy.exe --gap-fill 0xFF --pad-to 0x040000 -I ihex CC2530ZNP-with-SBL.hex -O binary CC2530ZNP-with-SBL.bin 3.燒錄 CCLoader_Arduino.bin 到Wemos D1-mini(ESP8266) 使用 Tasmotizer! ,  NodeMCU-pyflasher ,  esptool.py  燒錄  CCLoader_Arduino.bin 到ESP-8266 4. 燒錄cc2530 + cc2591韌體前置作業 編輯 \CCLoader\src\CCLoader.ino,在大約86-90行,確認以下文字 // Debug control pins & the indicate LED int DD = 14; //GPIO14=D5 on NodeMCU/WeMos D1 Mini int DC = 4; //GPIO4=D2 on NodeMCU/WeMos D1 Mini int RESET = 5; //GPIO5=D1 on NodeMCU/WeMos D1 Mini int LED = 2; //GPIO2=D4 and the Blue LED on the WeMos D1 Mini and the ESP-12E module on the NodeMCU, or can use GPIO16=D0 for the other Blue LED on NodeMCU 連接PIN腳 (可參考 https://zigbee.blakadder.com/coordinators.html) Pin Name NodeMCU

Sonoff Zigbee 3.0 USB Dongle Plus燒錄ZigBee Router 模式

前言       Sonoff Zigbee 3.0 USB Dongle Plus燒錄為ZigBee Router 模式,可加以延伸ZigBee訊息(提供給ZHA 或Zigbee2MQTT) 1.下載韌體 https://github.com/Koenkk/Z-Stack-firmware/raw/master/router/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_router_20220125.zip 2.下載燒錄軟體(FLASH-PROGRAMMER-2 — SmartRF Flash Programmer v2) 要註冊才能下載 https://www.ti.com/tool/FLASH-PROGRAMMER 3.拆除Sonoff Zigbee 3.0 USB Dongle Plus外殼,按住靠近USB的按鈕不放,插入電腦USB後,等待10秒後,再放開 4.開啟燒錄軟體     點選COM Port(Unknow)- > CC2652P -> 勾選 Erase + Program -> Play(燒錄)     如果遇到失敗,大部份是步驟3沒做好,再重新拔插一下 5.如果看到成功,就大功告成了,開啟 ZHA 或Zigbee2MQTT配對模式後,就可以看到它了。 註:目前不知道如何重新配對,我都是執行重新燒錄動作 參考文章 https://forum.automata.id/t/topic/247 https://github.com/Koenkk/Z-Stack-firmware/raw/master/router/Z-Stack_3.x.0/