Yet another MQTT gateway for MySensors :)



  • Hi,

    Just wanted to give an early "heads up" of a gateway I'm creating in order to have the wonderful world of MySensors at home with a RabbitMQ server and openHAB as HA controller. I wrote the following blog post on http://blog.scurb.se/homeautomation/my-own-mysensors-gateway/.

    I had no intention to write this post as a "advertisement post", I hope it was not taken as such. I'm about to clean up and prepare the project in order to publish on GitHub.

    Best regards,
    Patrik


  • Admin

    @scurb

    Patrik, looks great! 👍


  • Mod

    @scurb Any reason why you chose RabbitMQ? Did you try e.g. Mosquitto?

    Nice work btw (impressive file structure!)



  • Thanks for the positive response!

    @Yveaux - RabbitMQ was my choice primarily because of:

    • I have other applications using AMQP protocol and Rabbit supports multiple protocols (amqp, mqtt, xmpp etc)
    • I previously worked with RabbitMQ so it was less "unkown" among the many brokers.
    • I like the possibility of setting up central services as active/active and active/passive nodes. Even though I haven't the actual need for such a high availability solution at home 😉

    However, the application should be broker agnostic and support to connect over MQTT no matter which message broker used.

    /Patrik


  • Mod

    @scurb said:

    However, the application should be broker agnostic

    Of coarse, but I just wondered how you came to select that broker. I only used mosquito so far.


  • Hero Member

    @scurb This looks very interesting and my factor now to save me from having to create my own :-). I have been planning to do the same thing (although maybe on a smaller software scale) by writing a simple Python server that would pull serial packets off of a gateway arduino (either running mysensors or something I write myself) and pipe this through MQTT to openHAB. I have two questions:

    1. How do you interface with a sensor network? Do you go through a serial connection to read the serial packet format (a,b,c,d)? I see several implementations that put the mqtt client directly on the Arduino, but it seems much cheaper for me to just plug it into a USB port to get a virtual serial port instead of investing in a separate ethernet shield 🙂

    2. How does an item configurations look like for a switch in openHAB? I'm looking to build a toggle switch which toggles light on or off every time it is activated, and I cannot really understand how to configure the switch to allow this behaviour for an mqtt input.

    Feel free to take the second question with me directly since this might not be very interesting to the others in the forum 🙂


Log in to reply
 

Suggested Topics

11
Online

11.4k
Users

11.1k
Topics

112.7k
Posts