Page 1 of 1

Question about Node-red serial input > Mqtt > Domoticz

Posted: Tuesday 14 March 2017 7:23
by aee74
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.

Re: Question about Node-red serial input > Mqtt > Domoticz

Posted: Tuesday 02 May 2017 4:03
by MYLE
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