Comments (5)
It is the zlib_ng implemented in the connector.py will work on it later today.
Changes related to the
zlib_ng
: home-assistant/core#115767, and afterwards home-assistant/core#115777.
I thought it would be as simple as changing those lines from
from zlib_ng import gzip_ng as gzip from zlib_ng import zlib_ng as zlib
to
from isal import igzip as gzip from isal import isal_zlib as zlib
but now getting this error:
Logger: homeassistant.util.logging Source: util/logging.py:98 First occurred: 12:55:18 (2 occurrences) Last logged: 12:55:44 Exception in async_message_received when handling msg on 'valetudo/Alfred/BatteryStateAttribute/level': '99' Traceback (most recent call last): File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 322, in async_message_received await self.hypfer_handle_battery_level(msg) File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 208, in hypfer_handle_battery_level self._mqtt_vac_battery_level = int(bytes.decode(self._payload, "utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: descriptor 'decode' for 'bytes' objects doesn't apply to a 'str' object Exception in async_message_received when handling msg on 'valetudo/Alfred/BatteryStateAttribute/level': '98' Traceback (most recent call last): File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 322, in async_message_received await self.hypfer_handle_battery_level(msg) File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 208, in hypfer_handle_battery_level self._mqtt_vac_battery_level = int(bytes.decode(self._payload, "utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: descriptor 'decode' for 'bytes' objects doesn't apply to a 'str' object
from valetudo_vacuum_camera.
@tjorim
Please replace the lines in the connector.py with a simple
import gzip
import zlib
This solves the issue;)
from valetudo_vacuum_camera.
@tjorim done on the main, will publish the fix after a short test.
from valetudo_vacuum_camera.
Working well for me.
Closed by c0718c5.
from valetudo_vacuum_camera.
@tjorim I made some additional test with the isal, and I got the same error you had with the '''BatteryStateAttribute'' the issue was in the bytes decode that of course can be done automatically by simply converting the bytes to int when I will release the new version of the camera in the connector.py we can use the isal library (that performance wise is faster then gzip and zlib python embed libs.. of course there is the need to do more tests on it.
Once again thank you really much for the help and you are welcome to contribute at any time. I do really appreciate your kind cooperation.
from valetudo_vacuum_camera.
Related Issues (20)
- Calibration Offsets Images Aspect Ratios change.
- 2024.05.2 breaks my camera HOT 13
- Index Out of range error on the image_draw.py HOT 1
- Index Error on Image_Draw.py HOT 4
- The Active User in the HA instance is incorrect. HOT 1
- Vacuum Status Text Disconnected cause Translations Error.
- Only one room available when configuring room colors HOT 13
- The camera crash from Home Assistant 2024.06.0 HOT 7
- Auto Zoom Fails for the last room
- Invalid Calibration, please check your config HOT 9
- Detected blocking call to open inside the event loop HOT 32
- Only one room available when configuring room colors (reopened) HOT 4
- Forks Immediate Mandatory Update to be done! HOT 6
- 🚨⚠️ Attention: Migrating from Valetudo to MQTT Vacuum Camera ⚠️🚨 HOT 7
- At HA Startup / Warning camera took longer than the scheduled update interval 0:00:03 HOT 1
- Another async issue just popped up in 2024.7.1:
- Issue while re-drawing the map. HOT 2
- Vacuums entity id with "_" such as "myvacuum_floor" Colours Config Not Possible. HOT 9
- Can not add camera via UI HOT 7
- The `schema` option is deprecated for MQTT vacuum HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from valetudo_vacuum_camera.