so i have node red automation when an incoming calls come in it will say
“Joe Blow Is Calling” and repeats this for 20 seconds
but what i notice is cuz it does it 7 times usually depending the lenght of the name
it will do
“Joe Blow Is”
“Joe Blow Is Calling”
“Joe Blow Is Calling”
“Joe Blow Is Calling”
“Joe Blow Is Calling”
it glitchs the first time… i not sure if its a Esphome issue, a media player issue a node red issue… so i figured id ask here
here is my jsons and how o do it is
msg.payload = msg.payload.Name + " Is Calling"
return msg;
thats how i do it but it skips the first time running
[{"id":"3a36aafc0827ab96","type":"api-call-service","z":"dbde2ad1b4af7ed2","name":"Text-To-Speech To Devices","server":"915baa48.9b1898","version":7,"debugenabled":false,"action":"tts.speak","floorId":[],"areaId":[],"deviceId":[],"entityId":["tts.piper"],"labelId":[],"data":"{ \"message\": msg.payload, \t \"media_player_entity_id\": [\t \"media_player.speaker_1_esphome_i2s_media_player\"\t \t ]\t}\t","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"tts","service":"speak","output_location":"","output_location_type":"none","x":980,"y":3060,"wires":[[]]},{"id":"9cf490344d72b724","type":"api-call-service","z":"dbde2ad1b4af7ed2","name":"Set Volume 100%","server":"915baa48.9b1898","version":7,"debugenabled":false,"action":"media_player.volume_set","floorId":[],"areaId":[],"deviceId":[],"entityId":["media_player.speaker_1_esphome_i2s_media_player","media_player.speaker_2_esphome_i2s_media_player","media_player.speaker_3_esphome_i2s_media_player"],"labelId":[],"data":"{\"volume_level\":1}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"media_player","service":"volume_set","output_location":"","output_location_type":"none","x":730,"y":3060,"wires":[["3a36aafc0827ab96"]]},{"id":"74da379225a01243","type":"trigger","z":"dbde2ad1b4af7ed2","name":"Repeat Calling Message","op1":"","op2":"0","op1type":"pay","op2type":"str","duration":"-3","extend":false,"overrideDelay":false,"units":"s","reset":"stop","bytopic":"all","topic":"topic","outputs":1,"x":410,"y":3020,"wires":[["9cf490344d72b724"]]},{"id":"16c98567b818f293","type":"function","z":"dbde2ad1b4af7ed2","name":"Is Calling","func":"msg.payload = msg.payload.Name + \" Is Calling\"\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":140,"y":3020,"wires":[["74da379225a01243"]]},{"id":"691a61569537825f","type":"change","z":"dbde2ad1b4af7ed2","name":"Send Stop","rules":[{"t":"set","p":"payload","pt":"msg","to":"stop","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":3080,"wires":[["74da379225a01243","642338fa6fcf6853"]]},{"id":"642338fa6fcf6853","type":"api-call-service","z":"dbde2ad1b4af7ed2","name":"Kill Audio Alarm","server":"915baa48.9b1898","version":7,"debugenabled":false,"action":"media_player.media_stop","floorId":[],"areaId":[],"deviceId":[],"entityId":["media_player.speaker_1_esphome_i2s_media_player","media_player.speaker_2_esphome_i2s_media_player","media_player.speaker_3_esphome_i2s_media_player"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"media_player","service":"media_stop","output_location":"","output_location_type":"none","x":380,"y":3060,"wires":[[]]},{"id":"7512a166598a9505","type":"inject","z":"dbde2ad1b4af7ed2","name":"","props":[{"p":"payload.Name","v":"Joe Blow","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":90,"y":2880,"wires":[["16c98567b818f293"]]},{"id":"03ea0b86776f741f","type":"inject","z":"dbde2ad1b4af7ed2","name":"","props":[{"p":"payload"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"stop","payloadType":"str","x":130,"y":3200,"wires":[["691a61569537825f"]]},{"id":"915baa48.9b1898","type":"server","name":"Home Assistant","version":6,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":["y","yes","true","on","home","open"],"connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"c365acd9ba389573","type":"global-config","env":[],"modules":{"node-red-contrib-home-assistant-websocket":"0.80.3"}}]
and im guessing it probably glitchs audio files when it first plays i not sure i onyl test with an alarm if there is a fire or water flooding
i test in home assistant as a script no issues… it has “cache” set to true… so i added that to the call service… as its not one of the examples it says at the bottom… but it didnt help still cuts off “calling” the first time