isaacrlevin / presencelight

PresenceLight is a solution to broadcast your various statuses to light bulbs.
MIT License
419 stars 77 forks source link

Ability to manually configure IP address #829

Closed theseanspicer closed 8 months ago

theseanspicer commented 11 months ago

I use PresenceLight with a Yeelight lightbulb outside my homeoffice door. When the bulb is found using "Find Yeelights", PresenceLight works brilliantly, but regularly it fails to find the bulb and I have not been able to determine why this is.

Please could you add the option to manually specify the IP address of the lightbulb on the Configure Yeelight page, rather than using Find Yeelights. The bulb has a fixed IP address so once setup this would never need to be configured again.

Thankyou

isaacrlevin commented 10 months ago

Sadly there is no natural way to obtain a light by IP address alone, as the Yeelight API package does not support that. When you say you PL does not find the light, is there an error that you get at all in the logs?

jurajmisina commented 8 months ago

Same happens for me. I do not get any error in the logs, this is my latest trial to add Yeelight LED strip: {"Timestamp":"2023-12-18T11:23:40.5586231+01:00","Level":"Information","MessageTemplate":"Yeelight Light Retrieval Initialized","Properties":{"SourceContext":"PresenceLight.Razor.Pages.CustomApiSetup","Application":"PresenceLight"}} {"Timestamp":"2023-12-18T11:23:41.8675734+01:00","Level":"Information","MessageTemplate":"Yeelight Light Retrieval Successful","Properties":{"SourceContext":"PresenceLight.Razor.Pages.CustomApiSetup","Application":"PresenceLight"}} My Yeelight is on a different (IoT) VLAN though, so this might be due to my network configuration. Although I've opened comms betweent the IoT and Main VLANs, and can ping the device from the computer, PL is not able to find it automatically. If I put both devices on the same VLAN, it works perfectly and keeps working even after I reconnect the computer to main VLAN, until I sleep/turn off the computer. After that I again need to connect to IoT VLAN, find Yeelight and reconnect computer to main VLAN.

Perhaps someone with similar experience and more experience in networking can point me to a root cause?

jurajmisina commented 8 months ago

I have an update. When I posted my comment 3 days ago, I did the "sync process" (switched PC to IoT VLAN, set up yeelight, switched back to main VLAN). Since then, the light is working okay, I can see it in PL app, everything seems to be fine. There was no update to PL app nor light firmware for past few months, but there were a couple of updates to my router firmware, so this was obviously caused by me setup.