Jump to content

Recommended Posts

Posted

Every router is different and so are levels of expertise so I can't give a good generic answer. My environment is probably unique for the people following this thread but for what it is worth, I have a Mikrotik router. Mikrotik also provides a windows program called winbox to facilitate configuration, among other things. Within winbox, I can see all the connections from the firewall settings. I can then filter those connections to just those from the Polisy. I always keep that filter in place and try to remember to look at the connections. 

Regarding my hunch that the hub is not the issue, if you have notifications set appropriately in the YoLink app, you will get a notification if the hub is offline. If you aren't getting those notifications, then the hub connection isn't the issue. 

Posted

So you're referring to the Yolink hub being online? If so, I know the issue isn't with the Yolink hub, because I get motion notifications from it and Alexa, just not from the Yolink node server.

Posted

Yes, I was referring to the YoLink hub being online/offline because landolfi suggested connecting it with a wire. Or at least that is how I interpreted it. My point was that the YoLink hub was probably not the source of the problem, and the problem was probably the Poliy connection, particularly the NS running on the Polisy. Wires are always better than wifi. If the Polisy is connected via wifi then implicitly, so is the NS. If something messes up the wifi connection, or the connection is messed up any other way, then the NS will lose its connection to the YoLink server in the cloud and cannot, at this point, know it happened. Then, the NS stops seeing the YoLink events until it is restarted and can open that connection again. 

Posted

Yes mine is connected via ethernet cable and I never have a lost connection because I have other yolink devices and the motion detector also always works with hub so that’s not the problem

Posted (edited)
6 hours ago, Panda88 said:

Not that I am aware of - it appears the YoLink is loosing the connection - I am trying to discoven when it happens and reconnect 

So to be clear, the Yolink is online and recognizes motion events, but the Yolink Node server says it is online and does not recognize motion events after a certain undetermined period. For instance, I just got a notification of a motion event from Yolink but the  Yolink Node server says there is no motion even if I click "Update Motion Status". It worked a few hours ago.

Also, I think you probably know there is a typo in "Motoion State".

UPDATE: I just got a "TCP response failed" error from ISY in response to clicking the update motion status button, in case that tells you anything.

Edited by landolfi
Posted

You may already know what I am going to describe but just in case.... It may not be 100% accurate but it is based on off-line discussions with Panda88. I think it is at least conceptually accurate.

YoLink is a cloud-based service. The YoLink hub maintains a connection to an Amazon server running YoLink software. The app also has a connection to a YoLink server. The app doesn't communicate directly with the YoLink devices or hub. YoLink events get signaled to the hub, the hub tells the server, and then the server tells the appl. Commands to YoLink devices follow the opposite path: app->server->hub->device.

The NS interaction with the YoLink devices follows a similar path, meaning the NS does not communicate directly with the YoLink devices or hub. Everything flows through the cloud server via TCP port :8003. The NS recognizes motion events only because the cloud server tells it a motion event happened, just as it tells the app that a motion event happened. The NS then tells IoP of the event and depending on how the device is setup in IoP, something happens, like a light turns on. 

The NS uses an API provided by YoLink for its communication with the cloud server. The issue seems to be that there is no mechanism in the API to signal the NS that the connection to :8003 has gone away. When the NS stops recognizing YoLink events, it is probably because the NS still thinks it has a connection and is waiting to be notified of events. The NS may even attempt to send commands to the YoLink devices via the cloud server but there doesn't seem to be a mechanism in the API to confirm to the NS that the server has gotten the commands. The NS is blissfully "on-line", meaning it is running, but doesn't know it is disconnected from its source of information or recipient of its commands. 

Panda88 is working on a mechanism to detect the lost connection to :8003 so that it can reopen the connection if needed. Restarting the NS opens the connection but as we all know, it may go away for any number of reasons. 

I hope this helps explain some things and isn't too preachy. 

Posted
9 hours ago, tjkintz said:

You may already know what I am going to describe but just in case.... It may not be 100% accurate but it is based on off-line discussions with Panda88. I think it is at least conceptually accurate.

YoLink is a cloud-based service. The YoLink hub maintains a connection to an Amazon server running YoLink software. The app also has a connection to a YoLink server. The app doesn't communicate directly with the YoLink devices or hub. YoLink events get signaled to the hub, the hub tells the server, and then the server tells the appl. Commands to YoLink devices follow the opposite path: app->server->hub->device.

The NS interaction with the YoLink devices follows a similar path, meaning the NS does not communicate directly with the YoLink devices or hub. Everything flows through the cloud server via TCP port :8003. The NS recognizes motion events only because the cloud server tells it a motion event happened, just as it tells the app that a motion event happened. The NS then tells IoP of the event and depending on how the device is setup in IoP, something happens, like a light turns on. 

The NS uses an API provided by YoLink for its communication with the cloud server. The issue seems to be that there is no mechanism in the API to signal the NS that the connection to :8003 has gone away. When the NS stops recognizing YoLink events, it is probably because the NS still thinks it has a connection and is waiting to be notified of events. The NS may even attempt to send commands to the YoLink devices via the cloud server but there doesn't seem to be a mechanism in the API to confirm to the NS that the server has gotten the commands. The NS is blissfully "on-line", meaning it is running, but doesn't know it is disconnected from its source of information or recipient of its commands. 

Panda88 is working on a mechanism to detect the lost connection to :8003 so that it can reopen the connection if needed. Restarting the NS opens the connection but as we all know, it may go away for any number of reasons. 

I hope this helps explain some things and isn't too preachy. 

Not too preachy, in fact very helpful. Thanks!

  • 2 weeks later...
Posted (edited)

Not me.  I will restart the NS again, but typically this only last a day or two before stops working for me.

Edited by jkraus
Posted
15 minutes ago, jkraus said:

Not me.  I will restarth the NS again, but typically this only last a day or two before stops working for me.

Same here

Posted

I am trying to figure out why the connection to the YoLink API is lost - I am also working on a way to detect a disconnect and re-connect but I really hope to find the root cause 

  • Like 1
Posted

Just a quick update - I think I found my issue and I am updating the code 

What I have done to test is disconnect my ethernet cable and then reconnect it to make sure the node server recovers after it is reconnected

Any other ideas on how to test it?

Thanks 

Posted

I would think that would test everything but once we get the new code, I will test it through a router and cable modem reboot, power interruptions of the network infrastructure and the Polisy. BTW, have you found a fix to get the outdoor power strip online in IoP?

Posted
52 minutes ago, Panda88 said:

Just a quick update - I think I found my issue and I am updating the code 

What I have done to test is disconnect my ethernet cable and then reconnect it to make sure the node server recovers after it is reconnected

Any other ideas on how to test it?

Thanks 

Great news!

 

I have email alerts set for Yolink in a room with two other redundant non-Yolink sensors so I can see whether all are responding to motion or all except the Yolink.

Posted
2 hours ago, tjkintz said:

I would think that would test everything but once we get the new code, I will test it through a router and cable modem reboot, power interruptions of the network infrastructure and the Polisy. BTW, have you found a fix to get the outdoor power strip online in IoP?

I think I found the issue with power strip - mine does connect without issue now 

Posted

Just uploaded version 0.5.0

Probably have some bugs - Let me know if it can remain on-line 

I'll keep testing the coming days, as I am sure there are still a few bugs (did a lot of rewrite to the core), but hopefully someone will try and let me know of issues

 

Posted

I just checked too and don't see it. Aren't node servers supposed to automatically refresh if you stop and restart them? Or will this version be a completely different entry in the node server catalog like last time?

Posted

@jkraus @landolfi


Make sure you hit the “refresh store” while on the non-production store.

the version referenced above appears in the store…then restart the node server and it should update. 
 

 

1EE47DE9-F61C-4E1C-A243-E814661E914F.jpeg

  • Like 1
Guest
This topic is now closed to further replies.

×
×
  • Create New...