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
Shellyclass wrappingShellyPy.Shelly, withturn_on_relay/turn_off_relaymethods and anexecute_commanddispatcher foron/offcommands. - New
/api/shellyendpoint that reads the device’s IP andrelay_numberfromdevices_config.jsonand forwards the command to the relay. - Registered
shellyinDEVICE_ENDPOINTSand wired it intocreate_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/shellyis currently missing the@auth.login_requireddecorator 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_numberrather than anid/model like the other integrations, so the config schema needed a small variation (relay_numberfield) instead of reusing the existing device pattern exactly. -
emit_device_eventisn’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_requiredto/api/shelly. - Wire
emit_device_eventinto 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.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.