Closed DarthSonic closed 1 year ago
Or if you go back to v2.10.x does it still happen.?
I did not use any previous version.
Should be fixed with this release - https://github.com/RogerSelwyn/Home_Assistant_SkyQ_MediaPlayer/releases/tag/v2.11.1
Unfortunately still the same issue.
Ok, I may have to give you a custom version with extra debugging. I’ll look at it in a while, maybe tomorrow.
How come you have three rediscoveries in one night?
Can you provide the detailed log entries, rather than that summary.
Normally deep sleep is from about 2am to 5am. This suggests it is doing it between 00:00 and 13:00. Does it keep discovering during the day?
I put my device in deep standby everytime. I set to Eco Mode. I so not worry about that 3 minute start time each time I start the box.
OK
So my device was going to deep standby at night around 00:30 and around 13:00 today.
Are you able to look in .storage/core.config_entries for the skyq entry. It should look like this:
{
"entry_id": "85e60b553c7e9acab917f6df8804aae0",
"version": 2,
"domain": "skyq",
"title": "Sky Q",
"data": {
"host": "192.168.1.199",
"name": "Sky Q"
},
"options": {},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "user",
"unique_id": "GBR06270869999",
"disabled_by": null
}
Can you post here.
I think you may need to swap lines 108/109 in config_flow.py so they look like this:
self._async_abort_entries_match({CONF_HOST: host})
self._abort_if_unique_id_configured()
I suspect it is a race condition where the box is announcing itself via SSDP before it is ready to be connected to. Ignore last post, change _async_setuniqueid to look like the below in config_flow.py.
async def _async_setuniqueid(self, host):
self._async_abort_entries_match({CONF_HOST: host})
remote = await self.hass.async_add_executor_job(SkyQRemote, host)
if not remote.device_setup:
raise CannotConnect()
if remote.device_type in UNSUPPORTED_DEVICES:
_LOGGER.warning(
"W0010 - Device type - %s - is not supported", remote.device_type
)
device_info = await self.hass.async_add_executor_job(
remote.get_device_information
)
await self.async_set_unique_id(
device_info.countryCode
+ "".join(e for e in device_info.serialNumber.casefold() if e.isalnum())
)
self._abort_if_unique_id_configured()
Are you able to look in .storage/core.config_entries for the skyq entry. It should look like this:
{ "entry_id": "85e60b553c7e9acab917f6df8804aae0", "version": 2, "domain": "skyq", "title": "Sky Q", "data": { "host": "192.168.1.199", "name": "Sky Q" }, "options": {}, "pref_disable_new_entities": false, "pref_disable_polling": false, "source": "user", "unique_id": "GBR06270869999", "disabled_by": null }
Can you post here.
Looks like this:
{
"entry_id": "9d4de0a76e5c6834825e5f43221bbd86",
"version": 2,
"domain": "skyq",
"title": "Sky Q",
"data": {
"host": "192.168.178.24",
"name": "Sky Q"
},
"options": {
"output_programme_image": false,
"live_tv": true,
"get_live_record": false,
"generate_switches_for_channels": true,
"room": "Wohnzimmer",
"advanced_options": true,
"channel_sources": [
"Das Erste HD",
"ZDF HD",
"RTL HD",
"SAT.1 HD",
"ProSieben HD",
"VOX HD",
"RTLZWEI HD",
"kabel eins HD",
"SIXX HD",
"SAT.1 Gold HD",
"Pro7 MAXX HD",
"NITRO HD",
"Sky Sport Bundesliga HD",
"Sky Sport F1 HD",
"SPORT1 HD",
"Sky Cinema Premieren HD",
"Sky Cinema Best Of HD",
"Sky Cinema Thriller HD",
"Sky Cinema Action HD",
"Sky Cinema Family HD",
"Sky Cinema Fun HD",
"Sky Cinema Classics HD",
"Sky Cinema Special HD",
"Warner TV Film HD",
"Deluxe Music HD",
"Deluxe Dance by Kontor",
"Deluxe Rock",
"Deluxe Rap",
"Deluxe Flashback"
],
"tv_device_class": false,
"country": "DEU",
"epg_cache_len": 20
},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "ssdp",
"unique_id": "DEU21151027307076",
"disabled_by": null
}
async def _async_setuniqueid(self, host): self._async_abort_entries_match({CONF_HOST: host}) remote = await self.hass.async_add_executor_job(SkyQRemote, host) if not remote.device_setup: raise CannotConnect() if remote.device_type in UNSUPPORTED_DEVICES: _LOGGER.warning( "W0010 - Device type - %s - is not supported", remote.device_type ) device_info = await self.hass.async_add_executor_job( remote.get_device_information ) await self.async_set_unique_id( device_info.countryCode + "".join(e for e in device_info.serialNumber.casefold() if e.isalnum()) ) self._abort_if_unique_id_configured()
Changed that. Will report tomorrow if issue still exists.
It is working with the change to _async_setuniqueid
Good. I had the same rediscovery last night, but I hadn’t spilled that change. I’ll do a new version tomorrow.
And to be able to power on the Sky Q box still using media player card, I use this automation:
alias: Sky Q Power On
description: ""
trigger:
- platform: event
event_type: call_service
event_data:
domain: media_player
service: turn_on
service_data:
device_id:
- 48af9acf47ace8a3ba3c0cfe9dd0c5b0
alias: When Sky Q is turned on
condition:
- condition: or
conditions:
- condition: device
device_id: 48af9acf47ace8a3ba3c0cfe9dd0c5b0
domain: media_player
entity_id: media_player.sky_q
type: is_off
- condition: state
entity_id: media_player.sky_q
state: unavailable
action:
- service: script.skyq_toggle
data: {}
mode: single
What you need is a script "script.skyq_toggle" that is doing the power toggle. For me it is a broadlink ir device.
Maybe some example for your documentation when others want to use deep standby / Eco Mode.
P. S. would have loved to "buy you a beer" but it does not accept my credit card. 🙁
😀 no worries
Closed with v2.11.2
Describe the bug
I put my Sky Q Receiver to deep standby every night. Every next start the device gets re-discovered by integration. When configuring it says device already configured and dismisses. Configured device is running without problems anyway.
To Reproduce
Steps to reproduce the behavior: I guess it is problem with deep standby.
Expected behavior
No re-duscover after configured device once.
Component versions
Latest stable.
Your configuration
UI
Either - Your configuration from the options dialogue
Cannot open it on Android device.