Need help NodeRed and Shelly Button 1 issue

aww ok learn something new every day… so far its all working now makes it easier now to have a binary sensor when u wanna use a sensor on a different page flow…

so msg ={} is the same like msg = “” makes a blank message
so it deletes everything

always learning…
is this coding specific to node red or is it like python code or something… im formaly a basic programer language so i used to code from the 90s and 2000s in the orginal and the visuals but always learning and learn a bit a python here and there

It’s a little different. "" creates an empty string, {} creates an empty object. All messages in NR need to be inside an object. Look at the debug and you will see it’s always an object.

image

If you swap out the {} with "" in that function node I supplied, it will fail to output. Function nodes use javascript (mdn or w3)and jsonata is available in most other nodes for message manipulation.

ah ok learning always

i had another question i setup the local TTS so i installed the Piper and whymo and set up the local TTS under voice assistant
and i tried to find it in node read under domain tts but its not there do you know how to add it there or where it is… i though it was speak but i guess thats to talk into it… and i trying to figure that out too

i bought 2 Raspi espmuse boards so i wanna make a speak device but also i wanna do Text to speech using the local voice assistant but i cant find it in node red

[{"id":"91a50fe440a29a39","type":"api-call-service","z":"33e857f1856f9992","name":"Text-To-Speech To Devices","server":"efdc12b5.8e0cb","version":5,"debugenabled":false,"domain":"tts","service":"speak","areaId":[],"deviceId":[],"entityId":["media_player.raspiaudio_muse_proto","media_player.raspiaudio_muse_proto_2"],"data":"{          \"message\": msg.payload, \"entity_id\": \"tts.piper\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":640,"y":1800,"wires":[[]]},{"id":"f7d8aa63268fdb10","type":"inject","z":"33e857f1856f9992","name":"Start","props":[{"p":"topic","vt":"str"},{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"run","payload":"0","payloadType":"num","x":150,"y":1800,"wires":[["de2c15d81f1614e3"]]},{"id":"de2c15d81f1614e3","type":"ha-sensor","z":"33e857f1856f9992","name":"Caller Id Number","entityConfig":"ca004c017702ee1d","version":0,"state":"payload","stateType":"msg","attributes":[],"inputOverride":"allow","outputProperties":[],"x":350,"y":1800,"wires":[["91a50fe440a29a39"]]},{"id":"efdc12b5.8e0cb","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"ca004c017702ee1d","type":"ha-entity-config","server":"915baa48.9b1898","deviceConfig":"","name":"Caller Id Number","version":"6","entityType":"sensor","haConfig":[{"property":"name","value":"Caller Id Number"},{"property":"icon","value":""},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""}],"resend":false,"debugEnabled":false},{"id":"915baa48.9b1898","type":"server","name":"Home Assistant","version":5,"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}]

thats what i playing with at the moment i tried the tts.piper i found that in the developer states page