Hi, thanks for the great integration. I've been tinkering with it in my fork, mostly with Claude so it might be a bit of a mess. I've made too many changes to create a pull but there might be some bit you want to grab. Sorry I'm going to give you a Claude dump but it might be helpful. Ignore and close the issue if you like.
Power state from gettvinfo rather than statetype. platform_service/gettvinfo answers on a per-client data topic and returns fake_sleep_state (1 = on, 0 = off) — a live query rather than a cached broadcast. This mattered on my TVs because the TV pushes a fake_sleep_* frame on every connect regardless of actual state, which poisons the cached statetype: the TV would read as off while plainly on, and only a power-cycle corrected it. Switching is_on to the live query fixed that, and it also correctly reports off during the nightly maintenance wake (where the broadcast says fake_sleep_1 but fake_sleep_state is 0). Worth noting fake_sleep without _state is a constant capability flag, not the state.
Live source via sourcelist. The active input is the entry with is_signal == "1" — and the flag follows the selection even to an input with nothing plugged in (has_signal is the separate "something is connected" flag). Querying this each poll removed all dependence on catching the one-shot sourceswitch broadcast, which was the cause of the source going stale after power-on. displayname2 is also useful — it's the CEC device name on that input, e.g. "Fire TV Stick" on HDMI3.
changesource needs the string source ID on this firmware. SOURCE_MAP's numeric IDs are silently ignored; it wants "HDMI3", "TV", "AVS" exactly as sourcelist reports them. Confusingly, inputs whose display name equals their ID (HDMI2, HDMI4) appear to work, which masks the problem — HDMI3 named "Onkyo AVR" did nothing.
ARC volume. pyvidaa only accepts volume_type == 0, but with audio going to an AVR over ARC the TV only ever broadcasts type 1, so volume stays None. I work around it in the coordinator by teeing the MQTT callback, though the real fix is library-side. Also: there's no absolute-volume command over ARC at all — CEC only has relative up/down, so volume_set has to be emulated by stepping. My TV processes about one press per 0.74s, so sending faster just queues them.
Wake-on-LAN needs the right interface. device_id isn't reliably a MAC — on my newer TV it's the opaque gettvinfo deviceid string, which silently disabled WoL. network_type differs by firmware generation too: newer reports "wlan" with eth0/wlan0 listed separately, older puts the active interface's MAC directly in the field. Picking the MAC matching the live interface, and persisting it (you can only learn it while the TV is reachable, but you only need it when it isn't), made it work.
KEY_AUDIO toggles audio-only mode (panel off, sound on). It's in none of the published key lists. Its state isn't observable — I diffed every field of all five queryable actions with the panel on and off and found no difference, and no broadcast fires. I've used info + key_audio for off and just info so that I could create a toggle for on/off. It won't reflect if the screen is turned on with the remote but it's useful for me in automations.
Also worth knowing: getvolume never returns a value but does trigger a volume broadcast, so removing the call stops volume updating entirely. And gettvstate never answers on this firmware — I probed 70 candidate action names and only sourcelist, applist, capability, getdeviceinfo and gettvinfo reply.
Hi, thanks for the great integration. I've been tinkering with it in my fork, mostly with Claude so it might be a bit of a mess. I've made too many changes to create a pull but there might be some bit you want to grab. Sorry I'm going to give you a Claude dump but it might be helpful. Ignore and close the issue if you like.
Power state from gettvinfo rather than statetype. platform_service/gettvinfo answers on a per-client data topic and returns fake_sleep_state (1 = on, 0 = off) — a live query rather than a cached broadcast. This mattered on my TVs because the TV pushes a fake_sleep_* frame on every connect regardless of actual state, which poisons the cached statetype: the TV would read as off while plainly on, and only a power-cycle corrected it. Switching is_on to the live query fixed that, and it also correctly reports off during the nightly maintenance wake (where the broadcast says fake_sleep_1 but fake_sleep_state is 0). Worth noting fake_sleep without _state is a constant capability flag, not the state.
Live source via sourcelist. The active input is the entry with is_signal == "1" — and the flag follows the selection even to an input with nothing plugged in (has_signal is the separate "something is connected" flag). Querying this each poll removed all dependence on catching the one-shot sourceswitch broadcast, which was the cause of the source going stale after power-on. displayname2 is also useful — it's the CEC device name on that input, e.g. "Fire TV Stick" on HDMI3.
changesource needs the string source ID on this firmware. SOURCE_MAP's numeric IDs are silently ignored; it wants "HDMI3", "TV", "AVS" exactly as sourcelist reports them. Confusingly, inputs whose display name equals their ID (HDMI2, HDMI4) appear to work, which masks the problem — HDMI3 named "Onkyo AVR" did nothing.
ARC volume. pyvidaa only accepts volume_type == 0, but with audio going to an AVR over ARC the TV only ever broadcasts type 1, so volume stays None. I work around it in the coordinator by teeing the MQTT callback, though the real fix is library-side. Also: there's no absolute-volume command over ARC at all — CEC only has relative up/down, so volume_set has to be emulated by stepping. My TV processes about one press per 0.74s, so sending faster just queues them.
Wake-on-LAN needs the right interface. device_id isn't reliably a MAC — on my newer TV it's the opaque gettvinfo deviceid string, which silently disabled WoL. network_type differs by firmware generation too: newer reports "wlan" with eth0/wlan0 listed separately, older puts the active interface's MAC directly in the field. Picking the MAC matching the live interface, and persisting it (you can only learn it while the TV is reachable, but you only need it when it isn't), made it work.
KEY_AUDIO toggles audio-only mode (panel off, sound on). It's in none of the published key lists. Its state isn't observable — I diffed every field of all five queryable actions with the panel on and off and found no difference, and no broadcast fires. I've used info + key_audio for off and just info so that I could create a toggle for on/off. It won't reflect if the screen is turned on with the remote but it's useful for me in automations.
Also worth knowing: getvolume never returns a value but does trigger a volume broadcast, so removing the call stops volume updating entirely. And gettvstate never answers on this firmware — I probed 70 candidate action names and only sourcelist, applist, capability, getdeviceinfo and gettvinfo reply.