Announcement

Collapse
No announcement yet.

MQTT-plugin sending string On/off, not 0 or 1 to Node-red

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MQTT-plugin sending string On/off, not 0 or 1 to Node-red

    I've been working on my heating project this weekend, but I am stuck at the moment. I hope it is a simple setting somewhere I have missed, and some one can give me a clue how to solve this.
    I'm running mscMQTT on Homeseer, and MQTT with Node-Red in a Raspberry PI. In the screen shot below, the blue boxes are working. When clicked they transmit 1 and + to the relay switch, turning it on and off.


    Click image for larger version

Name:	Skjermbilde2.PNG
Views:	15
Size:	34.3 KB
ID:	1245195

    However, when turn it on or off from HS it does not work. Error message from Node-Red.
    It seems the message is text, not 1 or 0.
    Click image for larger version

Name:	Skjermbilde3.PNG
Views:	10
Size:	4.0 KB
ID:	1245196


    Device options, can I change anything here to make it work?
    Click image for larger version

Name:	Skjermbilde1.PNG
Views:	14
Size:	85.4 KB
ID:	1245194


  • #2
    Try adding $$value: as the Publish Payload Template. The default is the label which will be On or Off.

    Comment


    • #3
      It seems it still sends a string, it also adds a lot more to the VSP list:

      Click image for larger version  Name:	Skjermbilde4.PNG Views:	1 Size:	25.3 KB ID:	1245204
      Last edited by HAorso33; September 2nd, 2018, 01:40 PM.

      Comment


      • #4
        Missing a colon ":" after the $$value, but I dont understand why VSP list changed.unless these were received from mqtt messages. They can be deleted by entering the label in the text box below them. If you do not have success then a work around is to change from Button to Number. This will give you a different UI if you are trying to control from HS GUI.

        Comment


        • #5
          Thanks, the colon ":" did it, I think! It seems to be working now

          Comment

          Working...
          X