JSON API to control LuCI

Hi guys,

I have some Wi-Fi cameras that record my house, but when I'm at home, I'd like to disable it for privacy. To detect my I'm home, I'll using Home Assistant, which has support to PUT JSON or similar things, but no SSH.

Is it possible to send LuCI request to disable the Cameras W-Fi?

I use https://github.com/kvj/hass_openwrt for similar means.

A custom Home Assistant integration, that connects to rpcd/ubus via uhttpd/luci. Needs just uhttpd uhttpd-mod-ubus rpcd installed.

Edit: Quoted the actual requirements list from github. Was "luci-mod-rpcd" before edit.

2 Likes

The luci-mod-rpc module is obsolete and unmaintained, ideally the ubus RPC HTTP api should be used directly.

i'm pretty sure HA does support SSH. https://www.home-assistant.io/integrations/command_line/

1 Like

The integration doesn't use luci-mod-rpc. I misremembered, or it may have used it in the past. After your post above I looked the current requirements up, and edited my above post accordingly. Sorry for the noise.

1 Like

Oh, that's exactly what I needed! Thanks a lot. I installed everything on Home Assistant and OpenWrt, but I can't disable the wireless drive.

Do you know what I need to add into /usr/share/rpcd/acl.d/hass.json to add support to disable WiFi?