# Switch on amplifier?

**URL:** <https://discourse.mopidy.com/t/switch-on-amplifier/2750>\
**Category:** Pi MusicBox (archive)\
**Created:** [September 7, 2018, 10:18am UTC](https://discourse.mopidy.com/t/switch-on-amplifier/2750 "2018-09-07T10:18:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GCoops](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/gcoops/32/989_2.png) [@GCoops](https://discourse.mopidy.com/u/GCoops)\
**Post date:** [September 7, 2018, 10:18am UTC](https://discourse.mopidy.com/t/switch-on-amplifier/2750/1 "2018-09-07T10:18:46Z")

</div>

Being new to all things Pi I am pleased to have acheived playing my NAS stored MP3 collection through Musicbox to my HiFi.

However a real bonus would be to actually turn on the amplifier form the UI, even a simple power relay controlled by the Pi would do the job.

Surely this is not impossible…Has anyone any thoughts or achieved this?

---

<div class="post-metadata">

**Author:** ![greg\_frank](https://avatars.discourse-cdn.com/v4/letter/g/e99b99/32.png) [@greg\_frank](https://discourse.mopidy.com/u/greg_frank)\
**Post date:** [September 20, 2018, 2:52pm UTC](https://discourse.mopidy.com/t/switch-on-amplifier/2750/2 "2018-09-20T14:52:47Z")

</div>

I just did this last night. Here is the small script that does the work: [https://github.com/greglarious/stereo\_power\_manager](https://github.com/greglarious/stereo_power_manager)

The basic idea is to turn on the external equipment whenever there is recent activity within the mopidy log file and turn off the power when there has been no log activity and no active sound output for a long-ish while.

FYI, the stereo\_power.sh script (which is not included) operates a cheap Tonbux 4 outlet WiFi Smart Power Strip. If you are interested, that script gets the job done using the TUYA cli: [https://github.com/TuyaAPI/cli](https://github.com/TuyaAPI/cli)

---

<div class="post-metadata">

**Author:** ![GCoops](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/gcoops/32/989_2.png) [@GCoops](https://discourse.mopidy.com/u/GCoops)\
**Post date:** [September 20, 2018, 8:28pm UTC](https://discourse.mopidy.com/t/switch-on-amplifier/2750/3 "2018-09-20T20:28:34Z")

</div>

Thanks @greg_frank, this idea is perfect for what I had in mind. Thanks for the info.

---

<div class="post-metadata">

**Author:** ![jodal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jodal/32/2651_2.png) [@jodal](https://discourse.mopidy.com/u/jodal)\
**Post date:** [February 19, 2026, 11:47am UTC](https://discourse.mopidy.com/t/switch-on-amplifier/2750/4 "2026-02-19T11:47:02Z")

</div>

Closed on February 19, 2026, 11:47am UTC


