Starting flowchart



  • Hello everybody,

    I have doubts about how the sensor device start the comunication.

    At least with the 2.0 version, if there are not any gateway in the network, the sensor try to be connected sending:

    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=9)
    TSM:FPAR
    TSP:MSG:SEND 9-9-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 9-9-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 9-9-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 9-9-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT

    If the gateway is not in the network, the sensor doesn't listen any response and go a Power Down mode during some seconds. Is it right?

    The problem that I have is the following.

    I have a light device that it be able to switch the light from a external button or from a controller through a Mysensor GW.
    So, If I have network problems because the GW is not working (for any problem) the Mysensor 2.0 library always try to connect to the network searching a GW and the main loop doesn't run never. So the external button doesn't work if there is not a GW in the network.

    Is it possible to jump the initializacion or, at least, run the main loop when the PDT is enabled?

    Thank you in advance


  • Contest Winner

    This is not possible. See also this topic.

    You could do an intern node communication from the button node to the light actuator node. If I'm not mistaken, this will by pass the gateway. Hence no communication problem for these two nodes.

    But if the distance between the button and the light node is just a couple of meters. You'd probably best to hook the switch up to that node directly. I.m.o. all light node should have a button for manually override. Since they don't send messages (at least if you don't use ACK), they probably will never have communication problems.



  • @TheoL said:

    this topic

    Thank you for you fast answer.

    I didn't explain me well. I mean that the button is in the same PCB that the relay that switch the light. So only there is a node

    The node have two inputs to switch one output:

    1. Digital input from a external buttom
    2. A message from the controller throught the MySensor network.

    Anyway, if I'll try your remarks.


  • Contest Winner

    @logger02 Once the node has established connection, you'd be able to operate the relay with the switch on the PCB all the time. You can send a state update to the gw. But that should not stall your node. MySensors will just try to resend the state update and the node will keep operating, while MySensors is doing this.



  • @TheoL said:

    stall

    So, you mean that the infinite loop looking for a GW is only to the beginning. After the first conexion the main loop will be run?


  • Contest Winner

    @logger02 That is partially correct, if I remember correctly. But I haven't had any communciation troubles so far. Other that power related issues. But maybe @tekka can tell us more about it.


  • Admin

    @TheoL @logger02 Yes, that's right: during booting (transport initialization & registration) the node needs to handshake with the GW (without initial handshake, no loop() execution). If you loose connection later on, the main loop will execute and the underlying transport state machine will try to re-establish the link to the GW in regular intervals,



  • Thank you for your response, at least, I have the start initialization more clear.

    There is any way to jump the handshake?


  • Contest Winner

    @logger02 To my knowledge that wouldn't be possible. Certainly not with MySensors 2.0.

    The question, however is why would you want to do that? The purpose of a MySensor node, is that it can be controlled by e.g. a Home Automation controller. For that controller to be able to communicate with your node, the sensors needs to give the gateway a handshake. Besides the gateway is responsible for determining the Node Id's for new nodes, so that a node can join the network.

    There are some rare cases like power outage. But when the power comes back up, the network should be able to reconnect, since MySensors is a self healing service.



  • I agree with you, if you use have a radio in your system is because you want to control it remotely.

    But I think that there is more reason:

    1. Mysensor could be an additional function on my system, not the only one. So the others system will not work.
    2. Safety requirement, the system shall run free without knowledged locks. If the GW go down for any reason, maybe beacause is broken, your system could be no work. Is not a common case, but it's a real case.

    In my case, my node have a digital input (switch on the wall) and a digital output, the digital output (relay) is manage from the Mysensor node and from the digital input. If the GW is broken, the digital output will not work till I fix or change the GW. It can pass one day or one week it depend of the job. My wife will be very hungry if she can not manage the house manually with the tradional swithes on the wall.

    Any way, it's a feature that I think that could be take into account for next release. Is not very important because is not usual has not GW in the network, but I think that is a safety requirement to add in next deliveries.

    Thank a lot for your support.

    It's a nice forum


Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 8
  • 6
  • 5
  • 1

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts