Need help to connect gateway to Node-RED



  • I would like to use Node-RED as my single home automation controller and use MySensors devices for monitoring/control. In the past few days I have managed to get Node-RED up and running on a Raspberry Pi and I also built a MySensors temperature sensor node on a Arduino and a MySensors WiFi gateway using a ESP8266 NodeMCU board.
    Now it is time to connect the gateway to Node-RED, but I have no idea how to accomplish this.
    I understand that there are "plugins" that should be available for the gateway to connect to various types of controllers, but I cannot find such a plugin to connect to Node-RED.
    Can someone show me a small example how to get a temperature reading from my sensor into Node-RED?
    And also, how to control a MySensors device (like a relay switch) from Node-RED?


  • Mod

    @tbowmo this is your chance to promote your latest node-red mySensors nodes 😉


  • Admin

    @willemx
    You can install node-red-contrib-mysensors, which includes a couple of nodes that makes life easier with node-red / mysensors, both with serial gateways, and with MQTT enabled gateways.

    For inspiration, you can take a peek at https://github.com/tbowmo/nodered-mysensors-flow.

    I can give some more hints later today, when I'm back home..



  • I did install node-red-contrib-mysensors and these nodes will indeed be very useful for me.
    However, the part I'm struggling with is how to get input into the mysdecode node. This input needs to come from the gateway of course, but I don't now how to make the gateway send this to node-RED. And also, I don't know what to do with the output of mysencode to get the data to the gateway.
    I understand that if I was using a MQTT gateway this would be easy, but I have a WiFi ESP8266 gateway (because I wanted my gateway to communicate wireless and I couldn't find a wireless MQTT gateway...)

    EDIT: I just did find a wireless MQTT gateway!
    It was somewhat hidden as an example sketch inside the Ethernet MQTT gateway. I will now install Mosquitto on my Raspberry Pi and try if I can get this wireless gateway to speak to Node-RED.
    Will report back...



  • I have the wireless gateway and Mosquitto running and now I can see the temperature readings coming into node-RED, nicely decoded through mysdecode.
    Thanks everyone for these amazing frameworks!


Log in to reply
 

Suggested Topics

  • 9
  • 3
  • 2
  • 2
  • 9
  • 5

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts