Can anyone help me get this script to work through node red? Or if you know another way, via node red, I can set the same things in MQTT, that the script is setting; Id be open to that as well.
I have the following script in HA created by petro for setting inovelli light strips
alias: zwavejs2mqtt_mqtt_set_config_parameter
description: Publishes to ZwaveJS2MQTT
fields:
node_id:
description: Zwave Node Id
example: 3
parameter:
description: Parameter to be set.
example: 4
value:
description: Value to be set for the parameter
example: 256
bytes:
description: 'Size of parameter (1, 2, or 4)'
example: 4
variables:
payload:
args:
- nodeId: '{{ node_id }}'
commandClass: 112
property: '{{ parameter }}'
- set
- '{{ [ parameter, value, bytes ] }}'
sequence:
- service: mqtt.publish
data:
topic: zwave/_CLIENTS/ZWAVE_GATEWAY-Mosquitto/api/sendCommand/set
payload: '{{ payload | tojson }}'
mode: single
If I want to set parameters on my light strip, I can run this service, that uses the above script to set parameters…
But when I try to run the script in node red and set the parameters in the data field, I get API errors.
[{"id":"eb6ea691.7a3738","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"87231d56.d432a","type":"inject","z":"eb6ea691.7a3738","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":930,"y":120,"wires":[["215351e0.e4b19e"]]},{"id":"215351e0.e4b19e","type":"api-call-service","z":"eb6ea691.7a3738","name":"","server":"817e283a.e704f8","version":1,"debugenabled":false,"service_domain":"script","service":"turn_on","entityId":"script.1614522886816","data":"{\"node_id\":12,\"parameter\":30,\"value\":196863,\"bytes\":4}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1200,"y":120,"wires":[[]]},{"id":"817e283a.e704f8","type":"server","name":"Home Assistant","addon":true}]