Diving into MySensors and Home Assistant



  • Hello,

    I am starting out with MySensors and have lots of questions. After lots of reading I guess MySensors was initially designed for efficient traffic flow on low power radio links connected to a gateway and then to a controller. As far as i can tell, the principle still applies.

    Here's what I have in stock:

    (2) Vera 3 Controllers , one is live and used in the traditional way via ZWave. The other is a spare.
    So far, I tried using a Moteino as the gateway to Vera but the serial/USB problem arises. I'm aware of my options, change to serial or ethernet gateway or have the micasaverde folks fix my serial/usb ports.

    (2) Moteino USB's with RFM69HCW. (https://lowpowerlab.com/shop/product/100)
    (2) ESP8266 Module ESP-12E NodeMcu LUA WiFi (https://www.amazon.com/Makerfocus-ESP8266-ESP-12E-Internet-Development/dp/B01IK9GEQG/ref=sr_1_4?ie=UTF8&qid=1490623311&sr=8-4&keywords=nodemcu)
    (2) Adafruit Feather M0 RFM69HCW Packet Radio - 868 or 915 MHz (https://www.adafruit.com/products/3176)
    (1) Raspberry Pi 3 with HA 0.42 via Raspian Jessie and the All in One Install

    I guess what I'm having trouble with is the gateways and deciding which way to go. I want to control and automate the usual stuff around the house that I'm currently using Vera for and a for a motorhome.

    I'm aware of MQTT and it's already installed and working on the Pi (yaml) but it's the integration of WiFi/Radio -->Gateway-->MQTT process that's making my head hurt right now.

    For instance, for Vera, to integrate Arduino like nodes am I limited to an ethernet gateway with NRF24L01+ so that only nRF24L01+ nodes can be controlled?

    And for Home Assistant, can a NodeMCU with WiFi act as the gateway to HA and MQTT ? I guess I need a high level explanation of how to glue these things together. I have the Arduino IDE, Putty, WinSCP, Samba all ready to get started with a little help, Thanks


  • Mod

    I think you can have more than one gateway connected to home assistant, so you are not necessarily bound to just one type of radio.
    If you look at the examples of the mysensors library, you will see there are 3 for ESP8266 and one of which is for MQTT. Also keep in mind that you can compile and run a gateway on the rpi that can save you from additional hw.


  • Plugin Developer

    @kincaidj001

    Home assistant supports serial, ethernet and mqtt gateways. You can have multiple gateways connected to home assistant at the same time.

    The gateway connection type decides how the controller should communicate with the gateway, but it doesn't change the mysensors serial API. Messages between gateway and controller will still have the same structure. They will just be sent over different transport protocols.

    The controller doesn't care about what type of device is on the other end, it only cares about the transport protocol and the serial API to use for messages.

    Regarding choosing gateway type, I suggest you try something and see how it works for you. Since you already have mqtt set up you could start with the ESP and try connecting it via Wifi+mqtt.

    A serial gateway is probably the easiest to set up. Just take care to match baud rate settings on device with controller, depending on what device you chose as gateway.

    Read more on the mysensors site.


Log in to reply
 

Suggested Topics

  • 1
  • 5
  • 1
  • 3
  • 17

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts