Multiple gateways on RPI3



  • I want to setup a mysensors network to use with domoticz. I run domoticz on a Rpi3.

    My old sensor network runs on i2c and 1-wire, which i wish to convert to a MySensors network using RS485 between the nodes. New nodes will be connected by RF using NRF modules.

    I have read the wiki which specifies how to connect the nrf module directly to the raspberry pi and how to compile the MySensors gateway code for this. For RS485 however, the wiki only talks about using a serial gateway node with an arduino.

    My questions are :

    • Can i create a RS485 gateway on the RPI3 using it's serial port + a RS485 transceiver like the max485 ?

    • How do i compile and run the Mysensors gateway software on the raspberry to enable both the RS485 and NRF gateway functions ?

    • Will domoticz accept this setup ?


  • Mod

    • Can i create a RS485 gateway on the RPI3 using it's serial port + a RS485 transceiver like the max485 ?

    Probably. But connecting an Arduino with the serial gateway sketch to the usb port on the rpi might be easier.

    • How do i compile and run the Mysensors gateway software on the raspberry to enable both the RS485 and NRF gateway functions ?

    They would be two separate gateways. A gateway can only use one protocol.

    • Will domoticz accept this setup ?

    Domoticz can use multiple gateways so yes you can connect one that talks rs485 and one that talks nrf24l01.



  • I understood that so far.. my problem is how to set this up to run on the raspi itself..

    i can configure a gateway to work with the nrf and compile that.. but how to setup the second one ? copy the mysensors code to a separate directory and compile it to a new name ?



  • So first i pull the mysensors code from github to my raspberry pi.

    For running a mysensors gateway node on my raspberry pi using RS485 for transport i would then set it up with :+1:
    ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSBMySGW1 --my-transport=rs485 --my-rs485-serial-port=/dev/ttySC0 --my-rs485-baudrate=19200 --my-rs485-de-pin=23

    Then make and make install that gateway and voila..

    I can do the same for an RF based gateway running on the raspberry pi itself using a directly connected NRF module, which would recreate the mysensors files and install those. Which means i have either the RS485 or the RF gateway. Not both at the same time.

    My point is, how to set this up properly so i can compile 2 mysensors gateway instances on the same raspberry pi and run them at the same time. 1 for RF and one using RS485 ???


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.