You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/pi/libhueble/src/test.py", line 15, in <module>
asyncio.run(main())
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/pi/libhueble/src/test.py", line 9, in main
await lamp.set_power(True)
File "/home/pi/libhueble/src/libhueble.py", line 52, in set_power
await self.client.write_gatt_char(CHAR_POWER, bytes([1 if on else 0]), response=True)
File "/home/pi/.local/lib/python3.9/site-packages/bleak/backends/bluezdbus/client.py", line 707, in write_gatt_char
reply = await self._bus.call(
File "/home/pi/.local/lib/python3.9/site-packages/dbus_fast/aio/message_bus.py", line 337, in call
await future
File "/home/pi/.local/lib/python3.9/site-packages/dbus_fast/aio/message_bus.py", line 404, in _message_reader
if self._unmarshaller.unmarshall():
File "/home/pi/.local/lib/python3.9/site-packages/dbus_fast/_private/unmarshaller.py", line 332, in unmarshall
self._read_header()
File "/home/pi/.local/lib/python3.9/site-packages/dbus_fast/_private/unmarshaller.py", line 271, in _read_header
self.read_to_offset(HEADER_SIGNATURE_SIZE)
File "/home/pi/.local/lib/python3.9/site-packages/dbus_fast/_private/unmarshaller.py", line 174, in read_to_offset
raise EOFError()
EOFError
a part of unmarshaller.py:
defread_to_offset(self, offset: int) ->None:
""" Read from underlying socket into buffer. Raises MarshallerStreamEndError if there is not enough data to be read. :arg offset: The offset to read to. If not enough bytes are available in the buffer, read more from it. :returns: None """start_len=len(self.buf)
missing_bytes=offset- (start_len-self.offset)
ifself.sockisNone:
data=self.stream.read(missing_bytes)
else:
data=self.read_sock(missing_bytes)
ifdata==b"":
raiseEOFError()
This seems to be indicating that the pi can't read data from the bulb?!
I'm not sure what I did wrong here. Help is appreciated.
The text was updated successfully, but these errors were encountered:
Refuhr
changed the title
Alway getting EOFError when trying to turn on the bulb
Always getting EOFError when trying to turn on the bulb
Sep 14, 2022
My setup:
Rpi0 W, Philips Hue white GU10 (paired and trusted via bluetoothctl)
My script:
Error:
a part of unmarshaller.py:
This seems to be indicating that the pi can't read data from the bulb?!
I'm not sure what I did wrong here. Help is appreciated.
The text was updated successfully, but these errors were encountered: