I’m using a knx.sensor to track my called scene in my knx-network.
Sometimes the sensor does not update the scene send through the knx-system. After a hassio restart it usually works.
Any ideas?
Use always_callback = true
on the sensor or try the knx scene platform.
Thats what i do too.
That was not clear by reading your configuration.
You could also use a knx_event
- this would be the HA preferred way, I think.
Sry
I just tried it and generally knx_event does work.
The problem is (and this might be the problem with the binary sensor as well), that only values that are read seem to get to the event bus.
What i mean is the following:
I do have the GroupAdress 0/0/1 for my scenes.
When i use the ETS GroupMonitor for testing purposes and send a scenenumber to my bus (write), nothing happens.
When i read the scenenumber (0/0/1) some of my knx-devices (that usually send a scene number) send a status on the bus (scenenumber 1). This fires an event and also show up in the binary sensor.
I have no clue what i am doing wrong. Any ideas?
Best regards,
Stefan
First idea: topology issue / filter table issue. Some line coupler, gateway, router etc doesn’t forward the telegram to the HA tunnel.
I guess you added 0/0/1 to event_filter:
?!
I do not recommend this approach!
KNX is a rock solid, decentralized, industry level technology.
HA – as much as I love it – is tinker level. I cannot count the occasions when my HA installation (or essential parts of it) refused to cooperate due to breaking changes, hardware failures, dying SD cards, memory limits of my (former) Pi or a filled up SSD.
I try to do all really essential logic in KNX. When HA stalls, I still want to be able to switch my lights, control my covers, set my room temperature and have my presence detection working for me. I will in fact loose my higher functions like my KNX to Zigbee and to enOcean integrations, my non-KNX motion sensors, my cam recording, my lawn mower automations, my at home detection and automations. But my covers will still automatically shut down on the sunny side of the house in summer and at night and the timer functions for most of my lights will still work too.
The basic rule is: Without HA I want to have a house which is at least on the level of a usual (non-KNX) installation with all actors, lights, covers, heatings controllable. Honestly: My wife would KILL me if it would not be that way.
My recommendation:
Use the stability of KNX for all functions that you never want to loose. Even if it is sometimes more work to establish them in KNX.
Use HA for all convenience stuff that is not really essential. Also use it for automations that are simply to complex for KNX. But make sure that you have at least a viable fallback in KNX, so your house does not turn dark, cold or tropical and will not lock you out without HA.
Maybe my statement was over simplified Fully agree that all core devices should work indepenently from HA. It is most probably also due to the fact that in my case single technology is not good enough to make any automation to work; a few examples:
- my shades are acting (shelly controlled) based on zigbee luminance sensor, router based presence detection and timer from HA
- My audio-video equipment is network controlled by HA integration, presence detection via Konnected alarm integration and zwave smart plugs.
- My KNX A/C takes temperature measurement from zigbee room sensors.
So almost none of my automations would work without HA. But I can still watch TV, turn on lights open the gate or get notified if someone breaks into the house even if my network is completely down or HA not available.
HA 2021.4 update.
As of yesterday, after upgrading HA to the latest release I’ve started observing increased number of warning messages for KNX integration.
Below are examples of those:
2021-04-08 12:37:22 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 1/1/27
2021-04-08 12:37:22 WARNING (MainThread) [xknx.log] Could not sync group address '1/1/27' (Klima Asia - Target temperature)
2021-04-08 12:40:19 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request for: 1/1/29
2021-04-08 12:40:19 WARNING (MainThread) [xknx.log] Could not sync group address '1/1/29' (Klima Asia - Current temperature)
My specific way of using the climate devices is to expose an external temperature sensor state to KNX group address which is picked up by the A/C unit as a room temperature sensor.
expose:
- type: 'temperature'
entity_id: 'sensor.aqara_temperature_asia'
address: '1/1/29'
It works pretty well and my A/C unit is now working much more optimally as it takes actual room temperature into account for controlling the unit (and not the intake air temp which is way off the actuall room temp - too low in winter and too high in summer).
I have also configured it as the temperature_address
for the climate entity so that it has aligned information:
- name: Klima Asia
temperature_address: '1/1/29'
target_temperature_address: '1/1/27'
target_temperature_state_address: '1/1/27' # from aqara sensor
on_off_address: '1/1/0'
on_off_state_address: '1/1/46'
controller_mode_address: '1/1/1'
controller_mode_state_address: '1/1/47'
min_temp: 16.0
max_temp: 26.0
Since the upgrade to 2021.4 release I started to receive those warning messages, to me it looks like the KNX integration is sending a group value read requests to the KNX bus which are not being answered - they are coming from HA integration and seems that HA is not responding to those group read requests. Any hints on how to deal with that?
I’ve seen that for other entity types (e.g. sensor
, binary_sensor
) there is a parameter available sync_state
which enables to control the behavior of GroupValueRead telegrams but not available for climate
.
Expose does not answer to read requests from other xknx devices (until next xknx version). Just ignore the log messages.
Sync_state is not available for climate devices - the entity doesn’t work without a current temperature.
Thanks for info!
My understanding is that the climate entity for KNX does not do anything anyway apart from reflecting state of the KNX device and allowing to control the climate device. Or am I wrong? In that case it would be perfectly ok to allow for controlling it with the sync_state like other entity types. Correct me if I’m wrong. Or maybe there is a different way to provide external temperature sensor data to the KNX Climate entity?
There are caveats.
Maybe there is a template climate entity that would fit your needs.
Template would work but it would take over completely the controls of the A/C unit. I only need to expose the room temperature sensor to it and be able to set mode etc. Actually it all works ok, just that I now have those warning messages
Well, make them readable from bus or ignore the log entries.
I agree 1000 %
Finally I manage with Node-Red to write dates and times in the GA KNX with an “events state” node
Which node to use to read dates, times, , numberand boolean in GA and display them in HA?
What should I do to display knx related messages?
Those are messages in home assistant log file.
In the Supervisor / System menu?
You can see logs either from Configuration → Logs or by opening home-assistant.log
file from OS/SFTP or whatever you use to access the filesystem.