Multiple Mysensor Gateway



  • I have Mysensor 2 running on Raspberry Pi along with Home Assistant in my house. Now I haven't used encryption or signing till now, but I am planning to do so. Now the problem is 2 of my neighbors want the same kind of devices installed in their houses but when I tried to add another gateway to one of the house, the sensor got paired with mine and sometimes the lights with same node ID in both house randomly turns on.

    How do I differentiate both houses like can I define some hardware address for parent like MAC address on wifi, or something else can be done so that all three gateway and sensors work independently?


  • Mod

    @ayuclack I'm guessing you are using nrf24 based on yout earlier posts.

    Use a different MY_RF24_CHANNEL for each network.



  • @mfalkvidd said in Multiple Mysensor Gateway:

    @ayuclack I'm guessing you are using nrf24 based on yout earlier posts.

    Is there any way that Gateway can scan for channels that are being used and switch to a free channel. Or I was thinking to use signing so that data from and to other nodes of the different house won't be usable for the gateway and thus no Interference.


  • Contest Winner

    @ayuclack why not dedicate each network to a separate channel?
    Using signing will enable your gw to reject messages from unknown nodes, but it will not prevent them from flooding your gw with irrelevant communications.


  • Mod

    @ayuclack people have built scanners, but all nodes in the entire network would need to agree on and change channel at the same time. That's quite hard, especially with nodes that sleep. MySensors is not design to switch channel on the fly.

    Using signing with different keys might work, but there would be a lot of confusion with failed signing messages trying to compete with successful messages and acknowledgements. Troubleshooting communication problems in such a scenario would be a nightmare.



  • @mfalkvidd said in Multiple Mysensor Gateway:

    @ayuclack people have built scanners, but all nodes in the entire network would need to agree on and change channel at the same time. That's quite hard, especially with nodes that sleep. MySensors is not design to switch channel on the fly.

    So whats the best way, ie I don't want to change channel of each nodes and write channel ID for each devices in each house, I was trying to build a solution as in you have a Raspberry Pi based hub ( Gateway ) with signing , you press the inclusion button on the hub to pair a device, and then the gateway and it nodes would be able to create their own network, so that in theory the devices can work independently in lets say 10 or more houses in the same area.


  • Mod

    @ayuclack to my knowledge, nobody has developed such a solution. I don't know how to do it.



  • I was thing if it would be possible to use something like wifi, where you have a mac address defined so our gateway address could be changed to something unique and nodes would be able to pair to them.



  • Hey, @mfalkvidd so I was looking into the library doc and was wondering to use #define MY_RF24_BASE_RADIO_ID to give each house a unique base radio ID. Would that work?


  • Mod

    @ayuclack yes it would. But I don't see how doing that is easier than setting MY_RF24_CHANNEL


 

386
Online

7.4k
Users

8.3k
Topics

89.7k
Posts