[How to do instruction] Modding moOde: Switching amps - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9) +--- Thread: [How to do instruction] Modding moOde: Switching amps (/showthread.php?tid=335) Pages:
1
2
|
Modding moOde: Switching amps - Highsider - 07-21-2018 Hello, as I already posted some time ago my "moOde mod" for switchin amps in the old thread I updated this to the latest version (moOde 4.2 07-19-2018) With the modified files I have an additional "Amplifier" menu entry . I am using two amps which can be switched On/Off from here. This happens by two relais connected to the GPIO connectors (I am using a cheap China relais platine for this - connected to GPIO 23 and 24). Additionaly the amp gets switched off, when music is paused, stopped or muted for more than 5 minutes. They are switched on again (last amp selection) when the music is resumed. To use this mod, the attached files have to be replaced and two additional settings have to be added to the moode-sqlite3.db: Code: insert into cfg_system VALUES(100, amp-1, Off); The amps name and description of the amps are hardcoded in the footer.php file. The used GPIOs are set in the gpio.sh file Maybe it is usefull for others, too. Download Link Regards Hans. Edit: added Dropbox link RE: Modding moOde: Switching amps - Tim Curtis - 07-21-2018 Hi Hans, I remember this nice mod :-) I was going to try and integrate it and offer it as an option but never got to doing it. Are you trying to add zip files and how large are they? -Tim RE: Modding moOde: Switching amps - Highsider - 07-22-2018 Hi Tim, I tried, *.zip, *.tar *.txt - even renaming the achive to *.jpg isn't possible. The size is quite small - 55kB. This forum software is quite clever :-) RE: Modding moOde: Switching amps - TheOldPresbyope - 07-22-2018 (07-22-2018, 09:47 AM)Highsider Wrote: Hi Tim, Maybe use a cloud service like DropBox, Google Drive, Microsoft OneDrive? RE: Modding moOde: Switching amps - Highsider - 07-22-2018 Never used Dropbox & co. before. But thanks for the hint... Dropbox is quite easy to register. Download link is added at first posting RE: Modding moOde: Switching amps - Tim Curtis - 07-23-2018 Hi Hans, Just a heads up that the next moOde update will likely have some new cfg_system rows starting at 100 (there are already 99 rows. Just to be safe I would recommend starting at 200 otherwise the update will will not be able to insert the new rows. delete from cfg_system where id='100'; delete from cfg_system where id='101'; insert into cfg_system values (200, amp-1, Off); insert into cfg_system values (201, amp-2, Off); -Tim RE: Modding moOde: Switching amps - Highsider - 07-24-2018 Hi Tim, thank you for the information - i supose, it would have cost me quite some time to figure this out after next update :-) RE: Modding moOde: Switching amps - Prince - 07-26-2018 Hi guys, @Highsider: Sorry for hijacking your thread. (Reithalle und Stall, wo die Raspis überall arbeiten :-) my solution for switching the amplifier is using the popular SONOFF-Wifi-devices with the great Tasmota-Firmware . In my case the Sonoff will power up the Raspberry-Pi and the amplifiers simultaneously. After shutting down MoodeAudio the Sonoff will switch the power off with a delay of 20 seconds. In this time period the RaspberryPi has gone down safely. I wanted a remote hardware button for controlling MoOde and starting/shutting down the Pi, so this is my Tasmota-modification running on a cheap Sonoff-S20-Wifi-smart-switch. The webinterface-modification allows to control moOde rudimentary and own a link to the moOde-webinterface. The Sonoff has only one button, so a multipress function is used. It is nothing big, but maybe an inspiration or useful to someone. [attachment=2596] [attachment=2606]
Code: #ifndef USE_SCRIPT Detach the button from the relay (Tasmota-console-command): Code: SetOption73 1 Set some "moOde-like" color-changes (Tasmota-console-command): Code: WebColor {"WebColor":["#ffffff","#202020","#202020","#000000","#ffffff","#000000","#ffffff","#ff0000","#008000","#ffffff","#9ab87c","#82a361","#d43535","#931f1f","#931f1f","#9ab87c","#ffffff","#999999","#202020"]} The used script (for Raspberry-Hostname "moode"): Code: >D moOde-modification: add to /var/local/www/commandw/restart.sh Quote:if [[ $1 = "poweroff" ]]; then moOde-modification: add to /var/www/vol.sh Quote:if [[ $1 = "poweroff" ]]; then Greetings RE: Modding moOde: Switching amps - miklau - 09-25-2018 Hi there This Mod looks very nice I would really like to implement this in my MoOde player. Should i replace all the files with yours from the Dropbox folder to implement/install this? Would I then have to create a new build with that "Stretch" like from the download section on moodeaudio.org? Could I use the automated builder for this or is there a guide anywhere on how to do this please? Not quite sure how it works without the automated builder... My plan is to use this for a mute function that always pulls a pin when the music is paused (Link to other thread) Regards Mikkel RE: Modding moOde: Switching amps - MattOff491 - 10-13-2019 Hi everyone! Thanks for this mod - I'd really love to see this implemented! :-) Is this mod still valid for moode Will it "survive" an update of moode or does one have to manuall re-edit the files? MattOff491 |