Cereal2nd / velbus-aio

Velbus Asyncio
Apache License 2.0
14 stars 10 forks source link

PROGRAM_SELECTION is not read back when set #96

Open ggaljoen opened 3 months ago

ggaljoen commented 3 months ago

velbusaio/messages/module_status.py PROGRAM_SELECTION is only updated from Velbus. It can be set correctly and written to Velbus but the value is not updated to selection made.

Cereal2nd commented 3 months ago

i'm not following.

we should only look at the velbus for the state, so not sure what is wrong here

ggaljoen commented 3 months ago

Indeed not easy to understand. Made a small clip to clearify:Left side is VelbusLink, middle is Home Assistant status, right is selection box in Home Assistant

Does this make more sense now? PROGRAM_SELECTION bigger

ggaljoen commented 3 months ago

Think I found the cause... It is correctly intercepted from / and set by 0xB3 : velbusaio/messages/select_program.py Since this is transmitted from velbusaio, it is not possible to update from this packet.

But in velbusaio/messages/module_status.py 0xED there is no selected_program for the majority of the modules. This issue is present on all my VMBELx and one VMBGPOD-2.

Just checked and it works fine for my VMBPIRC, there it is present: @register(COMMAND_CODE, ["VMBPIRO", "VMBPIRM", "VMBPIRC", "VMBELPIR"]) self.selected_program = data[5] & 0x03 self.selected_program_str = PROGRAM_SELECTION[self.selected_program]

image

Cereal2nd commented 3 months ago

there is this: afbeelding

ggaljoen commented 3 months ago

Will wait on the april release. Get back at this in a few days.