Odtwarzanie wiadomości z node-red

Posiadam bramkę pro1, chciałem stworzyć prosty flow w node-red z komunikatem, który odtwarzany byłby przez głośnik podłączony do tej bramki. I tu mam problem, czasami komunikat odtwarzany jest jednorazowo (po restarcie komputera) a dalej już nie. Co robię nie tak. Przekształcanie tekstu na mowę na audio na bramce działa mi zawsze, tak jak odtwarzane jest również radio. Próbowałem też z Google_translate_say ale też nie działa. Proszę o pomoc

flows(3).json (3,3 KB)

Po pierwsze w temp office zmień state type string na number.
Napisz jaśniej, co Ci nie działa, bo piszesz, że działa a potem nie działa, jaki restart komputera?

Edit. zobacz czy to działa

[{"id":"30a8d18370f11818","type":"inject","z":"d1cf84c7df349dee","name":"19:00","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":130,"y":120,"wires":[["88d6daed40355896"]]},{"id":"137abce89e96af07","type":"function","z":"d1cf84c7df349dee","name":"Wiadomość","func":"msg.payload=\n{\n    \"data\":\n    {\n    \"message\": \"Temperatura w pokoju\"+msg.dom+\"stopni celsjusza\",\n    }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":120,"wires":[["d9513bfd8177e319"]]},{"id":"d9513bfd8177e319","type":"api-call-service","z":"d1cf84c7df349dee","name":"ais_tts","server":"94b6161079042526","version":3,"debugenabled":true,"service_domain":"tts","service":"ais_tts_local_say","entityId":"media_player.wbudowany_glosnik","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":120,"wires":[[]]},{"id":"88d6daed40355896","type":"api-current-state","z":"d1cf84c7df349dee","name":"Temp office","server":"94b6161079042526","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujnik_temp1_aqara_temperature","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"dom","propertyType":"msg","value":"","valueType":"entityState"}],"x":290,"y":120,"wires":[["137abce89e96af07"]]},{"id":"94b6161079042526","type":"server","name":"Asystent domowy","version":1,"legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Po zmianie state string na number zadziałało raz, potem kolejne uruchomienia już nie działa, również Twój flow też nie zadziałał. Tak jak poprzednio pisałem po restarcie bramki zadziała mi jeden raz a już kolejne uruchomienia nie działają, brak odtwarzania głosowego (o to mi chodziło), chociaż wiadomość jest wyświetlana chyba prawidłowo:

"28.12.2021, 10:27:13 node ais_tts
msg :

{ domain: “tts”, service: “ais_tts_local_say”, data: object }

A zrób tak, włącz flow, podejdź do termometru, chuchnij dmuchnij kliknij i puść flow ponownie i daj znać czy działa jak temp się zmieni i wtedy puszczasz flow.

Dalej nie działa pomimo zmian temperatury (jest widoczna na nodzie i w wyświetlanej informacji)

Wstaw sobie to flow i kliknij 1,2,3 razy pierwszy potem drugi i na zmianę i powiedz kiedy gada a kiedy nie.

[{"id":"c1cf976d0d107f21","type":"inject","z":"d1cf84c7df349dee","name":"19:00","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":150,"y":220,"wires":[["3cad2e9c534bd423"]]},{"id":"3cad2e9c534bd423","type":"function","z":"d1cf84c7df349dee","name":"Wiadomość","func":"msg.payload=\n{\n    \"data\":\n    {\n    \"message\": \"Temperatura w pokoju stopni celsjusza 1\",\n    }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":310,"y":220,"wires":[["1e03d19acb333073"]]},{"id":"1e03d19acb333073","type":"api-call-service","z":"d1cf84c7df349dee","name":"ais_tts","server":"94b6161079042526","version":3,"debugenabled":true,"service_domain":"tts","service":"ais_tts_local_say","entityId":"media_player.wbudowany_glosnik","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":470,"y":220,"wires":[[]]},{"id":"1b8802134b8c57b8","type":"inject","z":"d1cf84c7df349dee","name":"19:00","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":150,"y":260,"wires":[["ed418560a7cf65a0"]]},{"id":"ed418560a7cf65a0","type":"function","z":"d1cf84c7df349dee","name":"Wiadomość","func":"msg.payload=\n{\n    \"data\":\n    {\n    \"message\": \"Temperatura w pokoju stopni celsjusza 2\",\n    }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":310,"y":260,"wires":[["3714b7b6fe9246c9"]]},{"id":"3714b7b6fe9246c9","type":"api-call-service","z":"d1cf84c7df349dee","name":"ais_tts","server":"94b6161079042526","version":3,"debugenabled":true,"service_domain":"tts","service":"ais_tts_local_say","entityId":"media_player.wbudowany_glosnik","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":470,"y":260,"wires":[[]]},{"id":"94b6161079042526","type":"server","name":"Asystent domowy","version":1,"legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Przykro mi ale nic nie działa, robiłem tak jak napisałeś i nic cisza

kurde, nie mam jak teraz sprawdzic u siebie,
zobacz jeszcze to: (tylko w każdym nodzie zobacz czy na pewno jest wybrany Twój serwer po imporcie)

[{"id":"30a8d18370f11818","type":"inject","z":"d1cf84c7df349dee","name":"19:00","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":130,"y":120,"wires":[["8e8541c2a1b73503"]]},{"id":"137abce89e96af07","type":"function","z":"d1cf84c7df349dee","name":"Wiadomość","func":"msg.payload=\n{\n    \"data\":\n    {\n    \"message\": \"Temperatura w pokoju\"+msg.dom+\"stopni celsjusza\",\n    }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":120,"wires":[["d9513bfd8177e319"]]},{"id":"d9513bfd8177e319","type":"api-call-service","z":"d1cf84c7df349dee","name":"ais_tts","server":"94b6161079042526","version":3,"debugenabled":true,"service_domain":"tts","service":"ais_tts_local_say","entityId":"media_player.wbudowany_glosnik","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":790,"y":120,"wires":[[]]},{"id":"88d6daed40355896","type":"api-current-state","z":"d1cf84c7df349dee","name":"Temp office","server":"94b6161079042526","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujnik_temp1_aqara_temperature","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"dom","propertyType":"msg","value":"","valueType":"entityState"}],"x":450,"y":120,"wires":[["137abce89e96af07"]]},{"id":"8e8541c2a1b73503","type":"api-call-service","z":"d1cf84c7df349dee","name":"clear cache","server":"94b6161079042526","version":3,"debugenabled":true,"service_domain":"tts","service":"clear_cache","entityId":"","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":290,"y":120,"wires":[["88d6daed40355896"]]},{"id":"94b6161079042526","type":"server","name":"Asystent domowy","version":1,"legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Niestety dalej cisza, serwer prawidłowy

zmieniałeś na google_translate_say ?

Nie, bo muszę uruchomić to w configuration, ale wtedy nie działa ais_tts_local_say, do wyboru wyświetli się to lub to

To u mnie działa, własnie sprawdziłem, raz za razem gada temperature, zmień serwer i swoje encje temp i musi działać

[{"id":"7372abe7aaaffed7","type":"inject","z":"d1cf84c7df349dee","name":"19:00","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":130,"y":60,"wires":[["c0549c0bf90ee9df"]]},{"id":"4b5c06f35e0d7261","type":"function","z":"d1cf84c7df349dee","name":"Wiadomość","func":"msg.payload=\n{\n    \"data\":\n    {\n    \"message\": \"Temperatura w pokoju\"+msg.dom+\"stopni celsjusza\",\n    }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":60,"wires":[["0e48e71e7eee9c97"]]},{"id":"0e48e71e7eee9c97","type":"api-call-service","z":"d1cf84c7df349dee","name":"ais_tts","server":"4d0e02c9.2307bc","version":3,"debugenabled":true,"service_domain":"tts","service":"google_translate_say","entityId":"media_player.wbudowany_glosnik","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":790,"y":60,"wires":[[]]},{"id":"93f83229eed724e2","type":"api-current-state","z":"d1cf84c7df349dee","name":"Temp office","server":"4d0e02c9.2307bc","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujka_ruchu_biuro_2_temperature","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"dom","propertyType":"msg","value":"","valueType":"entityState"}],"x":450,"y":60,"wires":[["4b5c06f35e0d7261"]]},{"id":"c0549c0bf90ee9df","type":"api-call-service","z":"d1cf84c7df349dee","name":"clear cache","server":"4d0e02c9.2307bc","version":3,"debugenabled":true,"service_domain":"tts","service":"clear_cache","entityId":"","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":290,"y":60,"wires":[["93f83229eed724e2","4b5c06f35e0d7261"]]},{"id":"4d0e02c9.2307bc","type":"server","name":"Asystent domowy","version":1,"legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

Pozmieniałem na swój serwer i encję i dalej cisza, czy przypadkiem nie mam coś źle zrobione z odtwarzaczem media player

Tutaj Ci działa? jak wywołujesz?

Chyba używasz innej usługi niż @bartik22 .

Spróbuj może za pomocą:
ais_ai_service.say_it

google_translate_say mi nie działa, działała ais_tts_local_say i nie wiem dlaczego ale nie zawsze (chyba trzeba czyścić cache)
Dodałem do mojego flow nod clear cache i jak na razie działa

Dziękuję za zaangażowanie i pomoc, będę dalej próbował (na razie działa)

1 polubienie