I have no problem to switch on the light on m20/output2 which should also send M000020.A2TA00 or maybe A2DI100 or similar. I wonder what is happening. Is there any auth process taking place first that would be missing when the command is issued from the UI?
PCK access to LinHK is allowed if requested from inside the local network (127.0…, 192.168…). Other IPs need credentials. Can it be that the UI is called from a non-local IP?
When HA is started, a socket is opened and remains open for the entire time. Each PCK command from HA then uses the same (already opened and authorized) connection no matter how the command is initiated.
If you are interested what HA sends to your LinHK you can turn on debugging messages by entering the following lines in your configuration.yaml and check the logs.
logger:
default: info
logs:
homeassistant.components.lcn: debug
pypck: debug
But on my side I do not see any difference (incl. special characters, termination characters, etc.) no matter how I send the command from HA.
Thank you, that was very helpful. I have seen that your AIDI command uses three digits for both luminosity and ramp. Issuing AIDI100004 from the UI works.
It also help to use the correct module number when testing. I tried to poistion the cover for m116, whereas 216 is the correct number. All is working!
having time based positioning turned out to be not very reliable with LCN when I tried to implement that. So I postponed that as I do not need it for myself. I wanted to give it another try one day but I have other things with higher priority on my todo list.