Controller with NodeJS
-
Hi,
I want to work with NodeJsController.js file.
Can you help me, and give me responses of :- What is the role of "loadFirmware" method ?
- Why "saveProtocol" method is called only if sensor = 255 ?
- When I connect a new node relay, I can see this :
send: 105-105-0-0 s=255,c=0,t=18,pt=0,l=5,sg=0,st=ok:1.5.1 send: 105-105-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0 read: 0-0-105 s=255,c=3,t=6,pt=0,l=1,sg=0:M repeater started, id=105, parent=0, distance=1 send: 105-105-0-0 s=255,c=3,t=11,pt=0,l=5,sg=0,st=ok:Relay send: 105-105-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.0 send: 105-105-0-0 s=1,c=0,t=3,pt=0,l=0,sg=0,st=ok:
I don't understand good these steps.
Why the node send all information with "s=255" and send the latest with "s=1" ? In the controller, I must save only the latest version, so "s=1" ?
Actually, the "saveSensor" is called 2 times :send: 105-105-0-0 s=255,c=0,t=18,pt=0,l=5,sg=0,st=ok:1.5.1 send: 105-105-0-0 s=1,c=0,t=3,pt=0,l=0,sg=0,st=ok:
Thanks for your help.