The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Thank you for your donation!


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


HA integration render and others.
#1
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:
  1.    - platform: command_line
  2.      name: Moode Renderer
  3.      command: curl http://moode.local/currentsong.txt | sed -n 's/^file=//p'
  4.      value_template: >-
  5.        {% if value == 'Airplay Active' %}
  6.        Airplay
  7.        {% elif value == 'Bluetooth Active' %}
  8.        Bluetooth
  9.        {% elif value == '' %}
  10.        Brak
  11.        {% else %}
  12.        MPD
  13.        {% endif %}
  14.      scan_interval: 15
  15.  
  16.    - platform: command_line
  17.      name: Moode MPD State
  18.      command: curl http://moode.local/currentsong.txt | sed -n 's/^state=//p'
  19.      value_template: >-
  20.        {% if value == 'play' %}
  21.        Play
  22.        {% elif value == 'pause' %}
  23.        Pause
  24.        {% elif value == 'stop' %}
  25.        Stop
  26.        {% else %}
  27.        Brak

  28.        {% endif %}
  29.      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
And here starts problem.
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.
Reply


Messages In This Thread
HA integration render and others. - by kuduacz - 05-23-2022, 11:37 AM
RE: HA integration render and others. - by Nutul - 06-24-2022, 09:08 PM
RE: HA integration render and others. - by Nutul - 06-24-2022, 10:24 PM
RE: HA integration render and others. - by Nutul - 06-24-2022, 11:58 PM

Forum Jump: