Skip to content

at2plus: Handle sensor status (0x2B) messages - #22

Open
aramshaw wants to merge 1 commit into
nathanvdh:masterfrom
aramshaw:feat/0x2b-sensor-status
Open

aramshaw wants to merge 1 commit into
nathanvdh:masterfrom
aramshaw:feat/0x2b-sensor-status

Conversation

@aramshaw

Copy link
Copy Markdown

Handles the 0x2B sensor status message, as discussed in #21. Small scope: parse it, keep the readings, stop the warning.

What it does

  • Adds SENSOR_STATUS = 0x2B to ControlStatusSubType.
  • New SensorStatusMessage: six 4-byte records of sensor id, an undecoded byte, and a temperature.
  • Temperature uses the same encoding as AC status (temperature_from_value). 0x07FF (no reading) comes out as None.
  • At2PlusClient.sensors_by_id holds the latest reading per sensor id. add_sensor_callback fires on each update, following the same pattern as the AC and group callbacks.
  • No ack is sent.

Sensor ids

  • 0x90 and 0x91 are consoles 1 and 2.
  • 0x80 to 0x83 look like zone sensors. Neither kieranlee1970 nor I have any fitted, so that's unconfirmed.

Tests
Parsing is tested against real captures from two systems: mine, and kieranlee1970's from #21 (which reads 22.5 °C, matching what he reported). There are also client tests for storing readings and for the callback. All 39 tests pass.

The decode matches kieranlee1970's (#21) and mattjamesaus's work on his fork.

Aided by Claude

The console broadcasts 0x2B every 30 s or so. It wasn't in the protocol
document, so every one logged an "Unknown status message type" warning.

Parse it as six 4-byte sensor records (id, undecoded byte, temperature)
and keep the latest readings in At2PlusClient.sensors_by_id, with
add_sensor_callback for updates. Temperatures use the same encoding as
AC status; 0x07FF (no reading) becomes None.

0x90 and 0x91 are consoles 1 and 2. 0x80-0x83 look like zone sensors
but no capture from a system with them fitted has confirmed that.

No ack is sent.

Refs nathanvdh#21

Aided by Claude
@nathanvdh

Copy link
Copy Markdown
Owner

Hey thanks for this. I'm about to be away for a few weeks so I probably won't look into this until after I'm back. My understanding is that the outcome of implementing this will be the ability to choose a different (more useful for you?) temperature sensor to show in HA?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants