Long story short, I have an esphome NodeMCU with a rotary button to change the volume of a volumio integration (this works). On the NodeMCU, I also have an SSD1306 Display that shows the value of the rotary encoder / volumio volume. This is fine if I only want to change the volumio volume from the rotary button, but if I change it in volumio, OR through a node-red trigger, I would like the rotary value / screen to update as well. I can also change the volume of volumio from an input number slider.
What I would like to do is set the value of the same Input Number to the value of volumio volume when I pass in the value from the node-red trigger, that then goes into a function node, but I keep getting an error of “Call-service API error. Error Message: required key not provided @ data[‘value’]” I am new to node-red, so hopefully you have ideas, resources to point me towards. I am wondering if a
Any hints?
Here is a screenshot, I’ll figure out how to post the flow tonight. This is the full screenshot for something I am working on called Porch Mode. So when I open my porch door I can have volumio music automatically play and lights turn on if the sun is below the horizon.
[{"id":"b9d7a859.d7d0c8","type":"server-state-changed","z":"8f0283d1.757e7","name":"Patio Door Violated","server":"97501cec.c3c92","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.zone_012","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"Violated","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":880,"wires":[["3326b8fb.b6ef28"],[]]},{"id":"634c9370.a3622c","type":"trigger","z":"8f0283d1.757e7","name":"Send Play to Volumio","op1":"play","op2":"play","op1type":"str","op2type":"str","duration":"250","extend":false,"units":"ms","reset":"Normal","bytopic":"all","topic":"topic","outputs":1,"x":860,"y":920,"wires":[["e3569873.b84578"]]},{"id":"e3569873.b84578","type":"function","z":"8f0283d1.757e7","name":"Volumio String","func":"var event = msg.payload;\n\nmsg.payload = {\n event: event\n \n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1260,"y":940,"wires":[["e542ccca.cbcd2"]]},{"id":"e542ccca.cbcd2","type":"volumio command","z":"8f0283d1.757e7","server":"ec39db10.92fad8","x":1570,"y":940,"wires":[[]]},{"id":"bc7f6575.19e688","type":"switch","z":"8f0283d1.757e7","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":590,"y":880,"wires":[["634c9370.a3622c","da5337c6.2692e8","a2a121d8.b38e"],[]]},{"id":"3326b8fb.b6ef28","type":"api-current-state","z":"8f0283d1.757e7","name":"Porch Mode On?","server":"97501cec.c3c92","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.output_063","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":370,"y":880,"wires":[["bc7f6575.19e688"],[]]},{"id":"88861e.97d869e","type":"trigger","z":"8f0283d1.757e7","name":"Send Stop to Volumio","op1":"stop","op2":"stop","op1type":"str","op2type":"str","duration":"250","extend":false,"units":"ms","reset":"on","bytopic":"all","topic":"topic","outputs":1,"x":860,"y":1040,"wires":[["e3569873.b84578"]]},{"id":"9b84c935.2d0cb8","type":"switch","z":"8f0283d1.757e7","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":650,"y":1040,"wires":[[],["88861e.97d869e","4fa1a359.c89fec","ed0ca7ee.ca2e58"]]},{"id":"3315aa79.ebfff6","type":"server-state-changed","z":"8f0283d1.757e7","name":"Porch Mode State Off","server":"97501cec.c3c92","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.output_063","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":140,"y":1040,"wires":[["9b84c935.2d0cb8"],[]]},{"id":"2c2d631.4d95f9c","type":"api-call-service","z":"8f0283d1.757e7","name":"Turn On Porch String Lights","server":"97501cec.c3c92","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.sonoff_1000d2b03c","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1280,"y":860,"wires":[[]]},{"id":"4fa1a359.c89fec","type":"api-call-service","z":"8f0283d1.757e7","name":"Turn Off Porch String Lights","server":"97501cec.c3c92","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.sonoff_1000d2b03c","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":880,"y":1200,"wires":[[]]},{"id":"da5337c6.2692e8","type":"trigger","z":"8f0283d1.757e7","name":"Set Porch Angel to Volume 60","op1":"60","op2":"60","op1type":"num","op2type":"num","duration":"250","extend":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":890,"y":760,"wires":[["6473cb60.dc84a4"]]},{"id":"6473cb60.dc84a4","type":"function","z":"8f0283d1.757e7","name":"Volumio Volume Function","func":"var vol = msg.payload;\n\nmsg.payload = {\n event: \"volume\",\n data: vol\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1270,"y":1020,"wires":[["e542ccca.cbcd2"]]},{"id":"224be521.75b39a","type":"inject","z":"8f0283d1.757e7","name":"Test On","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":350,"y":800,"wires":[["bc7f6575.19e688"]]},{"id":"4871eb96.bb6154","type":"inject","z":"8f0283d1.757e7","name":"Test Off","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":370,"y":1100,"wires":[["9b84c935.2d0cb8"]]},{"id":"ed0ca7ee.ca2e58","type":"trigger","z":"8f0283d1.757e7","name":"Set Porch Angel to Volume 20","op1":"20","op2":"20","op1type":"num","op2type":"num","duration":"250","extend":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":890,"y":1280,"wires":[["6473cb60.dc84a4"]]},{"id":"a2a121d8.b38e","type":"api-current-state","z":"8f0283d1.757e7","name":"Sun Below Horizon?","server":"97501cec.c3c92","version":1,"outputs":2,"halt_if":"below_horizon","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sun.sun","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":860,"y":840,"wires":[["2c2d631.4d95f9c"],[]]},{"id":"150cf551.11d6eb","type":"server-state-changed","z":"8f0283d1.757e7","name":"Porch Angel Volume Rotart","server":"97501cec.c3c92","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.porch_angel_volume","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"0","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"output_only_on_state_change":true,"x":890,"y":1360,"wires":[["6473cb60.dc84a4"],[]]},{"id":"fd6092b3.6a487","type":"trigger","z":"8f0283d1.757e7","name":"Send Stop to Volumio","op1":"stop","op2":"stop","op1type":"str","op2type":"str","duration":"250","extend":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":860,"y":1120,"wires":[["e3569873.b84578"]]},{"id":"9b887ff1.14f31","type":"server-state-changed","z":"8f0283d1.757e7","name":"Input Number","server":"97501cec.c3c92","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.porchangeltest","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"0","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"output_only_on_state_change":true,"x":830,"y":980,"wires":[["6473cb60.dc84a4"],[]]},{"id":"97501cec.c3c92","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true},{"id":"ec39db10.92fad8","type":"volumio-server","z":"","host":"192.168.1.51","port":"3000"}]