Converting a sketch from 1.5.x to 2.0.x
-
@martinhjelmare
Thanks Martin.I uploaded the GatewaySerial to the arduino working as gateway, but if I upload the sketch and I open the monitor, I obtain this error:
0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
0;255;3;0;9;TSM:INIT
0;255;3;0;9;!TSM:RADIO:FAIL
0;255;3;0;9;!TSM:FAILURE
0;255;3;0;9;TSM:PDTWhat does it mean?
@Maurizio-Collu said:
@martinhjelmare
Thanks Martin.I uploaded the GatewaySerial to the arduino working as gateway, but if I upload the sketch and I open the monitor, I obtain this error:
0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
0;255;3;0;9;TSM:INIT
0;255;3;0;9;!TSM:RADIO:FAIL
0;255;3;0;9;!TSM:FAILURE
0;255;3;0;9;TSM:PDTWhat does it mean?
@tekka knows this best, and he wrote a post explaining some of those messages here:
https://forum.mysensors.org/topic/4347/can-t-get-sensors-talking/3 -
@Maurizio-Collu said:
@martinhjelmare
Thanks Martin.I uploaded the GatewaySerial to the arduino working as gateway, but if I upload the sketch and I open the monitor, I obtain this error:
0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
0;255;3;0;9;TSM:INIT
0;255;3;0;9;!TSM:RADIO:FAIL
0;255;3;0;9;!TSM:FAILURE
0;255;3;0;9;TSM:PDTWhat does it mean?
@tekka knows this best, and he wrote a post explaining some of those messages here:
https://forum.mysensors.org/topic/4347/can-t-get-sensors-talking/3@martinhjelmare Thanks a ot.
Is there any guide/manual where all these messages are explained?Plus, is there anywhere written what all these terms mean?
TSP:MSG:SEND 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=ok:
Kind Regards
-
@martinhjelmare Thanks a ot.
Is there any guide/manual where all these messages are explained?Plus, is there anywhere written what all these terms mean?
TSP:MSG:SEND 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=ok:
Kind Regards
-
@Maurizio-Collu do you mean except the link martinhjelmare provided?
@mfalkvidd Yes, basically this part (I'm sure it is explained somewhere, but I can't find where)
255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=ok:
SOrry for my newbieness...
-
@martinhjelmare Thanks a ot.
Is there any guide/manual where all these messages are explained?Plus, is there anywhere written what all these terms mean?
TSP:MSG:SEND 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=ok:
Kind Regards
@Maurizio-Collu Yes, the doc is in preparation, the meaning of these messages is described here (this is a PR that harmonizes the log message and will be pushed to 2.0.1).
In brief:
TSP:MSG:SEND 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=ok:TSP:MSG:SEND refers to message sending function in the transport state machine
255-255-0-0 is the routing information, i.e. sender-last-next-destination
s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=ok:
- s=sensor ID (255 = internal)
- c=command (3 = C_INTERNAL)
- t=type (3 = I_ID_REQUEST)
- pt=payload type (0 = P_STRING)
- l=message length (0)
- sg=signature flag (0 = not signed)
- ft=failed transmission counter (0 = no failed uplink transmission at this* oint)
- st=send status (OK)
- : actual message (empty)
=> Your node has no assigned ID (=255) and is requesting a new ID from the controller.
Please refer to the serial protocol or API for additional information.
Good luck!
-
Hi,
I was trying to implement the irrigation controller but realized that was not migrated to MySensors 2.0.
I followed the instructions provided in the first post and arrived to a version that compiles with no errors. Nonetheless, as I am newbie, I would appreciate if someone could review some changes that I am not sure about. Those changes are related with the original sketch which has direct calls to process() in several while statements. First I tried to change the process() with _process() but several errors appeared, so finally I removed all the calls to process() but am not sure. I have the modified code here IrrigationController.ino in which I commented the lines added / deleted / modified. Any help / direction would be greatly appreciated. -
Hi,
I was trying to implement the irrigation controller but realized that was not migrated to MySensors 2.0.
I followed the instructions provided in the first post and arrived to a version that compiles with no errors. Nonetheless, as I am newbie, I would appreciate if someone could review some changes that I am not sure about. Those changes are related with the original sketch which has direct calls to process() in several while statements. First I tried to change the process() with _process() but several errors appeared, so finally I removed all the calls to process() but am not sure. I have the modified code here IrrigationController.ino in which I commented the lines added / deleted / modified. Any help / direction would be greatly appreciated. -
@Boots33 Great! Thank you for the quick response and the URL. I took that version. Just wanted to let you know that to successfully compile it was needed to remove the #include <LiquidCrystal.h> and probably an update to that sketch would be needed at Github respository.
Thank you again! -
@Boots33 Great! Thank you for the quick response and the URL. I took that version. Just wanted to let you know that to successfully compile it was needed to remove the #include <LiquidCrystal.h> and probably an update to that sketch would be needed at Github respository.
Thank you again!@pndgt0 That may be because you do not have the LiquidCrystal library installed. They have the external libraries there as well
-
I built a 2.0 MQTT gateway and am experimenting with a sensor using 1.5 library. I can see incoming data in the serial monitor, but the data is a bit different then when I was using the 1.5 MQTT gateway. In openhab I used this:
{mqtt="<[mysensor:MyMQTT/3/2/1/V_TRIPPED:state:CLOSED:1],<[mysensor:MyMQTT/3/2/1/V_TRIPPED:state:OPEN:0]"}But now I must skip the V_Tripped part to make it work like this:
{mqtt="<[mysensor:mygateway1-out/3/2/1/0/16:state:OPEN:1],<[mysensor:mygateway1-out/3/2/1/0/16:state:CLOSED:0]"}Is this how it is supposed to be or do I have to make the sensor node 2.0 compatible first? I thought the payload is saved in the V_TRIPPED variable, but it doesn´t seem to work in the new 2.0 library. Pls advise-
edit:
Ok, digged a bit deeper: if I understand it right, I don´t need "V_TRIPPED" or any other value in my controllers code (which is openhab actually) anymore but still in my sensor node code of course. So the gateway will transform "V_Tripped" into sub-typ "16". Correct? So all I´ll have to change is my openhab code, right?
-
I built a 2.0 MQTT gateway and am experimenting with a sensor using 1.5 library. I can see incoming data in the serial monitor, but the data is a bit different then when I was using the 1.5 MQTT gateway. In openhab I used this:
{mqtt="<[mysensor:MyMQTT/3/2/1/V_TRIPPED:state:CLOSED:1],<[mysensor:MyMQTT/3/2/1/V_TRIPPED:state:OPEN:0]"}But now I must skip the V_Tripped part to make it work like this:
{mqtt="<[mysensor:mygateway1-out/3/2/1/0/16:state:OPEN:1],<[mysensor:mygateway1-out/3/2/1/0/16:state:CLOSED:0]"}Is this how it is supposed to be or do I have to make the sensor node 2.0 compatible first? I thought the payload is saved in the V_TRIPPED variable, but it doesn´t seem to work in the new 2.0 library. Pls advise-
edit:
Ok, digged a bit deeper: if I understand it right, I don´t need "V_TRIPPED" or any other value in my controllers code (which is openhab actually) anymore but still in my sensor node code of course. So the gateway will transform "V_Tripped" into sub-typ "16". Correct? So all I´ll have to change is my openhab code, right?