-
Notifications
You must be signed in to change notification settings - Fork 33
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
Develop branch updated #106
Comments
Getting error trying to install develop branch:
|
fixed |
Thanks! But now new issue:
|
ok cool. I know there are going to be some issues. II will get them fixed |
fixed |
thanks for prompt reply. now issue is this:
same if use --port 8002 --method websocket |
ok |
run the RUN_ME.py file do not use the command line for the moment. |
duplicate recursion messages excluded:
|
ok I just updated the develop branch once again. so give it a go. use the RUNME.py file to run tests against the TV. It will test every available feature to make sure it is working. the test supports multiple TV's and it will ask if you want to run the tests for each TV it locates. it is going to ask to create \tests in the root of thee system drive on the machine the tests are run from. it is going to create a series of files in there. I need a copy of those file whether or not the tests ended. It may get stuck at the end of the tests. if it does (no output to the screen for more then 10 seconds) just kill the process or ctrl+c it. zip up the tests folder and attach it to a post. if you have the ability to run the tests from python 2.7 and python >= 3.5 that would be a huge help. just be sure to zip up the tests folder between running the tests. Once you have paired the TV if you leave the .config files in the tests folder you will not have to pair the TV again. You do not need to delete the files in the folder either. the program will overwrite any files it needs to. |
I downloaded the develop branch, installed but no matter what, I get this:
Was just trying to get a simple command to work before running the suite. Seems like no matter what I pass, I keep getting |
I've also tried |
It seems my tests.zip is not very helpful since I get also |
you need to run the RUN_ME.py file. |
That error is a printout. it is a caught exception. I added some debugging to see what local IP addresses come up.. If you can do me a favor tho. and use the RUN_ME.py file. this is going to run a slew of tests on the TV. . |
I did run the RUN_ME.py with python version 2.7.13 on linux, tests -folder zip is found on #106 (comment) Thank for your hard work from Finland. |
sorry about that. I missed your post. I need you to turn your TV on.
THIS PART IS IMPORTANT |
Hi, I checked and smp_14_ did not return anything, it is totally blank page. I browsed through the ssdp_output.log and opened all the URIs with |
tests.zip |
It seemed to get stuck on an HBO app? |
I tested also on Windows-environment and got better results: |
It didn't make it that far this time? Let me know how to proceed, I'll try whatever you need! |
ahh yes a nested tuple.. I updated the develop branch. it has been fixed |
I think it might've failed around the same spot?
|
ha! is_runnning to many n's |
I just do not get the authorization popup to accept on the television screen when running from the Linux (raspberry pi). I have tried with 2.7 and 3.5 -branch Pythons too. On Windows machine it showed popup right away. Here is logs yet again from the Linux |
|
fixed and pushed |
Error message after the pairing:
I am also unable to kill the running process by ctrl+c
|
I have made a lot of progress using https://smartthings.developer.samsung.com/docs/devices/smartthings-schema/schema-basics.html I realized last week that the "SmartThings" app controls my TV with no issue. So I began to proxy traffic and use SSL Pinning to get an idea of whats going on. Between that and the info on the "SmartThings" API site, I have reversed about 80% of the API and can successfully connect to my TV through a one time (persistent) PIN auth and control just about anything I want. |
Do you have any code to work on? I'd love to contribute. Been trying to hunt down some documentation on how to interact with the 2018 TVs via the SmartThings protocol for ages, but never found anything. |
Hello, it is possible to intercept the channel and volume change event callback ?
Hello, it is possible to intercept the channel and volume change event callback ? |
@ChrisKader Did you have to decompile the apk and recompile with your own certificate to bypass the SSL pinning? I'm taking a look at the APK right now and it looks like there are a few certificates that need to be replaced. Wondering if you went down this route or another? |
OK guys. I can put some time into this bloody thing. However.. I do not want to hear anything about HASS. I will be more then happy to get this thing working properly I will not get it running in HASS that is going to be the job of someone else. I ill not modify code so that it works with HASS This can be done via monkey patching. I will get this running as a stand alone library and will be able to be used by any and all projects. Now that this has been said. It is by far easier for me and faster if I have a TV to use so that I can test against. I can make changes as the problems appear. I personally do not have a need for another TV but for the sake of being able to develop for the thing it is going to be far easier if I have one. At the bottom of this post is a donate link you can use to help pay for this thing. If you do donate PLEASE type a message including your GitHub name This way I will add your name to the library as a contributor and you will forever be recorded as one of the people that made the library possible. I really have no need to another TV and I would be more then happy to pass the thing off to whoever helps with development of the library once it is finished. If for some reason I am not able to finish the library I will send the TV to whomever is going to pick up where I left off. In this bat shit crazy world we live in right now if something was to happen to me I will leave instruction to my wife or family members to give you back your money. any moneys in excess of what is needed I will return each person that donated will get their "cut" of the excess up to the amount they donated. I can get a 43" 8 series for 210.00USD which is not a horribly high priced TV. But if you all are feeling generous I can get a 55" Q900 8K for 1400.00USD. bear in mind that higher end TV's have more functionality the more functionality a TV has the more I will be able to add to the library. I can get just about any model for about 1/2 of what retail price is. Because there is no API that has been publicly released for these TV's I am going to be doing quite a bit of data logging. I had written a really intensive debugging script that is able to handle multiple threads while keeping the logging output grouped together. It logs where a call is made from and where the call is made to providing me with the file names and line numbers for where the call originated from and where the call has been made to. It works on methods, functions, nested methods, nested functions, class level attributes, instance attributes, property gets, property sets and property deletes. It shows me the data being pass as arguments (if any) and also the data that is being returned (if any). Most newer TV's have a debugging feature built into them that can be turned on. I will have to go back and lookup how to do this. This is something that is going to need to be done so that I am able to see what a TV is going. There seem to be some issues with the websocket-client library I do not know if these issues have been fixed or not. If they have not I will either write my own websocket connector or I may see if there is sone available that works. There are several websocket client libraries that are available so hopefully one of them should work properly. If there is someone that has Python knowledge and is will to help out with this it would be greatly appreciated. The more brains working on this the the faster we will be able to get it working properly. The largest issue that this library currently has is with the websocket TV's and properly detecting the power state. This is due to how Samsung TV's power down their LAN port. I have written a program that is able to leverage Windows to send out ARP requests without the need to be logged in as an administrator and also does not require starting a new process to do this. I have to take a look and see if there is a way to go about doing the same kind of a thing from posix systems. If there is then the use of a static IP on the TV and bouncing arp packets off the TV is going to be a way we can detect the power state of the TV, I did want to avoid using static IP's but because of the inconsistent nature of UPNP on Samsung TV's we may not be able to use a UPNP SSDP packet to do the discovery. Most of the issues stem from Samsung's inconsistent API between the various models and years. I wanted to be able to provide a user with as much control as possibly but this may have to be put on the back burner or may not even be able to get done. I think the only way to properly go about adding the "extras" is going to be by making a table with TV model numbers letting us know what can and cannot be done. This is going to take a long while to compile and is going to only be able to be achieves through testing. so for the time being lets get the basics working properly. I was also making my very best attempt to keep the API the same as with samsungctl. I am not going to do this anymore. This is due to the complexities for having 4 different connection types. We may not be able to go the auto detect method This is something I would really like to have available but it may not be possible. I am going to start over and create a new repository and work from the ground up. I have the ability to test against my TV which is a Legacy TV. I do have another Samsung TV that is an H model I believe. It is not a "smart" TV but it does have a LAN port on it. I am not sure if I will be able to do anything with it. here is the donate link. make sure you tell me your Github username and also make sure you say this is for the Samsung TV. If I manage to get the library built fast enough I will be able to return the TV and give the money back. https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MXZ2RLZRS8P9J&source=url |
Hi, I'm a complete Python noobie, so getting a bit lost trying to run your development code. Anyway, I've downloaded the developer branch and open/run RUN_ME.py. In the console window I get a number of errors and it doesn't succeed in doing anything. Errors look like this:
It would appear to be unable to import various modules - I'm sure I'm doing something very basic wrong - but what is it? Many thanks, |
the easiest way to get running is to run the setup.py file first. this will install all external libraries that are needed to get you up and running. |
Thanks - I'll give that a try! |
OK, looking better:
Does this make any sense? It didn't seem to find the TV. |
Hi @MikeFleetwood - Regarding your latest error: #116 (comment) @kdschlosser - My apologies. I made a new issue without reading about attaching log files, etc. I've closed the issue (#135) and have attached my log files here. Progress was made using the dev branch. I've ran the RUN_ME script and have attached them. I'm still unable to send commands as I was able to on the original Ape version of samsungctl, unfortunately. Edit: While running a simple python script (below) as a test I get the following: Script:
Output:
It hangs here indefinitely. Also, regarding this "pairing" thing; I've never seen any pop-up on my TV and didn't on the last version either. Also using the Samsung SmartThings app I don't get any popups either, it simply finds my TV. I'm not sure my TV requires/has this. Also, I'm got some experience in Python and coding in general. If there's anything you would like me to assist with I'm happy to give it a go. I'm sure I speak for a lot of people here when I say we really appreciate the work you've put in and continue to put into this library. Many thanks! |
It has been a while since I messed around with this library. it is going to take me a while to get myself back up to snuff on what I was doing with it. I am really thinking about scrapping it and starting from scratch. |
I totally understand that. As you've mentioned, you want to do things differently and as Ape appears to be completely gone, this will allow you full control over your own library and also put it on Pypi so people can install it without cloning etc. If you need a hand. please let me know. Even if it's just some debugging/testing you want me to do, I'm happy to do so! My simple use-case for this entire thing is the fact that in the EU, all soundbars have an auto 15-minute shut-off which can't be disabled. I often pause TV or Netflix for longer than this then have to mess around switching the soundbar back on (HDMI CEC connected) and putting the volume back up which is a massive pain. I simply wanted to run a small python script every 10 minutes to send a key to the tv which hopefully would keep the soundbar alive. I can't really do this with the old version of the script as my TV decided to pop up a volume change icon which would be annoying every 10 minutes so I was looking at your library and the CEC related commands which may do the job for a silent kick in the butt to keep it alive. Sorry! Went of on a bit of a tangent there! Cheers |
Hi Ryan
I suspect the soundbar shutdown is triggered by a period of silent audio, so you probably won't see anything useful on CEC. If it gets around to sending a "standby" to the TV, it will be too late to do anything about it. You might try sending it a periodic "power on" via CEC, but I doubt if that will make any difference. The only other possibility that I can think of is that it's responding to a "pause" control, in which case you could write something to capture that pause and every few minutes send "play" followed by "pause" until you detect either "play" or "stop", or some other user command that would mean you were watching again. |
Hi Ryan, thanks for this. I did see that post, but assumed it had been superseded as it was a while ago - I'll give it a try.
I think that ever since models H/J there is no longer any "pairing". All there is is a pop-up "Allow/Deny" on the TV screen. Provided you continue to use the "token" provided by the TV on first connection you will never see that pop-up again. There's a setting on the TV "setup" that controls when, if ever, you see that message - it maybe you've got it set to "never", in which case connection will always be allowed with out user confirmation. |
Thanks to @IDemixI for the pointer to editing utils.py. RUN_ME ran perfectly this time. Pages of information to read through! |
I'm able to run RUN_ME.py to conclusion, but still get some messages that probably indicate errors. There's still a few errors reported in the console output:445c9af7-e281-4300-a61d-ff506bac74d5.3.7.log, then it fails the KEY_VOLUP and KEY_VOLDOWN tests. Monitoring CEC output shows the remote mute operations (which pass, but use a different interface), but nothing on the volume controls. Everything else seemed OK, although it didn't close the browser and power-off didn't work (I didn't expect it to ). Here is the internal log file:samsungctl.445c9af7-e281-4300-a61d-ff506bac74d5.3.7.log I'm afraid I can't tell which are actual error conditions and which might just be handlers for errors that didn't occur (I see "ms.connect.unauthorized" there a couple of times). When I first ran this, earlier today it passed the KEY_VOLUP/DOWN tests, so don't know why it should be different now - I'll try again shortly. Any help would be appreciated - thanks! |
Hi @MikeFleetwood, Thank you for the suggestion. In the end I've gone with a slightly different approach. I had a spare Pi sat around so I've hooked it up directly to the USB port on my soundbar. From here I'm keeping an eye on the status of the device - I'm still working on it but I'm hoping I can set up some udev rules or use python select to detect when the device is switched on. From here the Pi will use LIRC to blast IR signals to the soundbar such as changing the mode to the same mode it's set to (soundbar still picks this up which is good). While writing this I've realised I can probably skip the USB bit altogether and just keep an eye on the status of the TV... checking if it's on or not. Haha, right, anyway that's the idea. IR it is! Good luck with your project! |
There are a few ways you can monkey around with your problem. One of the ways you are attempting to detect the power is partially correct. You may want to plug your pi into one of the HDMI ports on the TV and install the libCEC library. Alot of Raspberry Pi's have a CEC chip built into them. You may be surprised that yours does. You can use cec and poll the soundbar to see if it is powered on. The other way you can go about it is you would need to take a UBB cable and cut one of the ends off. you need to cut the end off that is not the end you would plug into the soundbar. You need locate the power and ground wires in the USB cable. these are typically going to be red and black if memory serves. You can look this up on the internet. Connect the red wire to a GPIO pin and the black to a GND pin on the pie. You will then need a 10K ohm resistor and tie that from the red wire to GND as well. This resistor is going to act as a pull down resistor. So when the soundbar powers off and the USB power on the soundbar disappears the state of the USB is going to get pulled down to ground. This way on the PI you can check the GPIO and reliably tell if the soundbar is off or on. |
Hi.
I've seen others report the same list of errors. Is it possible that one of the underlying library files is a non-compatible version? I guess I could just empty my "Python37\lib" folder then re-run setup.py. Or is there something else going on here? The strange thing is, when I first ran RUN_ME, a couple of days ago, I'm pretty sure it all worked, despite the errors listed above still appearing. (in particular, the KEY_VOLUP/DOWN tests and the browser display did work, but no longer do) It's not worked since. Any suggestions? |
does anyone can tell me from where I can get complete service manual for samsung smart tv ue55nu8009? |
while your TV is a Europe variant It should be the same as the US model except for the tuner and the model number. The US models have an operating input voltage of 100V - 260V or something along those lines. But all in all it should be damned close to being the same. you can buy the manual (digital copy) for 12.00 USD Even tho your TV ends in 8009 it is an 8000 series. the 8009 if because there is a "special" model number that is associated to the big box store where you bought it. |
thank you very much kdschlosser |
@kdschlosser , so I have one question please if you could answer me , can I rest my samsung smart tv service menu to the original settings with this service manual pdf guide? |
If all you want to do is get into the service menu one of these procedures below will get you into it. it's kind of a pain to do sometimes. so you may have to try some of them more then once. Start at the bottom of the list because your TV is not horribly old. I have a C generation from 2011 I believe and it is method 2. yours being an N means it is newer and the list has the newist at the bottom.
|
thank you @kdschlosser , I already know how to enter the service menu, but I need to check all the settings and options in the service menu, because I want to set them back to default status, because when I installed an app from the usb flash drive it has manubiulated with the service menu settings, so I want to check wich options or control settings has been changed to set them back to default values |
OoOo There should be a reset in the service menu I would think. I do not know if the service manual is going to tell you what all of the default options are. |
theres been 38 participants in this thread, so I take it at some point in time there's been almost 40 people interested in getting this to work. If only 10 of us donate 20$ it should be possible for @kdschlosser to buy a new tv, and continue development if he's interested. This is the only tool I've found which states it can change brightness, and it would be awesome to have MadVR run samsungctl on some profiles to change settings on the tv. |
OK folks I just updated the develop branch. I did a massive amount of code changes.
There is also a new file called RUN_ME.py. this is a test program. You can run this if you like it will prompt you if it needs user input as it runs. The program never reuses the same config file so pay attetion to your paired devices on the TV it's self. You will have to delete the pairings.
The test program tests every single aspect of the library. it is going to output to the console window. it is going to be a HUGE amount of data. so if you want to scroll back thn I would suggest increasing the buffer size to say 10K lines.
The program is also going to output everything to a series of files.
DO NOT POST ERRORS OR CREATE NEW ISSUES.
zip up the directory and attach the zip to a post here.
DO NOT CREATE AN ISSUE WITHOUT HAVING ATTACHED THE OUTPUT FROM THE TEST PROGRAM.
That is the only thing I am going to need to be able to solve any issues. you do not have to pass any parameters to the test program. it is going to do what it needs to do. If the program goes nuts and keeps on repeating the same error. please ctrl+c the thing to stop it. If the test program runs for longer then 60 seconds it is frozen. you will need to ctrl+c it or terminate thee process.
it is still going to output data to the file if it get stuck in an endless loop or if it freezes. so please attach the files.
The text was updated successfully, but these errors were encountered: