[Custom Component] shABman – Shelly Script Manager for Home Assistant 🎉

Hey Community!

I’m excited to introduce my new custom integration shABman – a Shelly Script Manager right inside Home Assistant!


What is shABman?

shABman lets you manage scripts on Shelly Gen2/Gen3 devices directly from Home Assistant – no browser or Shelly app needed. Everything runs locally via the Shelly RPC API.


:sparkles: Features

  • Create, edit & delete scripts – fully integrated into the familiar HA Options Flow
  • Switch entities per script – start/stop scripts and toggle autostart
  • Sensor entities – total script count & number of running scripts
  • Real-time updates via WebSocket – instant entity updates on status changes
  • Automatic backups – code is backed up before every edit/delete, with automatic rollback if an upload fails
  • HA Servicesupload_script, delete_script, list_scripts for use in automations
  • HACS compatible :tada:
  • Full English & German translations

Screenshots


:test_tube: Quality & Testing

The integration ships with a comprehensive test suite covering Config Flow, Options Flow, Coordinator, Sensors, Switches, Services and Icon registration – with 88% code coverage. Tests run against pytest-homeassistant-custom-component with mocked HTTP and WebSocket responses.


:wrench: Installation via HACS

  1. HACS → Integrations → ⋮ → Custom Repositories
  2. Add https://github.com/arboeh/shABman as Integration
  3. Search for shABman, install it and restart HA
  4. Go to Settings → Devices & Services → Add Integration and search for „shABman"
  5. Enter the IP address of your Shelly device – done!

:pushpin: Notes

  • Tested with Shelly BLU Gateway (Gen2, Firmware 1.4.0+) – other Gen2/Gen3 devices should work as well
  • Currently no support for password-protected devices (planned for a future release)
  • This is a beta release – feedback and bug reports are very welcome!

:link: Links


I’d love to hear your feedback, test results with other Shelly devices, and of course GitHub stars are always appreciated! :star:
If you have any questions or run into issues – feel free to reply here or open a GitHub issue.

1 Like

This is OUTSTANDING!

I have an issue that this may solve. I have numerous Shelly BLU motion sensors - and ALOT of shelly relays so my gateway coverage is excellent. However, even so, every once in a while (maybe 5-10% of the time), when there is no longer motion the motion detected by the BLU does not change back to not detected. I believe this is because the single message from the BLU to the gateway is lost. So, the problem resolves itself only when it again senses motion (and then later sends back the message again that there is no motion - that last message not being “missed”).

Is there a way to put some kind of a script on a shelly relay that will for example if a BLU has been seen in a state of “motion detected” for a longish time, like 30 minutes - that the relay can just reach out to the BLU to verify if that is the actual state (or is the communication only one-way - but how could it be one way if you can use the phone app to reach out and update it’s firmware, etc., it must be “listening” somehow)?

Hey @KruseLuds,

it’s two way, synced every 30 seconds in a row. So it might not show autostart / status instantly if you switch it in Shelly UI…

So it sounds like any bug (still showing motion when there is none) would be in the sensor itself?

Hey @KruseLuds,

shABman is a management tool for Shelly scripts – it helps you create, edit, start/stop, and backup scripts, not develop complex Shelly scripting logic.

Regarding your BLU motion sensor issue:

Yes, BLU sensors communicate bidirectionally with the gateway (every ~30s). The “stuck motion detected” issue is likely not a communication problem, but:

  1. BLU Firmware – Update to latest (1.4.0+)
  2. Gateway Firmware – Ensure BLU compatibility
  3. HA MQTT timeout – Increase availability_timeout in Shelly BLU integration
  4. Check RSSI values – Weak gateway coverage drops packets

Script solution? Technically possible, but complex:

A relay script polling BLU sensors would require:

  • Parse MQTT topics from gateway (BLU sensors have NO direct HTTP API)
  • Track individual sensor states with timeouts
  • Dynamic topic discovery for each sensor
  • more than 200 lines of ShellyScript + MQTT debugging

shABman can deploy such a script for you, but you’d need to write it first.

My recommendation: Optimize the HA Shelly BLU integration first before building script workarounds.

Need help deploying scripts with shABman? Happy to assist! :blush:

P.S.: Your “stuck motion” sounds more like a firmware/HA config issue than lost packets.

It could be - I will ask Shelly about this and get back to you. Maybe they can include in the next firmare release possibly an optional setting that is disabled by default, that when it stops detecting motion, that the notification can be sent twice. They might want to as a related setting to do the same thing when motion is detected.

:tada: shABman v0.5.1-beta released!

What’s new:
:lock: GitHub Actions security fixes
:floppy_disk: Device IP in backup filenames
:test_tube: Extended backup tests
:zap: Modern CI actions (v6)

Full features: Options Flow (Create/Edit/Delete), WebSocket live updates, per-script switches, sensors.

Install: HACS → Integrations → shABman (Beta) → Update

Gen2 Shelly only. Issues: GitHub · Where software is built

#HomeAssistant #Shelly #shABman

1 Like

:rocket:shabman v0.5.3-beta** - HA 2026.03 Icons + Test Rewrite

Changes:
• Icons moved to images/ (HA 2026.03 brand icon compliance) :white_check_mark:
• Complete test suite rewrite with dynamic entity registry detection :bar_chart:

Test Coverage: 89%+ maintained
HA Compatibility: 2024.3.3+
HACS: Ready (Brands Repo PR pending)

Full changelog: CHANGELOG.md

Try it out and report any edge cases with dynamic script detection!