After restarting Home Assistant, the state of my Panasonic Viera (model TX-55EXW604S) is always reported as ON.
This is occuring since upgrading to 0.109. In 0.107 (I skipped 0.108), the state was correct after restart.
configuration.yaml
No entires in configuration.yaml. This is the relevant part from core.config_entries:
{
"connection_class": "local_poll",
"data": {
"host": "xxx.xxx.xxx.xxx",
"name": "wohnzimmer_fernsehgeraet",
"port": 55000,
"turn_on_action": null
},
"domain": "panasonic_viera",
"entry_id": "XXXXXXXXX",
"options": {},
"source": "user",
"system_options": {
"disable_new_entities": false
},
"title": "wohnzimmer_fernsehgeraet",
"unique_id": "xxx.xxx.xxx.xxx",
"version": 1
}
There are no log entires.
I have an (unverified) theory what's going on.
Version 0.107:
https://github.com/home-assistant/core/blob/d520a02b8c41b073476a615a582990a1b8e4ceff/homeassistant/components/panasonic_viera/media_player.py#L125-L132
The update
method catches exceptions, setting the state to OFF when it can't fetch volume etc. from the TV.
Version 0.109:
https://github.com/home-assistant/core/blob/405062d2df06c8e3861fd0010104d628306235df/homeassistant/components/panasonic_viera/media_player.py#L244-L250
The _update
method (which seems to to be the replacement for the old update
method) does not catch exceptions. As a result, the state stays set to ON (which is the assumed initial state).
Hey there @joogps, mind taking a look at this issue as its been labeled with a integration (panasonic_viera
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
@rschaeuble that could be what’s going on. However, _update
does catch errors (it’s called inside async_update
using a helper to catch errors). Did you try to manually update the entity (using homeassistant.update_entity
) to see if the problem is that async_update
is never called?
Later I’ll investigate into this ;)
@joogps: I just tried homeassistant.update_entity
; however, that did not correctly update the state.
On my quick glance of the code, I did indeed miss the helper that handles the exception. Also, async_turn_off
invokes async_update
, which invokes _update
. So if the error were in _update
, the state would get reset to ON even after turning off the TV.
However, that's not what I'm seeing. Once the state is correct (when I restart Home Assistant while the TV is on), it stays correct when turning it on and off through Home Assistant.
Well, it's quite late here, so I might have missed another important detail in the code. If you need me to try out something to help you find the issue, I'll gladly do so tomorrow.
Ok! Thank you! (also, good night 😂)
not sure if related to same issue, if not let me know I'll create a new issue, but since 0.109, the state of my Panny (TX58DX700) is also incorrect.
If I switch it off from HA, state goes to off, and then to unavailable after a few secs
If I switch if off from the TV remote, state remains on on all the time.
if I then switch it off from HA ( TV is already off) state does not change to off and goes to unavailable after a few secs
Same here. The initial state is always ON and when I turn off the TV with the remote, the state remains ON. If I turn it on again with the remote and then use HA to turn it off, the state is correct.
Same issue. I have opened a different ticket #34934 giving some more information.
Any update on this @joogps please?
In the meantime I've reverted back to the old component as I use my TV for A LOT of automations...
Any update on this @joogps please?
In the meantime I've reverted back to the old component as I use my TV for A LOT of automations...
How did you do that?
get the files form the previous integration and replace them in the panasonic folder.
Ddepending on how you've installed HA, it may be in a different place. Mine is set to:
/usr/src/homeassistant/homeassistant/components/panasonic_viera/
Then remove the new integration and add it the old way (yaml)
get the files form the previous integration and replace them in the panasonic folder.
Ddepending on how you've installed HA, it may be in a different place. Mine is set to:
/usr/src/homeassistant/homeassistant/components/panasonic_viera/
Then remove the new integration and add it the old way (yaml)
Thanks.
I will wait a bit more for joogps to solve the issue. It does not a big deal for me so I can live without it at the moment but it is good to know.
@lolouk44 Hey! I’m working on some features to the integration (such as the possibility of sending remote key commands), and I’ve implemented some checks that might fix your problem. I’ll mention you when everything’s done 🙂
Great stuff, thanks.
It's not so critical for me personally since I've for now reverted to the old integration, but I'd sure like this fixed indeed.
If you need a "guinea pig" to test some stuff let me know :)
@lolouk44 It's strange that the older integration works since the update method is practically the same: https://github.com/home-assistant/core/blob/d520a02b8c41b073476a615a582990a1b8e4ceff/homeassistant/components/panasonic_viera/media_player.py#L125
yes, it's as if it's not catching the exception
I had even tried to catch all exceptions in the new integration by removing (TimeoutError, URLError, SOAPError, OSError)
on line 297
https://github.com/home-assistant/core/blob/405062d2df06c8e3861fd0010104d628306235df/homeassistant/components/panasonic_viera/media_player.py#L297
But that didn't fix it
Same issue. The initial state is always ON and when I turn off the TV with the remote, the state remains ON. If I turn it On again with the remote and then use HA to turn it off, the state is correct.
Also volume initial state is 0 in HA. If I adjust the volume in HA then that volume is set on the TV, but any external changes to volume are not reflected in HA.
It seems like the update method is not being called at all for you... Are you sure you don't have any logs @circa1665?
I think the problem could be that the new _update
function was async (which was unnecessary since it's purpose was to be an enclosure for the other sync methods)
Before the upgrade I had this kind of issue and It was solved using the app_power: true.
If I removed this option the problem reappeared.
@03397 Well, app_power had no influence on the update method at all, it would only enable the support for turn on. In this new version, you can overcome this by defining the more flexible attribute turn_on_action
, which can be any kind of script. More info in the documentation.
@joogps Yeah, it seems removing the async
from _update
fixes the issue.
Apparently, async_add_executor_job
doesn't work with async functions.
@rschaeuble That’s great! This fix will probably be included only with the next release, so it might take some time...
@joogps Oh well, it seems I cheered too early.
Removing async
causes _update
to be called (which didn't happen before), but the state is still ON after restarting Home Assistant.
After _update
sets the state to OFF in the exception handler, it directly calls async_create_remote_control
, which sets it back to ON. I'm not sure whether it's OK to delete that call, so please also have a look.
Maybe something to also add to the test suite.
If you want to, you can set the self.state
property to the default STATE_OFF
, and that could maybe help... I was taking a look at the homebridge Panasonic Viera component and I might adopt a different method for handling the on/off states.
I'll try setting the default to STATE_OFF a bit later today; right now my wife wants to use the TV ;)
Could be a nice workaround until the final fix is there.
The Homebridge component (using the viera.js library) gets the on state directly from the TV... That way we could make the error handling and state checking more robust https://github.com/g30r93g/homebridge-panasonic/blob/ef76c7f10d66c5810c1ede9a8513b0bb1ee7a364/index.js#L250
Getting the state directly from the TV sounds good.
But I guess special handling for a non-responding TV is still required. When it's completely powered off, or doesn't respond for any other reason, it should still be displayed as off. And regular polling should detect when it starts responding again.
Yes, that's what I'm thinking of.
@rschaeuble guess that's something 🤷
I figured out how to get the TV power on state even for models that don't disconnect from the network when turned off. Also, I managed to get data for the opened app (that could allow for input selection in the future maybe, although getting the input source, AV or HDMI, would be impossible).
I'll try to work on that as soon as the current changes I'm making get approved (please keep in your minds I have school work to do too 😂)
I'll implement a method that retrieves this data on the panasonic_viera
library and see how I can integrate it with Home Assistant later
It seems like the update method is not being called at all for you... Are you sure you don't have any logs @circa1665?
@joogps this is my YAML config for the integration:
# Panasonic TV
panasonic_viera:
host: !secret tv_ip
name: panasonic_tv
turn_on_action:
- service: wake_on_lan.send_magic_packet
data:
mac: !secret tv_mac
Have the following error in logs:
Log Details (ERROR)
Logger: homeassistant.components.media_player
Source: helpers/entity_platform.py:112
Integration: Media player (documentation, issues)
First occurred: 12:19:47 AM (1 occurrences)
Last logged: 12:19:47 AM
The panasonic_viera platform for the media_player integration does not support platform setup. Please remove it from your config.
I removed the previous config, so don't understand why it's moaning about "platform setup"?
@circa1665 We figured that out already in a different issue. It’s because there was still some code left for panasonic_viera
in the legacy discovery
integration. It was removed already, and I think it’s probably going to ship with the next patch.
For now, you can add this to you configuration to prevent the error from appearing:
discovery:
ignore:
- panasonic_viera
I was able to make the subscription requests using Python. If everything goes well, we'll soon have local push states!
the same problem occurs for the volume. if I change from the remote it is not updated
@lolouk44 are you there? Would you mind to see if the patch is working? Please download this repository (on this specific branch) and run Hass from there. Configure your TV and give me some feedback. Thanks!
Hi @joogps I'll try tomorrow
Great! Thank you 😊
App detection (made possible by the extra data that is received by the new subscription method) is working perfectly! I'm still experimenting, but it seems like it's possible to display even the media track title, duration etc if the file is playing directly from the TV (aka, not streaming)
it's funny because the TV I'm using to test these new features (the only Panasonic Viera one we have in our house) is in my parent's bedroom
I went there and confirmed they were watching a movie on Netflix 😂
Hi @joogps
I've just tried (copied to content of panasonic_viera over to my install) and I get this:
Error occurred loading configuration flow for integration panasonic_viera: cannot import name 'TV_TYPE_ENCRYPTED' from 'panasonic_viera' (/config/panasonic_viera/__init__.py)
Is there anything else that I'm missing? I could not see any other changes than what is in the panasonic_viera folder.
@lolouk You should update the entire installation, and not just the component, since it’s based on the dev branch. Run script/setup
and then hass
.
Actually, that was my bad. I’m fixing the issue now.
If Home Assistant complains about MediaPlayerEntity
or RemoteEntity
, just replace them with MediaPlayerDevice
and RemoteDevice
sorry mate :(
Had to turn the TV on for the integration to be setup, so there is some sort of communication, but state is not detected...
that's strange...
more here:
Log Details (ERROR)
Logger: homeassistant.setup
Source: setup.py:249
First occurred: 12:15:47 PM (2 occurrences)
Last logged: 12:15:47 PM
Unable to prepare setup for platform panasonic_viera.media_player: Platform not found (cannot import name 'MediaPlayerEntity' from 'homeassistant.components.media_player' (/usr/src/homeassistant/homeassistant/components/media_player/__init__.py)).
Unable to prepare setup for platform panasonic_viera.remote: Platform not found (cannot import name 'RemoteEntity' from 'homeassistant.components.remote' (/usr/src/homeassistant/homeassistant/components/remote/__init__.py)).
Oh, you just need to replace MediaPlayerEntity
and RemoteEntity
with MediaPlayerDevice
and RemoteDevice
, both in the import sections and in the class declarations
I made a new commit to the repo that fixes this so you don't need to do it again later
sorry just seen this. Was too eager to test :)
this line too?
remote_device = PanasonicVieraRemoteEntity(remote, name)
You don't need to rename PanasonicVieraRemoteEntity
, just replace RemoteEntity
with RemoteDevice
where it appears (it appears twice)
Do the same in media_player.py
Some progress :)
TV first showed as on after restarting HA while TV was on
Volume reacted pretty much straight away.
App name shows netflix for some reason even though I had no app running
Then still says on on
even though I switch the TV off with the remote
I eventually (about 30 sec later) turned the tv on with the remote. The TV state went to off
Then remains off regardless, with this in the logs:
Update for media_player.panasonic_viera_tv fails
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 962, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 949, in create_connection
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 473, in sock_connect
return await fut
File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 503, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.0.27', 55000)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/panasonic_viera/__init__.py", line 583, in async_aiohttp_request
method, url, headers=headers, data=body
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 1012, in __aenter__
self._resp = await self._coro
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request
timeout=real_timeout
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection
req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 1004, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection
req=req, client_error=client_error)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 943, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.0.27:55000 ssl:None [Connect call failed ('192.168.0.27', 55000)]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/media_player.py", line 114, in async_update
await self._remote.async_update()
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/__init__.py", line 203, in async_update
await self._handle_errors(self._update, is_async=True)
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/__init__.py", line 262, in _handle_errors
await self._shutdown()
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/__init__.py", line 296, in _shutdown
await self._control.async_upnp_service_unsubscribe(event)
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/panasonic_viera/__init__.py", line 648, in async_upnp_service_unsubscribe
"UNSUBSCRIBE", f"http://{self._host}:{self._port}/{service}", headers
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/panasonic_viera/__init__.py", line 591, in async_aiohttp_request
raise TimeoutError
TimeoutError
by the way I have now 3 components?
the remote
entity is from a new feature I'm adding.
Ok, I will make one more commit that logs when the state variables change and what kind of data is received.
Also the log messages were just poor error handling. I'll fix that in the future
cool. I'll also set my logs to debug for the component.
Is that correct ?
logger:
default: error
logs:
homeassistant.components.panasonic_viera: debug
Yes!
Also, it would be nice to call homeassistant.update_entity
after each change to update states right away
cool. So far, if the TV is on while I restart HA, it's updating the volume
So is the mute state, without having to call homeassistant.update_entity
app_name seems to remain at "netflix" regardless of the app running (tried with youtube)
Calling homeassistant.update_entity
doesn't seem to have any effect
Do you have any logs with Received data from service
?
This "Netflix" situation is strange... I need to check the data sent by your TV to confirm where the problem is
latest:
2020-05-04 13:07:26 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/panasonic_viera/__init__.py", line 723, in _handle_request
await self.on_event(service, properties)
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/__init__.py", line 273, in on_event
_LOGGER.error("Received data from service %s: %d", service, properties)
File "/usr/local/lib/python3.7/logging/__init__.py", line 1407, in error
self._log(ERROR, msg, args, **kwargs)
File "/usr/local/lib/python3.7/logging/__init__.py", line 1514, in _log
self.handle(record)
File "/usr/local/lib/python3.7/logging/__init__.py", line 1524, in handle
self.callHandlers(record)
File "/usr/local/lib/python3.7/logging/__init__.py", line 1586, in callHandlers
hdlr.handle(record)
File "/usr/local/lib/python3.7/logging/__init__.py", line 894, in handle
self.emit(record)
File "/usr/src/homeassistant/homeassistant/components/system_log/__init__.py", line 181, in emit
record, stack, _figure_out_source(record, stack, self.hass)
File "/usr/src/homeassistant/homeassistant/components/system_log/__init__.py", line 97, in __init__
self.message = deque([record.getMessage()], maxlen=5)
File "/usr/local/lib/python3.7/logging/__init__.py", line 369, in getMessage
msg = msg % self.args
TypeError: %d format: a number is required, not collections.OrderedDict
2020-05-04 13:07:26 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/panasonic_viera/__init__.py", line 723, in _handle_request
await self.on_event(service, properties)
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/__init__.py", line 273, in on_event
_LOGGER.error("Received data from service %s: %d", service, properties)
File "/usr/local/lib/python3.7/logging/__init__.py", line 1407, in error
self._log(ERROR, msg, args, **kwargs)
File "/usr/local/lib/python3.7/logging/__init__.py", line 1514, in _log
self.handle(record)
File "/usr/local/lib/python3.7/logging/__init__.py", line 1524, in handle
self.callHandlers(record)
File "/usr/local/lib/python3.7/logging/__init__.py", line 1586, in callHandlers
hdlr.handle(record)
File "/usr/local/lib/python3.7/logging/__init__.py", line 894, in handle
self.emit(record)
File "/usr/src/homeassistant/homeassistant/components/system_log/__init__.py", line 181, in emit
record, stack, _figure_out_source(record, stack, self.hass)
File "/usr/src/homeassistant/homeassistant/components/system_log/__init__.py", line 97, in __init__
self.message = deque([record.getMessage()], maxlen=5)
File "/usr/local/lib/python3.7/logging/__init__.py", line 369, in getMessage
msg = msg % self.args
TypeError: %d format: a number is required, not list
Sorry, apparently Python didn't like the way I was logging. Fixed.
it's funny now that twice I get an update in the logs after I click restart server.
2020-05-04 13:12:48 DEBUG (SyncWorker_8) [homeassistant.components.panasonic_viera.panasonic_viera] Determining TV type
2020-05-04 13:12:48 DEBUG (SyncWorker_8) [homeassistant.components.panasonic_viera.panasonic_viera] Determined TV type is non-encrypted
2020-05-04 13:12:48 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Creating server at 192.168.0.23:55000
2020-05-04 13:12:49 INFO (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Please override the on_event method to handle the received data.
2020-05-04 13:12:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] Received the following data from service nrc/event_0
2020-05-04 13:12:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] [OrderedDict([('X_InputMode', 'rc-mode')]), OrderedDict([('X_KeyboardType', 'default')]), OrderedDict([('X_ScreenState', 'on')]), OrderedDict([('X_AppInfo', 'vc_app:1:product_id=0010000200000001:Netflix')])]
2020-05-04 13:12:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] Update screen state: on
2020-05-04 13:12:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] Update app info: vc_app:1:product_id=0010000200000001:Netflix
Just did the update on init.py
Then got this at restart:
2020-05-04 13:13:52 ERROR (MainThread) [homeassistant.components.panasonic_viera] Received the following data from service dmr/event_0
2020-05-04 13:13:52 ERROR (MainThread) [homeassistant.components.panasonic_viera] OrderedDict([('@val', '0'), ('PresetNameList', OrderedDict([('@val', 'FactoryDefaults')])), ('Mute', OrderedDict([('@val', '0'), ('@channel', 'Master')])), ('Volume', OrderedDict([('@val', '0'), ('@channel', 'Master')])), ('X_AudioList', OrderedDict([('@val', '-1,')])), ('X_CurrentAudioID', OrderedDict([('@val', '0')])), ('X_DualMonoModeList', OrderedDict([('@val', '-1,')])), ('X_CurrentDualMonoModeID', OrderedDict([('@val', '0')])), ('X_SubtitleList', OrderedDict([('@val', '-1,')])), ('X_CurrentSubtitleID', OrderedDict([('@val', '0')])), ('X_SubtitleCharCodeList', OrderedDict([('@val', '-1,')])), ('X_CurrentSubtitleCharCodeID', OrderedDict([('@val', '0')]))])
2020-05-04 13:13:52 ERROR (MainThread) [homeassistant.components.panasonic_viera] Received the following data from service nrc/event_0
2020-05-04 13:13:52 ERROR (MainThread) [homeassistant.components.panasonic_viera] [OrderedDict([('X_InputMode', 'rc-mode')]), OrderedDict([('X_KeyboardType', 'default')]), OrderedDict([('X_ScreenState', 'on')]), OrderedDict([('X_AppInfo', 'vc_app:1:product_id=0010000200000001:Netflix')])]
2020-05-04 13:13:52 ERROR (MainThread) [homeassistant.components.panasonic_viera] Update screen state: on
2020-05-04 13:13:52 ERROR (MainThread) [homeassistant.components.panasonic_viera] Update app info: vc_app:1:product_id=0010000200000001:Netflix
2020-05-04 13:14:03 ERROR (MainThread) [homeassistant.components.panasonic_viera] Received the following data from service dmr/event_0
2020-05-04 13:14:03 ERROR (MainThread) [homeassistant.components.panasonic_viera] OrderedDict([('@val', '0'), ('PresetNameList', OrderedDict([('@val', 'FactoryDefaults')])), ('Mute', OrderedDict([('@val', '0'), ('@channel', 'Master')])), ('Volume', OrderedDict([('@val', '0'), ('@channel', 'Master')])), ('X_AudioList', OrderedDict([('@val', '-1,')])), ('X_CurrentAudioID', OrderedDict([('@val', '0')])), ('X_DualMonoModeList', OrderedDict([('@val', '-1,')])), ('X_CurrentDualMonoModeID', OrderedDict([('@val', '0')])), ('X_SubtitleList', OrderedDict([('@val', '-1,')])), ('X_CurrentSubtitleID', OrderedDict([('@val', '0')])), ('X_SubtitleCharCodeList', OrderedDict([('@val', '-1,')])), ('X_CurrentSubtitleCharCodeID', OrderedDict([('@val', '0')]))])
2020-05-04 13:14:03 ERROR (MainThread) [homeassistant.components.panasonic_viera] Received the following data from service nrc/event_0
2020-05-04 13:14:03 ERROR (MainThread) [homeassistant.components.panasonic_viera] [OrderedDict([('X_InputMode', 'rc-mode')]), OrderedDict([('X_KeyboardType', 'default')]), OrderedDict([('X_ScreenState', 'on')]), OrderedDict([('X_AppInfo', 'vc_app:1:product_id=0010000200000001:Netflix')])]
2020-05-04 13:14:03 ERROR (MainThread) [homeassistant.components.panasonic_viera] Update screen state: on
2020-05-04 13:14:03 ERROR (MainThread) [homeassistant.components.panasonic_viera] Update app info: vc_app:1:product_id=0010000200000001:Netflix
The "Netflix" issue is because of the data coming from your TV, apparently. And the screen state should update when you turn the TV off. If it doesn't, then the problem is with Panasonic's API.
my boy is watching youtube now ;)
gimme 10 min (we're about to have lunch after that so will quickly test state changes before)
oh, no problem!
state is not changing to off
after switching off by remote...
2020-05-04 13:20:23 ERROR (MainThread) [homeassistant.components.panasonic_viera] Update screen state: off
2020-05-04 13:20:23 ERROR (MainThread) [homeassistant.components.panasonic_viera] Received the following data from service nrc/event_0
2020-05-04 13:20:23 ERROR (MainThread) [homeassistant.components.panasonic_viera] OrderedDict([('X_ScreenState', 'off')])
2020-05-04 13:20:23 ERROR (MainThread) [homeassistant.components.panasonic_viera] Update screen state: off
2020-05-04 13:20:32 DEBUG (MainThread) [homeassistant.components.panasonic_viera] Could not establish remote connection:
2020-05-04 13:20:32 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Stopping server
2020-05-04 13:20:32 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.panasonic_viera_tv fails
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 962, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 949, in create_connection
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 473, in sock_connect
return await fut
File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 503, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.0.27', 55000)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/panasonic_viera/__init__.py", line 583, in async_aiohttp_request
method, url, headers=headers, data=body
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 1012, in __aenter__
self._resp = await self._coro
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request
timeout=real_timeout
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection
req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 1004, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection
req=req, client_error=client_error)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 943, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.0.27:55000 ssl:None [Connect call failed ('192.168.0.27', 55000)]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/media_player.py", line 114, in async_update
await self._remote.async_update()
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/__init__.py", line 202, in async_update
await self._handle_errors(self._update, is_async=True)
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/__init__.py", line 261, in _handle_errors
await self._shutdown()
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/__init__.py", line 302, in _shutdown
await self._control.async_upnp_service_unsubscribe(event)
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/panasonic_viera/__init__.py", line 648, in async_upnp_service_unsubscribe
"UNSUBSCRIBE", f"http://{self._host}:{self._port}/{service}", headers
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/panasonic_viera/__init__.py", line 591, in async_aiohttp_request
raise TimeoutError
TimeoutError
2020-05-04 13:20:42 DEBUG (MainThread) [homeassistant.components.panasonic_viera] Could not establish remote connection:
2020-05-04 13:20:42 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Stopping server
2020-05-04 13:20:42 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.panasonic_viera_tv fails
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 962, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 949, in create_connection
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 473, in sock_connect
return await fut
File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 503, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.0.27', 55000)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/panasonic_viera/__init__.py", line 583, in async_aiohttp_request
method, url, headers=headers, data=body
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 1012, in __aenter__
self._resp = await self._coro
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request
timeout=real_timeout
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection
req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 1004, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection
req=req, client_error=client_error)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 943, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.0.27:55000 ssl:None [Connect call failed ('192.168.0.27', 55000)]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/media_player.py", line 114, in async_update
await self._remote.async_update()
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/__init__.py", line 202, in async_update
await self._handle_errors(self._update, is_async=True)
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/__init__.py", line 261, in _handle_errors
await self._shutdown()
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/__init__.py", line 302, in _shutdown
await self._control.async_upnp_service_unsubscribe(event)
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/panasonic_viera/__init__.py", line 648, in async_upnp_service_unsubscribe
"UNSUBSCRIBE", f"http://{self._host}:{self._port}/{service}", headers
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/panasonic_viera/__init__.py", line 591, in async_aiohttp_request
raise TimeoutError
TimeoutError
2020-05-04 13:20:43 DEBUG (MainThread) [homeassistant.components.panasonic_viera] Could not establish remote connection:
2020-05-04 13:20:43 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Stopping server
2020-05-04 13:20:43 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.panasonic_viera_tv fails
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 962, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 949, in create_connection
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 473, in sock_connect
return await fut
File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 503, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.0.27', 55000)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/panasonic_viera/__init__.py", line 583, in async_aiohttp_request
method, url, headers=headers, data=body
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 1012, in __aenter__
self._resp = await self._coro
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request
timeout=real_timeout
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection
req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 1004, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection
req=req, client_error=client_error)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 943, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.0.27:55000 ssl:None [Connect call failed ('192.168.0.27', 55000)]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/media_player.py", line 114, in async_update
await self._remote.async_update()
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/__init__.py", line 202, in async_update
await self._handle_errors(self._update, is_async=True)
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/__init__.py", line 261, in _handle_errors
await self._shutdown()
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/__init__.py", line 302, in _shutdown
await self._control.async_upnp_service_unsubscribe(event)
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/panasonic_viera/__init__.py", line 648, in async_upnp_service_unsubscribe
"UNSUBSCRIBE", f"http://{self._host}:{self._port}/{service}", headers
File "/usr/src/homeassistant/homeassistant/components/panasonic_viera/panasonic_viera/__init__.py", line 591, in async_aiohttp_request
raise TimeoutError
TimeoutError
Okay, I think I know what's happening. The _shutdown
function has no error checking, and when a TimeoutError
is raised, it prevents the TV state from being set to "Unavailable" after a connection error. In the first lines, we can see that the TV's state is set to off
, but the integration fails after that
I'll try to optimize it for all TVs (each one behaves a bit differently from the others apparently)
getting better. State now keeps changing as I turn on and off.
even the app state has changed.
Opening Firefox returns: app_name: Netflix, vc_app
Opening BBC Iplayer returns: app_name: Netflix, vc_app
Opening Youtube returns: app_name: Netflix
Switching to HDMI input returns: app_name: Netflix
Turning the TV off via remote, state goes to unavailable. Turning it back on, state goes briefly to off then on (which I guess makes sense. When the TV is off, its NIC is off as I can't even ping it)
So although I'll have to update all my automations from off
to unavailable
, I'm happy it's working now :)
btw remote also changes from on to unavailable. media_player.viera remains unavailable all the time, so that's probably one to remove for now?
you may also want to change the log level for the data received from error to debug:
2020-05-04 14:34:49 DEBUG (SyncWorker_0) [homeassistant.components.panasonic_viera.panasonic_viera] Determining TV type
2020-05-04 14:34:49 DEBUG (SyncWorker_0) [homeassistant.components.panasonic_viera.panasonic_viera] Determined TV type is non-encrypted
2020-05-04 14:34:49 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Creating server at 192.168.0.23:55000
2020-05-04 14:34:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] Received the following data from service dmr/event_0
2020-05-04 14:34:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] OrderedDict([('@val', '0'), ('PresetNameList', OrderedDict([('@val', 'FactoryDefaults')])), ('Mute', OrderedDict([('@val', '0'), ('@channel', 'Master')])), ('Volume', OrderedDict([('@val', '0'), ('@channel', 'Master')])), ('X_AudioList', OrderedDict([('@val', '-1,')])), ('X_CurrentAudioID', OrderedDict([('@val', '0')])), ('X_DualMonoModeList', OrderedDict([('@val', '-1,')])), ('X_CurrentDualMonoModeID', OrderedDict([('@val', '0')])), ('X_SubtitleList', OrderedDict([('@val', '-1,')])), ('X_CurrentSubtitleID', OrderedDict([('@val', '0')])), ('X_SubtitleCharCodeList', OrderedDict([('@val', '-1,')])), ('X_CurrentSubtitleCharCodeID', OrderedDict([('@val', '0')]))])
2020-05-04 14:34:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] Received the following data from service nrc/event_0
2020-05-04 14:34:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] [OrderedDict([('X_InputMode', 'rc-mode')]), OrderedDict([('X_KeyboardType', 'default')]), OrderedDict([('X_ScreenState', 'on')]), OrderedDict([('X_AppInfo', 'vc_app:1:product_id=0010000200000001:Netflix')])]
2020-05-04 14:34:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] Update screen state: on
2020-05-04 14:34:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] Update app info: vc_app:1:product_id=0010000200000001:Netflix
2020-05-04 14:36:51 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Not notify
2020-05-04 14:36:52 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Not notify
getting better. State now keeps changing as I turn on and off.
even the app state has changed.
Opening Firefox returns: app_name: Netflix, vc_app
Opening BBC Iplayer returns: app_name: Netflix, vc_app
Opening Youtube returns: app_name: Netflix
Switching to HDMI input returns: app_name: NetflixTurning the TV off via remote, state goes to unavailable. Turning it back on, state goes briefly to off then on (which I guess makes sense. When the TV is off, its NIC is off as I can't even ping it)
So although I'll have to update all my automations fromoff
tounavailable
, I'm happy it's working now :)btw remote also changes from on to unavailable. media_player.viera remains unavailable all the time, so that's probably one to remove for now?
I guess the media_player.viera
entity is just an old entity that wasn't removed completely 🤷♂️
you may also want to change the log level for the data received from error to debug:
2020-05-04 14:34:49 DEBUG (SyncWorker_0) [homeassistant.components.panasonic_viera.panasonic_viera] Determining TV type 2020-05-04 14:34:49 DEBUG (SyncWorker_0) [homeassistant.components.panasonic_viera.panasonic_viera] Determined TV type is non-encrypted 2020-05-04 14:34:49 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Creating server at 192.168.0.23:55000 2020-05-04 14:34:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] Received the following data from service dmr/event_0 2020-05-04 14:34:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] OrderedDict([('@val', '0'), ('PresetNameList', OrderedDict([('@val', 'FactoryDefaults')])), ('Mute', OrderedDict([('@val', '0'), ('@channel', 'Master')])), ('Volume', OrderedDict([('@val', '0'), ('@channel', 'Master')])), ('X_AudioList', OrderedDict([('@val', '-1,')])), ('X_CurrentAudioID', OrderedDict([('@val', '0')])), ('X_DualMonoModeList', OrderedDict([('@val', '-1,')])), ('X_CurrentDualMonoModeID', OrderedDict([('@val', '0')])), ('X_SubtitleList', OrderedDict([('@val', '-1,')])), ('X_CurrentSubtitleID', OrderedDict([('@val', '0')])), ('X_SubtitleCharCodeList', OrderedDict([('@val', '-1,')])), ('X_CurrentSubtitleCharCodeID', OrderedDict([('@val', '0')]))]) 2020-05-04 14:34:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] Received the following data from service nrc/event_0 2020-05-04 14:34:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] [OrderedDict([('X_InputMode', 'rc-mode')]), OrderedDict([('X_KeyboardType', 'default')]), OrderedDict([('X_ScreenState', 'on')]), OrderedDict([('X_AppInfo', 'vc_app:1:product_id=0010000200000001:Netflix')])] 2020-05-04 14:34:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] Update screen state: on 2020-05-04 14:34:49 ERROR (MainThread) [homeassistant.components.panasonic_viera] Update app info: vc_app:1:product_id=0010000200000001:Netflix 2020-05-04 14:36:51 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Not notify 2020-05-04 14:36:52 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Not notify
That was just to make sure it would appear 😂
Also, I didn't manage to get input data. Maybe it's impossible with my model, since not even the app let me do it.
migliorare. Lo stato ora continua a cambiare mentre accendo e spengo.
anche lo stato dell'app è cambiato.
Apertura di ritorni di Firefox: nome_app: Netflix, vc_app
Apertura di BBC Iplayer ritorni: nome_app: Netflix, vc_app
Apertura di ritorni Youtube: nome_app: Netflix
Passaggio a ritorni di ingresso HDMI: nome_app: NetflixSpegnendo la TV tramite telecomando, lo stato diventa non disponibile. Riaccendendolo, lo stato si spegne brevemente, quindi si accende (il che immagino abbia senso. Quando la TV è spenta, la sua scheda di rete è disattivata in quanto non riesco nemmeno a eseguire il ping)
Quindi anche se dovrò aggiornare tutte le mie automazioni daoff
aunavailable
, sono felice che funzioni ora :)btw remote cambia anche da on a non disponibile. media_player.viera non è sempre disponibile, quindi è probabilmente uno da rimuovere per ora?
for the unaviable problem go to the TV menu and activate the option switch on via app, under remote TV app settings
for the unaviable problem go to the TV menu and activate the option switch on via app, under remote TV app settings
Thanks @legolas0802 for this. Never knew/noticed this :)
@joogps if you can add this to the doc next time you update the integration/doc. You may also want to add my TV to the list of supported models (TX58DX700) ;)
Last but not least, I don't suppose you're able to retrieve the TV's source?
@lolouk44 I couldn’t manage to get the source (subscribed to all of the available events and got nothing), but it’s possible to change the source with key presses and get the current app. So we could implement input selection where the source would only be set, and if an app was open, it would display the app name
for the unaviable problem go to the TV menu and activate the option switch on via app, under remote TV app settings
Thanks @legolas0802 for this. Never knew/noticed this :)
@joogps if you can add this to the doc next time you update the integration/doc. You may also want to add my TV to the list of supported models (TX58DX700) ;)
Last but not least, I don't suppose you're able to retrieve the TV's source?
You are welcome!!!
the source no, but it would be a great success to be able to change it as happens from the smartphone app.
the source no, but it would be a great success to be able to change it as happens from the smartphone app.
Yes that'd be great...
Last but not least, I don't suppose you're able to retrieve the TV's source?
Source selection (HDMI 1, 2, 3) would be amazing!!
That's definitely something to add... I just need to work on fixing those issues first
That's definitely something to add... I just need to work on fixing those issues first
Awesome!!
Re: reading the current input from the TV, not sure if this helps, if I go to [TV_IP]:55000/nrc/sdd_0.xml
I can see this XML file:
sdd_0.xml.zip
There's this section:
<action>
<name>X_GetInputMode</name>
<argumentList>
<argument>
<name>X_InputMode</name>
<direction>out</direction>
<relatedStateVariable>X_InputMode</relatedStateVariable>
</argument>
</argumentList>
</action>
Would this have anything to do with reading the current input?
@rschaeuble guess that's something 🤷
@circa1665 that probably just returns 'rc-mode'
, as reported by the events. It's the only attribute I didn't figure out the meaning of 🤔
X_KeyboardType
changes when a keyboard is opened (and that could be useful)
I made the pull request on the lib repository https://github.com/florianholzapfel/panasonic-viera/pull/36
@lolouk44 I made some extra changes on my fork, you can test them if you want to
It's the only attribute I didn't figure out the meaning of 🤔
It just clicked. “rc-mode”
probably stands for “remote control mode”
, since there’s also a “pad mode”
available in the official app
@lolouk44 I made some extra changes on my fork, you can test them if you want to
Sure. What changes did you do / what do you want me to test?
At first glance it doesn't work as well. State was showing as unavailable after I set the integration up (with the TV in standby mode, not off)
Turning the TV on eventually changed the status to on, but turning it off changed the status to unavailable
I then turned the TV back on and the status remains unavailable
2020-05-05 08:15:04 DEBUG (SyncWorker_1) [homeassistant.components.panasonic_viera.panasonic_viera] Sending to http://192.168.0.27:55000/dmr/control_0:
{'Host': '192.168.0.27:55000', 'Content-Length': 328, 'Content-Type': 'text/xml; charset=utf-8', 'SOAPAction': '"urn:schemas-upnp-org:service:RenderingControl:1#GetVolume"'}
b'<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><m:GetVolume xmlns:m="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><Channel>Master</Channel></m:GetVolume></s:Body></s:Envelope>'
2020-05-05 08:15:04 DEBUG (SyncWorker_1) [homeassistant.components.panasonic_viera.panasonic_viera] Response: b'<?xml version="1.0" encoding="utf-8"?>\n<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">\n <s:Body>\n <u:GetVolumeResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">\n <CurrentVolume>0</CurrentVolume>\n </u:GetVolumeResponse>\n </s:Body>\n</s:Envelope>\n'
2020-05-05 08:15:04 DEBUG (SyncWorker_1) [homeassistant.components.panasonic_viera.panasonic_viera] Sending to http://192.168.0.27:55000/dmr/control_0:
{'Host': '192.168.0.27:55000', 'Content-Length': 324, 'Content-Type': 'text/xml; charset=utf-8', 'SOAPAction': '"urn:schemas-upnp-org:service:RenderingControl:1#GetMute"'}
b'<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><m:GetMute xmlns:m="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><Channel>Master</Channel></m:GetMute></s:Body></s:Envelope>'
2020-05-05 08:15:04 DEBUG (SyncWorker_1) [homeassistant.components.panasonic_viera.panasonic_viera] Response: b'<?xml version="1.0" encoding="utf-8"?>\n<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">\n <s:Body>\n <u:GetMuteResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">\n <CurrentMute>0</CurrentMute>\n </u:GetMuteResponse>\n </s:Body>\n</s:Envelope>\n'
2020-05-05 08:15:14 DEBUG (SyncWorker_24) [homeassistant.components.panasonic_viera.panasonic_viera] Sending to http://192.168.0.27:55000/dmr/control_0:
{'Host': '192.168.0.27:55000', 'Content-Length': 328, 'Content-Type': 'text/xml; charset=utf-8', 'SOAPAction': '"urn:schemas-upnp-org:service:RenderingControl:1#GetVolume"'}
b'<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><m:GetVolume xmlns:m="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><Channel>Master</Channel></m:GetVolume></s:Body></s:Envelope>'
2020-05-05 08:15:14 DEBUG (SyncWorker_24) [homeassistant.components.panasonic_viera.panasonic_viera] Response: b'<?xml version="1.0" encoding="utf-8"?>\n<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">\n <s:Body>\n <u:GetVolumeResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">\n <CurrentVolume>0</CurrentVolume>\n </u:GetVolumeResponse>\n </s:Body>\n</s:Envelope>\n'
2020-05-05 08:15:14 DEBUG (SyncWorker_24) [homeassistant.components.panasonic_viera.panasonic_viera] Sending to http://192.168.0.27:55000/dmr/control_0:
{'Host': '192.168.0.27:55000', 'Content-Length': 324, 'Content-Type': 'text/xml; charset=utf-8', 'SOAPAction': '"urn:schemas-upnp-org:service:RenderingControl:1#GetMute"'}
b'<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><m:GetMute xmlns:m="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><Channel>Master</Channel></m:GetMute></s:Body></s:Envelope>'
2020-05-05 08:15:14 DEBUG (SyncWorker_24) [homeassistant.components.panasonic_viera.panasonic_viera] Response: b'<?xml version="1.0" encoding="utf-8"?>\n<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">\n <s:Body>\n <u:GetMuteResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">\n <CurrentMute>0</CurrentMute>\n </u:GetMuteResponse>\n </s:Body>\n</s:Envelope>\n'
2020-05-05 08:15:36 DEBUG (SyncWorker_15) [homeassistant.components.panasonic_viera.panasonic_viera] Response: b'<?xml version="1.0" encoding="utf-8"?>\n<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">\n <s:Body>\n <u:GetMuteResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">\n <CurrentMute>0</CurrentMute>\n </u:GetMuteResponse>\n </s:Body>\n</s:Envelope>\n'
2020-05-05 08:15:36 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Received valid request from service None. Handling properties:
2020-05-05 08:15:36 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] OrderedDict([('X_ScreenState', 'off')])
2020-05-05 08:15:36 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Received valid request from service nrc/event_0. Handling properties:
2020-05-05 08:15:36 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] OrderedDict([('X_ScreenState', 'off')])
2020-05-05 08:15:47 DEBUG (MainThread) [homeassistant.components.panasonic_viera] Could not establish remote connection: HTTP Error 400: Bad Request
2020-05-05 08:15:47 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Stopping server
2020-05-05 08:15:47 DEBUG (MainThread) [homeassistant.components.panasonic_viera] Couldn't unsubscribe from service %s
2020-05-05 08:15:58 DEBUG (SyncWorker_31) [homeassistant.components.panasonic_viera.panasonic_viera] Determining TV type
2020-05-05 08:15:58 DEBUG (SyncWorker_31) [homeassistant.components.panasonic_viera.panasonic_viera] Determined TV type is non-encrypted
2020-05-05 08:15:58 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Creating server at 192.168.0.23:55000
2020-05-05 08:16:09 DEBUG (SyncWorker_2) [homeassistant.components.panasonic_viera.panasonic_viera] Determining TV type
2020-05-05 08:16:09 DEBUG (SyncWorker_2) [homeassistant.components.panasonic_viera.panasonic_viera] Determined TV type is non-encrypted
2020-05-05 08:16:09 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Creating server at 192.168.0.23:55000
2020-05-05 08:16:09 ERROR (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Failed to create HTTP server at 192.168.0.23:55000: [Errno 98] error while attempting to bind on address ('192.168.0.23', 55000): address in use
2020-05-05 08:16:20 DEBUG (SyncWorker_6) [homeassistant.components.panasonic_viera.panasonic_viera] Determining TV type
2020-05-05 08:16:20 DEBUG (SyncWorker_6) [homeassistant.components.panasonic_viera.panasonic_viera] Determined TV type is non-encrypted
2020-05-05 08:16:20 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Creating server at 192.168.0.23:55000
2020-05-05 08:16:20 ERROR (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Failed to create HTTP server at 192.168.0.23:55000: [Errno 98] error while attempting to bind on address ('192.168.0.23', 55000): address in use
2020-05-05 08:16:30 DEBUG (SyncWorker_15) [homeassistant.components.panasonic_viera.panasonic_viera] Determining TV type
2020-05-05 08:16:30 DEBUG (SyncWorker_15) [homeassistant.components.panasonic_viera.panasonic_viera] Determined TV type is non-encrypted
2020-05-05 08:16:30 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Creating server at 192.168.0.23:55000
2020-05-05 08:16:30 ERROR (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Failed to create HTTP server at 192.168.0.23:55000: [Errno 98] error while attempting to bind on address ('192.168.0.23', 55000): address in use
2020-05-05 08:16:41 DEBUG (SyncWorker_12) [homeassistant.components.panasonic_viera.panasonic_viera] Determining TV type
2020-05-05 08:16:41 DEBUG (SyncWorker_12) [homeassistant.components.panasonic_viera.panasonic_viera] Determined TV type is non-encrypted
2020-05-05 08:16:41 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Creating server at 192.168.0.23:55000
2020-05-05 08:16:41 ERROR (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Failed to create HTTP server at 192.168.0.23:55000: [Errno 98] error while attempting to bind on address ('192.168.0.23', 55000): address in use
2020-05-05 08:16:52 DEBUG (SyncWorker_3) [homeassistant.components.panasonic_viera.panasonic_viera] Determining TV type
2020-05-05 08:21:56 DEBUG (SyncWorker_11) [homeassistant.components.panasonic_viera.panasonic_viera] Determined TV type is non-encrypted
2020-05-05 08:21:56 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Creating server at 192.168.0.23:55000
2020-05-05 08:21:56 ERROR (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Failed to create HTTP server at 192.168.0.23:55000: [Errno 98] error while attempting to bind on address ('192.168.0.23', 55000): address in use
2020-05-05 08:22:06 DEBUG (SyncWorker_26) [homeassistant.components.panasonic_viera.panasonic_viera] Determining TV type
2020-05-05 08:22:06 DEBUG (SyncWorker_26) [homeassistant.components.panasonic_viera.panasonic_viera] Determined TV type is non-encrypted
2020-05-05 08:22:06 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Creating server at 192.168.0.23:55000
2020-05-05 08:22:06 ERROR (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Failed to create HTTP server at 192.168.0.23:55000: [Errno 98] error while attempting to bind on address ('192.168.0.23', 55000): address in use
2020-05-05 08:22:17 DEBUG (SyncWorker_25) [homeassistant.components.panasonic_viera.panasonic_viera] Determining TV type
2020-05-05 08:22:17 DEBUG (SyncWorker_25) [homeassistant.components.panasonic_viera.panasonic_viera] Determined TV type is non-encrypted
2020-05-05 08:22:17 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Creating server at 192.168.0.23:55000
2020-05-05 08:22:17 ERROR (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Failed to create HTTP server at 192.168.0.23:55000: [Errno 98] error while attempting to bind on address ('192.168.0.23', 55000): address in use
2020-05-05 08:22:17 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Received valid request from service None. Handling properties:
2020-05-05 08:22:17 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] OrderedDict([('@val', '0'), ('PresetNameList', OrderedDict([('@val', 'FactoryDefaults')])), ('Mute', OrderedDict([('@val', '0'), ('@channel', 'Master')])), ('Volume', OrderedDict([('@val', '0'), ('@channel', 'Master')])), ('X_AudioList', OrderedDict([('@val', '-1,')])), ('X_CurrentAudioID', OrderedDict([('@val', '0')])), ('X_DualMonoModeList', OrderedDict([('@val', '-1,')])), ('X_CurrentDualMonoModeID', OrderedDict([('@val', '0')])), ('X_SubtitleList', OrderedDict([('@val', '-1,')])), ('X_CurrentSubtitleID', OrderedDict([('@val', '0')])), ('X_SubtitleCharCodeList', OrderedDict([('@val', '-1,')])), ('X_CurrentSubtitleCharCodeID', OrderedDict([('@val', '0')]))])
2020-05-05 08:22:17 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] Received valid request from service None. Handling properties:
2020-05-05 08:22:17 DEBUG (MainThread) [homeassistant.components.panasonic_viera.panasonic_viera] [OrderedDict([('X_InputMode', 'rc-mode')]), OrderedDict([('X_KeyboardType', 'default')]), OrderedDict([('X_ScreenState', 'on')]), OrderedDict([('X_AppInfo', 'vc_app:1:product_id=0010000200000001:Netflix')])]
2020-05-05 08:22:28 DEBUG (SyncWorker_1) [homeassistant.components.panasonic_viera.panasonic_viera] Sending to http://192.168.0.27:55000/dmr/control_0:
{'Host': '192.168.0.27:55000', 'Content-Length': 328, 'Content-Type': 'text/xml; charset=utf-8', 'SOAPAction': '"urn:schemas-upnp-org:service:RenderingControl:1#GetVolume"'}
b'<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><m:GetVolume xmlns:m="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><Channel>Master</Channel></m:GetVolume></s:Body></s:Envelope>'
2020-05-05 08:22:28 DEBUG (SyncWorker_1) [homeassistant.components.panasonic_viera.panasonic_viera] Response: b'<?xml version="1.0" encoding="utf-8"?>\n<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">\n <s:Body>\n <u:GetVolumeResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1">\n <CurrentVolume>0</CurrentVolume>\n </u:GetVolumeResponse>\n </s:Body>\n</s:Envelope>\n'
Turns out the TV has a server with all of the app icons!
any news on the power state issue (always on)???
It's fixed! I'm pushing the changes to this repository, if you want to, you can test it.
cool, but I don't know how to use the link, haven't tried it before???
You can just wait for the official release if you prefer 😁
i would love to get it fixed now ;-)
It's fixed! I'm pushing the changes to this repository, if you want to, you can test it.
I'm not seeing any changes since 13h ago?
I'm doing some final edits, mainly to the tests. I closed the PR that added remote control support so I can prioritise this one
for info I just tried the latest code and I can't set up the integration:
Error occurred loading configuration flow for integration panasonic_viera: cannot import name 'EncryptionRequired' from 'panasonic_viera' (/config/panasonic_viera/__init__.py)
Connection lost. Reconnecting…
I'm doing some final edits, mainly to the tests. I closed the PR that added remote control support so I can prioritise this one
Why did you close that PR?
Because it's hard to keep track of two PRs at the same time 🤷♂️
for info I just tried the latest code and I can't set up the integration:
Error occurred loading configuration flow for integration panasonic_viera: cannot import name 'EncryptionRequired' from 'panasonic_viera' (/config/panasonic_viera/__init__.py) Connection lost. Reconnecting…
I think you need to download the latest version from the panasonic_viera
library (4.0)
Because it's hard to keep track of two PRs at the same time 🤷♂️
Haha I understand :)
Did you get sending custom keys working?
Yep, it's just that reviews and approvals take time and I want to make sure this fix gets in before the remote control stuff (I've already received a few issues about this)
Yep, it's just that reviews and approvals take time and I want to make sure this fix gets in before the remote control stuff (I've already received a few issues about this)
Yep I understand. Good luck :)
I think you need to download the latest version from the
panasonic_viera
library (4.0)
I'm already on v 0.4.0:
I'll try and reset my test system from scratch....
Did you remove the inner panasonic_viera
folder I was using before the library got updated?
Just a quick survey here: how many HDMI ports do your TVs have?
Did you remove the inner
panasonic_viera
folder I was using before the library got updated?
yes. will just create a new test env from scratch, no issues
Just a quick survey here: how many HDMI ports do your TVs have?
3
I think you need to download the latest version from the
panasonic_viera
library (4.0)I'm already on v 0.4.0:
I'll try and reset my test system from scratch....
I was on the wrong repo: dev instead of Viera_fix.
Do I still need to use viera_fix?
the branch I'm using is panasonic_viera_fix
Just a quick survey here: how many HDMI ports do your TVs have?
Model no. TX-49DX600B
x3 HDMI
@joogps if you can add this to the doc next time you update the integration/doc. You may also want to add my TV to the list of supported models (TX58DX700)
Added a PR for doc to include my TV and note for Powered On By App
https://github.com/home-assistant/home-assistant.io/pull/13330
great!
Is this solved now or what?
109.6 is out but the issue is still there.
This will very likely be included only with 110.0 (the pr wasn't even merged yet)
Is there anyway to add temporary fix into my installation? How can I do it?
You can download the files from this repository (on branch panasonic-viera-fix
) and update the panasonic_viera
package (version 4.0) on your Home Assistant installation
Sorry, I'm noob. I have Hassio on RPI4. Where should I put these files? Is there any manual? Thanks!
Oh, then it's a bit harder. I use HassOS on my installation too, and to manually move files and update packages I think you need to enable advanced SSH https://developers.home-assistant.io/docs/hassio_debugging/#home-assistant-os
Or you could just wait for when it's released 🤷♂️
Thanks
pt., 8 maj 2020, 16:26 użytkownik João Gabriel notifications@github.com
napisał:
Or you could just wait for when it's released 🤷♂️
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/core/issues/34894#issuecomment-625841563,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACRMBLY2LTP2NQVAMO2J7ATRQQJBVANCNFSM4MUBQ3XA
.
@joogps
Can you please tell me how to get the fix for my environment?
From which repo should I download the fix?
Thanks
arch | armv7l
-- | --
dev | false
docker | false
hassio | false
os_name | Linux
os_version | 4.19.97-v7l+
python_version | 3.7.3
timezone | Europe/Nicosia
version | 0.109.6
virtualenv | true
You can download the files from this repository (on branch
panasonic-viera-fix
) and update thepanasonic_viera
package (version 4.0) on your Home Assistant installation
@03397 here
You can download the files from this repository (on branch
panasonic-viera-fix
) and update thepanasonic_viera
package (version 4.0) on your Home Assistant installation@03397 here
I have downloaded the files from there with git clone but how do I get just the Panasonic files from here and and put them in the corresponding folder?
the component is located under homeassistant/components/panasonic_viera
I did that @joogps moved the files under /srv/homeassistant/lib/python3.7/site-packages/panasonic_viera.
After restart I am getting an error
Error importing platform config_flow from integration panasonic_viera to set up panasonic_viera configuration entry: cannot import name 'TV_TYPE_ENCRYPTED' from 'panasonic_viera' (/srv/homeassistant/lib/python3.7/site-packages/panasonic_viera/__init__.py)
You need to update the panasonic_viera
package to 4.0. Run pip install panasonic_viera
Actually, I think you moved the folder to the wrong place. Just move homeassistant/components/panasonic_viera
to the same destination on your installation and then update the panasonic_viera
library as I explained above
Hi @joogps
My test setup is screwed, so:
1) I've downloaded the latest ha dev docker image:
0.110.0.dev20200511
2) I've replaced the content of
/usr/src/homeassistant/build/lib/homeassistant/components/panasonic_viera
and
/usr/src/homeassistant/homeassistant/components/panasonic_viera
with the content your panasonic_viera folder. (Not sure which path I really need to update so tried both)
3) I've installed the latest panasonic_viera package:
pip install panasonic_viera==0.4.0
The TV still shows a status of on
even though it's off
.
What am I doing wrong?
did you check if your __init__.py
has the new update method (with on_event
?)
during this week I want to focus on working on my Swift Student Challenge project, so sorry if I can’t give this enough attention (I can’t really do anything until the pull request is merged)
did you check if your
__init__.py
has the new update method (withon_event
?)
yes it does.
during this week I want to focus on working on my Swift Student Challenge project
That's quite ok. Thanks for your help thus far :)
0.110.0b2 is out but it doesn't include this fix...
anyone?
@novitibo Hi! As I said above, I'm currently focused on working my Swift Student Challenge project (submissions are due this Sunday), and I had to close the PR that was already open because I still need to make some changes... I promise that I'll get back to next week!
@novitibo Hi! As I said above, I'm currently focused on working my Swift Student Challenge project (submissions are due this Sunday), and I had to close the PR that was already open because I still need to make some changes... I promise that I'll get back to next week!
good luck there!
good luck there!
Thank you! :)
So, since the Swift Student Challenge is over (results will be released next month), as I promised, I'm back! @lolouk44 I made a commit to the PR (#35252) that forces the full TV state to be retrieved every 90 seconds, so it won't be missed in case connection fails. I know it's not the ideal but it's the best I got for now.
Also, it would be nice to get this merged soon since HomeKit remote compatibility (with multiple TVs!) is coming with the next update 🤯
Why don't you make it every 30sec?
As in an update of iOS or an update of HomeKit?
From: João Gabriel notifications@github.com
Sent: Tuesday, May 19, 2020 9:15:23 PM
To: home-assistant/core core@noreply.github.com
Cc: Dunker R, Ramon r.dunker@st.hanze.nl; Comment comment@noreply.github.com
Subject: Re: [home-assistant/core] Panasonic Viera: state always reported as on after restart of Home Assistant (#34894)
Also, it would be nice to get this merged soon since HomeKit remote compatibility (with multiple TVs!) is coming with the next update 🤯
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Fcore%2Fissues%2F34894%23issuecomment-631027448&data=02%7C01%7Cr.dunker%40st.hanze.nl%7Ce7e866a20b7b45b2a90008d7fc28fbc2%7Ca3b390147adc48faa11437c2434dbd69%7C0%7C0%7C637255125257190658&sdata=GNSs7YWDpeupNqXQ9tw%2BArx0ZSTgUvWW59v2IVqjo4A%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABVBPOV5A75AHO2QK4HKY2DRSLLEXANCNFSM4MUBQ3XA&data=02%7C01%7Cr.dunker%40st.hanze.nl%7Ce7e866a20b7b45b2a90008d7fc28fbc2%7Ca3b390147adc48faa11437c2434dbd69%7C0%7C0%7C637255125257200655&sdata=3hkysz2tdFwG6X3c2n7y8V2n0ohX4drNV8Als7kcWws%3D&reserved=0.
@ramondunker an update to the HomeKit integration!
Why don't you make it every 30sec?
@03397 It could be, I don't know... I just don't want to add it to regular updates since these are already taking too much time
0.110 is out. What now?
The pull request wasn't merged yet, @novitibo
@novitibo just updated to 0.110 and integration seems to be working perfectly with my ZT60 now, thanks.
@b1g1an well, literally nothing changed 😂 good thing it’s working
@b1g1an well, literally nothing changed 😂 good thing it’s working
actually, I think the refactoring of the Remote
class did change some of the behavior
I can’t even remember, so many things happened since then
@joogps lol, whatever it was it definitely seems to have fixed it.
When I initially added it under 0.109 I had the same always on issue as everyone else but also an issue where it always showed the volume as 0 which I hadn't seen mentioned elsewhere. Now having readded it after upgrading to 0.110 it works a treat.
My TV is one that turns off in the old fashioned way, so literally cuts communication with the outside world so can't report itself as off. HA is now reporting it is off and instantly reconnects when powered back on. Volume likewise reports the correct level and is reliably controllable in HA which was my biggest concern as the whole point of adding the integration was so I could have an automation that would reset the volume to a specific level when the TV was turned on as that is a function missing from the TV itself.
I believe this can also be done in the hidden “hotel menu”. You can read about it here: https://turbofuture.com/home-theater-audio/Hotel-Mode-Panasonic-Televisions
Holding down the Volume down (on the tv itself) and using the colored buttons 3 times got me in other menus aswel.
On 20 May 2020, at 23:26, b1g1an notifications@github.com wrote:
@joogpshttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjoogps&data=02%7C01%7Cr.dunker%40st.hanze.nl%7C5e0f7b0f92784bf8e99808d7fd0466c3%7Ca3b390147adc48faa11437c2434dbd69%7C0%7C0%7C637256067659291086&sdata=2CI5IOufxkypv5pMI2l7FGnNWaCmy5B85ZFuOBCCbiE%3D&reserved=0 lol, whatever it was it definitely seems to have fixed it.
When I initially added it under 0.109 I had the same always on issue as everyone else but also an issue where it always showed the volume as 0 which I hadn't seen mentioned elsewhere. Now having readded it after upgrading to 0.110 it works a treat.
My TV is one that turns off in the old fashioned way, so literally cuts communication with the outside world so can't report itself as off. HA is now reporting it is off and instantly reconnects when powered back on. Volume likewise reports the correct level and is reliably controllable in HA which was my biggest concern as the whole point of adding the integration was so I could have an automation that would reset the volume to a specific level when the TV was turned on as that is a function missing from the TV itself.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Fcore%2Fissues%2F34894%23issuecomment-631735565&data=02%7C01%7Cr.dunker%40st.hanze.nl%7C5e0f7b0f92784bf8e99808d7fd0466c3%7Ca3b390147adc48faa11437c2434dbd69%7C0%7C0%7C637256067659301080&sdata=3Bm411BbCQ80OTnJazjtlVr5SN6oMpHTGOQ7frmd2aM%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABVBPOV52OYESLNJGDBAZ5DRSRDGVANCNFSM4MUBQ3XA&data=02%7C01%7Cr.dunker%40st.hanze.nl%7C5e0f7b0f92784bf8e99808d7fd0466c3%7Ca3b390147adc48faa11437c2434dbd69%7C0%7C0%7C637256067659301080&sdata=B7Zp4ZomqCMDQMFp5iZERfDkHyd1H%2FjeOCuSTvLefLw%3D&reserved=0.
why is everything about panasonic so hard like cmon you’re a global company you can do better 😂
btw hotel mode worked here too (make sure you’re pressing the TV volume down button, not the remote one)
@ramondunker cheers, will give it a go tomorrow. Can't believe i I've never come across this in 20+ years hanging around on the avforums.
@ramondunker worked a treat thank you. Will still use integration to detect power on for my ambient lighting to replace the current automation which uses device tracking to detect when it joins the network.
Hotel mode is only for old TVs without "Powered On By Apps in the TV Settings: Network > TV Remote App Settings"?
Mine TX50AS650 still doesn't update HA with it's power ON/OFF state. However I can power it ON/Off from HA frontend and also can use PLAY_MEDIA SCRIPT.
Anybody else with similar issue? Is this still pending?
My TV (2017 model) does have this option, and also has the hotel mode.
And yes, this pr is not yet merged so isn’t included in a HA update.
On 22 May 2020, at 13:56, novitibo notifications@github.com wrote:
Hotel mode is only for old TVs without "Powered On By Apps in the TV Settings: Network > TV Remote App Settings"?
Mine TX50AS650 still doesn't update HA with it's power ON/OFF state. However I can power it ON/Off from HA frontend and also can use PLAY_MEDIA SCRIPT.
Anybody else with similar issue? Is this still pending?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Fcore%2Fissues%2F34894%23issuecomment-632654333&data=02%7C01%7Cr.dunker%40st.hanze.nl%7C42e9329782b24557e15208d7fe47237b%7Ca3b390147adc48faa11437c2434dbd69%7C0%7C0%7C637257453803017152&sdata=bN%2FycovdNzg7lwFRv7ZD1LM8EIm127kAutWa2j5Lcpg%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABVBPOWRZITFQVBQIIQMLPLRSZR6DANCNFSM4MUBQ3XA&data=02%7C01%7Cr.dunker%40st.hanze.nl%7C42e9329782b24557e15208d7fe47237b%7Ca3b390147adc48faa11437c2434dbd69%7C0%7C0%7C637257453803027147&sdata=TaHn64gfiz%2FdIqOPREviQWcQMMJHltQvs%2B%2B%2Bv%2B1BohQ%3D&reserved=0.
so, with hotel mode on, some of you resolved this issue and some not, as I understand.
so, with hotel mode on, some of you resolved this issue and some not, as I understand.
Not at all, something else has changed in the 0.110 HA update which has fixed the issue. Hotel mode is a complete red herring as that only came into the conversation as @raymondunker told me I was using the component to achieve something that could be more easily achieved using that than an automation using the component status as a trigger.
@joogps has said the component hasn't been updated but... "actually, I think the refactoring of the Remote class did change some of the behavior". Presumably whatever was changed in 0.109 has been corrected in 0.110 and wasn't actually a problem with this component at all.
The component is working perfectly for me on a 2013 ZT60 now which has 'powered on by apps' in the settings and has been 100% reliable through several HA restarts since the update.
Mine TX50AS650 still always shows
power ON state. However I can power it ON/Off from HA frontend and also can use PLAY_MEDIA SCRIPT. What do you suggest?
Really don't know, what you're getting is exactly what mine was doing before 0.110. Do you have the remote app setting turned on on your TV? It's the only related thing I can find in the settings that is any different to default.
Only thing I can't do is power it back up again from HA because older models turn everything off when in standby so disappear off the network and will only respond to ir commands.
Yes, remote app setting is still ON as it was befor 0.109.x.
@joogps probably not the right place to ask, but will the updated panasonic viera tv integration work if the tv is on a seperate subnet?
@circa1665 probably not
I'm not very familiar with subnets, but we could try to make it work, sure!
I updated to the latest version of home assistant, now the volume is detected correctly, but the on / off status always remains in On
The problem is still there in 0.110.4. HomeAssistant does not seem to understand when my TV is on. Problem also couples trought the HomeKit intergration. It also shows the TV on whole day while it's off.
I't with both my 2018 and 2019 Panasonic TV's/
As long as this PR doesn’t get merged it won’t be included in a release.
We’ll have to wait until then.
On 30 May 2020, at 15:59, MrUser notifications@github.com wrote:
The problem is still there in 0.110.4. HomeAssistant does not seem to understand when my TV is on. Problem also couples trought the HomeKit intergration. It also shows the TV on whole day while it's off.
I't with both my 2018 and 2019 Panasonic TV's/
If it's still not working for some people there must be two different issues with the same symptom dependent on the age of the TV and it's feature set.
It is still working perfectly for me since 0.110, set up with the TV on and from then on it reflects the state perfectly and through restarts with the TV off.
Mine being the age it is doesn't have the network power on facility so just goes unavailable when off which is obvious given any smart device that has its network connection cut will do the same but makes no difference in use other than you can't turn it on with this component which is obviously impossible. Unfortunately some users can't accept the obvious though!
The same problem here in 0.110.4 as well.
I have a Panasonic TX-50DX780E (model 2016).
Although it is perfectly possible to turn on and off the TV with HomeAssistant, its state is continuously reported as ON.
If it's still not working for some people there must be two different issues with the same symptom dependent on the age of the TV and it's feature set.
It is still working perfectly for me since 0.110, set up with the TV on and from then on it reflects the state perfectly and through restarts with the TV off.
Mine being the age it is doesn't have the network power on facility so just goes unavailable when off which is obvious given any smart device that has its network connection cut will do the same but makes no difference in use other than you can't turn it on with this component which is obviously impossible. Unfortunately some users can't accept the obvious though!
I have the same behavior exactly as yours. It will be nice though if the component interpret the "unavailable" as "off" as it was before the upgrade.
Since the introduction of this new integration that removed yaml configuration, my tv now shows as on or unavailable. The previous yaml integration correctly showed on and off. How about just reverting to the original yaml configured integration that actually operates correctly?
@b1g1an I can still ping my tv. The network interface is not powered down.
@tomlut because the config flow and encryption support involved a lot of hard work from me and other people. Also, the unavailable state for TVs that don't stay connected when turned off was suggested by the official Home Assistant staff. Have you tried to use the python library to check if your TV connects when powered off? Maybe it stays connected only for wake-on-lan but stops the UPnP interfaces. You could try accessing the descriptor file at "http://[IP ADDRESS]:55000/dmr/ddd.xml"
.
I have already made some changes to the UPnP events system, but because of school stuff and the past few weeks, I couldn't focus on finishing it. I'll come back as soon as possible (hopefully today).
I've made a template switch as a workaround for now so it's not a huge issue.
@joogps Once the current PR gets merged, are you still planning on working on the current app integration in Home Assistant?
@ramondunker The turning on method? Sorry, I checked it and my TV doesn’t support it... I plan on adding input selection though!
Can't wait for the input select, that's the last bit I need for my "show who pressed the doorbell" automation 😄
Yeah that would be great :)
—
Can't wait for the input select, that's the last bit I need for my "show who pressed the doorbell" automation 😄
@joogps Is there a chance that eventually the Legacy devices/method will work? Or a possibility of creating the legacy version to run seperate for us whose TV's worked till the new integration?
@joogps Is there a chance that eventually the Legacy devices/method will work? Or a possibility of creating the legacy version to run seperate for us whose TV's worked till the new integration?
replace the files with those from a previous version and it'll work. That's what I've done...
get the files form the previous integration and replace them in the panasonic folder.
Ddepending on how you've installed HA, it may be in a different place. Mine is set to:
/usr/src/homeassistant/homeassistant/components/panasonic_viera/
Then remove the new integration and add it the old way (yaml)
@ramondunker The turning on method? Sorry, I checked it and my TV doesn’t support it... I plan on adding input selection though!
You mentioned in a PR that the TV has different images for each app on the TV. That's what I meant :)
@ramondunker oh, sure! Once it's finished, it will display the app images like the webOS integration
got everything working today
tomorrow I'll open a pr in the library's repo
I did a couple of tests, my tv is a panasonic viera mod. 55ex600_series, with the setting in the TV Settings: Network> TV Remote App Settings: on the state of the TV always remains on whether I turn it on and off from the remote control, or I turn it on and off from Home Assistant. While with TV Settings: Network > TV Remote App Settings: off if I turn on and off the remote control the status changes from on to unavailable, but from Home Assistant I can only turn it off. While the volume status is detected correctly. If you can't solve the problem why not use the old method that worked properly?
I have the same behavior exactly as yours. It will be nice though if the component interpret the "unavailable" as "off" as it was before the upgrade.
Hadn't realised this as only started using it with 0.109 and usually with HA 'unavailable' would be the correct result for something that it can no longer communicate with like mine, you'd only get 'off' if that was the status it reported which you can obviously get from newer TVs.
@joogps Is there a chance that eventually the Legacy devices/method will work? Or a possibility of creating the legacy version to run seperate for us whose TV's worked till the new integration?
replace the files with those from a previous version and it'll work. That's what I've done...
get the files form the previous integration and replace them in the panasonic folder.
Ddepending on how you've installed HA, it may be in a different place. Mine is set to:
/usr/src/homeassistant/homeassistant/components/panasonic_viera/
Then remove the new integration and add it the old way (yaml)
Could this be done in Hassio?
With Samba I don't have access to that depth of folders :(
@Yllelder you can do it through ssh! https://developers.home-assistant.io/docs/operating-system/debugging/
@joogps can yau write step by step. I have the same problem.
For my installation (which was showing the TV as always on after the update), I fixed it by adding the old version as a custom component. When there is an internal and a custom component with the same name, the custom component is used.
The new version of the integration was implemented in 0.109, so you should download the last working version 0.108.9.
Extract the zip file and copy the 0.108.9 panasonic_viera component to the custom components folder in your setup. So all files from core-0.108.9\homeassistant\components\panasonic_viera
should end up in config\custom_components\panasonic_viera
.
Change your configuration.yaml to what you had before (I believe these are the matching instructions) and reboot Home Assistant.
cool.
But does this mean the power on/off issue won’t be fixed? I’m patiently waiting for the fix. My 2 Panasonic 4K tv’s are from 2018 and 2019.
@joogps: I think it would be quite helpful if you could give us a short summary of where this issue stands. This issue is now about 2 months old and has accumulated over 100 comments, so it's getting a bit unwieldy.
What is still missing for this to be resolved? And do you have a rough estimate how long it's going to take?
Is there anything that other developers could do to assist?
If you can foresee that it will take quite a while longer, please consider reverting to the old state in the meantime.
For my installation (which was showing the TV as always on after the update), I fixed it by adding the old version as a custom component. When there is an internal and a custom component with the same name, the custom component is used.
The new version of the integration was implemented in 0.109, so you should download the last working version 0.108.9.
Extract the zip file and copy the 0.108.9 panasonic_viera component to the custom components folder in your setup. So all files from
core-0.108.9\homeassistant\components\panasonic_viera
should end up inconfig\custom_components\panasonic_viera
.Change your configuration.yaml to what you had before (I believe these are the matching instructions) and reboot Home Assistant.
can you turn ON TV via HA frontend after this?
can you turn ON TV via HA frontend after this?
It's exactly the same integration as before the update. So if you had it working before, it will work again (as long as you also have the same settings of course).
For me it's working, this is probably dependent on the TV model though.
Okay guys, I'm sorry for not responding for so long. As I said before, I submitted a project to the Swift Student Challenge, and I was selected as one of the 350 winners, so this week has been a roller coaster of emotions.
I got the code for the fix working with the recommended changes from the previous pull request, now I only need to test it and make some final adjustments. The TV I use to test the code is not mine and I also got some school work to do, so this might take some time. The new version of the integration was made to add encryption support, and I don't think it would be cool to undo these changes.
See you soon!
@joogps show me your configuration.yaml to 108.9 version.
@joogps: First of all, congratulations for winning the contest! Well done.
I would like to help testing the new version, and I'm sure there are others as well.
Could you give us some instructions on how to install your development version into a hass.io installation?
this problem is still present in today's release -> 0.112.1
Hi @joogps,
I just wanted to check if you were still working on this integration?
Hi @joogps
I also hope you can finish this...
me too. Patiently waiting for it :-)
Hi @joogps
problem is still present, deeply appreciate if there any update for this.
Hey @joogps are you still working on this?
Hello, after update to latest version, my viera 42AS650 has same behavior.
Maybe we can find a developer to take over this repository. The “future” of HomeAssistant depends on this.
Who knows one? @balloobob ?
oops hey guys sorry :)
quarantine and school got me quite busy recently, but I'll try to fix the PRs and stuff this week
made a quick pr (yet again ✨) to address some of the issues and _try_ to fix the state situation #39303
it still needs to be merged though 😕
but voluntary approvals should make the process quicker 🎉
Issue still persists in 0.115.0b3, was able to fix it using workaround posted by @s-hutter
@ogakul
Pretty sad for heard that, been waiting for 0.115 for a long time...
update: tried same workaround and worked after delete integration .
but fail to on the tv, even can on it with latest version of this component and also tv-remote app. specified MAC address.
I also went back to 0.108.9 panasonic_viera component and everything works correctly
I also went back to 0.108.9 panasonic_viera component and everything works correctly
Can you please explain how you went back for that specific component?
I am at version 0.115.x
I also went back to 0.108.9 panasonic_viera component and everything works correctly
Can you please explain how you went back for that specific component?
I am at version 0.115.x
https://github.com/home-assistant/core/issues/34894#issuecomment-646548597
0.116.1 is out
is 0.108.9 panasonic_viera component still necessary?
I'm on 0.116.1 and my TV’s status is permanently “unavailable”, doesn’t work for me at all now.
Have tried removing a re-adding the integration.
Model no: TX-49DX600B
I have the same issue.
When you restart home assistant and the tv is on the status is correct. But when the tv is off and seen as unavailable it never updates it's status.
After the integration the whole thing broke.
I do not understand what was the gain by doing that since a lot of people are having major issues.
By the way is joogps still around?
@03397 of course I am!
I'm aware of this issue (although it doesn't happen with me), but I've been waiting for this pr to be merged first #41028 I would be grateful if you could review it, haha :)
@03397 the gain of the changes was the support to other models (such as mine) that required a different level of encryption. the library already had the code for that, and I just implemented the config flow to cover it. I don't have one of those "always on" models though, so most of the attempts I've done in the past to correct this problem was just trial and error
Ah. Someone in the Santa Catarina, Brazil area who can lend @joogps a tv?
@MrUserY AHHAHAHAHAHAHAAHHAHAHA that's a great idea
(well, anyone with one of those models can contribute at any time)
@03397 Don't use the integration then, old version works fine as a custom component as mentioned by many here!
@03397 Don't use the integration then, old version works fine as a custom component as mentioned by many here!
That's one way to do it I guess, but it's a workaround, and we're all really waiting for a solution so we don't need to "maintain" an old component because the "official" one doesn't work
Hopefully the PR gets merged and it all works...
That's one way to do it I guess, but it's a workaround, and we're all really waiting for a solution so we don't need to "maintain" an old component because the "official" one doesn't work
Hopefully the PR gets merged and it all works...
Only way to do it until the integration works and nothing to maintain, just delete the folder as and when others have said the integration works.
Surprised @joogps bothers given the stick he gets for helping people out for no gain other than a load of moaning.
@bobbynobble
Nobody gives the stick to any one here my friend and no one is moaning.
Everybody can express their opinion without insulting anyone and everybody appreciates all the people who are giving to the community.
The only one here who is giving the stick to the others is you because someone has a different opinion than yours.
I asked a simple question, about the gain, I got my answer and all good.
uau, now I know why is this issue solving so slow... too many sticks!
@03397 Lol, try actually reading the previous posts
@bobbynobble
My friend as I said before, all good.
Stay safe.
Upgraded to 116.2 and this is my experience:
Let me know if if I should report this to a different ticket, but for now, I'm reporting an observation.
TV Model: TH-49FX600z
I used Home Assistant's integrations page to add my TV with success however:
Like so many other users my integration with the TV worked fine pre HA 109
Same here.
Is there any other hub to report to HA devs?
I’m not sure where I should report this, as this thread is now closed. Some progress since updating to 0.117.
I can now turn my TV on and off from with Home Assistant 💁♀️
However I now have the opposite issue where the status of the TV is incorrectly and permanently ON within Home Assistant whether the TV is actually on or off. The behaviour is the same whether turning the TV on/off via the remote or within HA.
Model no: TX-49DX600B
This integration has been reverted to the old state with 117. So now it works again, which is great!
But the previous version already has this error that the state is always wrong. I believe the maintainer didn’t know how to correct the code. If I’m correct....
Hope someone can fix this indeed :)
Op 29 okt. 2020 om 10:06 heeft Yannik Ache Eicher notifications@github.com het volgende geschreven:
I can confirm this, in HA 0.117 the control suddenly works again, in my case even the status updates sometimes, but it is quite random. Sometimes it works, other times nothing happens.
Maybe I will find some time to debug this behaviour this weekend and provide more information.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Most helpful comment
oops hey guys sorry :)
quarantine and school got me quite busy recently, but I'll try to fix the PRs and stuff this week