KNX: Issue a GroupValueRead telegram from HA or from shell?

I’m currently debugging some other issue with sensor values not updating on startup. I already found out that HA is updating the state as soon as the knx device sends it’s current state to the bus because of a state change or because the state update is triggered by a GroupValueRead telegram issued f.e. from the ETS application.

My question: Is it possible to trigger a GroupValueRead from HA as well? Is the knx.send service able to generate this telegram type?

Or do you know any linux command line tool able to send telegrams directly to the gateway?

Some weeks ago I installed a knxd docker container (https://github.com/fdubuisson/knxd-docker-rpi) on my HA server. I use it to trigger groupread commands on the knx bus for the affected GAs via a shell script started from cron every 30 minutes.

This is a pretty dirty workaround, but at least it updates my temperature and alarm system sensors after restarting HA. I still don’t have a clue, why the state restoration for these sensors isn’t handled properly by the xknx component.

If someone’s interested, this is my workaround. It needs a working docker installation to run.

The shell script:

#!/bin/sh
id=$(docker run --rm --network host -d fdubuisson/knxd-rpi knxd -e 0.0.1 -E 0.0.2:1 -c -DTS -i -u -b ip:224.0.23.12)

echo $id

for eibaddr in $(grep -o '^[^#]*' /etc/knxtool_groupread.conf)
do
  echo "$eibaddr: $(/usr/bin/docker exec $id knxtool groupread ip:localhost $eibaddr && echo OK || echo ERR)"
done

docker stop $id

Some snippets of the config file /etc/knxtool_groupread.conf:

# Fensterkontakte
1/3/11  # DG Bad Kontakt Fenster oben
1/3/12  # DG Bad Kontakt Fenster unten

# [...]

# Solltemperaturen
5/4/1   # DG Bad Temperatur Raum read
5/4/2   # DG Bad Temperatur Raum write
# [...]

And this is the cron entry:

12,42 * * * * /usr/local/bin/knxtool_groupread.sh >/dev/null

Of course it would be much more elegant to run this script after every restart of HA, instead of every 30 minutes. But I’m running HA in a docker container as well and there is no easy way to execute something on a docker host issued from inside a container (this is not a bug, but a security feature). Thus, I’d have to replace my crontab workaround with some other quirky workaround that somehow detects, that HA restarted inside its container and runs the script.

If you have a good solution for this, feel free to post it here.