![]() |
HA integration render and others. - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: HA integration render and others. (/showthread.php?tid=4873) |
HA integration render and others. - kuduacz - 05-23-2022 I am using home assistant and integrate Moode (on my pri4) by mid integration. It work well but I don't know what render is in use. I mean when Moode playing something by airplay from my iPhone or by bluetooth from my wife's smartphone I don't see it in home assistant. So I try to do something like that: add new sensors in my HA:
At 1st try I linked file in/var/www/ doesn't change when I change render in Moode. I mean. I play something by airplay, and see that in "Moode.local/currentsong.txt". When I change course to some internet radio file doesn't changed. so render sensor is useless. When I try to link file with -sfn parameters in command it work well but file disappear after few hours. Anyone can help me ? I just won't to know what is playing on my Moode audio in my home assistant, because deflate integration does not support that feature. RE: HA integration render and others. - Tim Curtis - 05-23-2022 You will need to use a symbolic (soft) link instead of a hard link because the currentsong.txt file is updated via writing to a /tmp file first then renaming it to /var/local/www/currentsong.txt. This effectively creates a new file which causes the hard link to become broken. Try this Code: # Remove hard linked file RE: HA integration render and others. - kuduacz - 05-23-2022 I have to use sudo before ln… otherwise i have premission denied. Anyway i am pretty shure that this gile will disappear. But ill check it Edited: And Here it is as i said. File disappear. Why? RE: HA integration render and others. - Tim Curtis - 05-23-2022 Thats probably due to some old code in worker.php maintenance task that removes temp files and any symlinks in /var/www. Edit the file /var/www/command/worker.php and comment out or delete the code block below in the function chkMaintenance() Code: // Purge temp or unwanted resources RE: HA integration render and others. - kuduacz - 05-23-2022 Hmmm. it seems like You're right. I deleted that lines and for now file is still in place. Hope it doesnt change ![]() Thank You so much. Anyway. Is there a chance to little integration in home assistant with something like that? You know. official way but what i made is just workaround. EDIT: Nope. file currentsong.txt disappear again ![]() RE: HA integration render and others. - Tim Curtis - 05-23-2022 It would probably be a good thing to do but I don't have any experience with HA and so I'm not sure what "integration" would look like. Maybe another dev with HA experience can help us out :-) RE: HA integration render and others. - kuduacz - 05-23-2022 Nope. file currentsong.txt from /var/www/ disappear again RE: HA integration render and others. - TheOldPresbyope - 05-23-2022 (05-23-2022, 10:12 PM)Tim Curtis Wrote: It would probably be a good thing to do but I don't have any experience with HA and so I'm not sure what "integration" would look like. Maybe another dev with HA experience can help us out :-) As I read this thread, all the Op is asking for is that the currentsong.txt file (with enhanced metadata) be made accessible through the moOde Command API. Regards, Kent RE: HA integration render and others. - kuduacz - 05-24-2022 (05-23-2022, 11:45 PM)TheOldPresbyope Wrote:(05-23-2022, 10:12 PM)Tim Curtis Wrote: It would probably be a good thing to do but I don't have any experience with HA and so I'm not sure what "integration" would look like. Maybe another dev with HA experience can help us out :-) i just wont to see in HA status of mpd player with render. i mean i play via airplay wont to see in HA media player is playng via airplay, same for BT. No matter how. Any ideas how? RE: HA integration render and others. - Tim Curtis - 05-24-2022 (05-23-2022, 11:19 PM)kuduacz Wrote: Nope. file currentsong.txt from /var/www/ disappear again Very odd. There is no other code in moOde that would delete symlinks in /var/www/ |