Skip to content

Read digital inputs from the web interface - #57

Merged
nielstron merged 2 commits into
masterfrom
feat/web-digital-inputs
Nov 16, 2026
Merged

nielstron merged 2 commits into
masterfrom
feat/web-digital-inputs

Conversation

@nielstron

@nielstron nielstron commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Closes #39. Supersedes #46.

Inputs configured as digital show up on the inputs page 580500.htm as AUS/EIN instead of a value with unit:

 8:&nbsp;Freigabe1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PAR?

The analog regex skipped them, so they were missing when fetching via the web interface.

#46 couldn't find them: it matched on the outputs page 580600.htm (via read_digital_values), and its regex (AUS|EIN|ON|OFF){2,3} only matches the state repeated (AUSAUS).

This PR

  • matches digital inputs in read_analog_values, in one regex with the other inputs so the order stays as on the page
  • reports them like the direct connection does: as analog entries with value "0"/"1", unit_of_measurement: None and type: "digital" (not in digital, which holds the outputs and would collide by id)
  • adds the page from the BL-NET of the reporter in Add support to read digital inputs #46 as test fixture (inputs 3, 8, 13, 14 are digital)

The new tests fail on master and pass here.

Second commit: with web and direct enabled, a None from the direct connection no longer replaces the web value. A UVR1611 on CAN sends digital inputs as type 000 with the state in bit 0 (see the recorded CAN dataset in pyblnet-async, input 2 = 0x0001), which the parser reports as None since #49. In direct-only mode those inputs remain indistinguishable from unused ones.

The inputs page shows inputs configured as digital as AUS/EIN instead of
a value with unit, which the analog regex skipped, so they were missing
when fetching via the web interface. Match them too and report them
like the direct connection does: as analog inputs with value 0 or 1 and
type digital.

Supersedes #46, which matched them on the outputs page and with a
regex that required the state twice. The test page is from the BL-NET
of the user who reported it there.
A UVR1611 on CAN sends digital inputs over the direct port with type
bits 000 and the state in bit 0 (recorded dataset in pyblnet-async), so
the parser reports them as None like unused inputs. With both
connections enabled that None replaced the state read from the web
interface.
@nielstron
nielstron merged commit f08544c into master Nov 16, 2026
14 checks passed
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.

FeatureRequest - detect digital inputs

1 participant