Git Product home page Git Product logo

Comments (17)

ollo69 avatar ollo69 commented on July 3, 2024

From the log seems that this TV does not support WebSocket connection, but I suggest you to remove the token file from the custom component directory and also clean all connected devices from the TV options, then retry configuration with TV turned on in front of you.
A couple of qustion:

  • when you try to setup the component, you see the popup on the TV screeen?
  • can you try to open from a browser the url "http://{host}:8001/api/v2/" (replace {host} with your TV ip) and send me back the result? Remove sensitive data (like Mac-Address)

Thx

from ha-samsungtv-smart.

codylv7 avatar codylv7 commented on July 3, 2024

Hey Ollo,

I’ll send over info from api URL in a bit. I have the device connect prompt disabled (I also tried it with setting “First Time Only”) and no popup is displayed.

Thanks,
Cody

from ha-samsungtv-smart.

codylv7 avatar codylv7 commented on July 3, 2024

{ "device": { "FrameTVSupport": "false", "GamePadSupport": "true", "ImeSyncedSupport": "true", "OS": "Tizen", "TokenAuthSupport": "true", "VoiceSupport": "true", "countryCode": "US", "description": "Samsung DTV RCR", "developerIP": "0.0.0.0", "developerMode": "0", "duid": "uuid:3ee908bd-1557-4b0c-bd89-feebfc6b359d", "firmwareVersion": "Unknown", "id": "uuid:3ee908bd-1557-4b0c-bd89-feebfc6b359d", "ip": "192.168.0.65", "model": "17_KANTM_UHD", "modelName": "UN82MU8000", "name": "[TV] Living Room", "networkType": "wired", "resolution": "3840x2160", "smartHubAgreement": "true", "type": "Samsung SmartTV", "udn": "uuid:3ee908bd-1557-4b0c-bd89-feebfc6b359d", "wifiMac": "" }, "id": "uuid:3ee908bd-1557-4b0c-bd89-feebfc6b359d", "isSupport": "{\"DMP_DRM_PLAYREADY\":\"false\",\"DMP_DRM_WIDEVINE\":\"false\",\"DMP_available\":\"true\",\"EDEN_available\":\"true\",\"FrameTVSupport\":\"false\",\"ImeSyncedSupport\":\"true\",\"TokenAuthSupport\":\"true\",\"remote_available\":\"true\",\"remote_fourDirections\":\"true\",\"remote_touchPad\":\"true\",\"remote_voiceControl\":\"true\"}\n", "name": "[TV] Living Room", "remote": "1.0", "type": "Samsung SmartTV", "uri": "http://192.168.0.65:8001/api/v2/", "version": "2.0.25" }

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 3, 2024

Device connect prompt must be "First Time Only". You also must delete all authorized device from your TV.
Then retry to configure the component, you should see the popup. When it apper, confirm immediatly.

Let me know.

from ha-samsungtv-smart.

codylv7 avatar codylv7 commented on July 3, 2024

I tried it with First Time Only and Off, neither worked, but I'll try it again

from ha-samsungtv-smart.

codylv7 avatar codylv7 commented on July 3, 2024

Put it back to First Time Onle, deleted all devices, same issue. Log file shows:

2020-04-01 17:36:56 DEBUG (SyncWorker_55) [custom_components.samsungtv_smart] Try config with port: 8001
2020-04-01 17:36:56 DEBUG (SyncWorker_55) [custom_components.samsungtv_smart.websockets] WS url ws://192.168.0.65:8001/api/v2/channels/samsung.remote.control?name=W0hvbWUgQXNzaXN0YW50XSBMaXZpbmcgUm9vbSBTYW1zdW5nIFRW

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 3, 2024

The popup is shown on the TV during configuration?
Also delete the file "token-.txt" in the custom_component folder and be sure that there are no issue with the access permission to this folder (component must be able to read and write this file).

from ha-samsungtv-smart.

codylv7 avatar codylv7 commented on July 3, 2024

No popup occurs, I deleted token.txt and still getting same errors

2020-04-04 11:28:57 DEBUG (SyncWorker_47) [custom_components.samsungtv_smart] Try config with port: 8001
2020-04-04 11:28:57 DEBUG (SyncWorker_47) [custom_components.samsungtv_smart.websockets] WS url ws://192.168.0.65:8001/api/v2/channels/samsung.remote.control?name=W0hvbWUgQXNzaXN0YW50XSBMaXZpbmcgUm9vbSBTYW1zdW5nIFRW
2020-04-04 11:28:57 DEBUG (SyncWorker_47) [custom_components.samsungtv_smart.websockets] Connection closed.
2020-04-04 11:28:57 DEBUG (SyncWorker_47) [custom_components.samsungtv_smart] Working but unsupported config on port: 8001
2020-04-04 11:28:57 DEBUG (SyncWorker_47) [custom_components.samsungtv_smart] Try config with port: 8002
2020-04-04 11:28:57 DEBUG (SyncWorker_47) [custom_components.samsungtv_smart.websockets] WS url wss://192.168.0.65:8002/api/v2/channels/samsung.remote.control?name=W0hvbWUgQXNzaXN0YW50XSBMaXZpbmcgUm9vbSBTYW1zdW5nIFRW&token=
2020-04-04 11:28:58 DEBUG (SyncWorker_47) [custom_components.samsungtv_smart.websockets] Connection closed.
2020-04-04 11:28:58 DEBUG (SyncWorker_47) [custom_components.samsungtv_smart] Working but unsupported config on port: 8002

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 3, 2024

Hard to solve here. When you use wscat, what did you do? Does the popup appear in this case?

from ha-samsungtv-smart.

codylv7 avatar codylv7 commented on July 3, 2024

When I do
wscat -n -c https://192.168.0.65:8002/api/v2/channels/samsung.remote.control?name=U2Ftc3VuZyBUViBMaXZpbmcgUm9vbSBUaXplbg

I get the prompt on TV, and when I allow I get

{"data":{"clients":[{"attributes":{"name":"U2Ftc3VuZyBUViBMaXZpbmcgUm9vbSBUaXplbg"},"connectTime":1583718916730,"deviceName":"U2Ftc3VuZyBUViBMaXZpbmcgUm9vbSBUaXplbg","id":"2545101f-ca4a-4e40-9ae7-14b483b7758b","isHost":false}],"id":"2545101f-ca4a-4e40-9ae7-14b483b7758b","token":"16730934"},"event":"ms.channel.connect"}

from ha-samsungtv-smart.

Aiace88 avatar Aiace88 commented on July 3, 2024

hi, i have

The popup is shown on the TV during configuration?
Also delete the file "token-.txt" in the custom_component folder and be sure that there are no issue with the access permission to this folder (component must be able to read and write this file).

I tried to use your custom component to connect to my tv (samsung q70 2019), but hassio tells me it is impossible to connect to the tv. does anyone have any ideas on how to try?

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 3, 2024

{"data":{"clients":[{"attributes":{"name":"U2Ftc3VuZyBUViBMaXZpbmcgUm9vbSBUaXplbg"},"connectTime":1583718916730,"deviceName":"U2Ftc3VuZyBUViBMaXZpbmcgUm9vbSBUaXplbg","id":"2545101f-ca4a-4e40-9ae7-14b483b7758b","isHost":false}],"id":"2545101f-ca4a-4e40-9ae7-14b483b7758b","token":"16730934"},"event":"ms.channel.connect"}

This is exacly what I'm expecting back! Are you sending the wscat from the same machine where HA is running or are different machines?
The message log Working but unsupported config... (may be should be rewied) is conseguence to a WebSocketException, so seems thar HA is not able to connect to the TV. May be there is an active firewall on the HA hardware?

from ha-samsungtv-smart.

codylv7 avatar codylv7 commented on July 3, 2024

I ran wscat from my laptop, HA runs in docker. I can try the wscat from within container if that helps? I do have my docker swarm and Samsung TV segregated on different VLANs, but no firewall rules between them.

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 3, 2024

Different VLAN do not work, same problem was here #5

from ha-samsungtv-smart.

Aiace88 avatar Aiace88 commented on July 3, 2024

Different VLAN do not work, same problem was here #5

ok, i move the tv in the same vlan, and now the configuration is complete. now i need to create in configuration.yaml for the additional setting? such as apps...

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on July 3, 2024

Yes, you can. Apps is suggested.

from ha-samsungtv-smart.

codylv7 avatar codylv7 commented on July 3, 2024

Ok, I suppose it is what it is then. I'm having a hard time understanding why a different VLAN would make a difference but I'll play around and see if I can find a workaround.

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.