Thank you for your donation!


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


HA integration render and others.
#11
So maybe HA can delete that file somehow. i have no idea. will try to observe what must happen for this file to disappear

Edit:
I leave it alone for a few hours and there od no currentsong.txt filw? is there a way to look to history od file? Moves on its or smoething? Its do strange.
Maybye its about rights to that file?
Reply
#12
have no idea whats going on.
Maybe you have other solution how to do that?
Reply
#13
I tested the symlink yesterday and no issues after 8 hours. It's not obvious to me what might be happening on your end.

Code:
1. Comment out or delete the code block in worker.php chkMaintenance() function
2. Reboot
3. Setup the symlink
  sudo ln -s /var/local/www/currentsong.txt /var/www/currentsong.txt
4. Turn on the metadata file in System Config
5. Start a radio station playing
6. Query the metadata file (currentsong.txt)
  http://moode/currentsong.txt

It might be worthwhile to add a TODO list item to create a Web API command to return currentsong.txt. This would eliminate the need to mess with symlinks.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#14
(05-25-2022, 10:48 AM)Tim Curtis Wrote: I tested the symlink yesterday and no issues after 8 hours. It's not obvious to me what might be happening on your end.

Code:
1. Comment out or delete the code block in worker.php chkMaintenance() function
2. Reboot
3. Setup the symlink
  sudo ln -s /var/local/www/currentsong.txt /var/www/currentsong.txt
4. Turn on the metadata file in System Config
5. Start a radio station playing
6. Query the metadata file (currentsong.txt)
  http://moode/currentsong.txt

It might be worthwhile to add a TODO list item to create a Web API command to return currentsong.txt. This would eliminate the need to mess with symlinks.

For now i have no issue for 8 hours too. but i nothing changed from last disappear of file. So strange.
I'am pretty shure that is something on home assistant side but cant catch what. Still looking for reason.

It would be great to do that
Reply
#15
(05-25-2022, 08:35 PM)kuduacz Wrote: For now i have no issue for 8 hours too. but i nothing changed from last disappear of file. So strange.
I'am pretty shure that is something on home assistant side but cant catch what. Still looking for reason.

Maybe you just rebooted the system...

Anyway, an api to retrieve the file, or a JSON (better choice IMO) is easy to implement, if I do not forget about it during the w/e (I'll be hiking away, no PC) I'll take care of implementing it for you to test. I'll tell you exactly what to do once tested on my side.

Just tell me if a JSON object would be as easy to be parsed by the HA as the file itself. It could look something like the following (cannot remember what's in it right now, and my moOde is off)

{
    audio: BT / Airplay / whatsoever
    source: song title / radio URL (if cannot retrieve its name)
    status: PLAY / STOP / PAUSE
}


Cheers, A.
Reply
#16
There is now a Web API to get currentsong data. Its returned in JSON format.

Try

Code:
http://moode/command/?cmd=get_currentsong
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#17
(06-24-2022, 10:10 PM)Tim Curtis Wrote: There is now a Web API to get currentsong data. Its returned in JSON format.

Try

Code:
http://moode/command/?cmd=get_currentsong

you've been quick... or was it there since the beginning? ;-)
Reply
#18
The new API works a treat.

Here's some examples of the output from my moOde 8.1 player

Code:
# MPD playing a track from NAS

{"file":"NAS\/OMV-Music\/DBPowerAmp\/Al Di Meola\/Splendido Hotel\/01 Al Di Meola - Alien Chase on Arabian Desert.flac","artist":"Al Di Meola","album":"Splendido Hotel","title":"Alien Chase on Arabian Desert","coverurl":"\/coverart.php\/NAS%2FOMV-Music%2FDBPowerAmp%2FAl%20Di%20Meola%2FSplendido%20Hotel%2F01%20Al%20Di%20Meola%20-%20Alien%20Chase%20on%20Arabian%20Desert.flac","track":"1","date":"1980","composer":"Al Di Meola","encoded":"16\/44.1 FLAC","bitrate":"820 kbps","outrate":"16 bit, 48 kHz, Stereo, 1.536 Mbps","volume":"20","mute":"0","state":"play"}

# MPD playing a radio station

{"file":"http:\/\/listen.jazz88.org\/ksds.mp3","artist":"Radio station","album":"San Diego Jazz 88.3","title":"Regina Carter - Day Dreaming On The Niger","coverurl":"imagesw%2Fradio-logos%2FSan%20Diego%20Jazz%2088.3.jpg","track":"","date":"","composer":"","encoded":"VBR","bitrate":"96 kbps","outrate":"16 bit, 48 kHz, Stereo, 1.536 Mbps","volume":"20","mute":"0","state":"play"}

# Track playing via Bluetooth Renderer from Qobuz app on Pixel 3A phone

{"file":"Bluetooth Active","outrate":"16 bit, 48 kHz, Stereo, 1.536 Mbps"}

# Track playing via Airplay Renderer from Qobuz app on iPad

{"file":"Airplay Active","outrate":"16 bit, 48 kHz, Stereo, 1.536 Mbps"}

# Track playing via UPnP Renderer with BubbleUPnP app on Android Pixel 3A as the Control Point and Qobuz as (remote) media server

{"file":"http:\/\/10.0.0.84:57645\/proxy\/qobuz\/D05105691130D21835454C09686XXXXX.flac?proxy=false","artist":"Stanley Turrentine","album":"That's Where It's At","title":"Smile, Stacey (Remastered)","coverurl":"sudo: \/var\/www\/util\/upnp_albumart.py: command not found","track":"1","date":"","composer":"","encoded":"VBR","bitrate":"775 kbps","outrate":"16 bit, 48 kHz, Stereo, 1.536 Mbps","volume":"20","mute":"0","state":"play"}

Regards,
Kent
Reply
#19
(06-24-2022, 11:05 PM)TheOldPresbyope Wrote: The new API works a treat.

Here's some examples of the output from my moOde 8.1 player

Code:
# MPD playing a track from NAS

{"file":"NAS\/OMV-Music\/DBPowerAmp\/Al Di Meola\/Splendido Hotel\/01 Al Di Meola - Alien Chase on Arabian Desert.flac","artist":"Al Di Meola","album":"Splendido Hotel","title":"Alien Chase on Arabian Desert","coverurl":"\/coverart.php\/NAS%2FOMV-Music%2FDBPowerAmp%2FAl%20Di%20Meola%2FSplendido%20Hotel%2F01%20Al%20Di%20Meola%20-%20Alien%20Chase%20on%20Arabian%20Desert.flac","track":"1","date":"1980","composer":"Al Di Meola","encoded":"16\/44.1 FLAC","bitrate":"820 kbps","outrate":"16 bit, 48 kHz, Stereo, 1.536 Mbps","volume":"20","mute":"0","state":"play"}

# MPD playing a radio station

{"file":"http:\/\/listen.jazz88.org\/ksds.mp3","artist":"Radio station","album":"San Diego Jazz 88.3","title":"Regina Carter - Day Dreaming On The Niger","coverurl":"imagesw%2Fradio-logos%2FSan%20Diego%20Jazz%2088.3.jpg","track":"","date":"","composer":"","encoded":"VBR","bitrate":"96 kbps","outrate":"16 bit, 48 kHz, Stereo, 1.536 Mbps","volume":"20","mute":"0","state":"play"}

# Track playing via Bluetooth Renderer from Qobuz app on Pixel 3A phone

{"file":"Bluetooth Active","outrate":"16 bit, 48 kHz, Stereo, 1.536 Mbps"}

# Track playing via Airplay Renderer from Qobuz app on iPad

{"file":"Airplay Active","outrate":"16 bit, 48 kHz, Stereo, 1.536 Mbps"}

# Track playing via UPnP Renderer with BubbleUPnP app on Android Pixel 3A as the Control Point and Qobuz as (remote) media server

{"file":"http:\/\/10.0.0.84:57645\/proxy\/qobuz\/D05105691130D21835454C09686XXXXX.flac?proxy=false","artist":"Stanley Turrentine","album":"That's Where It's At","title":"Smile, Stacey (Remastered)","coverurl":"sudo: \/var\/www\/util\/upnp_albumart.py: command not found","track":"1","date":"","composer":"","encoded":"VBR","bitrate":"775 kbps","outrate":"16 bit, 48 kHz, Stereo, 1.536 Mbps","volume":"20","mute":"0","state":"play"}

Regards,
Kent

Nice thing to have, good job.

Cheers, A.
Reply
#20
You know what?
It happend to me again!
I mean file disapear. I dont know how.
Anyone have ana idea how to do it pernament?
Or how to use new file in json format in Home Assistant?
Reply


Forum Jump: