|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
Key fields of the last processed 1W frame, used to collapse a remote's repeat burst. More...
#include <hub_decisions.h>
Public Attributes | |
| std::string | src_id |
| Source node ID of the last processed frame; empty before the first. | |
| uint8_t | cmd {0} |
| Command byte. | |
| bool | has_intent {false} |
| Whether main0/main1 were decoded (execute / activate-mode only). | |
| uint8_t | main0 {0} |
| First main byte — what distinguishes a move from a stop. | |
| uint8_t | main1 {0} |
| Second main byte. | |
| uint32_t | timestamp {0} |
| millis() when the frame was processed. | |
| uint8_t | dst [NODE_ID_SIZE] {} |
| Destination address; compared only when has_intent is false. | |
Key fields of the last processed 1W frame, used to collapse a remote's repeat burst.
1W remotes repeat each command 4× at ~40ms intervals for reliability, and a held button keeps resending, so one logical press arrives as many identical frames. The key deliberately includes the decoded intent bytes and not just the command byte: a move and a stop are both CMD_EXECUTE and differ only in main0, so a command-only key silently discards a stop that follows a move within the window — losing the sender event, the optimistic-target clear, and the immediate poll that a stop is supposed to trigger.
For a frame with no decoded intent the destination is part of the key as well. A VELUX KLI's Gear press sends its 0x2E to several device classes a few hundred ms apart, and the classes it names are the ones a new controller has to enroll on; keying on src+cmd alone would log only the first of them. Intent-bearing frames keep ignoring the destination: they fire sender events and optimistic state, where one press must stay one press.
Definition at line 287 of file hub_decisions.h.
| uint8_t esphome::home_io_control::decisions::OneWayDedupState::cmd {0} |
Command byte.
Definition at line 289 of file hub_decisions.h.
| uint8_t esphome::home_io_control::decisions::OneWayDedupState::dst[NODE_ID_SIZE] {} |
Destination address; compared only when has_intent is false.
Definition at line 294 of file hub_decisions.h.
| bool esphome::home_io_control::decisions::OneWayDedupState::has_intent {false} |
Whether main0/main1 were decoded (execute / activate-mode only).
Definition at line 290 of file hub_decisions.h.
| uint8_t esphome::home_io_control::decisions::OneWayDedupState::main0 {0} |
First main byte — what distinguishes a move from a stop.
Definition at line 291 of file hub_decisions.h.
| uint8_t esphome::home_io_control::decisions::OneWayDedupState::main1 {0} |
Second main byte.
Definition at line 292 of file hub_decisions.h.
| std::string esphome::home_io_control::decisions::OneWayDedupState::src_id |
Source node ID of the last processed frame; empty before the first.
Definition at line 288 of file hub_decisions.h.
| uint32_t esphome::home_io_control::decisions::OneWayDedupState::timestamp {0} |
millis() when the frame was processed.
Definition at line 293 of file hub_decisions.h.