Closed bjorncs closed 7 months ago
I checked the JSON, the custom_name attribute of these bulbs are not set. Which is why the issue exists, will make changes in the code to name unnamed bulbs with unique id of the device
please try with latest release and let know. The work on remotes is still pending, that @slajob is working on
I checked the JSON, the custom_name attribute of these bulbs are not set. Which is why the issue exists, will make changes in the code to name unnamed bulbs with unique id of the device
You're right - I double checked with the Ikea app now. Although the sets are named the individual devices were not. I'll add names and try again with your latest commit.
My setup consist of multiple ceiling spotlights with 4 spots each (Ikea Nymåne). I never control those devices directly - just the aggregate sets. It would be practical to have the sets being imported as light groups in HA.
Agreed, will include support for sets as well. Any clue if the command to set on/off to a set is to each device individually or to the set
After upgrading to the newest version the unnamed Ikea bulbs had their id as name.
FYI there is no easy way of naming devices that are part of a set in the Ikea app. A device must be temporarily removed from the set to give it a name.
Any clue if the command to set on/off to a set is to each device individually or to the set
No clue. However, I'm happy to assist in finding out.
ok i figured out how to work with sets. Now I have couple of questions, that I would need answers before I can start implementing the changes
@slajob please do weigh in with your thoughts also
That's awesome 👍
@bjorncs I have an implementation ready would you be able to test device sets and all other functions?
If yes will release a beta
@sanjoyg Sure thing 👍
1.5.1 Beta released for you to test and let me know
All my device sets were imported as such with 1.4.1 pre-release version after a reinstall. My installation was modified with some small code changes in the first place, so I'm not certain that the reinstall would be necessary when upgrading from a clean installation. I tested some basic behaviour (on/off, dimming, color change). Everything works great so far 👏.
FYI there are repeated failures being logged. Not sure if this is a regression or just a result of my Aqara sensors being treated as a VINDSTYRKA device.
2024-04-10 21:50:13.436 ERROR (MainThread) [custom_components.dirigera_platform] error encountered running update on : Temperatur bathroom
2024-04-10 21:50:13.436 ERROR (MainThread) [custom_components.dirigera_platform] 'ikea_vindstyrka_device' object has no attribute 'hass'
2024-04-10 21:50:13.436 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.temperatur_bathroom_voc_index fails
Traceback (most recent call last):
File "/config/custom_components/dirigera_platform/sensor.py", line 93, in async_update
self._json_data = await self.hass.async_add_executor_job(self._hub.get_environment_sensor_by_id, self._json_data.id)
^^^^^^^^^
AttributeError: 'ikea_vindstyrka_device' object has no attribute 'hass'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 951, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1268, in async_device_update
await self.async_update()
File "/config/custom_components/dirigera_platform/sensor.py", line 175, in async_update
await self._ikea_env_device.async_update()
File "/config/custom_components/dirigera_platform/sensor.py", line 100, in async_update
raise HomeAssistantError(ex, DOMAIN, "hub_exception")
homeassistant.exceptions.HomeAssistantError: (AttributeError("'ikea_vindstyrka_device' object has no attribute 'hass'"), 'dirigera_platform', 'hub_exception')
@bjorncs would you also test with release 1.4.2 is an entire new way to update device state. need help to test with
@slajob if you could also please have a look.
There are some new warnings occurring - see attached log. logs.txt
Thank you. For the motion sensor would be able to send me json when its off and when its on. Think the attribute is not been captured
Also when you enable debug the hub event of motion sensor will indicate the change in attribute that is another source to figure
The colorMode issue I will start looking into
When motion is detected the a websocket event is received with isDetected=true
2024-04-11 21:40:52.807 DEBUG (Thread-2) [custom_components.dirigera_platform] rcvd message : {"id":"8ec8d256-ebf6-40e5-9add-fedfb103c402","time":"2024-04-11T19:40:52.000Z","specversion":"3.150.0","source":"urn:com:ikea:homesmart:iotc:zigbee","type":"deviceStateChanged","data":{"id":"deb44783-06c3-4489-8346-f98f6b183308_1","type":"sensor","deviceType":"motionSensor","createdAt":"2023-10-29T21:17:17.000Z","isReachable":true,"lastSeen":"2024-04-11T21:40:52.000Z","attributes":{"isDetected":true,"sensorConfig":{"scheduleOn":false,"onDuration":120,"schedule":{"onCondition":{"time":"22:00"},"offCondition":{"time":"06:00"}}},"circadianPresets":[]},"remoteLinks":[]}}
3 minutes later a new event is received with isDetected=false
.
2024-04-11 21:43:52.785 DEBUG (Thread-2) [custom_components.dirigera_platform] rcvd message : {"id":"4d62257f-1d99-477c-b770-eb41425c6dbf","time":"2024-04-11T19:43:52.000Z","specversion":"3.150.0","source":"urn:com:ikea:homesmart:iotc:zigbee","type":"deviceStateChanged","data":{"id":"deb44783-06c3-4489-8346-f98f6b183308_1","type":"sensor","deviceType":"motionSensor","createdAt":"2023-10-29T21:17:17.000Z","isReachable":true,"lastSeen":"2024-04-11T21:40:52.000Z","attributes":{"isDetected":false,"sensorConfig":{"scheduleOn":false,"onDuration":120,"schedule":{"onCondition":{"time":"22:00"},"offCondition":{"time":"06:00"}}},"circadianPresets":[]},"remoteLinks":[]}}
The isDetected
attribute is not included in the output from dump_data
. I could not find any difference before and after a detection except for lastSeen
.
Thank you, what model of motion sensor is it?
Also would you send me the log line output of the websocket event for the colorMode that generates the warning
Also would request for the json dump of the motion sensor
Thank you, what model of motion sensor is it?
Ikea Trådfri Motion Sensor E1745
Also would you send me the log line output of the websocket event for the colorMode that generates the warning
Also would request for the json dump of the motion sensor
See attached file dump.txt
@bjorncs Thank you for the logs. Both issues should be fixed. Do let me know if you now see the motion sensor working
There's some new failure appearing in the log. HA claims the binary_sensor.storage_sensor
entity is unavailable.
logs.txt
Would you please check this with the new release.
I submitted a short fix in https://github.com/sanjoyg/dirigera_platform/pull/32 to resolve a crash during device setup.
My installation was also in a bad state where it failed to update dirigera
dependency to 1.1.1. Once upgraded the detection entity started working 💯
The revert back to polling did result in a lot of timeouts and connection failures. This could be a result of too aggresive pooling or some edge case when combining websocket listener with polling. My hub is on version 2.556.0, which is fairly new, so a regression there is not unlikely either. dump.txt
I am thinking setting the listener for only certain devices such as motion_sensor. What do u think?
Have done that in the release. If there continues to be an issue do open another issue, closing this for now. Thank you for your changes have merged it in.
I am thinking setting the listener for only certain devices such as motion_sensor. What do u think?
I prefer listener for all devices is it provides immediate update on state transitions. The cost of polling increases linearly with the number devices. The local push model scales better for large number of devices.
Its a hybrid right now. Do have a look at the implementation and if there is a away to improve it... please feel free to add.
My imported GU10s are missing the original name except for one single device, which is my only GU10 not grouped in a device set in the Ikea Home Smart app. They were briefly named
IKEA Dirigera Hub : 10.0.0.3
before settling toUnnamed device
. The other imported Ikea devices were correctly named including 3rd party devices.dirigera-devices.json