roberodin / ha-samsungtv-custom

📺 HomeAssistant - SamsungTV Custom Component
Apache License 2.0
122 stars 177 forks source link

Invalid config for [media_player.samsungtv_custom]: [token] #48

Open jjwBullfrog opened 4 years ago

jjwBullfrog commented 4 years ago

Hi - Thank you for all your effort!

I recently updated to 3.0.5. I updated through HACS and restarted HA. I get the following error when adding the "token" parameter to my config file. Any idea what is going on here?

Invalid config for [media_player.samsungtv_custom]: [token] is an invalid option for [media_player.samsungtv_custom]. Check: media_player.samsungtv_custom->token. (See ?, line ?).

Not sure how to get the format to show right on this. I have a dash before platform and its two space in from media_player, and everything else is tw space in from "- platform: samsungtv_custom".

media_player: platform: samsungtv_custom host: 192.168.1.72 port: 8001 mac: tc:d1:3:95:6d:11 sourcelist: '{"RaspberryPi": "KEY_HDMI2", "Chromecast": "KEY_HDMI3"}' protocol: ctl_beta token: 9116a675c22276a3f0f2222rtae03db9 id: 57661078-1111-02w34-ae75-664e04943af3

I have a 2015 J-series TV. Im running HassOS 4.10 and version 0.111.4 on Windows in VM.

If it helps:

{ "id": "uuid:id", "name": "[TV] UN55JS8500", "version": "2.0.25", "device": { "type": "Samsung SmartTV", "duid": "uuid:id", "model": "15_HAWKM_UHD", "modelName": "UN55JS8000", "description": "Samsung DTV RCR", "networkType": "wired", "ssid": "", "ip": "192.168.1.72", "firmwareVersion": "Unknown", "name": "[TV] UN55JS8500", "id": "uuid:id", "udn": "uuid:id", "resolution": "1920x1080", "countryCode": "US", "msfVersion": "2.0.25", "smartHubAgreement": "true", "wifiMac": "mac", "developerMode": "0", "developerIP": "" }, "type": "Samsung SmartTV", "uri": "http://192.168.1.72:8001/api/v2/" }

Moonbase59 commented 3 years ago

Same here, UE40H6700. HA Core 0.113.3.

ralpho1337 commented 3 years ago

Hi,

Changing the lines 64 and 65 in media_player.py to: CONF_ID = "id" CONF_TOKEN = "token" solves to problem.

Best Ralph

CaptInsano commented 3 years ago

@ralpho1337 Thanks so much, this fixed the error on my system.

Any change of getting this fix merged into mainline?

Jens-Wymeersch commented 3 years ago

@CaptInsano were you able to get control over your TV ? If so, which port did you take ?

new-kirte commented 3 years ago

The issue is still present, but the line numbers changed to 65 and 66: Changing the lines 65 and 66 in media_player.py to: CONF_ID = "id" CONF_TOKEN = "token" solves to problem.