05-23-2022, 11:37 AM
(This post was last modified: 05-23-2022, 12:35 PM by Tim Curtis.
Edit Reason: Remover extra line breaks for readability
)
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.
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:
- - platform: command_line
- name: Moode Renderer
- command: curl http://moode.local/currentsong.txt | sed -n 's/^file=//p'
- value_template: >-
- {% if value == 'Airplay Active' %}
- Airplay
- {% elif value == 'Bluetooth Active' %}
- Bluetooth
- {% elif value == '' %}
- Brak
- {% else %}
- MPD
- {% endif %}
- scan_interval: 15
-
- - platform: command_line
- name: Moode MPD State
- command: curl http://moode.local/currentsong.txt | sed -n 's/^state=//p'
- value_template: >-
- {% if value == 'play' %}
- Play
- {% elif value == 'pause' %}
- Pause
- {% elif value == 'stop' %}
- Stop
- {% else %}
- Brak
- {% endif %}
- scan_interval: 15
Enable metadata file in setting in Moode.try to link that file by sudo ln /var/local/www/currentsong.txt /var/www/currentsong.txt
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.