scrool / xled

🎄Unofficial control for Twinkly - Smart Decoration LED lights.
MIT License
204 stars 46 forks source link

xled on not working #114

Closed jovabo closed 2 years ago

jovabo commented 2 years ago

Summary

The problem has similarities to a previous issue (https://github.com/scrool/xled/issues/66), but I did not do a factory reset or other reset. So when I run the command to switch the lights on, it shows in the CLI that it has switched them on. However, nothing happens. When I switch them on with the Twinkly app and then switch them off via the CLI it works fine. It was all working fine yesterday and I'm pretty sure I did not change anything.

Affected XLED components

XLED version

Name: xled Version: 0.7.0 Summary: Python library and command line interface to control Twinkly - Smart Decoration LED lights for Christmas. Home-page: https://github.com/scrool/xled Author: Pavol Babinčák Author-email: scroolik@gmail.com License: MIT license Location: /usr/local/lib/python3.7/dist-packages Requires: click-log, pyzmq, Click, cryptography, tornado, requests, netaddr, requests-toolbelt Required-by:

Twinkly device details

Device information

{
  "product_name": "Twinkly",
  "hardware_version": "100",
  "bytes_per_led": 3,
  "hw_id": "XXXXXX",
  "flash_size": 64,
  "led_type": 19,
  "product_code": "TWS600STP",
  "fw_family": "M",
  "device_name": "Twinkly_XXXXXX",
  "uptime": "3046141",
  "mac": "XX:XX:XX:XX:XX:XX",
  "uuid": "XXXXXXXXXXXXXXXXXXXX",
  "max_supported_led": 600,
  "number_of_led": 600,
  "led_profile": "RGB",
  "frame_rate": 9,
  "measured_frame_rate": 9.8,
  "movie_capacity": 2245,
  "wire_type": 1,
  "copyright": "LEDWORKS 2021",
  "code": 1000
}

Firmware version

{
  "version": "2.8.3",
  "code": 1000
}

Operating system

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Python version

Python 2.7.16 Python 3.7.3

Steps to reproduce

xled --name DEVICENAME on # Expected behavior

Expect lights to switch on.

Actual results

Nothing happens

xled --verbosity-cli DEBUG --verbosity-control DEBUG --verbosity-auth DEBUG --name Twinkly_XXXXXX on Looking for a device with name: TwinklyXXXXXX... Working on requested device. debug: HW address = XX:XX:XX:XX:XX:XX debug: IP address = XXX.XXX.XXX.XXX debug: Turning on... debug: Generated new state 'W\xd9\x04\xa1s\x98MN\xf7\x14M\x0b\x8c\x1c\xc9\xed\xc3%IC2\x14\xe9<e\xdb\x13n\xd6\xeaI'. debug: ClientApplication(): Challenge: 'W\xd9\x04\xa1s\x98MN\xf7\x14M\x0b\x8c\x1c\xc9\xed\xc3%IC2\x14\xe9<e\xdb\x13n_\xd6\xeaI' debug: receive_authentication_token(): got token: LaPx6RSxcCw= debug: challenge-response is correct. debug: Requesting url http://XXX.XXX.XXX.XXX/xled/v1/led/mode using method POST. debug: Supplying headers {'X-Auth-Token': u'LaPx6RSxcCw='} debug: Passing through key word arguments {'json': {'mode': 'movie'}, 'data': None}. Turned on.

Additional information

Anders-Holst commented 2 years ago

The device refuses to go into movie mode if there is no uploaded movie. Apart from at factory reset, it may happen if you delete all uploaded movies. The easiest way to check whether this is the problem, is to use the app to make sure you have a movie uploaded, and then try again. Alternatively, use the python interface to xled (rather than the cli) and try to set the mode to 'effect' instead of movie (to see that the problem concerns 'movie' only) ctr.set_mode("effect"), and then try to see what movies it thinks it has uploaded by ctr.get_movies()._data. Both provided that ctr is your ControlInterface, produced by e.g from xled.control import * followed by ctr = ControlInterface("ip-number-of your-device")

jovabo commented 2 years ago

@Anders-Holst, Thanks for the reply. You were correct. Somehow there were no movies on the device anymore. I have no idea what movie(s) were on there, but I created a new one and now it all works as expected.

scrool commented 2 years ago

@Anders-Holst, Thanks for the reply. You were correct. Somehow there were no movies on the device anymore. I have no idea what movie(s) were on there, but I created a new one and now it all works as expected.

I have noticed that app deletes movies after layout mapping.

jovabo commented 2 years ago

I have noticed that app deletes movies after layout mapping.

That might explain it in my case.