Hello there,
I’m trying to figure out how to expose time or date to knx because my Meteodata Weatherstation has no internal clock and needs this information to determine the elevation and azimut of the sun, so it can calculate the correct position of the covers. It is possible to tell the device to send a bit to a specific adress to get a the current time. Unfortunately the device does not simply ask on the adress of the time object 1/0/10
via GroupValueRead
like other KNX devices.
My Hardware configuration is as follows:
- HA running on a raspberry 4b (Home Assistant Operating System)
- Home Assistant 2022.4.6
- supervisor-2022.04.0
- Elsner KNX PS640-IP
- Theben Meteodata 140 S 24V
- Logging for knx is enabled (and working):
logger:
default: critical
logs:
xknx.telegram: debug
This is what i tried before posting my question:
At first, simply following the documentation: https://www.home-assistant.io/integrations/knx/#exposing-entity-states-entity-attributes-or-time-to-knx-bus
My entry in configuration.yaml:
knx:
expose:
- type: date #also tried datetime
address: "1/0/11"
- type: time
address: "1/0/10"
This has no effect, neither in the HA serverlogs nor in ETS Groupmonitor there is any entry for date or time. As I read in other threads, there should be one entry on startup and one entry every hour.
Then i tried to set the Date and Time manually in ETS, output in Groupmonitor:
Unfortunately there is no entry in the HA logs after this step.
My next try was to figure out if i could set up an automation to send any time to knx bus. This seems to be impossible as there is no 3byte DPT in HA.
So I went the other way round and set up an automation which requests the time every 5 minutes (for test purposes only) and triggers Homeassistant to answer:
alias: KNX Uhrzeit senden
description: >-
Schickt an 1/0/10 und 1/0/11 ein Groupvalueread damit Homeassistant mit Zeit
und Datum antwortet.
trigger:
- platform: time_pattern
minutes: '5'
condition: []
action:
- service: knx.read
data:
address: 1/0/10
- service: knx.read
data:
address: 1/0/11
mode: single
The Log entry is as follows:
2022-04-24 12:05:00 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Outgoing" source_address="0.0.0" destination_address="1/0/10" payload="<GroupValueRead />" />
2022-04-24 12:05:00 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Outgoing" source_address="0.0.0" destination_address="1/0/11" payload="<GroupValueRead />" />
2022-04-24 12:05:00 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Outgoing" source_address="1.1.237" destination_address="1/0/10" payload="<GroupValueResponse value="<DPTArray value="[0xec,0x5,0x0]" />" />" />
2022-04-24 12:05:00 DEBUG (MainThread) [xknx.telegram] <Telegram direction="Outgoing" source_address="1.1.237" destination_address="1/0/11" payload="<GroupValueResponse value="<DPTArray value="[0x7a,0x4,0x18,0xec,0x5,0x0,0x21,0x80]" />" />" />
Obviously this is working as excpected, Homeassistant can get triggered by itself…
Needless to say this has no effect in the world of KNX, knx telegram is not showing up in Groupmonitor, the time on the Meteodata remains not defined.
It seems there is no communication between HA and KNX when time or date should be sent.
Now i’m stuck, i have no idea what i could possibly try or what i could have missed out.
All other KNX Devices (about 200 Groupadresses or more, sensors, binary sensors, switches, covers) work properly within Homeassistant (both directions). Before moving to Homeassistant i used FHEM, there was a simple oneliner tor configure sending time every hour.
Does anybody have an idea what to try or where i made a mistake?