Home Assistant integration (working proof of concept) via the HTTP integration API #5683
Replies: 4 comments 1 reply
|
@mzspicoli this looks very promising and I would love to be able to install this as HACS integration. |
|
@gbcatrinoiu Good news — you can install it through HACS right now, as a custom repository:
On the Mac side, the HTTP server is off by default, so you have to enable it first: BetterDisplay > Settings > Application > Integration > HTTP integration > "Enable integrated HTTP server". The port is set right below it ("Listening HTTP port", default Worth noting: the HTTP interface, DDC brightness, DDC volume, DDC power and DDC input switching are all listed as free features, so you don't need a Pro license for anything this integration does. You get one device per display, with up to four entities:
Two honest caveats. First, I've only been able to test against a single display (an AOC CU34V5C) on one Mac, so I'd genuinely like to hear how it behaves on your hardware — brightness, power, volume and mute are all verified there, but that's one data point. Second, the input source Bug reports and feature requests are very welcome at https://github.com/mzspicoli/ha-betterdisplay/issues — contrast and the per-channel gain parameters would be easy to add next, following the same pattern as volume. |
|
@gbcatrinoiu Thank you, that's really useful feedback — much appreciated. I think I found the cause of the light entity not turning off, and I've just pushed v0.2.1 with a fix. If you have a moment to update in HACS and try again, I'd be grateful. The problem: BetterDisplay's On the input source, I couldn't reproduce or rule anything out from here, so your logs would really help. What I can tell you is that the request format looks right: sending a deliberately invalid value ( If you do open that issue, these would help most:
Also worth knowing: the option list the integration shows is BetterDisplay's full DDC catalogue (40 entries), not the ports your monitor actually has, so most of those options were never going to do anything on any display. That part I should improve regardless. |
Uh oh!
There was an error while loading. Please reload this page.
Context: this started as a MonitorControl feature request that waydabber redirected here (MonitorControl/MonitorControl#1881), since MonitorControl doesn't have CLI/API integration.
Since this repo is closed-source, a code PR isn't possible, but BetterDisplay's HTTP integration API (
Settings > Application > Integration > Enable integrated HTTP server, default port 55777) turned out to be enough to build a proper Home Assistant custom integration — no MQTT, no polling scripts, just HA talking to BetterDisplay directly over LAN.Repo: https://github.com/mzspicoli/ha-betterdisplay
What it does today:
lightentity (config flow for host/port/token).GET /get?identifiers+GET /get?tagID=<id>&brightness, sets viaGET /set?tagID=<id>&brightness=<0-1>.Tested end-to-end against a real monitor and a production Home Assistant instance (not just localhost) — confirmed the HA host can reach BetterDisplay's HTTP server over the LAN, and that
light.turn_oncalls actually change the physical monitor's brightness.Opening this mainly in case there's interest in:
brightnessvsbrightness_pcton the HA side) if useful.No urgency here, just sharing in case it's useful to others who find their way here from the MonitorControl issue.
All reactions