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

Pi Zero 2W Freezes after about 30 seconds #134

Open
chazzawalla opened this issue Feb 8, 2024 · 0 comments
Open

Pi Zero 2W Freezes after about 30 seconds #134

chazzawalla opened this issue Feb 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@chazzawalla
Copy link

I'm cross-posting this from the home_assistant_streamdeck_yaml git, which is the python script I'm running when this happens - but it looks like the issue might be related to the LibUSBHIDAPI code so thought it might be more relevant to the folks over here

Hi all, I went through two identical installs over the last week - first on an RPi 4 (works flawlessly), then on a Pi Zero 2 W so I can get that smaller footprint.

The problem is on the Pi Zero, it'll work great at first but after +/- 30 seconds the Streamdeck freezes up.

Sometimes I get some code in terminal, sometimes not. Here's what I saw last time:

[13:10:54] Updating key 7 for             home_assistant_streamdeck_yaml.py:1130
           light.kitchen_hue_zone_pendant
Traceback (most recent call last):
  File "/home/<username>/home-assistant-streamdeck-yaml/home_assistant_streamdeck_yaml.py", line 1943, in <module>
    main()
  File "/home/<username>/home-assistant-streamdeck-yaml/home_assistant_streamdeck_yaml.py", line 1932, in main
    asyncio.run(
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/<username>/home-assistant-streamdeck-yaml/home_assistant_streamdeck_yaml.py", line 1848, in run
    await handle_changes(websocket, complete_state, deck, config)
  File "/home/<username>/home-assistant-streamdeck-yaml/home_assistant_streamdeck_yaml.py", line 1092, in handle_changes
    await asyncio.gather(
  File "/home/<username>/home-assistant-streamdeck-yaml/home_assistant_streamdeck_yaml.py", line 1057, in process_websocket_messages
    _update_state(complete_state, data, config, deck)
  File "/home/<username>/home-assistant-streamdeck-yaml/home_assistant_streamdeck_yaml.py", line 1131, in _update_state
    update_key_image(
  File "/home/<username>/home-assistant-streamdeck-yaml/home_assistant_streamdeck_yaml.py", line 1476, in update_key_image
    deck.set_key_image(key, image)
  File "/home/<username>/.env/lib/python3.11/site-packages/StreamDeck/Devices/StreamDeckOriginalV2.py", line 139, in set_key_image
    self.device.write(payload + padding)
  File "/home/<username>/.env/lib/python3.11/site-packages/StreamDeck/Transport/LibUSBHIDAPI.py", line 407, in write
    return self.hidapi.write(self.device_handle, payload)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/<username>/.env/lib/python3.11/site-packages/StreamDeck/Transport/LibUSBHIDAPI.py", line 322, in write
    raise TransportError("Failed to write out report (%d)" % result)
StreamDeck.Transport.Transport.TransportError: Failed to write out report (-1)
python3: ../../libusb/os/threads_posix.h:46: usbi_mutex_lock: Assertion `pthread_mutex_lock(mutex) == 0' failed.
python3: ../../libusb/os/threads_posix.h:58: usbi_mutex_destroy: Assertion `pthread_mutex_destroy(mutex) == 0' failed.
Aborted (core dumped)
(.env) <username>@ubuntu:~$

Any idea whats going on here?

@chazzawalla chazzawalla added the bug Something isn't working label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant