Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Power button and relay
#11
(04-06-2021, 11:28 AM)electroremy Wrote: Hi everybody

I notice that the GPIO "poweroff" pin behavior is a little bit more complex

This is the diagram of my wiring, it's works fine ("BP" are push buttons)

[Image: rpi_on_off_circuit.jpg]

Hope that can helps other people

Regards
Thanks for your solution, it works great for me!
Reply
#12
Hi I tried this. But after editing the config file and shutting down. Moode automatically deleted all content of the file and stopped playing music.

Code:
20210929 000020 worker: -- Start
20210929 000020 worker: Successfully daemonized
20210929 000020 worker: Integrity check (passed)
20210929 000021 worker: File check (OK)
20210929 000022 worker: Session vacuumed
20210929 000022 worker: Session loaded
20210929 000022 worker: Debug logging (OFF)
20210929 000022 worker: -- Audio debug
20210929 000022 worker: ALSA cards: (0:empty | 1:empty | 2:empty | 3:empty
20210929 000022 worker: MPD config: (0:Allo DigiOne | mixer:(Digital) | card:0)
20210929 000022 worker: ALSA mixer actual (Digital)
20210929 000022 worker: ALSA Digital volume set to (Invalid card number.)
20210929 000022 worker: -- System
20210929 000024 worker: Host     (moode)
20210929 000024 worker: moOde    (7.3.0 2021-06-25)
20210929 000024 worker: RaspiOS  (10.6)
20210929 000024 worker: Kernel   (5.4.77-v7+ #1371)
20210929 000024 worker: Platform (Pi-3B+ 1.3 1GB)
20210929 000024 worker: ARM arch (armv7l, 32-bit kernel)
20210929 000024 worker: MPD ver  (0.22.8_p0x3)
20210929 000024 worker: CPU gov  (ondemand)
20210929 000024 worker: USB boot enabled
20210929 000024 worker: File system expanded
20210929 000024 worker: HDMI port off
20210929 000024 worker: -- Network
20210929 000024 worker: eth0 exists
20210929 000024 worker: IP addr (192.168.1.8)
20210929 000024 worker: Netmask (255.255.255.0)
20210929 000024 worker: Gateway (192.168.1.1)
20210929 000024 worker: Pri DNS (192.168.1.1)
20210929 000024 worker: Domain  (192.168.1.10)
20210929 000024 worker: wlan0 does not exist
20210929 000024 worker: -- Audio config
20210929 000025 moode.php: MPD connect failed: cmd=(playlist)
20210929 000025 worker: MPD conf updated
20210929 000025 worker: ALSA card number (0)
20210929 000025 worker: MPD audio output (Allo DigiOne)
20210929 000025 worker: WARNING: No device found at MPD configured card 0
20210929 000025 worker: ALSA mixer name (Digital)
20210929 000025 worker: MPD volume control (none)
20210929 000025 worker: Hdwr volume controller exists
20210929 000025 worker: Max ALSA volume (100%)
20210929 000025 worker: ALSA output mode (Direct: hw)
20210929 000025 worker: ALSA loopback (Off)
20210929 000025 worker: Reset renderer active flags
20210929 000025 worker: CamillaDSP (off)
20210929 000025 worker: -- MPD startup
20210929 000025 worker: MPD started
20210929 000026 worker: MPD accepting connections
20210929 000026 worker: MPD output 1 ALSA Default (on)
20210929 000026 worker: MPD output 2 ALSA Bluetooth (off)
20210929 000026 worker: MPD output 3 HTTP Server (off)
20210929 000026 worker: MPD crossfade (off)
20210929 000026 worker: MPD ignore CUE files (yes)
20210929 000026 worker: -- Feature availability
20210929 000026 worker: Source select (available)
20210929 000026 worker: Source select (source: MPD)
20210929 000026 worker: Source select (output: Allo DigiOne)
20210929 000026 worker: Bluetooth (available)
20210929 000026 worker: Airplay renderer (available)
20210929 000026 worker: Spotify renderer (available)
20210929 000026 worker: Squeezelite (available)
20210929 000026 worker: RoonBridge renderer (not installed)
20210929 000026 worker: UPnP renderer (available: started)
20210929 000026 worker: DLNA server (available)
20210929 000026 worker: UPnP browser (available)
20210929 000026 worker: GPIO button handler (available)
20210929 000026 worker: Stream recorder (n/a)
20210929 000026 worker: -- Music sources
20210929 000026 worker: USB sources (none attached)
20210929 000029 sourceMount(): Mount error: (mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs))
20210929 000032 sourceMount(): Mount error: (mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs))
20210929 000032 worker: NAS and UPnP sources (mountall initiated)
20210929 000032 worker: -- Other
20210929 000032 worker: USB volume knob (Off)
20210929 000032 worker: Shellinabox SSH started
20210929 000032 worker: USB auto-mounter (udisks-glue)
20210929 000032 worker: LED0 (Off)
20210929 000032 worker: LED1 (Off)
20210929 000032 worker: Saved MPD vol level (0)
20210929 000032 worker: Preamp volume level (0)
20210929 000032 worker: MPD volume level (0) restored
20210929 000032 worker: ALSA Digital volume (Invalid card number.)
20210929 000032 worker: Auto-play (Off)
20210929 000032 worker: Maintenance interval (3 hours)
20210929 000032 worker: Screen saver activation (Never)
20210929 000032 worker: Session permissions (OK)
20210929 000032 worker: Watchdog started
20210929 000032 worker: Ready
Reply
#13
(09-28-2021, 09:47 PM)coin777 Wrote: Hi I tried this. But after editing the config file and shutting down. Moode automatically deleted all content of the file and stopped playing music.

Code:
20210929 000020 worker: -- Start
20210929 000020 worker: Successfully daemonized
20210929 000020 worker: Integrity check (passed)
20210929 000021 worker: File check (OK)
20210929 000022 worker: Session vacuumed
20210929 000022 worker: Session loaded
20210929 000022 worker: Debug logging (OFF)
20210929 000022 worker: -- Audio debug
20210929 000022 worker: ALSA cards: (0:empty | 1:empty | 2:empty | 3:empty
20210929 000022 worker: MPD config: (0:Allo DigiOne | mixer:(Digital) | card:0)
20210929 000022 worker: ALSA mixer actual (Digital)
20210929 000022 worker: ALSA Digital volume set to (Invalid card number.)
20210929 000022 worker: -- System
20210929 000024 worker: Host     (moode)
20210929 000024 worker: moOde    (7.3.0 2021-06-25)
20210929 000024 worker: RaspiOS  (10.6)
20210929 000024 worker: Kernel   (5.4.77-v7+ #1371)
20210929 000024 worker: Platform (Pi-3B+ 1.3 1GB)
20210929 000024 worker: ARM arch (armv7l, 32-bit kernel)
20210929 000024 worker: MPD ver  (0.22.8_p0x3)
20210929 000024 worker: CPU gov  (ondemand)
20210929 000024 worker: USB boot enabled
20210929 000024 worker: File system expanded
20210929 000024 worker: HDMI port off
20210929 000024 worker: -- Network
20210929 000024 worker: eth0 exists
20210929 000024 worker: IP addr (192.168.1.8)
20210929 000024 worker: Netmask (255.255.255.0)
20210929 000024 worker: Gateway (192.168.1.1)
20210929 000024 worker: Pri DNS (192.168.1.1)
20210929 000024 worker: Domain  (192.168.1.10)
20210929 000024 worker: wlan0 does not exist
20210929 000024 worker: -- Audio config
20210929 000025 moode.php: MPD connect failed: cmd=(playlist)
20210929 000025 worker: MPD conf updated
20210929 000025 worker: ALSA card number (0)
20210929 000025 worker: MPD audio output (Allo DigiOne)
20210929 000025 worker: WARNING: No device found at MPD configured card 0
20210929 000025 worker: ALSA mixer name (Digital)
20210929 000025 worker: MPD volume control (none)
20210929 000025 worker: Hdwr volume controller exists
20210929 000025 worker: Max ALSA volume (100%)
20210929 000025 worker: ALSA output mode (Direct: hw)
20210929 000025 worker: ALSA loopback (Off)
20210929 000025 worker: Reset renderer active flags
20210929 000025 worker: CamillaDSP (off)
20210929 000025 worker: -- MPD startup
20210929 000025 worker: MPD started
20210929 000026 worker: MPD accepting connections
20210929 000026 worker: MPD output 1 ALSA Default (on)
20210929 000026 worker: MPD output 2 ALSA Bluetooth (off)
20210929 000026 worker: MPD output 3 HTTP Server (off)
20210929 000026 worker: MPD crossfade (off)
20210929 000026 worker: MPD ignore CUE files (yes)
20210929 000026 worker: -- Feature availability
20210929 000026 worker: Source select (available)
20210929 000026 worker: Source select (source: MPD)
20210929 000026 worker: Source select (output: Allo DigiOne)
20210929 000026 worker: Bluetooth (available)
20210929 000026 worker: Airplay renderer (available)
20210929 000026 worker: Spotify renderer (available)
20210929 000026 worker: Squeezelite (available)
20210929 000026 worker: RoonBridge renderer (not installed)
20210929 000026 worker: UPnP renderer (available: started)
20210929 000026 worker: DLNA server (available)
20210929 000026 worker: UPnP browser (available)
20210929 000026 worker: GPIO button handler (available)
20210929 000026 worker: Stream recorder (n/a)
20210929 000026 worker: -- Music sources
20210929 000026 worker: USB sources (none attached)
20210929 000029 sourceMount(): Mount error: (mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs))
20210929 000032 sourceMount(): Mount error: (mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs))
20210929 000032 worker: NAS and UPnP sources (mountall initiated)
20210929 000032 worker: -- Other
20210929 000032 worker: USB volume knob (Off)
20210929 000032 worker: Shellinabox SSH started
20210929 000032 worker: USB auto-mounter (udisks-glue)
20210929 000032 worker: LED0 (Off)
20210929 000032 worker: LED1 (Off)
20210929 000032 worker: Saved MPD vol level (0)
20210929 000032 worker: Preamp volume level (0)
20210929 000032 worker: MPD volume level (0) restored
20210929 000032 worker: ALSA Digital volume (Invalid card number.)
20210929 000032 worker: Auto-play (Off)
20210929 000032 worker: Maintenance interval (3 hours)
20210929 000032 worker: Screen saver activation (Never)
20210929 000032 worker: Session permissions (OK)
20210929 000032 worker: Watchdog started
20210929 000032 worker: Ready

Hi coin777, I'm using 7.2.1 and I think I won't update because maybe the new version will have many features I don't use.

In this 7.2.1 version, it works very stable with the above solution.

I don't know if version 7.3 on your raspberry pi  affects that function?
Reply
#14
If you don't want to play around with 220V (I don't want), then the alternative way is to use a low energy single board like an ESP8266, build a web server on it and let the esp shut down the pi with a remote switch (connected to the Shutdown pin of the GPIO of the raspi) and after some delay cut off the 5V power connection to the pi. You can use something like this here: https://www.aliexpress.com/item/32615078664.html . All you need is to route the 5V through it, and all you need is two of those here: https://www.aliexpress.com/item/1005002320414960.html so you can connect a power cable on both ends
Reply


Forum Jump: