Sensebender micro as serial gateway: transmit data?



  • Hi, I'm new to mysensors, and maybe I'm missing something, but is there an example of a serialgateway that itself acts as a SensebenderMicro sensor and transmits its temperature and humidity sensor ?
    It would seem possible to merge the code from serialgateway and SensebenderMicro, but not completely straightforward either for a beginner.
    Thanks,

    Nicolas



  • @nsom67

    Are you interested in using a sensebender as a serial gateway or just interested in adding temp and humidity sensors to your gateway? The latter option is possible under the development branch by adding the coding bits regarding the temp/hum sensor to the Serial GW sketch. I would recommend against, however, as it could interfere with the gateway's primary function (e.g. missing messages) while processing sensor routines.

    The sensebender was designed for battery operation and it's use as a powered gateway would nullify the design innovations and would most likely require additional power regulation for stable operation. The only benefit, as I can see, would be the built-in ATSHA204 for security.



  • Hi,
    Thank you for your answer.
    I understand that the sensebender is intended for battery operation. Simply I only have 1 NRF transceiver for now and while waiting for other ones to arrive I was curious to try to connect the sensor to my controller and get data directly from the gateway. At the same time it helps me understand the messaging system a bit better.
    About the dev branch, are you talking about this example ?
    https://github.com/mysensors/Arduino/blob/development/libraries/MySensors/examples/GatewaySerial/GatewaySerial.ino
    Because this file does not seem to be doing anything, all the loops are empty.
    Thanks,
    Nicolas



  • @nsom67

    Yes, that is the serialGW sketch. In the development branch, the setup and loop are blank because everything is handled by the libraries in the background. To make a serialGW with sensors, you add the sensor specific code from the applicable sensor sketch to the defines, setup, presentation and loop sections of the GW sketch. In your case, you can even comment out the rf24 bits of the GW sketch and not attach the radio as you don't have anything for the gw to talk to.

    Upload the modified sketch and connect by serial adapter to your controller and test it out. Personally, I would wait and use a nano as a serial gateway and stick with the master branch until you get comfortable with MySensors.



  • OK thanks for your help and advice,
    I had a quick look at the librairies behind but indeed it was not straightforward to see where the things happen in the background.


Log in to reply
 

Suggested Topics

13
Online

11.4k
Users

11.1k
Topics

112.7k
Posts