Hi Bruno,
Bruno.dualo wroteOne thing you might guys me to figure out is where to call the script 16x2_oled_runeaudio.py so it runs when my Pi starts?
I would do it the arch linux way and use systemd.
Save this as /usr/lib/systemd/system/oled.service
[Unit]
Description=Audiophonics OLED Service
After=mpd.service
[Service]
ExecStart=/usr/bin/python /usr/local/bin/16x2_oled_runeaudio.py
ExecReload=/usr/bin/kill -HUP $MAINPID
KillMode=process
Restart=always
RestartSec=10
StartLimitInterval=30
StartLimitBurst=20
[Install]
WantedBy=multi-user.target
Enable it:
systemctl enable oled.service
I will have a look a it and try this week-end to add a few features like the detection of the airplay mode.
All the info is accessible via redis (activePlayer, act_player_info)
redis-cli get act_player_info
"{\"volume\":\"40\",\"repeat\":\"0\",\"random\":\"0\",\"single\":\"0\",\"consume\":\"0\",\"playlist\":\"109\",\"playlistlength\":\"313\",\"mixrampdb\":\"0.000000\",\"state\":\"play\",\"song\":\"312\",\"songid\":\"313\",\"time\":\"748\",\"elapsed\":\"3\",\"bitrate\":\"1336\",\"audio\":\"48000:24:2\",\"OK\":null,\"song_percent\":0,\"audio_sample_rate\":\"48\",\"audio_sample_depth\":\"24\",\"audio_channels\":\"Stereo\",\"changed\":\"playlist\",\"currentartist\":\"moe\",\"currentsong\":\"George\",\"currentalbum\":\"Live at Snow Ridge Ski Resort on 2008-08-31\",\"fileext\":\"flac\",\"radioname\":null,\"actPlayer\":\"MPD\"}"
You can use redis-py for the script.
Frank