openHAB MQTT Ethernet Gateway & ESP-01?



  • Hi,

    So my plan was to run openHAB as the controller, with MQTT on an Arduino Gateway using a Wiznet Ethernet 5100 shield and then talking with the nodes throughout the home via the ESP8266 ESP-01 wifi module.

    Parts used:

    • Where I buy my parts - REMOVED

    • Ethernet Shield - REMOVED

    • WiFi module - REMOVED

    But the guide is written for the ESP8266 nodemcu and the pin outs do not match at all.

    Suggestions?


  • Admin

    Welcome to the MySensors community.

    The MySensors gateways can't act as a IP relay. So each gateway/node that terminates in IP have to communicate directly with your controller or MQTT broker. If you start add NRF24/RF69 nodes, they can all communicate through one of your ethernet gateways though.

    As this is your first, we're pretty restrictive on linking to external sites (SPAM). I've removed them from your post as they didn't really add any information.

    I haven't actually tried running MySensors on the ESP-01. But it should work. It is a little restrictive on the number of GPIOs exposed though. Certainly not enough pins to add a NRF radio (act as gateway/repeater).



  • Hi, the reason I listed those links was to show you the modules I have, and that is the store which I bought them from, I thought maybe someone could suggest an alternative module.

    I am not quite sure I understand your first paragraph, could you explain a bit more? It sounds as though you are telling me I should do what I am already planning to do.

    I am not planning to use only the ESP-01 by itself, considering I can buy Uno's for about $10 and the wifi module for $9 plus a sensor for $5 it is cheap enough to have uno's for each room.

    0_1457778335548_20160312022452.jpg


  • Admin

    You should actually run the MySensors library IN the ESP module, the Arduino is not needed on those nodes. Using the Serial AT-interface is currently not supported (It's infamous for being very unstable).

    So, your setup should look something like this:

    0_1457779919202_20160312_114030.png



  • @hek Ok so I have to either buy a ESP8266 module with more pin outs or buy the programming board for the ESP-01 in order to make this work?


  • Admin

    Yes, I bough one of these a few months ago:
    http://www.ebay.com/itm/ESP8266-ESP-01-Programming-and-Development-Tool-Board-Auto-reset-/321830899735?hash=item4aee9dd017
    ...but I haven't had a chance to test it yet.

    But I'd probably recommend the NodeMCU board.




  • Admin

    Absolutely, also works!

    Or using a FTDI board if you got one.



  • @hek Awesome, so after the ESP-01 is ready to go, am I still able to use the my sensors library? And the guide on building the MQTT gateway?


  • Admin

    I haven't tried it myself on an ESP-01. But yes, in theory 😉

    And use the development branch, which support turning off the NRF radio driver which is needed in your case.



  • Great, I'll let you know the results once I figure it all out. Thank you for your help 🙂



  • Ok so I have an update:

    OpenHAB and MQTT are both up and running perfectly along with the Ethernet Gateway. 😄 Everything is talking to each other.

    Now, I want a ESP-01 on the Ethernet shield to send commands to other Arduinos with an ESP-1. I am able to send/receive data from MQTT and the Ethernet but I am not sure how to write the Gateway sketch to receive a command via Ethernet from MQTT and then to send it via WiFi ESP-01 to another Arduino with a WiFi ESP-01.

    Suggestions?

    I know it is possible somehow, but I just can't find anyone else who has done this. The ESP-01 is the cheapest and most accessible module, I really dont want to use anything else.


Log in to reply
 

Suggested Topics

  • 87
  • 7
  • 5
  • 2
  • 8
  • 10

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts