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 ?
-
-
- 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
./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=23Then 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 ???
Suggested Topics
-
Over the air updates
General Discussion • 23 Mar 2014, 21:38 • ToSa 1 Mar 2015, 11:21 -
Newbie questions
Hardware • 14 Feb 2025, 20:03 • magwas 14 Feb 2025, 20:03 -
Best VOC sensor for detecting a wide range of VOC's?
Hardware • 26 Oct 2023, 23:59 • NeverDie 18 Nov 2023, 01:41 -
"Remote Irrigation with LoRaWAN: LM27313 Challenges and PCB Design"
Hardware • 24 Jan 2024, 23:06 • wrendral 3 Feb 2024, 07:13 -
hlk-pm01 are to noisy for rfm69?
Hardware • 5 Aug 2023, 21:16 • Tmaster 9 Aug 2023, 16:28 -
Does MySensors require Arduino Timer 2?
Hardware • 6 Jan 2024, 19:39 • OldSurferDude 11 Jan 2024, 04:39