I'm triying out with a project where i connect the serial printer port output from my alarmpanel to a node-red serial input. From there I want to read these values per sensor in domoticz. The serial input works and I have installed the mqtt broker. In domoticz I've created a hardware input for mqtt.
I created dummy devices for the alarm inputs.
I have a node red flow (created for openhab) which works in openhab. But how do I make node red talk to Domoticz.
How should a function in node red look like to inject via mqtt to domoticz?
The output of the function in the log of domoticz shows:
Domoticz/in message: idx : 80, nvalue : 0, svalue : "1"
Error mqtt invalid data
This it where the project stops!
How do I get the state of a detector in domoticz.
Question about Node-red serial input > Mqtt > Domoticz
Moderators: leecollings, remb0
-
- Posts: 5
- Joined: Saturday 18 February 2017 14:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Question about Node-red serial input > Mqtt > Domoticz
- Attachments
-
- IMG_1032.PNG (233.55 KiB) Viewed 1441 times
Re: Question about Node-red serial input > Mqtt > Domoticz
Think the payload line is wrong drop everything before the idx I think you mite have to add some {} to the front and end I'm just getting my head around it to
I would try some like
'payload' :"{idx: "+IDX+" ,nvalue:"+0+,svalue:""'"+sta_stat+
if you still getting errors think it could them be the the "" and the ' I hate dealing with the quots i always get lost LOL
read some where
the payload of -m should be in this format
'{ "idx" : 29, "nvalue" : 1, "svalue" : ""}'
hope this helps
I would try some like
'payload' :"{idx: "+IDX+" ,nvalue:"+0+,svalue:""'"+sta_stat+
if you still getting errors think it could them be the the "" and the ' I hate dealing with the quots i always get lost LOL
read some where
the payload of -m should be in this format
'{ "idx" : 29, "nvalue" : 1, "svalue" : ""}'
hope this helps
Who is online
Users browsing this forum: No registered users and 1 guest