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
Not working properly new firmware #13
Comments
Hi @Erdk2, The power on works because it's using a standard function. Your TV probably have a new version of OS for Smart TV with a new API. Since i don't have a TV like that, i can't help you with the problem. Unless you want to donate one :P |
I'm on the same firmware version and I'm seeing the exact same issue. I'm pretty familiar with JavaScript, so I'm happy to have a go at this. Any chance you could share any pointers on how to approach this, @tavicu? My main question is where to find information about these APIs – is there any form of documentation anywhere, or is it reverse engineered? Thanks! |
I was able to plant some logs and see what is being returned in a few places of the application when the power off command is executed.
|
It looks like you didn’t authorize the api on the first connection. You can check in Settings - General - External Device Manager - Device List. Maybe you clicked Disallow. Let me know! |
Hi @tavicu, thanks for the quick reply! I don't have any devices on the Device List window, it just says "No equipment stored". In fact, I've never seen any authorisation prompt, except when I tried pairing with an older plugin. If this is an authorisation issue, is it normal that the power ON command works fine? And is there any other way I could troubleshoot an authorisation problem? Also, I'm happy to plant some more logs in other parts of the application if that helps. Thanks again. |
Hi @eduardoboucas Can you try to access this url and see if it works? http://TV_IP:8001/api/v2/ |
It does work, here's what I see: {
"device":{
"FrameTVSupport":"false",
"GamePadSupport":"true",
"ImeSyncedSupport":"true",
"OS":"Tizen",
"TokenAuthSupport":"true",
"VoiceSupport":"true",
"countryCode":"PT",
"description":"Samsung DTV RCR",
"developerIP":"0.0.0.0",
"developerMode":"0",
"duid":"uuid:<DEVICE_ID>",
"firmwareVersion":"Unknown",
"id":"uuid:<DEVICE_ID>",
"ip":"192.168.1.78",
"model":"18_KANTME_UHD",
"modelName":"UE65NU7455",
"name":"[TV] Samsung 7 Series (65)",
"networkType":"wired",
"resolution":"3840x2160",
"smartHubAgreement":"true",
"type":"Samsung SmartTV",
"udn":"uuid:<DEVICE_ID>",
"wifiMac":"<MAC ADDRESS>"
},
"id":"uuid:<DEVICE_ID>",
"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] Samsung 7 Series (65)",
"remote":"1.0",
"type":"Samsung SmartTV",
"uri":"http://192.168.1.78:8001/api/v2/",
"version":"2.0.25"
} |
I think some of the TV's are using another auth method. Can you please try the demo from this repo? And also if this url return something: http://${this.config.ip}:8001/ms/1.0/ |
I ran demo example, inserted the IP and clicked to connect. I saw an authorisation prompt on my TV asking if I wanted to allow the device to connect. I clicked Allow and then clicked Confirm on the web app, but the web app then asks me for a pairing code that the TV was supposed to show. Trouble is, there was no pairing code. Nothing really happened on the TV after I clicked Allow.
This returns |
That's cool! It means that your TV supports my plugin. The problem is why when you try to send a command for the first time (power off) it's not asking for authorisation like it did now ... |
Can you point me to any relevant documentation so that I can try to poke around? I've been looking at various pages in the Samsung Developer portal (e.g. https://developer.samsung.com/tv/develop/getting-started/creating-tv-applications), but there's too much content and I can't find the relevant API references for what we're trying to do. We're not exactly building a TV application, we're trying to interact with it from an external device. Or would that be the same, as far as the APIs are concerned? |
Unfortunately there is no documentation for this API. Let me know what name did you put in config file and i will try to make a command for you to run and see the result :) |
I just noticed that when I hit http://192.168.1.78:8001/ms/1.0, I do see an authorisation prompt in the TV. However, nothing happens after I select Allow, and subsequently hitting the same endpoint simply results in the response I shared above. As for my config, here's what it looks like: {
"bridge":{
"name":"Homebridge",
"username":"CC:22:3D:E3:CE:30",
"port":51826,
"pin":"031-45-154"
},
"description":"Home",
"accessories":[
],
"platforms":[
{
"platform":"SamsungTizen",
"devices":[
{
"name":"Living room TV",
"ip":"192.168.1.78",
"mac":"<MAC>"
}
]
}
]
} Let me know if you need any other info. Thanks again for your help. Much appreciated! |
I have removed the bridge from my HomeKit app and added it back again. Now the error seems to be slightly different. I see this when trying to send the power off command:
And this is shown in the console, as a result of the logs I planted:
Also, I can see from the logs that the plugin is trying to access this URL at some point: http://192.168.1.78:8001/api/v2/channels/samsung.remote.control?name=TGl2aW5nIHJvb20gVFY=. When I try to access it directly on a browser, I get the authorisation prompt on the TV, select Allow and then nothing happens. The browser responds with the same response as the other endpoint: |
can you try to run from the server this command?
|
I tried it on my Q7FN TV and got the following result: curl -I -L http://192.168.178.129:8001/api/v2/channels/samsung.remote.control?name=U2Ftc3VuZyBRN0ZO
HTTP/1.0 403 Forbidden
content-type: text/html
content-length: 38 The name of my device in the homebridge config is "Samsung Q7FN" aka "U2Ftc3VuZyBRN0ZO" in base64. The root API URL prints the following information
|
And this is what I get when I run the command... |
when I run http://192.168.1.54:8001/api/v2/ i get: { |
You have to change the base64 encoded name part of the URL. It will always return 404, if the name was not found. For me it returns |
Btw, this seems to be an issue with all Series 7 models: Ape/samsungctl#89. |
A new firmware (1153.3) is available for manual download, but same problem with this one. |
2018 models added TokenAuthSupport in August after fooling everyone into thinking normal IP control worked. Samsung designated 6 chosen vendors last November that they have given the information for the protocol. So you would need to reverse engineer one of those 6 to auth for that protocol now. Most likely it's some kind of OAuth and a token parameter now needs to be passed to these APIs. |
Which vendors and which apps are on the list? |
The Nov 30 2017 announcement identified URC, AMX, Savant, RTI, Crestron, and C4. I don't know if all of those actually completed it, but presumably most did and presumably that's why Samsung felt it was okay to suddenly block the rest of the world last August. |
yup. UK firmware TV here and the new firmware killed this except for power on :( im happy to help troubleshoot too |
Also had issue with power modes. Installed this plugin instead, which works fine: https://www.npmjs.com/package/homebridge-samsung-remote |
I used to use that one, it didn't work either for the "power off" command. what firmware and TV model are you using? |
Hey! Sorry for not being active. Until December i have a lot of work and i will not be able to help any of you. |
Anyone knows of any Samsung remote plugin that will work after this TV update? There's no way to revert the TV firmware update |
yup, doesn't work, its super weird! https://github.com/petealves/homebridge-samsung-smart-tv18 <-- works however he has no way to save the token in his implementation so it asks each time on screen if it can control... but the commands are working for WOL and to turn off but I get the authorisation prompt. his web sockets are working and are very fast. Log for that plugin: TV Off: |
i'd suggest uninstalling the plugin and clearing out the config and starting over... |
Thank you so much for this update! I was so worried after seeing earlier comments that all hope was lost. But we all appreciate your development of this! I love controlling my TV using HomeKit, Siri, and Alexa. |
@tavicu still asks to allow in the morning.... wss://10.0.0.13:8002/api/v2/channels/samsung.remote.control?name=VFY=&token=10985883 |
Can't get it to work :-(. Have received the token and, put it in the config and restarted homebridge. |
that's the same experience I'm having :( |
I have the same Problem. I have a UE 55 Nu 7179. |
QE65Q8 here.. looks like we may need a bit more troubleshooting. |
Mine is a QE49Q7FAM |
@tavicu the token seems to be changing, my TV keeps asking to allow after a while of working fine, so i've removed the token - and paired again - a new token was presented, set it in the config, but after a few hours was asked to allow again, removed the token again and paired - new token was presented and yet it keeps asking to allow after a few hours again |
Hei. I didn't had time in the latest days to look but i will try to make some. What i can tell is that i use the same version with my tv and never asked me to Allow since the first pair that was 5 days ago. I use my TV and commands every day without a problem! |
thanks, question - in settings, general, external device manager, device connect manager - do you have access notification set to Always On or something different? |
@logictester i will take a look when i get home but i don't think so! It did asked me the first time to Allow. So if it was on Always On, it shouldn't ask. But i will come back with a response :) |
@tavicu setting the Access Notification to Never seems to do the trick :)! |
Nope, that doesn’t work. It won’t show the prompt but it still doesn’t work. |
@tavicu Thank you so much for the update!! works on my TV after updating your plugin and adding the token to the config. My TV model is: UE40MU6402U 6 Series |
same here |
looks like its either a Tizen v3 or a series 7-9 issues |
hmm same problem here! UE40KU6075 Samsung |
@tavicu I had the same symptoms as @JonoHaysom with a 65MU8000, the problem is right here: https://github.com/tavicu/homebridge-samsung-tizen/blob/master/lib/SamsungRemote.js#L41
Thus the ping check fails so it does not even bother sending out the off command. |
thanks @markgergely hey @tavicu is it possible to change the code to suit the above for those running home bridge on OS X? |
Just wanna confirm I'm also running Homebridge on OSX |
Hei! Sorry for not being active but i had a lot of work at the job. I will push a new update next week at the beginning and try to solve most of the problems, including -w on OS X. As an update, i still run the same version and the TV never ask me to allow again. Please make sure you update your config file to include the token after pairing. |
@tavicu ever since i've set the notification in TV settings to first time only - never been asked to allow again :) i run my homebridge as a docker on my LibreELEC Kodi box btw |
I thought my setup was good but the TV did ask me to allow access for Homebridge. I did it again with a new token and I'm fine for now. I just hope that it doesn't ask me again. Any work on fixing that so far? |
@thehauntedmattress make sure in the TV settings - Remote device management to set the notification setting to first time only |
I had it at first time only and it was still doing it. In fact I turned it off and it still was asking for allow/deny. |
I have released a new version.
Please try to look on the README file at Installation steps! On TV go to If you still have a problem that is not answered in the Common Issues section please open a new Issue. |
No description provided.
The text was updated successfully, but these errors were encountered: