Node with two transport layers: RS485 & Bluetooth?



  • Hi,

    i am developing a wired RS485 environmental sensor node for our rooms at home, using the BME680 to measure temperature, humidity, air quality and additional sensor for light intensity and an LED as a night-light.

    The prototype is based on a ESP32 and is currently working well. The sensor nodes should later be hidden in flush-mounted boxes and are powered by 24V.

    As the esp32doit-devkit-v1 also supports WLAN and Bluetooth, I am wondering, if I could use the Bluetooth and the RS485 connections for future applications in parallel. Possible use cases would be a RS485 to BT relay to control Philips HUE lights or just use the BT to act as a relay in a mesh.

    Enabling both interfaces in my code

    #define MY_RS485
    #define MY_RADIO_RF24
    

    results in

    error: #error Only one forward link driver can be activated
    #error Only one forward link driver can be activated
    

    Are these use cases somehow possible?

    Martin


  • Mod

    @mkaiser RF24 is not wifi (and it is not bluetooth).

    What you want can be done, but not using rf24, and not using a MySensors transport.

    Sensors can be connected in many ways. Bme680 uses SPI or I2C. Some sensors (like Philips HUE) use their own protocols. All can be presented through the same MySensors functions.



  • Hi mfalkvidd,

    thanks for your answer. Today I realize, that I must have been very confused yesterday and mixed up some things and wrote some BS....

    To clarify for me and others: The ESP has built-in BT and Wifi interfaces. There are no additional nordic NRF whatever peripherals 🙂

    Also the Philips Hue uses Zigbee, which is not Bluetooth-compliant.

    However are there more examples how to use the ESP32 in a MYSensors environment? Could not find much about the interfacing between Node and Gateway...


  • Mod

    I have not used ESP32 with MySensors myself, but @freynder has shared https://github.com/freynder/ESP32-MySensors-Gateway which might be a good resource.

    ESP32 is not very suitable for battery powered nodes, but except that it should work the same way as most other Arduino-compatible boards so most of the normal examples should work.

    The interface between a node and a gateway is the present and send functions. At https://www.mysensors.org/build you'll find multiple examples with wiring instructions and example code. If you haven't already, start with the getting started guide which will explain how MySensors works.


Log in to reply
 

Suggested Topics

9
Online

11.4k
Users

11.1k
Topics

112.7k
Posts