Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panasonic GX800 series with Panasonic Viera TV integration doesn't works in Home Assistant #26

Closed
maframan opened this issue Nov 26, 2019 · 21 comments

Comments

@maframan
Copy link

Home Assistant release with the issue:
channel: stable
hassos: "2.11"
homeassistant: 0.102.1
hostname: hassio
logging: info
machine: raspberrypi3
supervisor: "192"
supported_arch:

armv7
armhf
timezone: Europe/Rome
Last working Home Assistant release (if known):
homeassistant: 0.102.1

Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io

Integration:
https://www.home-assistant.io/integrations/panasonic_viera/

Description of problem:
Internal server error 500 when press all buttons except the mute button that works.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

platform: panasonic_viera
host: 192.168.102.61
mac: XX:XX:XX:XX:XX:XX
app_power: true

@joogps
Copy link

joogps commented Apr 24, 2020

This problem will very likely be fixed with version 0.109 of Home Assistant, since it features an updated panasonic_viera component with encryption support and more stability. More info here: home-assistant/core#33829

@maframan
Copy link
Author

maframan commented Apr 25, 2020

Hi, thanks for your reply but the components doesn't works, below the error and my configuration:

2020-04-25 15:47:49 ERROR (MainThread) [homeassistant.setup] Setup failed for panasonic_viera: No setup function defined.

panasonic_viera:
host: 192.168.102.61
name: TV Cucina Panasonic

My Home assistant version: 0.108.9

The components directory contents is:
/usr/src/homeassistant/homeassistant/components/panasonic_viera
bash-5.0# ls -lrt
total 20
-rw-r--r-- 1 root root 6993 Apr 24 20:03 media_player.py
-rw-r--r-- 1 root root 255 Apr 24 20:03 manifest.json
-rw-r--r-- 1 root root 37 Apr 24 20:03 init.py
drwxr-xr-x 2 root root 4096 Apr 24 20:55 pycache

@joogps
Copy link

joogps commented Apr 25, 2020

that's because you don't have the updated version yet :)

You can either wait for Home Assistant 0.109 to be released or transfer the new component in your own (download it from home-assistant/core and move it to /usr/src/homeassistant/homeassistant/components/, replacing panasonic_viera)

@maframan
Copy link
Author

Thanks.
I just copied the panasonic_viera components from github and replaced in the HA directory.
After restart do I do?

@joogps
Copy link

joogps commented Apr 25, 2020

In theory, you could run python3 -m script.hassfest from root to enable UI configuration (under Configuration -> Integrations)

Or you could just use YAML, but I'm not sure if the setup process would work without running hassfest.

@maframan
Copy link
Author

Hi, I don't find any file with this name "script.hassfest", where must I to launch this command?
Consider that my HA run in docker container on raspbian (raspberry 4).
Thanks a lot for your support.

@joogps
Copy link

joogps commented Apr 26, 2020

You need to run it from root (just type cd ~ in the docker terminal)

:)

@maframan
Copy link
Author

Hi,

i've executed the suggested command, below the output but in configuration-->integrations don't see nothing.

bash-5.0#
bash-5.0# python3 -m script.hassfest
Run from project root
bash-5.0#

@joogps
Copy link

joogps commented Apr 26, 2020

Oh, I'm sorry. Actually, you don't need to run it from root. Just run it from the folder opened when the terminal starts.

@maframan
Copy link
Author

same behavior in the terminal start...

@joogps
Copy link

joogps commented Apr 26, 2020

Are you in the core folder?

@maframan
Copy link
Author

root@raspberrypi:~# docker exec -it homeassistant bash
bash-5.0# python3 -m script.hassfest
Run from project root
bash-5.0# pwd
/config
bash-5.0#

@joogps
Copy link

joogps commented Apr 26, 2020

I thought you were running docker from Visual Studio Code, sorry 😅.
Visual Studio Code opens the terminal inside the project root.

Try to find the folder for Home Assistant core and run it from there.

@maframan
Copy link
Author

I've executed the command in this /usr/src/homeassistant/ docker container directory, restarted the homeassistant container but doesn't works.

The command executed
root@raspberrypi:~# docker exec -it homeassistant bash
bash-5.0# cd /usr/src/homeassistant
bash-5.0# python3 -m script.hassfest
Warning: homeassistant/components/.translations/init.py missing, skipping directory. If this is your development environment, you can safely delete this folder.
Validating json... done in 3.53s
Validating codeowners... done in 0.00s
Validating config_flow... done in 0.01s
Validating coverage... done in 0.05s
Validating dependencies...
done in 23.57s
Validating manifest... done in 0.16s
Validating services... done in 3.87s
Validating ssdp... done in 0.01s
Validating zeroconf... done in 0.01s
Integrations: 921
Invalid integrations: 0

@maframan
Copy link
Author

during restart obtain below error:
2020-04-26 02:22:05 ERROR (MainThread) [homeassistant.components.panasonic_viera.config_flow] The remote connection was lost: Precondition failed

@joogps
Copy link

joogps commented Apr 26, 2020

I haven't seen that before... Try to remove panasonic_viera from your YAML configuration and configure it through the UI

@maframan
Copy link
Author

Now works, ip address not correct, sorry.........just one question: why is not present channel up and down button?

@joogps
Copy link

joogps commented Apr 26, 2020

It's because the media_player domain doesn't support channel up/down, so there isn't a native API for that.

However, there's another pull request I made that makes the integration create a new remote entity. With it you would then be able to create an automation to call the service remote.send_command with the ch_up or ch_down keys (and maybe add some buttons to trigger them from the UI)

The pull request wasn't accepted yet, but you can download the source code from my repo and replace it with your current integration if you want. (you won't need to do the pairing process done again)

@maframan
Copy link
Author

Thanks a lot for your patient and availability.

@joogps
Copy link

joogps commented Apr 26, 2020

It's because the media_player domain doesn't support channel up/down, so there isn't a native API for that.

That doesn't mean we can't modify it in the future to work like the webOS integration, that handles next/previous track as channel up/down when the source is Live TV.

Thanks a lot for your patient and availability.

You're welcome!
If you wan't to help me, leave a thumbs up on my pull request 😂

@joogps
Copy link

joogps commented Apr 26, 2020

Also, I can't close this issue since I'm not the repository owner, so, if you feel like your problem is fixed, you can close it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants