Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smartthings power state not changing when device H6104 switched on/off from govee app or alexa #3

Open
jc73uk opened this issue Dec 23, 2020 · 29 comments

Comments

@jc73uk
Copy link

jc73uk commented Dec 23, 2020

Hi, thank you for sharing the govee smartthings api. I have been using it for controlling the govee tv led lights H6104. I have noticed that when the led lights are powered on or off from another app, such as govee home or alexa, smartthings is not detecting the change of state with the device.

@uncdubdiver
Copy link
Owner

So I made an update a week or two ago (I can't remember sorry) that includes the refresh() option to check the status of the govee lights every 1 min for cases just like this. Take a look at the latest commit version of the DTH and it should provide you what you're looking for. Just copy-and-paste that new version of it and let me know how it goes!

@jc73uk
Copy link
Author

jc73uk commented Dec 23, 2020

Thanks for quick reply. I am using the latest version of code. I downloaded yesterday (22/12) and it has 397 lines and multiple references of "refresh". I have recopied code again and published, but it is still only recording state changes when I control the deivce in the Smartthings app. Any change to power state in Govee Home mobile app or Alexa do not get logged on smartthings. I checked the Events for the device and can only see text such as "Govee TV Lights switch is off" and "Govee TV Lights switch is on", when controlling via the smartthings app.
If you know of any other settings I can check let me know.
Samsung smartthings is very temperamental, in that when I create automations for when TV is powered on or off.. it does not run the rule for the "off state" even though it shows me that the Samsung TV is off (2018 model). It does however run the TV is powered on some of the time! Its not very consistent. Very frustrating.
Thanks in advance. Jason.

@uncdubdiver
Copy link
Owner

Ok give me a bit to add some additional debugging and test it out further locally.
I agree the ST is very temperamental and if an action isn't completed through it, it does get finicky.

@uncdubdiver
Copy link
Owner

Ignore my previous, I think I see what you're seeing, mine is doing the same thing, it's only setting the color and brightness on refresh(), not the power state.
Give me a few, updating the DTH and will post shortly!

@jc73uk
Copy link
Author

jc73uk commented Dec 23, 2020

Ok, Always better when you can reproduce it! Reply to this thread when you have an update and I will try it out. Many thanks

@uncdubdiver
Copy link
Owner

Well, I would have something for you, but the ST sim isn't refreshing at all now...stupid interface...

@uncdubdiver
Copy link
Owner

Ok so the simulator was fairly useless, however using the app its self, I was able to turn on/off the govee light strips using alexa and the app and could see the update within the DEV simulator, the ST app (on the main view), as well as on the selected device screen.

I'm committing another brief update with some more logging. Copy-and-paste it into your DTH, then Save, Publish for Me, then run similar tests if you can. One nice thing is that I can have the DEV sim enabled for the govee device, and use the ST app triggering the actions and it'll display the logs within the sim Logs section.

Give that a try and see if you're seeing the power state changes properly or not (it may not be immediate, but should be within the minute).

@jc73uk
Copy link
Author

jc73uk commented Dec 23, 2020

Not seeing any difference unfortunately. Its still only recognising power state when i control in the ST app. If I use Govee Home or Alexa, it does not appear in the Event log.

@uncdubdiver
Copy link
Owner

Do me a favor, uncomment line ::311, hit Save, then Publish for me, then test again. Can you send me an email of the output like you did above please? Don't post it on a comment because other's will be able to see the details too. [email protected]

@uncdubdiver
Copy link
Owner

So after working with @jc73uk , we have determined that the model in question H6104 does not currently support the "devicestate" API call, which the API docs clearly state that it SHOULD. So this is an issue on Govee's side. I'm reaching out to them to determine if this is an issue on their API or if it was purposely left out of support...?
More to come soon!

@jc73uk jc73uk changed the title Smartthings power state not changing when device switched on/off from govee app or alexa Smartthings power state not changing when device H6104 switched on/off from govee app or alexa Dec 28, 2020
@uncdubdiver
Copy link
Owner

Forgot to update this, sorry.

After reaching out to Govee API Support, they have stated that the get device state API call is not available for the H6104. They did not provide a reason why, just that it's not supported in the API and then they closed my ticket.

Unfortunately I can not resolve this issue at this time due to the lack of support from the Govee API to handle it.

@jc73uk
Copy link
Author

jc73uk commented Jan 12, 2021 via email

@troynowens
Copy link

Thanks so much for sharing this handler. The power off state from Govee app to ST is not an issue at all for me as I now only use Smartthings to power the device on/off either manually or with automations

@uncdubdiver
Copy link
Owner

So...is everything working for you?

@troynowens
Copy link

troynowens commented Jan 28, 2021

Yes, working just fine. on/off, color changes, and brightness all work as expected. I know this is an issues thread but just wanted to thank you

@uncdubdiver
Copy link
Owner

Great, glad to hear it!

I'm finishing up a new version of the file, a cleaner version of it to enable/disable debugging instead of it printing constantly. All should still work like normal for you guys once the update goes out.

Feel free to use it or not.

@jonicunha
Copy link

jonicunha commented Feb 22, 2021

Hi,

I have the same problem with H6199. It's the same situation that device state API call isn't available or can you help me with the debugging? Where I have to add the line "set_DEBUG("on")" on my DTH?

On the documentation the device state for this model is, supposedly, supported:
https://govee-public.s3.amazonaws.com/developer-docs/GoveeAPIReference.pdf

Thank you.

@uncdubdiver
Copy link
Owner

Yes I agree that Govee "says" it's supported, but I've reached out to them directly about their other TV backlit product H6104 (I have the H6104 as well on my TV all thanks to @jc73uk ), and I confirmed locally that it's not available, and Govee API Support confirmed it's not available on every model, and because the H6199 is a newer model for it, it's probably in the same issue. I will reach out to Govee API Support and ask them specifically about this one though and reply back on here once I hear back.

@jonicunha
Copy link

Great, thanks for the quick feedback!
I'll be waiting for news.

@Alexkemp1980
Copy link

I cant for the life of me find my GED Hardware ID within the IOS app.

Any pointers?

@uncdubdiver
Copy link
Owner

uncdubdiver commented Feb 22, 2021 via email

@Alexkemp1980
Copy link

Alexkemp1980 commented Feb 22, 2021

Download the index HTML file and run it locally. That's how you'll retrieve your ID and model number / name.

On Feb 22, 2021 at 10:26 AM, Alexkemp1980 @.***> wrote: I cant for the life of me find my GED Hardware ID within the IOS app. Any pointers? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Thanks, I have been trying to do this, but for some reason it doesnt open as a web page, only shows the programming lines

Ignore me, Im being an idiot, was downloading HTML from wrong area

@uncdubdiver
Copy link
Owner

Not a problem, hope that helps!

@uncdubdiver
Copy link
Owner

@jonicunha , so Govee API Support responded back and said that they will have an update to their API in 8-9 weeks (wow, super vague and a long time from now).
Once I get word that there's an update, I'll let everyone know what I find out. Sorry for the not so good news...

@jonicunha
Copy link

So, more or less 2 months.
No need to excuse, you have done what no one did, and you did it with distinction.
We will wait for your feedback.

Once again, thanks for all your work and efforts!

@jonicunha
Copy link

Hi,
This week I'm testing Home Assistant and the state is updating on H6199. I don't know if it'll help but you can see the code here:
https://github.com/LaggAt/hacs-govee

Thanks!

@uncdubdiver
Copy link
Owner

uncdubdiver commented Mar 17, 2021 via email

@troynowens
Copy link

Any chance you will be coding a conversion to the new Smartthings Edge driver? That would be fantastic. Thanks

@uncdubdiver
Copy link
Owner

uncdubdiver commented Sep 24, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants