nikshriv / cync_lights

Home Assistant Integration for controlling Cync switches, plugs, and bulbs
160 stars 53 forks source link

Getting error: ShuttingDown:, logs don't contain much info #39

Closed weeryan17 closed 1 year ago

weeryan17 commented 1 year ago

Hello I hope your doing well,

Today I ran into an issue where this integration will log ShuttingDown:, nothing else and it doesn't work. This screenshot is from the home assistant log interface image I noticed the line it's referencing is it connecting to the cync servers so it could just be possible their down, although the actual cync app on my phone works fine. I'll keep checking if the integration starts working, either way you should probably improve the logging.

nikshriv commented 1 year ago

ShuttingDown usually occurs if you uninstall, reload, or reconfigure the integration. You can probably just ignore that error message. Hopefully, the integration is still working for you.

weeryan17 commented 1 year ago

Sadly it is not working for me, I'm unable to control my smart plug, and I have a felling #40 is having the same issue, the log message did only pop up after a home assistant update so maybe it's hiding the true issue.

weeryan17 commented 1 year ago

Acctuly I just check the logs again and I found this, so maybe this is the true issue image

nikshriv commented 1 year ago

That is helpful. It looks like the integration is not picking up any connected devices. I have seen this happen with some of my bulbs as well but can't figure out why these Cync devices behave this way sometimes. I may have a workaround, so I'll let you know when it's fixed.

nikshriv commented 1 year ago

I made a small change which will default to using the switch id of the device if there are no other detected connected devices. Hopefully that will fix your issue. Let me know if it works for you.

weeryan17 commented 1 year ago

I'm no longer getting any errors from the integration, but sadly it's still not working. I did get this error, but it looks like this is from home assistant it's self. image

weeryan17 commented 1 year ago

Here's my full logs from after updating it https://pastebin.com/h2hUvP4X Maybe you need to implement more logging to better track down the issue?

nikshriv commented 1 year ago

This means that your plug is not responding to WiFi commands. I have had this problem with some of my bulbs as well, but I'm still able to control them with the integration because I have a number of other WiFi connected bulbs that are connected and functioning, so the commands go through them. It is a Cync issue, and I cannot figure out how to get those bulbs to properly connect to my WiFi. Did you have trouble getting the plug device to connect to your WiFi when you were setting it up? To test my theory, try disabling the bluetooth on your phone and then try to control the plug with the Cync app. If the device doesn't respond to commands from the app with bluetooth disabled, you have a WiFi connection problem.

You might try deleting the device from your Cync system and reinstalling it. Hopefully it will properly connect if you try again.

weeryan17 commented 1 year ago

Oh your right, I disabled bluetooth it can't control it via the cync app any more, that is weird, I didn't have any issues connecting it to wifi initially, that is super weird, guess I need to reset my plug. You should probably implement logging just saying that home assistant can't connect to the device via wifi as to lessen the confusion. Thank you for your help!

nikshriv commented 1 year ago

For those that have many devices, logging that information would probably clog your logs. These Cync devices are pretty unreliable and don't always stay connected, unfortunately. That was the reason I had to implement checking for connected devices in the first place. If you can't get it to work over WiFi, there is an integration that uses bluetooth to connect to the devices instead of WiFi.

weeryan17 commented 1 year ago

I would recommend adding something to the readme then at the very least, something along the lines of "If you are having connectivity issues in home assistant, but the app works, try turning of bluetooth and check if the app still works, if it doesn't you need to reconnect your device to wifi". Considering there where 3 issues posted on this probably best to have the information somewhere.

Anyways thank you again so much for the help and I know if it stops working in the future it's probably cause the device got disconnected from wifi

nikshriv commented 1 year ago

That’s a good suggestion. I’ll update it soon

Get Outlook for iOShttps://aka.ms/o0ukef


From: weeryan17 @.> Sent: Thursday, February 2, 2023 9:45:39 AM To: nikshriv/cync_lights @.> Cc: nikshriv @.>; Comment @.> Subject: Re: [nikshriv/cync_lights] Getting error: ShuttingDown:, logs don't contain much info (Issue #39)

I would recommend adding something to the readme then at the very least, something along the lines of "If you are having connectivity issues in home assistant, but the app works, try turning of bluetooth and check if the app still works, if it doesn't you need to reconnect your device to wifi". Considering there where 3 issues posted on this probably bets to have the information somewhere.

Anyways thank you again so much for the help and I know if it stops working in the future it's probably cause the device got disconnected from wifi

— Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnikshriv%2Fcync_lights%2Fissues%2F39%23issuecomment-1414130313&data=05%7C01%7C%7Cdeedb4c2f6ea411bf44008db05454e2a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638109567442370176%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=M82KgTYqoln3OwwgYwfab1%2F6Dr1YrgJiSezviTdbqkU%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEAUPHLDWSCBNUYWCZZLE4TWVPXEHANCNFSM6AAAAAAT7XY73Y&data=05%7C01%7C%7Cdeedb4c2f6ea411bf44008db05454e2a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638109567442370176%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=4n9OlN26tjwIyxS1BC%2FDcmPOFwGAIe%2Beovzs2YdJsmo%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

elliotmatson commented 1 year ago

@nikshriv So interestingly I can confirm that my plug is connected to WiFi, and is controllable with Home Assistant. Just all the bluetooth bulbs connected to the plug don't work from Home Assistant