Thank you for your donation!


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


Problem: Autostart Radiostation empty
#1
Hi,
i am new to Moode but i love it.

Sadly i have a problem that i cant fix, i turn on and off the Raspi where moode is running with a wireless powerplug.
I activated the Autostart after Boot but moode lost the radiostation which was played last time and so it cant autostart playing.

Is there a way i can fix that, maybe set a fixed station which ist played every time the Pi boots?
So its not necessary for mpd to remember the last station or something...

thx
traillight
Reply
#2
Post the Moode log after powering up and experiencing the issue and I'll have a look.

Code:
moodeutl -l
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Hi Tim,
thx for the fast reply.

Here is the log, i had to start it Tow Times, first time it worked, but im not sure if i shudwon the Pi yesterday witch Wirelessplug or per command.
Second time i it started after definately switch off with the Wireless Plug and the Autostart didnt work:

Code:
pi@moode:~ $ moodeutl -l
20200505 133802 worker: -- Start
20200505 133802 worker: Successfully daemonized
20200505 133802 worker: Integrity check (passed)
20200505 133802 worker: Session loaded
20200505 133802 worker: Debug logging (off)
20200505 133802 worker: Device raw: (0:ALSA|1:empty|i2s:none)
20200505 133802 worker: Device cfg: (On-board audio device|0|0|PCM|0)
20200505 133803 worker: ALSA volume set to (0%)
20200505 133803 worker: -- System
20200505 133806 worker: Host     (moode)
20200505 133806 worker: moOde    (6.5.1 2020-04-27)
20200505 133806 worker: Raspbian (10.3)
20200505 133806 worker: Kernel   (4.19.115-v7+ #1305)
20200505 133806 worker: Platform (Pi-3B 1GB v1.2)
20200505 133806 worker: ARM arch (armv7l, 32-bit kernel)
20200505 133806 worker: MPD ver  (0.21.22)
20200505 133806 worker: CPU gov  (ondemand)
20200505 133806 worker: USB boot not enabled yet
20200505 133806 worker: File system not expanded yet
20200505 133807 worker: HDMI port on
20200505 133807 worker: File check (OK)
20200505 133807 worker: -- Network
20200505 133807 worker: eth0 exists
20200505 133808 worker: IP addr (192.168.1.39)
20200505 133808 worker: Netmask (255.255.255.0)
20200505 133808 worker: Gateway (192.168.1.1)
20200505 133808 worker: Pri DNS (192.168.1.1)
20200505 133808 worker: Domain  (fritz.box)
20200505 133808 worker: wlan0 exists
20200505 133808 worker: wifi country (AT)
20200505 133808 worker: wlan0 trying SSID (Chamber)
20200505 133808 worker: IP addr (169.254.20.222)
20200505 133808 worker: Netmask (255.255.0.0)
20200505 133808 worker: Gateway (192.168.1.1)
20200505 133808 worker: Pri DNS (192.168.1.1)
20200505 133808 worker: Domain  (fritz.box)
20200505 133809 worker: -- Audio
20200505 133809 worker: ALSA outputs unmuted
20200505 133809 worker: ALSA card number (0)
20200505 133809 worker: Audio output (On-board audio device)
20200505 133809 worker: Audio formats (U8, S16_LE)
20200505 133809 worker: ALSA mixer name (PCM)
20200505 133809 worker: MPD volume control (software)
20200505 133809 worker: Hdwr volume controller exists
20200505 133809 worker: Max ALSA volume (100%)
20200505 133809 worker: Reset renderer active flags
20200505 133809 worker: -- MPD
20200505 133810 worker: MPD conf updated
20200505 133810 worker: MPD started
20200505 133810 worker: MPD accepting connections
20200505 133810 worker: Configure MPD outputs
20200505 133811 worker: MPD output 1 ALSA default (on)
20200505 133811 worker: MPD output 2 ALSA crossfeed (off)
20200505 133811 worker: MPD output 3 ALSA parametric eq (off)
20200505 133811 worker: MPD output 4 ALSA graphic eq (off)
20200505 133811 worker: MPD output 5 ALSA polarity inversion (off)
20200505 133811 worker: MPD output 6 ALSA bluetooth (off)
20200505 133811 worker: MPD output 7 HTTP stream (off)
20200505 133811 worker: MPD crossfade (off)
20200505 133811 worker: -- Feature availability
20200505 133811 worker: Source select (available)
20200505 133811 worker: Source select (source: MPD)
20200505 133811 worker: Source select (output: On-board audio device)
20200505 133811 worker: Bluetooth (available)
20200505 133811 worker: Airplay renderer (available)
20200505 133811 worker: Spotify renderer (available)
20200505 133811 worker: Squeezelite renderer (available)
20200505 133811 worker: UPnP renderer (available)
20200505 133811 worker: DLNA server (available)
20200505 133811 worker: UPnP browser (available)
20200505 133811 worker: Audio scrobbler (available)
20200505 133811 worker: GPIO button handler (available)
20200505 133811 worker: -- Music sources
20200505 133811 worker: USB sources (none attached)
20200505 133811 worker: NAS and UPnP sources (none configured)
20200505 133811 worker: -- Miscellaneous
20200505 133811 worker: USB volume knob (Off)
20200505 133811 worker: USB auto-mounter (udisks-glue)
20200505 133811 worker: LED0 (On)
20200505 133811 worker: LED1 (On)
20200505 133811 worker: Saved MPD vol level (0)
20200505 133811 worker: Preamp volume level (0)
20200505 133811 worker: MPD volume level (30) restored
20200505 133811 worker: ALSA volume level (100%)
20200505 133811 worker: Auto-play (On)
20200505 133812 worker: ALSA output (closed)
20200505 133812 worker: Auto-playing id ()
20200505 133814 worker: ALSA output (closed)
20200505 133814 worker: Auto-shuffle service (Off)
20200505 133814 worker: Maintenance interval (3 hrs)
20200505 133814 worker: Screen saver activation (Never)
20200505 133814 worker: Session permissions (OK)
20200505 133814 worker: Watchdog started
20200505 133814 worker: Ready
pi@moode:~ $
Reply
#4
The log entry below suggests MPD state file did not get written to disk by MPD before power was cut. You prolly need to use one of the smart power off boards that would let you do a software shutdown first b4 cutting the mains.

Code:
20200505 133812 worker: Auto-playing id ()

moOde uses the MPD status element 'songid' which represents the last played item in the Playlist.

Try the commands below to see whether songid exists in MPD state.
Code:
telnet localhost 6600
status
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
Thats what status is telling me:


Code:
pi@moode:~ $ mpc status
volume: 30%   repeat: off   random: off   single: off   consume: off
pi@moode:~ $ mpc status
Roots Legacy Radio Dub UK & Reggae: Marion - Strings Of Zion
[playing] #1/1   0:06/0:00 (0%)
volume: 30%   repeat: off   random: off   single: off   consume: off
pi@moode:~ $
First status was after Boot, second after i choose a Radiostation over Webinterface.

You dont have an idea how i can manage that without use soft shutdown?

Pi is in cellar an i Controll it over a ESP8266 on Terrasse, i have programmed a button witch switch the status of a wireless plug so that pi and AMP in cellar is powerd off.
Reply
#6
@traillight

So the ESP8266 is a WiFi+microcontroller chip with a full TCP/IP stack, right? To a first approximation, so is the RPi.

Couldn't you rethink your system in the following way?

 - Let the moOde player command the plug to turn off as the final step in moOde's "Shutdown" function.
 - use the ESP8266 to command the plug to turn on.

Just a thought.

Regards,
Kent
Reply
#7
Hi OldPresbyope,
at first, yes it is.

To your suggestion:
I think its not possible to let the RPI control de plug because itself is powered by the plug?
Or is there a way to tell the PRI the last action to make is to power of the plug, only thing which is important is to power off the plug after mpd has finish his shutdown.

That would be the great Smile

otherwise i have to recode the Sketch on the ESP so it first send the shutdown cmd in first step to the RPI an constantly Ping it , if there is no response send CMD to the Wireless Plug to power off in second step.
Thats a lot more work so i would prefer your option Smile
Reply


Forum Jump: