Git Product home page Git Product logo

Comments (30)

ollo69 avatar ollo69 commented on July 22, 2024

Your request is clear, I worried that changing this all user will receave a new authentication confirmation that can cause confusion. What kind of name do you propose? Can you make some example?

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

I would propose to use "HomeAssistant - {name of your HA installation".
For me would be "HomeAssistant-Home-Test":

image

You can always set the new name only if the name of HA installation was changed from default.
As last option, you can consider to add a flag to activate the new naming.

Simone

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 22, 2024

Not sure how to fetch this info, but I think is not complex.
I agree with the flag, to be added on initial config flow, this will avoid issue on existing installation.
Will update this issue when new release will be ready.

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

Not sure how to fetch this info, but I think is not complex.

https://github.com/home-assistant/core/blob/f286992b1007588ae1221352883259393947fdfe/homeassistant/config.py#L495

Simone

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 22, 2024

The FR is now available with last release. Can you please try and report your feedback?

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

Hi, just arrived back home and tested latest release.

Even if the pop-up shows the instance name, then in the allowed device list of the TV I see only 1 device named "[Home Assistant] SamsungTV"(last part is the name I assigned to the entity).

I thing the way to go is to change the first part to make because this is the info device list relies on.

Simone

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 22, 2024

You must remove component configuration and re-configure it.
It also better that you previously delete the exixtsing permission on the TV.
If you use instance name friendly name is not used at all!

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

Hi,

what I did was:

  • update compoment to latest
  • remove cfg
  • remove all TV auth
  • add cfg with

image

I still see only 1 name (may come from prod isntance) but nothing else.

Simone

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 22, 2024

You never see the permission popup on the TV when you click submit? If not, try rebooting your HA instance and power off and on the TV, then try reconfigure it.

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

I fear to have not explained the issue well :-(

Prod ( still running v0.3.9:

image

Test ( running v0.3.10 and with the new box for instance name ticked):

image

As you can see the part between square is the same and instead needs to be different.
The name after is the entity name and this can already be specified thus be different between one and the other, but it's not enough.

Let me know if now is more clear.

Thank you for you time and help.

Simone

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 22, 2024

Why is not enough? The TV is not considering the whole name?

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

Seems not, otherwise I would have solved the issue with old version ;-)
As the name before this issue as formed by "[Home Assistant] Entity name".

Simone

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

Worked a lot on this issue and I fear we cannot do much :-(
Seems TV store source ip or mac or both and not the string identification passed over by this integration.

As I'm running on Docker, both containers have the same network details.

Simone

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 22, 2024

Oh, yes, very probably. I'm also surprised that it work for you inside a docker, in most case websocket connection fail.
I think that there is nothing more that I can do, if you don't have any suggestion please close the issue.

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

Seems another conflict comes from default integration (zeroconf working again with recently developed PR).

Is there a way to reuse/share the auth token ?

Simone

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 22, 2024

Wait, may be is because I store the token based on the IP? Do you have in the integration folder the file "token-<ip_address>.txt?
Does it contain same value for both installation?

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

Do you have in the integration folder the file "token-<ip_address>.txt?

Yes, for both install.

Does it contain same value for both installation?

Nope, value differ.

Simone

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 22, 2024

Please retry with last release. May be I found a wrong processing of connect message that could assign wrong authentication token

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

Did a lot of tests, but I still get 3(why 3?) confirmation each time I switch TV on.

Simone

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 22, 2024

Did you update both instance to last version?
Please give me debug log from both instance so that I can analyze the requests

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

Did you update both instance to last version?
Please give me debug log from both instance so that I can analyze the requests

Yup, both. Will update debug log in a while...

Simone

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

Log from the first instance is a bit weird:

image

Simone

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

Interesting thing is that now if I reboot HA with TV switched on, I don't get any confirmation on the TV :-S
And also log seems much cleaner.
Only 2 issues remaining:

2020-08-22 14:37:40 DEBUG (MainThread) [custom_components.samsungtv_smart.media_player] SamsungTV Smart - Error: []
2020-08-22 14:37:57 DEBUG (MainThread) [custom_components.samsungtv_smart.media_player] SamsungTV Smart - Error: [500, message='Internal Server Error', url=URL('https://api.smartthings.com/v1/devices/xxxxxxxxx/commands')]
2020-08-22 14:38:42 DEBUG (MainThread) [custom_components.samsungtv_smart.media_player] SamsungTV Smart - Error: [500, message='Internal Server Error', url=URL('https://api.smartthings.com/v1/devices/xxxxxxxxx/commands')]
2020-08-22 14:38:57 DEBUG (MainThread) [custom_components.samsungtv_smart.media_player] SamsungTV Smart - Error: [500, message='Internal Server Error', url=URL('https://api.smartthings.com/v1/devices/xxxxxxxxx/commands')]

Simone

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 22, 2024

To analyze I need the log files that containt the transaction status of the TV from off to on.

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

To analyze I need the log files that containt the transaction status of the TV from off to on.

Will provide one, even if is the same data as the left part of the previous screenshot.

Following lines for logger are fine ? Do you need anything else ?

homeassistant.components.samsungtv_smart: debug
custom_components.samsungtv_smart.media_player: debug
samsungtvws: debug

Simone

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 22, 2024

Use this for setting log:

logger:
  default: info
  logs:
    custom_components.samsungtv_smart: debug

If possible provide one for each HA instance.
Remember to remove your personal data (e-mail, token, etc) before posting the file.

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

With the suggested log settings I get only this (grep for "samsung" in home-assistant.log):

2020-08-22 21:33:41 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for samsungtv_smart which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-08-22 21:34:31 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'input_select', 'ssdp', 'cert_expiry', 'climate', 'fritzbox', 'map', 'zone', 'switch', 'default_config', 'fan', 'notify', 'light', 'ios', 'system_health', 'mobile_app', 'sun', 'utility_meter', 'device_tracker', 'configurator', 'samsungtv_smart', 'history', 'script', 'neato', 'persistent_notification', 'shelly', 'ipp', 'group', 'automation', 'scene', 'updater', 'alert', 'synology_dsm', 'input_datetime', 'remote', 'fritzbox_tools', 'shell_command', 'upnp', 'smartir', 'binary_sensor', 'zeroconf', 'hacs', 'cover', 'alexa_media', 'input_text', 'sensor', 'input_number', 'brother', 'input_boolean', 'logbook'}
2020-08-22 21:34:34 INFO (MainThread) [homeassistant.setup] Setting up samsungtv_smart
2020-08-22 21:34:34 INFO (MainThread) [homeassistant.setup] Setup of domain samsungtv_smart took 0.0 seconds
2020-08-22 21:34:41 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.samsungtv_smart
2020-08-22 21:34:44 INFO (MainThread) [custom_components.samsungtv_smart.media_player] Samsung TV 192.168.188.34:8002 added as 'SamsungTV'
2020-08-22 21:34:53 WARNING (MainThread) [homeassistant.components.media_player] Setup of media_player platform samsungtv_smart is taking over 10 seconds.
2020-08-22 21:35:23 INFO (SyncWorker_5) [homeassistant.loader] Loaded samsungtv from homeassistant.components.samsungtv
2020-08-22 21:35:57 WARNING (MainThread) [custom_components.samsungtv_smart.media_player] SamsungTV Smart - Detected fake power on, status not updated
2020-08-22 21:36:01 INFO (SamsungRemote) [custom_components.samsungtv_smart.api.samsungws] New token 16307522
2020-08-22 21:39:13 INFO (MainThread) [custom_components.samsungtv_smart.media_player] Samsung TV: loaded sources list from SmartThings: {'digitalTv': 'ST_TV', 'HDMI1': 'ST_HDMI1', 'HDMI3': 'ST_HDMI3'}

Simone

EDIT: One more line just arrived

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 22, 2024

Did you reboot HA? Check that the you don't have other log settings that conflict, because you should receive all DEBUG info from the component. I use it regurally to debug it!!!

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

I'm away from home for vacation for 2 weeks. Will report once back.

Simone

from ha-samsungtv-smart.

chemelli74 avatar chemelli74 commented on July 22, 2024

Unfortunately nothing we can do to fix this issue: root cause is having 2 containers on docker with --net=host so the requests looks like coming from the same device.

Simone

from ha-samsungtv-smart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.