bpwwer Posted September 23, 2022 Posted September 23, 2022 It looks like you have a copy of the node server running already so it can't start another. Each installation is assigned an ID, that instance with that ID is only allowed to connect to PG3 at a time, all other attempts are rejected. What probably happened was that when you restarted PG3 after upgrading, it wasn't able to stop the currently running node server for some reason. PG3 does ask each node server to stop when it is stopping but sometimes a node server ignores it and keeps running. Uninstalling and reinstalling will assign a new ID to the new installation. You'll still have two copies running but they'll both be able to connect and you'll probably see duplicate messages in the log and both will be trying to update the nodes on the ISY which could lead to confusion. There are 2 ways to force the original to go away. 1) ssh to the Polisy and run some commands to find the process and manually kill it. 2) reboot the Polisy. If you want to attempt #1 I can provide some examples of how to do that.
landolfi Posted September 23, 2022 Posted September 23, 2022 I rebooted. Now the node server shows as connected. It takes a while for the node server to make the nodes on the IoP active, right? It's been about 5 minutes and I don't see any node status on Yolink Setup or either of the other nodes yet.
Panda88 Posted September 23, 2022 Posted September 23, 2022 It should not take that long - do you have a log file?
landolfi Posted September 23, 2022 Posted September 23, 2022 Attached. YoLink_9-23-2022_122800_PM.zip
Panda88 Posted September 23, 2022 Posted September 23, 2022 Looks ok - maybe restart AC and see if that helps
landolfi Posted September 23, 2022 Posted September 23, 2022 (edited) I cleared cache and restarted IoP and AC. Still no status for Yolink Setup and no response to events. I also restarted Yolink just to be sure. Edited September 23, 2022 by landolfi
landolfi Posted September 23, 2022 Posted September 23, 2022 Somehow during the power outage the IP address of Polisy/IoP got reset, I thought I had set it to manual but my router or Polisy or both forgot that. I looked in the PG3 log and Yolink was trying to connect to the old IP. I changed to the new IP in PG3 and now it works. This may make sense to you, but the strange thing to me was that my other node servers were working. Or is there a best practice for Polisy/IoP addressing that I should be following?
Panda88 Posted September 23, 2022 Posted September 23, 2022 41 minutes ago, landolfi said: Somehow during the power outage the IP address of Polisy/IoP got reset, I thought I had set it to manual but my router or Polisy or both forgot that. I looked in the PG3 log and Yolink was trying to connect to the old IP. I changed to the new IP in PG3 and now it works. This may make sense to you, but the strange thing to me was that my other node servers were working. Or is there a best practice for Polisy/IoP addressing that I should be following? I am not using the IP address directly - I do an updateProfile() that may read data from ISY/IoP and that will fail in your case. Other nodes may not do that - just guessing I am doing the same as you - so I have no magic setting - I do not think you can use local loop on the IoP connection (127.0.0.1) - it would be nice, but I think I tried and did not make it work
landolfi Posted September 23, 2022 Posted September 23, 2022 I just went back and forth with Michel on this topic. He was telling me the node slot config in IoP should be localhost or 127.0.0.1, but then said leave it if it's working. I changed the ISY IP on PG3 (on PG3 ISYs/Edit ISY) to 127.0.0.1. So far things seem to be working and the node slot has the actual address of the Polisy, so I'll leave it at that unless you know that won't work for some reason.
bpwwer Posted September 23, 2022 Posted September 23, 2022 There are communications both ways between the IoP and PG3. When a node server is installed in a slot on the IoP, part of that configuration is the ip address of PG3 so the IoP can query the node server and send commands to the node server. Since PG3 is designed to support multiple ISY/IoP's it can't assume that the ISY/IoP is on the same host as PG3 so it uses the real IP address for that. Thus if the IP address of PG3 changes after the node servers are installed, that communication channel is broken. The node server will still be able to send updates to the ISY/IoP so it may not be obvious.
landolfi Posted September 24, 2022 Posted September 24, 2022 Thanks for this explanation. So is it a best practice to give the Polisy a static IP and use that in the node server slot configuration? And for IoP, should we tell PG3 that the ISY is at 127.0.0.1?
bpwwer Posted September 24, 2022 Posted September 24, 2022 Yes, using 127.0.0.1 (the local address) should be a bit quicker, but probably not something you'd notice.
Panda88 Posted October 10, 2022 Posted October 10, 2022 Just released an update - I hope it fixes the disconnect issue - I think over time I was consuming the 5 connections that are allowed by Yolink - I believe I disconnect before reconnecting now - but it could mean a few sec of no connection (only happens when link is down anyway) Also added support for smart lock 1
landolfi Posted October 11, 2022 Posted October 11, 2022 That update seems to have broken something for me. I am sending the log via PM.
Panda88 Posted November 1, 2022 Posted November 1, 2022 Just released the YoLink server to the production store I finally found the issue causing the server to sometimes disconnect - YoLink has a limit if maximum 5 connections and I somehow did not release the connections so after 5 connections the node server can still talk to YoLink but it was ignoring the requests - I think I found the correct way to handle the disconnects - It has been running for 2 weeks now, and I have been trying what I can to break it but it keep coming back I also added support for the smart lock - It actually works well and is very reasonably priced I am charging 10$ for the node - mostly to provide some cash to UD - (they take about 1/2) - rest will be used to buy new YoLink devices and rest will be donated to a good cause - I do this mostly for fun My next devices will be the IR remote controller and the new dimmer switch 2
landolfi Posted November 1, 2022 Posted November 1, 2022 22 minutes ago, Panda88 said: Just released the YoLink server to the production store I finally found the issue causing the server to sometimes disconnect - YoLink has a limit if maximum 5 connections and I somehow did not release the connections so after 5 connections the node server can still talk to YoLink but it was ignoring the requests - I think I found the correct way to handle the disconnects - It has been running for 2 weeks now, and I have been trying what I can to break it but it keep coming back Is version 5.21 the one that incorporates the new way of handling the disconnects?
Panda88 Posted November 2, 2022 Posted November 2, 2022 (edited) It should be 0.6.15 - it shows in store as 0.6.1 but it is a bug in PG3 - when you enter the node you should see 0.6.15 Edited November 2, 2022 by Panda88 1
Geddy Posted November 2, 2022 Posted November 2, 2022 Nice work @Panda88! The new area to discuss YoLink can be found here: https://forum.universal-devices.com/forum/395-yolink/
Recommended Posts