wez / pview

PowerView to MQTT bridge for Home Assistant
MIT License
11 stars 2 forks source link

Expose repeaters #10

Open trullock opened 8 months ago

trullock commented 8 months ago

I use HD repeaters to extend the wireless range, and these feature LEDs which I use as nightlights for the kids.

Can the LED functionality of the repeaters be exposed so I can automate them?

wez commented 8 months ago

Yeah, it's technically doable.

trullock commented 8 months ago

If you dont have any and need to see what the JSON looks like LMK what to curl and I can provide.

Although I expect with your 9 million shades you've probably also got some repeaters 😂

wez commented 8 months ago

heh, I do have a couple, yeah. It's largely time that I lack for this

trullock commented 8 months ago

I appreciate that.

I'll try and learn some Rust!

wez commented 8 months ago

FWIW, I think this would be fairly straight forward to pull together into a PR if you felt like sitting down for a couple of hours and tinkering:

trullock commented 8 months ago

How is this project designed to be worked on/developed?

Should it "just work" if I open the devcontainer with VS code?

wez commented 8 months ago

the devcontainer stuff is only present for launching home assistant to test the addon config/store side of things. I don't use vscode at all, or devcontainers outside of this one use case, so I've given no attention to the dependencies of this project and how those are handled in the devcontainer.

The project itself needs rust and a C compiler for the mosquitto client library; I think you're all set with build-essentials on an ubuntu system, but otherwise, installing gcc and binutils will likely do the job. After that, it's just cargo build to build, and then I launch it via ./target/debug/pview serve-mqtt.

Alternatively, if you don't want to put those things on your local system, you can docker build . -f Dockerfile.notls -t pview:x86-no-tls to build the standalone docker image, then you can use docker to run that pview:x86-no-tls image.