#still unavailable
1 messages ยท Page 1 of 1 (latest)
let me fire up debugging
nothing that looks errorish
2022-12-02 11:21:56.291 DEBUG (MainThread) [custom_components.twinkly.light] Updating 'Twinkly_6A5D49.collective.lan'
2022-12-02 11:21:56.291 DEBUG (MainThread) [ttls.client] Authentication token still valid
2022-12-02 11:21:56.291 DEBUG (MainThread) [ttls.client] GET endpoint led/mode
2022-12-02 11:21:56.320 DEBUG (MainThread) [ttls.client] GET response 200
2022-12-02 11:21:56.320 DEBUG (MainThread) [ttls.client] Authentication token still valid
2022-12-02 11:21:56.320 DEBUG (MainThread) [ttls.client] GET endpoint led/out/brightness
2022-12-02 11:21:56.400 DEBUG (MainThread) [ttls.client] GET response 200
2022-12-02 11:21:56.400 DEBUG (MainThread) [ttls.client] Authentication token still valid
2022-12-02 11:21:56.400 DEBUG (MainThread) [ttls.client] GET endpoint gestalt
2022-12-02 11:21:56.425 DEBUG (MainThread) [ttls.client] GET response 200
2022-12-02 11:21:56.425 DEBUG (MainThread) [ttls.client] Authentication token still valid
2022-12-02 11:21:56.425 DEBUG (MainThread) [ttls.client] GET endpoint movies
2022-12-02 11:22:29.432 DEBUG (MainThread) [custom_components.twinkly.light] Updating 'Twinkly_6A5D49.collective.lan'
2022-12-02 11:22:29.432 DEBUG (MainThread) [ttls.client] Authentication token still valid
2022-12-02 11:22:29.432 DEBUG (MainThread) [ttls.client] GET endpoint led/mode
2022-12-02 11:22:29.467 DEBUG (MainThread) [ttls.client] GET response 200
2022-12-02 11:22:29.467 DEBUG (MainThread) [ttls.client] Authentication token still valid
2022-12-02 11:22:29.467 DEBUG (MainThread) [ttls.client] GET endpoint led/out/brightness
2022-12-02 11:22:29.495 DEBUG (MainThread) [ttls.client] GET response 200
2022-12-02 11:22:29.495 DEBUG (MainThread) [ttls.client] Authentication token still valid
2022-12-02 11:22:29.495 DEBUG (MainThread) [ttls.client] GET endpoint gestalt
2022-12-02 11:22:29.515 DEBUG (MainThread) [ttls.client] GET response 200
2022-12-02 11:22:29.515 DEBUG (MainThread) [ttls.client] Authentication token still valid
2022-12-02 11:22:29.515 DEBUG (MainThread) [ttls.client] GET endpoint movies
No exceptions or anythng?
I added some debug lines in the latest PRs
i see it in the get movies stuff
Yes. They should show up just after the "Get endpoint movies" probably
nothing happens after that
re-ran the script too:
== Setting color ==
## Cant set color ##
404, message='Not Found', url=URL('http://twinkly_6a5d49.collective.lan/xled/v1/led/color')
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fb2e93b7d90>
== Setting color done ==
## Cant get movies ##
Server disconnected
## Cant get current movie ##
Server disconnected
Traceback (most recent call last):
File "/home/firstof9/twinkly.py", line 65, in <module>
asyncio.run(main_loop())
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/home/firstof9/twinkly.py", line 45, in main_loop
if 'movies' in mov and curr:
TypeError: argument of type 'NoneType' is not iterable
Unclosed client session
here's the get_mode reply:
{'code': 1000, 'mode': 'movie', 'shop_mode': 0}
"led/movie/config":
{'code': 1000,
'frame_delay': 67,
'frames_number': 45,
'leds_number': 435,
'loop_type': 0,
'sync': {'master_id': '', 'mode': 'none', 'slave_id': ''}}
Mhm. Just dont understand why you cant see the debug lines and why it does not work
yup
Does it continue with the updates, or did it jst run once?
the async_update function keeps getting called
Pushed a new file now to the same PR, a bit more error-logging
I'm pin pointing where the issue is but I think it may have something to do with this block:
for key, value in device_info.items():
if key not in HIDDEN_DEV_VALUES:
self._attributes[key] = value
if LightEntityFeature.EFFECT in self.supported_features:
await self.async_update_movies()
await self.async_update_current_movie()
The first three lines have not changed. The last three are added in 2022.12
At first run, the if should return true, but the two functions below should fail, and unset the EFFECT feature
ya i added some "echo" debugs just to see where it's getting hung up
because it seems to never fall out to self._is_available = True
It could be that the async_update_movies() never returns?
That would be the same function as this from the script
Cant get movies
Server disconnected
yup it's failing at that if block
if LightEntityFeature.EFFECT in self.supported_features:
await self.async_update_movies()
await self.async_update_current_movie()
So... I need to add another test to check if that is available
ya like
if movies not in get_movies:
self.supported_features = None
something like that I'd think
the older version I could set colors so ๐คทโโ๏ธ
I just need a way to check if the feature is available without turning the lights on or breaking something else
i've not really dug into the API on this stuff, I assume you're reverse engineering it
Whant happens if you curl http://twinkly_6a5d49.collective.lan/xled/v1/movies
curl: (52) Empty reply from server
/xled/v1/led/mode: {'code': 1000, 'mode': 'enabled', 'value': 50}
maybe base it on FW version?
curl http://twinkly_6a5d49.collective.lan/xled/v1/fw/version
{"version":"2.3.5","code":1000}
Probably the best
That is the latest fw for your?
(Pushed a new version now)
Seems like 2.7.1 is the first with all of this
New version coming up with version testing instead
But if the one you are testing now works, this shoud work as well, as the only difference is that I check for the version instead of another parameter I found
it does become available and controllable
Was that with the latest fix, or the previous?
Thanks a lot for testing btw
sure no problem man
Pleas, if you don't mind restarting again
downloading now
So we can close that bug and get it into it to b3 or something
Thanks again. Need a break now
Got a review from balloob, and have implemented all of his comments. Rewrote quite a bit of code. But should still work for you, I hope.
dropping the files in and restarting to test ๐
๐
yup still works
could go for a firmware field in the device info later on just for good measure ๐
It's coming.
I have a PR ready for that as well, but it depends on this one to be merged first.
I am adding full diagnostics support to the integration
Do you mind confirming in the PR that it resolves the issue?
https://github.com/home-assistant/core/pull/83145
Proposed change
This should bring back support for older devices that was broken with the new effects functions.
Type of change
Dependency upgrade
Bugfix (non-breaking change which fixes an is...
just commented
Thanks. Balloob already approved it, so I am just waiting for the merge and I'll add the diagnostics PR as well