make Ultimaker platform compatible with HA OS 5.12
Closed this issue · 8 comments
I’m trying to set up the integration with an UltimakerS5
However no devices or entities get created..
Not sure where I could be going wrong:
sensor:
- platform: ultimaker
name: UltimakerS5
host: 172.24.1.109
scan_interval: 10 # optional, default 10
decimal: 2 # optional, default 2 rounds the sensor values
sensors:- status # optional
- state # optional
- progress # optional
- bed_type # optional
- bed_temperature # optional
- bed_temperature_target # optional
- hotend_1_id # optional
- hotend_1_temperature # optional
- hotend_1_temperature_target # optional
- hotend_2_id # optional
- hotend_2_temperature # optional
- hotend_2_temperature_target # optional
I see that you're using hotend_1_id
, hotend_2_id
and bed_type
. These are changes that I released today. Make sure that you're using the latest version 0.1.4
or master
when you use these.
You could check if it stumbles over the comments #
. Try removing them. It can't hurt to make the name lower case as well. If that is the case please let me know. So I can update the README.md.
sensor:
- platform: ultimaker
name: ultimakers5
host: 172.24.1.109
scan_interval: 10
sensors:
- status
- state
- progress
- bed_temperature
- bed_temperature_target
- bed_type
- hotend_1_id
- hotend_1_temperature
- hotend_1_temperature_target
- hotend_2_id
- hotend_2_temperature
- hotend_2_temperature_target
This should create multiple sensors: such as sensor.ultimakers5_hotend_1_temperature
If this still not works you can output debugging log entries if you create the following entry in your configuration.yaml
:
logger:
default: info
logs:
custom_components.ultimaker: debug
This should give you additional information. Remember to remove it afterwards or change the debug
to info
, otherwise, your log file will be very big.
I need additional information if it still doesn't work. Like your log file. Used version, both from HA and this plugin.
Thanks for message.
This is what I’m seeing in the logs (I’ve removed comments and the name is set to ‘ultimaker’
sensor:
- platform: ultimaker
name: ultimaker
host: 172.24.1.109
scan_interval: 10
decimal: 2
sensors:- status
- state
- progress
- bed_type
- bed_temperature
- bed_temperature_target
- hotend_1_id
- hotend_1_temperature
- hotend_1_temperature_target
- hotend_2_id
- hotend_2_temperature
- hotend_2_temperature_target
Logger: homeassistant.components.sensor
Source: custom_components/ultimaker/sensor.py:141
Integration: Sensor (documentation, issues)
First occurred: 18:58:16 (1 occurrences)
Last logged: 18:58:16
Error while setting up ultimaker platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 200, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/ultimaker/sensor.py", line 101, in async_setup_platform
await data.async_update()
File "/config/custom_components/ultimaker/sensor.py", line 141, in async_update
self._data |= await self.fetch_data(self._url_print_job)
TypeError: unsupported operand type(s) for |=: 'dict' and 'dict'
I’m running V0.1.4 of this integration (installed via HACS today)
Home assistant details below:
System Health
version | core-2021.3.2 |
---|---|
installation_type | Home Assistant OS |
dev | false |
hassio | true |
docker | true |
virtualenv | false |
python_version | 3.8.7 |
os_name | Linux |
os_version | 5.4.99 |
arch | x86_64 |
timezone | UTC |
Home Assistant Community Store
GitHub API | ok |
---|---|
Github API Calls Remaining | 4509 |
Installed Version | 1.11.3 |
Stage | running |
Available Repositories | 748 |
Installed Repositories | 22 |
Home Assistant Cloud
logged_in | true |
---|---|
subscription_expiration | 3 April 2021, 1:00 |
relayer_connected | true |
remote_enabled | true |
remote_connected | true |
alexa_enabled | false |
google_enabled | false |
can_reach_cert_server | ok |
can_reach_cloud_auth | ok |
can_reach_cloud | ok |
Home Assistant Supervisor
host_os | Home Assistant OS 5.12 |
---|---|
update_channel | stable |
supervisor_version | supervisor-2021.03.4 |
docker_version | 19.03.13 |
disk_total | 97.7 GB |
disk_used | 10.5 GB |
healthy | true |
supported | true |
board | ova |
supervisor_api | ok |
version_api | ok |
installed_addons | SSH & Web Terminal (8.0.3), Zigbee2mqtt (1.17.0.1), AirSonos (3.0.0), File editor (5.2.0), InfluxDB (4.0.3), Grafana (6.1.3), motionEye (0.11.0), TasmoAdmin (0.14.0), Mosquitto broker (5.1.1) |
Lovelace
dashboards | 1 |
---|---|
resources | 8 |
views | 7 |
mode | storage |
Are you running from source?
It seems to trip over the new |= operator which was introduced in python 3.9
Upgrading to python 3.9 should do the trick.
Let me know
I will try to rewrite that part so that it should work for earlier python versions
I’m running Home Assistant OS 5.12 which seems to come with an earlier version of Python - will do some research to see if upgrading is ‘safe’ ! Thanks!
You will in all likelihood see an update today, with support for OS 5.12.
It should be fixed now in release 0.1.5. If not let me know.
Confirmed to be working! Many Thanks