You are browsing as a guest. Sign up (or log in) to start making projects!

41m 42s logged

Shelly Support Added

The Edge-AI Home Monitoring System now supports Shelly smart relays, using the ShellyPy library to control relay-based devices (plugs, switches, etc.) over the local network.

What’s New

  • New Shelly class wrapping ShellyPy.Shelly, with turn_on_relay / turn_off_relay methods and an execute_command dispatcher for on/off commands.
  • New /api/shelly endpoint that reads the device’s IP and relay_number from devices_config.json and forwards the command to the relay.
  • Registered shelly in DEVICE_ENDPOINTS and wired it into create_device_action, so Shelly devices can already be used as automation actions (schedule or event triggered), same as every other device type.

Why This Matters

Shelly relays are a common, cheap way to add “dumb” appliances into the automation system — a fan, a boiler, anything behind a relay can now be toggled from the dashboard or from a rule, without needing a dedicated smart-device ecosystem.

Challenges

  • Noticed /api/shelly is currently missing the @auth.login_required decorator that every other device endpoint has — since authentication was added, this is the one route that slipped through. Needs to be fixed before this ships anywhere network-exposed.
  • Shelly relays are addressed by relay_number rather than an id/model like the other integrations, so the config schema needed a small variation (relay_number field) instead of reusing the existing device pattern exactly.
  • emit_device_event isn’t wired into the Shelly handler yet, so — like the other non-TV devices — a Shelly state change can’t currently act as a trigger for other automations.

Next Steps

  • Add the missing @auth.login_required to /api/shelly.
  • Wire emit_device_event into the Shelly (and remaining) handlers so any device can be both an action and a trigger source.
  • Once event emission is consistent across all device types, move on to energy monitoring for the Tapo smart plugs.
0
1

Comments 0

No comments yet. Be the first!