State Off vs Standby
blackie333 opened this issue · 7 comments
Hello, thank you for this integration, I like it more than the official.
I have a VU+Duo4K box and trying to optimize it's energy consumption.
I managed to build an esp32 IR transmitter via ESPhome emulating remote power button (able to poweron the box).
I would like to know the real status of the box and differentiate between states OFF(deep standby) and Standby(easy to wakeup) to know when I need to use IR transmitter instead of media_player.turn_on.
When trying to create automation I realized that after activating power button on hassio mediaplayer the box goes to standby, but entity state is Off. Would it be possible to set the entity state to "Standby" instead of "Off" and use "Off" only when the box is in DeepStandby/PoweredOff state (able to wake via IR or WoL only)?
Hi @blackie333 , thanks for the message.
The problem on recognizing the state is because the only information I can retrieve from Openwebif is if the Box is on or in standby.
I prefer to set to off when it is in standby, but may have a look to change it to standby instead of off, but that will not solve your issue, because I cannot get from OpenWebIf if it is on Off, Standby or deep Standby :(
Hello cinzas,
Is there meanwhile the possibility to display the powerstate "standby" in the mediaplayer?
I think I may have a solution to retry do add devices that are not available at boot time. I will investigate.
According to HomeAssistant media_plyer entity (https://developers.home-assistant.io/docs/core/entity/media-player/) these are the available states
OFF, ON, DLE, PLAYING, PAUSED, STANDBY and BUFFERING.
I will have a look, I think currently I only use OFF and ON
@uli-rpi : To be honest the only thing Openwebif will tell us, is if the box is on standby or not.
Tehcnically, I can only check it. Right now the plugin assumes STANDBY as OFF. So I should change that, and then it will show either ON or STANDBY, and those are the two states we can change from the mediaplay entity.
Openwebif allows to change the state to On, Standby and DeepStandby.
If you set it to deepstandby then you cannot turn it on from HA, and you need either wake on lan or to use the remote. (https://github.com/E2OpenPlugins/e2openplugin-OpenWebif/wiki/OpenWebif-API-documentation)
on the next update I will change the default behavior from OFF to STANDBY
I think I may have a solution to retry do add devices that are not available at boot time. I will investigate.
According to HomeAssistant media_plyer entity (https://developers.home-assistant.io/docs/core/entity/media-player/) these are the available states
OFF, ON, DLE, PLAYING, PAUSED, STANDBY and BUFFERING.
I will have a look, I think currently I only use OFF and ON
Thanks, that's the only really annoying issue for me.
My receiver is switching to deep-sleep automatically after 30minutes of standby (set in enigma to safe energy) a few times a day.
If HA could monitor the state of the receiver after HA restart(when receiver is offline) it would be a big improvement.
my solution for this
scrape:
- resource: !secret URL_VuDuo4KSE_Standby
# "http://192.168.178.22/web/powerstate"
scan_interval: 15
timeout: 30
sensor:
- name: "VuDuo4KSE_Standby"
unique_id: VuDuo4KSE_Standby
select: "e2instandby"
#TAB am Ende entfernen
value_template: "{{value[:-1]}}"
and the custom sensor
#VuDuo4KSE eingeschaltet
- sensor:
- name: "VuDuo4KSE_is_on"
unique_id: "VuDuo4KSE_is_on"
icon: mdi:power
state: >
{% if is_state('sensor.vuduo4kse_standby', 'true') or is_state('media_player.vuduo4kse', 'on')
or is_state('media_player.vuduo4kse', 'playing') %}
on
{% else %}
off
{% endif %}
Thanks, your solution could partly work, but it's more a work-around not fixing the media_player dashboard element.
I would prefer media_player.vuplus entity state set to "off" at HA restart instead of "unavailable" (could go 'unavailable' after some hours passed).
AFAIK it was the usual behavior with other HA devices/media_players.
After such offline device goes online it's HA state is recovered automatically.
For media_player.vuplus it stays 'unavailable' and I must restart whole HA to recognize my VU+ device again.