Send Auth request to Q
Send Auth request to Q
Hi all
I want to ask does anyone have some. Sample. Code to get the TV to pop-up the Auth request for a app.
I am trying to code a LUA script for my home automation system. I have seen the other HTTP codes and how to determine TV's etc through /rcr call on the TV. Returns a xml unpn xml. File.
Would be really helpful.
Sent from my SM-N950F using Tapatalk
I want to ask does anyone have some. Sample. Code to get the TV to pop-up the Auth request for a app.
I am trying to code a LUA script for my home automation system. I have seen the other HTTP codes and how to determine TV's etc through /rcr call on the TV. Returns a xml unpn xml. File.
Would be really helpful.
Sent from my SM-N950F using Tapatalk
Re: Send Auth request to Q
There's no special code, TV will ask user agreement as soon as it receives something acceptable.
I do NOT receive any PM. Please use forum.
Re: RE: Re: Send Auth request to Q
Thank you, I am looking for some sample code I could send to the TV to invoke this. I have limited protocols to use in LUA can use a network socket, HTTP request, Post.zoelechat wrote:There's no special code, TV will ask user agreement as soon as it receives something acceptable.
I wanted to send Auth request of sort get the TV to prompt and I would accept so I could send it Key requests I. E. Up down etc
Sent from my SM-N950F using Tapatalk
Re: Send Auth request to Q
Well, you can take websockets example in rccli code.
If you want to do it manually you can use for example "Simple Web Socket Client" extension for Firefox (or Chrome), then use as URL:
(name= at the end is name of device in base64, here "rccli")
and as request, e.g. (even if TV should already have asked your agreement at this point...)
You should get some json (installed) apps list as reply
If you want to do it manually you can use for example "Simple Web Socket Client" extension for Firefox (or Chrome), then use as URL:
Code: Select all
ws://YOUR_TV_IP:8001/api/v2/channels/samsung.remote.control?name=cmNjbGk=
and as request, e.g. (even if TV should already have asked your agreement at this point...)
Code: Select all
{"method":"ms.channel.emit","params":{"event": "ed.installedApp.get", "to":"host"}}
I do NOT receive any PM. Please use forum.
Re: RE: Re: Send Auth request to Q
Now we talking thank you so much! Json would be the best option, is there somewhere I could get a list of the controls I could send via JSON I could then use the HTTP Protocol via LUAzoelechat wrote:Well, you can take websockets example in rccli code.
If you want to do it manually you can use for example "Simple Web Socket Client" extension for Firefox (or Chrome), then use as URL:(name= at the end is name of device in base64, here "rccli")Code: Select all
ws://YOUR_TV_IP:8001/api/v2/channels/samsung.remote.control?name=cmNjbGk=
and as request, e.g. (even if TV should already have asked your agreement at this point...)You should get some json (installed) apps list as replyCode: Select all
{"method":"ms.channel.emit","params":{"event": "ed.installedApp.get", "to":"host"}}
Sent from my SM-N950F using Tapatalk
Re: Send Auth request to Q
No official documentation, but much infos (more than I have) there on samsungctl github project page: https://github.com/Ape/samsungctl
I do NOT receive any PM. Please use forum.
Re: Send Auth request to Q
Yeah I have researched this for a week now on the web. There are many many posts but they all end in one disappointment, there are ways to get the sender (app / http) to pair but then the session token returned is encrypted. One can use the DLLs from some of the decompiled code that is on the net BUT this will only work if it is "an actual app".zoelechat wrote: ↑Tue May 15, 2018 9:48 pm No official documentation, but much infos (more than I have) there on samsungctl github project page: https://github.com/Ape/samsungctl
What do I mean by this, if you trying to (as in my example) embed the calls into another interface (My Home Automation System) and its system only understand LUA code - it seems like you screwed. Is my assumption correct?
One additional question, I have coded many apps in .Net, LUA etc I know its noob however thought I would ask. For the rccli there are windows version. Do I need to compile it somehow for Windows or what environment do i run it in, CMD, Python?
On this example:
Two questions for my understanding:ws://YOUR_TV_IP:8001/api/v2/channels/samsung.remote.control?name=cmNjbGk=
- 1. WS is websockets, in the previous TV's Samsung use to use 55xxx Port correct?
2. Have they now created a new port / interface for WebSockets on 8001?
3. So I just understand correctly - the name= xxxxx element - one takes the string i.e. FOO and uses the language (in my case LUA) function to encode it in base64? Is that a correct mechanism?
4. The JSon you showed below:
this is a great way to interface. Is there any list of ms.channel.emit - params I can reference - or is it a simple forum search / google search.{"method":"ms.channel.emit","params":{"event": "ed.installedApp.get", "to":"host"}}
5. Also so I understand the construct, does one construct the JSon "method" and then POST it to the Websocket?
Looking forward to hearing from you.
Re: Send Auth request to Q
There must be a websockets implementation in LUA, nah? That's what you have to look for, now you have all infos you need. Can't help you about it, thought Lua was a compression format
Builds are included in archive and ready to use from commandline on platform of your choice.
Yes, and even older TVs didn't use websockets, but you don't care.
As shown in sample request above.
Unless you want TV to popup everytime, better define device name once for all https://www.base64encode.org/
Told you: no documentation, everything known on github (all over the place).
Up to you to "construct" but a predefined sequence of chars with wildcard field(s) can be ok too for such simple requests.
I do NOT receive any PM. Please use forum.
Re: Send Auth request to Q
Ok thank you will give it a go, will revert back maybe it will help. Someone one day
Re: Send Auth request to Q
Well forunately you ONLY need to run this piece of code in lua shit:
Code: Select all
local t = os.execute("echo 'test'")
print(t)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!