Multiple virtual nodes on a gateway



  • Hi,
    I have a very interesting challege.
    I run a Domoticz controller with a MySensors radio network connected through a serial gateway.
    Now I have a new group of temperature and humidity sensors connected to an Arduino nano. The Arduino is connected to the Pi and functions as a second serial gateway. (I cannot connect it through the radio network because of several other reasons)
    The main problem is with Domoticz. It handles temperature and humidity sensors in pairs. Pairs are connected with node-id. Now the serial gateway has only on node_id = 0. I would give different node_ids to the temp-hum pairs. Is it possible?


  • Mod

    @pvoj could you have mixed up childID and nodeID?

    Any MySensors node (not only the gateway) only has one nodeID. But sensors are presented with different childID.



  • Thanks for your reply!

    could you have mixed up childID and nodeID?

    I don't think so

    Any MySensors node (not only the gateway) only has one nodeID.

    That is the problem. The question is that can it have more in some cases?
    My sensors are connected to the gateway node via Bluetooth. Each of them has a separate battery level also. 🙂
    I would like to create different node_ids for all of the bluetooth sensors.
    Now I have 10 sensor_ids on the gateway node_id=0.
    I would like to create 5 node_ids with 2 sensor_ids each.
    I have tried to hack things and communicate with the controller without MySensors library but using the serial API. Unfortunately I have failed. It screwed up Domoticz in a minute.. 🙂 If there is no other solution I will have to work that way out.


  • Mod

    @pvoj thanks for explaining.

    In that case, this problem has nothing to do with your node being a gateway. The same problem would apply to any node that has multiple sensors.

    It seems very strange that Domoticz does this, but Domoticz is doing strange things in all sorts of ways. Maybe something can be changed in Domoticz to handle this case? Have you tried asking in the Domoticz forum?



  • @mfalkvidd thanks for the info
    I still prefer Domoticz to the rest. It's running 7x24 with a 1.5 MySensors network in the past 4 years. I just changed the old Pi B+ to a new one but just for fun.
    The next big project will be to migrate to MySensors v2.x.

    The main issue with Domoticz is that it has a temp+hum type of sensor and it pairs data automatically. If a temp and a hum data arrives from one specific id Domoticz will pair them. You cannot control this pairing. The problem raises when more temp and hum data comes from the same node.

    Thanks for the tip I will check out in the other forum.


  • Mod


  • Hardware Contributor

    Hello @pvoj, this looks like an interesting configuration, and probably the good way to manage that would be to have a "bluetooth" radio option in the gateway. It's a bit overkill for solving a Domoticz behavior, but that would be useful in the future as bluetooth sensors will get more and more available.
    Would you mind to share more information on your configuration on both gateway and nodes ?



  • @mfalkvidd tank you for the forum topics. I found the logic of grouping sensors in Domoticz. It quite logical. Now the temperature and humidity grouping works ok. 🙂
    Unfortunately I still have a problem with the battery levels. MySensors can report it only for a node. I have tried several sensor types like S_DIMMER, S_COVER and everything which has a V_PERCENTAGE variable. Of course any of them is grouped together with tem-hum. Now it's a bit messy, but at least it works.



  • @nca78 thanks for your reply.
    Since serial API protocol is very flexible and capable to solve this multi-node problem it could be used as the protocol between controllers and Bluetooth gateways. The only this has to be solved is to allow developers to create "dummy" nodes on the gateway node. If the Bluetooth receiver node (the mysensors gateway) detects a device (hum-temp device in my case) and identifies it using its mac address it should be connected to the controller as a node. This node can have sensors and other parameters like battery level. It's the same as in the MySensors network.



  • @nca78 about my gateways:

    1. an old gateway running on MySensors 1.5 for years now. There are several nodes and sensors connected through it like temperature sensors, relays, switches. It controls my heating system with heat pump, buffering, 18 circles of floor heating, garden irrigation, alarm system, and some lights just for fun.
    2. the new gateway is a gateway to a Bluetooth network. Since MySensors has a great serial API and I have some experience with it I preferred to use it without a radio. I also think that it will be an interesting way of development and it could help to make MySensors even more popular. I had an idea to fork the library but unfortunately I don't have the experience and time to make it in good quality. But I'm sure letting developers to build connectors to different protocols is a very good idea. Catching Bluetooth messages from the air and decode them (with some reverse engineering) to send it through the MySensors gateway is relatively simple compared to the bidirectional communications. Processing some simple sensor data is a good first step.


Suggested Topics

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts