Heartbeat Gateway
-
Hello,
this is my first post.
I have an Arduino Nano clone with an ethernet module working as stand-alone gateway. No node is connected. Everything works fine except the sendHeartbeat(); function.
I want to send every 5 minutes a heartbeat to the controller. In my case FHEM. But analysing with MYSController, no heartbeat is sent. Everything before and after ‘sendHeartbeat();’ is sent, but no heartbeat.
Is this a bug? Or should only the nodes send a heartbeat directly to the controller?
Thank you!
Regards
-
@sirben Welcome to MySensors! When talking about the heartbeat output - are you referring to the serial debug or tcp/ip output?
-
Hello again,
thank you.
I am talking about the tcp/ip output.
Checked with MYSController connected via IP address.
I also tried the Arduino Serial Monitor. But I don’t know how to geht the raw data, which have been send (for example heartbeat output).
Maybe, because no heartbeat is sent?
Thanks for your help!
Regards
-
Pretty strange symptoms.
Do you have the option to connect the GW via USB to check if you get the heartbeat messages there?Then we could try to dig deeper into that, if you get this message type over serial also. I'm pretty sure other type of GW's work at least closer to your expectations: I myself have different serial GW's and there's no issue in FHEM to request heartbeats from controller side.
Most likely also WLAN-GW's work as expected in this aspect, as FHEM-user Sidey, who has contributed the code for checking, if a GW is still connected, used heartbeat-requests for that purpose, and he's using ESP8266-based GW's.
So most likely this problem is limited to Ethernet GW's.
-
@sirben ok, this feature is currently disabled for GW-only with disabled transport network. I'll prepare a code update: https://github.com/mysensors/MySensors/pull/1273
-
@tekka WOW, thanks a lot! That was fast. How can I modify the library on my local machine to have the functionality?
@rejoe2 I also send a heartbeat-request with MYSController to the GW and the GW was responding.
I send via MYSController 0;255;3;0;18; and received 0;255;3;0;14; and all the other presentation messages.
It seems, that the function sendHeartbeat() is deactivated like tekka said.
-
@sirben You can download the library here: https://github.com/tekka007/MySensors/tree/GWonlyHeartbeat
-
@rejoe2 I also send a heartbeat-request with MYSController to the GW and the GW was responding.
I send via MYSController 0;255;3;0;18; and received 0;255;3;0;14; and all the other presentation messages.Ok, there's one possible additional thing you might test in FHEM: Most likely the heartbeat request is published under childID 0, not as in MYSController as broadcast (255). For testing, you might add
childID => 255,
somewhere in the get function (sendClientMessage(), at around line 356).
For all other Nodes, also childID 0 seems not to be an issue.
-
Hi @all
I modified the MySensorsCore.cpp as tekka did on Github.
Now my sendHeartbeat() is received by FHEM and it is working fine!
Thanks a lot to all!
@rejoe2
I just tested to send with MYSController 0;0;3;0;18; and the Gateway was answering like before.