Node to node communication fails if gateway is not reachable
-
for info, thanks to @tekka, he prepared a PR to address node to node communication, and make you happy ;)
https://github.com/mysensors/MySensors/pull/1174So
- you can try berkseo implementation but like I said above, maybe it will be broken in future, who knows.. as it's using internal mysensors api (not the end user api).
- or try tekka work and feedback (from a end user point of view, you just have to add same changes in your files as those this PR) https://github.com/mysensors/MySensors/pull/1174/files
Btw, not sure if it will work with signing (whitelisting etc), and if not, not sure when.. but plz feedback!
-
for info, thanks to @tekka, he prepared a PR to address node to node communication, and make you happy ;)
https://github.com/mysensors/MySensors/pull/1174So
- you can try berkseo implementation but like I said above, maybe it will be broken in future, who knows.. as it's using internal mysensors api (not the end user api).
- or try tekka work and feedback (from a end user point of view, you just have to add same changes in your files as those this PR) https://github.com/mysensors/MySensors/pull/1174/files
Btw, not sure if it will work with signing (whitelisting etc), and if not, not sure when.. but plz feedback!
@scalz Thanks for the info. I do not understand much of the software, but I would prefer the second solution as far as it will be integrated in the release. Using an internal API is unacceptable.
But what about the case that the gateway is not reachable and the direct node also but a repeater inbetween could serve it? -
for info, thanks to @tekka, he prepared a PR to address node to node communication, and make you happy ;)
https://github.com/mysensors/MySensors/pull/1174So
- you can try berkseo implementation but like I said above, maybe it will be broken in future, who knows.. as it's using internal mysensors api (not the end user api).
- or try tekka work and feedback (from a end user point of view, you just have to add same changes in your files as those this PR) https://github.com/mysensors/MySensors/pull/1174/files
Btw, not sure if it will work with signing (whitelisting etc), and if not, not sure when.. but plz feedback!
@scalz
The thing is, I don't change anything in the library, I just use some things from there. In theory, this should not change. But I agree that this is not quite reliable, as it can be renamed. BUT.. I did this when I first came out 2.0, now 2.3.1 and still it works. I use two things. On-the-fly spoofing parentID and a feature with a set of parameters that does roughly the same thing as a passive node, but all the proof-of-delivery work. This works like this: if the gateway is OK then work through it, if there is a problem with the gateway then the nodes work directly. If the gateway is back online then the nodes build a new route and work again through the gateway. Your previous posts have brought me to new thoughts. Because my solution works very well in a direct exchange between two nodes. Now I want to expand the functionality and make such a transition from node to node and worked through repeaters. @tekka solution is good, but not sufficient.And most likely I will recommend the сreator of this theme to use your solution if it suits him. My research is rather experimental, this is what I would like to see in mysensors. But studying my experiments, I think, will be useful, because it works ... work well.
-
@berkseo
as OP asked for a end user solution, I can't give a better answer than what I already said.
I didn't say you changed lib nor it doesn't work (in all cases, with signing etc?).
and as you noticed, it works in 2.x. Maybe things will be different for 3.x in future, in case transport layer etc is revamped..But most important is to use what fit your needs. and of course then to be able to maintain it in long term. less easy for endusers with less programming skills.
Anyway thx for sharing.@Heizelmann
if node2node not in range, it should try to find a parent I think. but then i've not tested. -
@berkseo
as OP asked for a end user solution, I can't give a better answer than what I already said.
I didn't say you changed lib nor it doesn't work (in all cases, with signing etc?).
and as you noticed, it works in 2.x. Maybe things will be different for 3.x in future, in case transport layer etc is revamped..But most important is to use what fit your needs. and of course then to be able to maintain it in long term. less easy for endusers with less programming skills.
Anyway thx for sharing.@Heizelmann
if node2node not in range, it should try to find a parent I think. but then i've not tested.My scenario is as follows: A sensor node should report directly to a actuator node wether the gatway or any repeater are on or off. Both nodes should communicate bidirectonal to the gateway if available some different messages. Can anyone give me as an end user a simple example code for the both nodes?
-
My scenario is as follows: A sensor node should report directly to a actuator node wether the gatway or any repeater are on or off. Both nodes should communicate bidirectonal to the gateway if available some different messages. Can anyone give me as an end user a simple example code for the both nodes?
@heizelmann while it is a valid use case, it is not how MySensors was designed. MySensors uses a tree topology, and if the root of the tree (=the gateway) is gone, there is no way to route the messages.
Supporting the use case would be nice, but changing the topology will require a lot of work deep inside the MySensors library.
-
My scenario is as follows: A sensor node should report directly to a actuator node wether the gatway or any repeater are on or off. Both nodes should communicate bidirectonal to the gateway if available some different messages. Can anyone give me as an end user a simple example code for the both nodes?
-
@heizelmann have you tried to use it normally in order to check the long term stability before going trough all that trouble?
For me, node to node communication is a must have for a reliable secure home automation system. E.g. if a PIR sensor node detects motion, a lamp actuator on a different place should switch on the lamp quickly even if the gateway is off. May be mySensors is the wrong choice for this domain.
-
For me, node to node communication is a must have for a reliable secure home automation system. E.g. if a PIR sensor node detects motion, a lamp actuator on a different place should switch on the lamp quickly even if the gateway is off. May be mySensors is the wrong choice for this domain.
@heizelmann said in Node to node communication fails if gateway is not reachable:
May be mySensors is the wrong choice for this domain.
This is not so, you are in the right place :), do not leave here, this project has excellent prospects. Mysensors is still evolving, who knows what awaits us in version 3.0 for example. For me, uninterrupted communication between nodes is as important as it is for you. This is a fundamentally important thing that should be. For myself, I decided it, respectively, and for you it is also solved.
-
the Node To Node must be seen as a Gateway to node :)
the controller is not mandatory.
so we rethink the topology.Gateway (node0) <---> Node1 <---> Node2 <---> 3.. 4...
The Gateway in 2022/2023 must be used, how to do!!?!! ...... a Node Useful :)
(yes an old message, but to refresh the ideas )
happy holidays to you all