IT WORKS! :D (my experience, suggestions, questions about protocols)



  • Hey guys,

    I write this because I loved how you guys setup this project - it felt much like installing Plex (https://plex.tv) - just a great experience from buying to assembling to running and in the end your life is better/easier.

    I've been playing a few days with the hardware and today could get a simple system to work.
    Yesterday night I thought I had a problem, because I couldn't understand the debug log [1], but today I took another approach and just tried to run (power-on) the 3 parts of the system (Temperature sensor node, ESP8266 gateway node, Domoticz) and, to my surprise, things just worked. After selecting the MySensors + LAN [2] hardware on Domoticz, my node appeared with its own name, and adding a temperature sensor, everything clicked, and I noticed that the protocol isn' t that simple, since there is all this discoverability going on.

    Comments in text:
    [1] the debug log format isn' t explained anywhere? I couldn't relate it to the message structure in the docs.
    [2] would be nice if on the ESP8266 page you guys would explain this, many people will miss it

    Suggestions:

    • the website is GREAT, but a little overwhelming to navigate, and some information is a little bit hidden.
    • ex: esp8266 gateway appears on the side bar but not on the body of this page: https://www.mysensors.org/build/select_gateway
    • I think Getting started should be a tutorial with all the steps to build the thing. (one node, one gateway, one controller). I felt guided when connecting the sensors, but later I felt on my own, afraid, hehe
    • Just hand hold me in the later stages as well ("now you have a node, now you have a gateway, lets install domoticz to test it, turn on both the node and the gateway, yay it works!")
    • no information on how to connect battery to Arduino Pro mini, again, this might be obvious for some of you, but not to me.
    • it would also be important to tell the user he can see debug logs (serial) from two nodes if he uses an external terminal like Putty or whatever is on linux. The IDE doesn't let you do it. (its kinda tragic how beginner-friendly the Arduino IDE is - its great when you get started, or for non-programmers playing with Arduino, but later one would like more options, manage your several boards, and in this hideous thing you can't even change tab size...)
    • I understand writing documentation is hard and boring, and sincerely you guys are already doing a great job.

    Questions:

    • since I was kinda surprised on how easy it worked when I turned everything on, I'd love to understand more about the Mysensors plugin on the controllers and the gateway - what messages are exchanged? how does it worked?
    • what messages does the node/gateway send when booting up? Is there a state machine drawn somewhere?

    In short:
    This project is a great idea, greatly implemented, with a beautiful website, and the code seems to work very, very well. The API is clear and amazingly more friendly than libraries written for the web or something.

    I'd love to know more about the internals of MySensors and home automation in general.
    For example, I'd love to write a mini-controller to understand how it works. Where would I get started?
    If you guys from MySensors start to document all of this, you will for sure become THE reference for DIY home automation (I guess you already are in part), just like StackOverflow is for general programming. This site has lots and lots of potential to grow even more!
    Congratulations!


  • Admin

    The serial API (glue between gateway/controller) is documented here:
    https://www.mysensors.org/download/serial_api_20
    You can see the messages sent at boot in the serial console. It's just sends the presentation and controller usually transmits unit configuration back to node. (Unless node requires an id which takes place prior to this.)

    Suggest you have a look at the (somewhat outdated) sample controller to get started
    https://github.com/mysensors/MySensorsSampleController


 

252
Online

7.8k
Users

8.7k
Topics

93.1k
Posts