kdschlosser / samsungctl

Remote control Samsung televisions via a TCP/IP connection
MIT License
155 stars 33 forks source link

3 new branches #9

Closed kdschlosser closed 5 years ago

kdschlosser commented 5 years ago

I created 3 new branches

please read the instruction for each branch, I have updated the instructions on use of each of those items as well as code examples.

for controlling applications https://github.com/kdschlosser/samsungctl/tree/add_application

mouse movements https://github.com/kdschlosser/samsungctl/tree/adds_mouse_movements

voice recognition https://github.com/kdschlosser/samsungctl/tree/adds_voice_buttons

dcorsus commented 5 years ago

@kdschlosser Awesome job Kevin!

kdschlosser commented 5 years ago

does that mean that they work? LOL

kdschlosser commented 5 years ago

No one wants to chime in here and let me know if these changes work?

mike9011 commented 5 years ago

Does this suppose to work on a Q8FN (2018) model? If yes I can test this in a couple of days.

kdschlosser commented 5 years ago

it should work.

jnimmo commented 5 years ago

I'll test it out as soon as I'm back from holiday, thanks very much for your work on this! Has anyone tested with Home Assistant - and if so does it work with 0.84.6, or should I stick with the 0.80.3 version I've been using to date?

DJPsycho82 commented 5 years ago

I had a busy time around christmas and new year (so happy new year to you all!).

I want to test some of these branches but i'm still having connection failures... (Q7F (2017) model)... Sorry being this late, but it didn't have more time...

Maybe i'm doing something wrong or my model is still different from the others?

This is what i see when i test the 0.8.0 version, the error appears after pressing accept on my remote:

volumio@volumio:/mnt/INTERNAL/samsungctl$ sudo samsungctl -i --host 192.168.0.161 --port 8002 --method websocket --timeout 10 Traceback (most recent call last): File "/usr/local/bin/samsungctl", line 9, in load_entry_point('samsungctl==0.8.0b', 'console_scripts', 'samsungctl')() File "/usr/local/lib/python2.7/dist-packages/samsungctl-0.8.0b-py2.7.egg/samsungctl/main.py", line 181, in main with Remote(config) as remote: File "/usr/local/lib/python2.7/dist-packages/samsungctl-0.8.0b-py2.7.egg/samsungctl/remote.py", line 13, in init self.remote = RemoteWebsocket(config) File "/usr/local/lib/python2.7/dist-packages/samsungctl-0.8.0b-py2.7.egg/samsungctl/remote_websocket.py", line 50, in init self.open() File "/usr/local/lib/python2.7/dist-packages/samsungctl-0.8.0b-py2.7.egg/samsungctl/remote_websocket.py", line 117, in open raise RuntimeError('Connection Failure') RuntimeError: Connection Failure

kdschlosser commented 5 years ago

no there is an issue with the the current version of the websocket library. I am going to have have to specify an older version of the websocket-client library. there are to many bugs and problems in the newer versions.

i really dislike doing that because if another library is installed that requires a newer version there is going to be problems somewhere.

DJPsycho82 commented 5 years ago

I understand, i wouldn't do that also. Is it fixable?

I read some people use samsungctl without problems, think that's not with the websocket method then? 2016+ TVs use the websocket secure, right?

Anything i can do to help?

kdschlosser commented 5 years ago

the firmware on the TV is what dictates what type of websocket connection is used. not the year. the year does play into it because the newer the TV the chances of it having a newer firmware preinstalled is higher.

the SSL websocket (secure) works just fine. the people that are running into problems with this library and people that are installing it. if they already has the old version of the library installed before the author of the websocket-client made the updates they did then they will be running an older version of the websocket library.

ok so this is what you need to do to get it working.

pip install -uninstall websocket-client

this is going to uninstall the websocket-client library

then run

pip install websocket-client==0.48.0

this will install a version of the websocket-client library before there were changes made to it that caused problems.

give that a shot and see if it works. do this after you run the setup.py file. and if you want to change the version of samsungctl you are using then you will clone (download) the branch as a zip file. open the zip file and extract the samsungctl folder into the \libs\site-packages folder of your python installation. overwrite any files it prompts you to. this will bypass having to use the installer for samsungctl. so it will always use the working version of the websocket-client library you installed

DJPsycho82 commented 5 years ago

Looks like i did something wrong because now i get the error :

pkg_resources.DistributionNotFound: websocket-client>=0.54.0

But I get no notification to accept the connection on my television. I succesfully removed the websocket-client and installed version 0.48.0 as you said:

volumio@volumio:~$ sudo pip install websocket-client==0.48.0 --upgrade Requirement already up-to-date: websocket-client==0.48.0 in /usr/local/lib/python2.7/dist-packages

I made a mistake at first to deinstall websocket via sudo apt purge websocket... didn't read you post to well (i'm having the flu at the moment, could be it haha).

Think there is something wrong with websocket at the moment, but i'm not sure where to search for it but i'm trying :)

DJPsycho82 commented 5 years ago

(i installed python websocket succesfully again with sudo apt install)

This is what i get when i run the uninstall command: sudo pip uninstall websocket-client Not uninstalling websocket-client at /usr/lib/python2.7/dist-packages, owned by OS

I think that's where the fault is...

dseifert commented 5 years ago

I am running into the same issues with the "Connection Failure" (remote_websocket.py, line 118).

pip install websocket-client==0.48.0

I am on Ubuntu 18.04, I made sure that websocket-client is not installed as a deb and installed it via pip. The same error happened when I run "python -m samsungctl --host 192.168.42.40 --method websocket --port 8002 KEY_POWEROFF" (also for pip3/python3). I do get asked by the TV whether I want to allow the access, but that's it.

P.S: https://github.com/eclair4151/samsungctl/tree/websocketssl is working for me.

jnimmo commented 5 years ago

@DJPsycho82 if you edit setup.py in samsungctl folder prior to running python install setup.py it should fix to either remove the websocket-client version requirement (54) or change it to ==0.48.0 (perhaps could update this in your fork @kdschlosser?)

I've just tried this but unfortunately away from the TV for a few days so I can't test whether it has fixed the Connection Failure issue.

DJPsycho82 commented 5 years ago

Whoohoo! got it to work with interactive mode! not sure where the problem was but i think trying to install websocket again worked for some reason (using the websocketssl version):

sudo pip install websocket-client==0.48.0 Downloading/unpacking websocket-client==0.48.0 Downloading websocket_client-0.48.0-py2.py3-none-any.whl (198kB): 198kB downloaded Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.7/dist-packages (from websocket-client==0.48.0) Installing collected packages: websocket-client Found existing installation: websocket-client 0.18.0 Not uninstalling websocket-client at /usr/lib/python2.7/dist-packages, owned by OS Successfully installed websocket-client

After that: [sudo samsungctl -i --host 192.168.0.161 --method websocket --port 8002] just worked! Opening the smarthub doesn't work, but when i'm in the hub, i can navigate. Now trying to figure out how to read the input source.

@kdschlosser should i still test these branches for you? Not sure if i can run these seperately from the websocketssl version?

DJPsycho82 commented 5 years ago

Is it possible to get a readout from the TV? For example on what source the TV is set? (e.g. HDMI1 / HDMI2 / NETFLIX / YOUTUBE / etc.?) I'm not sure how to do it via samsungctl.

kdschlosser commented 5 years ago

@DJPsycho82

if you download each of the branches and rename the samsungctl folder and place it into your site-packages folder you can have each of the version installed at the same time. you have to do the file work manually.

so extract the samsungctl folder to a temporary directory. rename it to whatever it is you want.

you will not be able o use the command line utility unless you directly run the main.py file.

an example would be

python __main__.py -i --host 192.168.0.161 --method websocket --port 8002

I have not extended the interactive mode at all. so this is not going to help you in testing the branches I have up.

the only way to test the branches is to do it via code. there are example code blocks in each of the branches readme files.

you have to remember to import the samsungctl version as what you renamed the folder to. so if you named one of the folders samsungctl2 then you would do the import like so.

import samsungctl2 as samsungctl

as far as the sources go. we do not have a way of getting this information as of yet. not unless you have a 1st generation TV. like what I have. I am able to get the playing content metadata, sources, change the source labels. get the tv channels. set the TV channel. basically the whole enchilada. Samsung has removed all of these features form the newer generations. I am sure they probably still exist but it does it through the websocket interface. The crappy thing is that not even Samsung's own applications use any of these features. so it's not like we can even wireshark the connection to reverse engineer it. I am almost positive that there is more to the websocket end of things.

I need to start poking about to see if I can locate a Samsung developer I do know a guy that works for MIOS (MiCasaVerde) and that company is a Samsung Partner. I might be able to finagle some information out of him. we will see.

DJPsycho82 commented 5 years ago

I'm certain Samsungs smart things app (I have it installed, android) reads out information from my TV. When I start the app, the app sees what kind of input the tv is on. That's the only thing it reads out, but it's something. I'm sure it could do more. I'm going to test the branches you posted. I think I will manage to install the 3 versions at once and test the branches but it could take me a little while.

DJPsycho82 commented 5 years ago

hmm i'm struggling a bit. I copied the 3 branches to /usr/local/lib/python2.7/site-packages/ (my samsungctl with websockssl isn't on that location).

I tried the samsungctl-application branch and it fails to execute. I did not have to change the import to how i renamed the folder. If I do that, the code fails:

python youtube.py File "youtube.py", line 1 import samsungctl-ap ^ SyntaxError: invalid syntax

But when i use the code as described in the readme files i get this when i try to start youtube app:

python youtube.py Traceback (most recent call last): File "youtube.py", line 14, in app = remote.get_application('YouTube') AttributeError: RemoteWebsocket instance has no attribute 'get_application'

when i run the code to access the applications, i get: python test.py Traceback (most recent call last): File "test.py", line 14, in for app in remote.applications: File "/usr/local/lib/python2.7/site-packages/samsungctl-ap/samsungctl/remote_websocket.py", line 218, in applications if app_1['appId'] == app_2['appId']: TypeError: string indices must be integers

Hope this helps you :)

DJPsycho82 commented 5 years ago

I think i found something interesting! I scanned the traffic on my phone when i connected with the smart things app to the tv and found a new port. maybe you already knew this, but when i connect to http://[tv ip]:9197/dmr I get some information about my tv in XML file. Running Tizen, model name, number serial, etc. (I found out, it's from the allshare upnp protocol from samsung)

I'm not good with XML nor wireshark, but maybe i'm finding some usefull information. Edit for pasting the information:

http://192.168.0.161:7676/rcr/MultiScreenService.xml http://192.168.0.161:9197/upnp/control/ConnectionManager1 http://192.168.0.161:9119/screen_sharing http://192.168.0.161:7678/nservice/dial.xml http://192.168.0.161:9197/dmr http://192.168.0.161:7676/rcr/ http://192.168.0.161:9197/StreamSplicing_1.xml http://192.168.0.161:9197/ConnectionManager_1.xml http://192.168.0.161:9197/AVTransport_1.xml http://192.168.0.161:9197/RenderingControl_1.xml http://192.168.0.161:7678/nservice/

All these adresses give me an XML page back. Some of the pages give me an: s:Client

UPnPError

back, but it's a nice XML page.

I still have the .pcap file. Maybe someone will help finding out how to read information from the Samsung with Tizen firmware.

dcorsus commented 5 years ago

@DJPsycho82 These are all UPNP ports for individual services. It is what Kevin was referring to that in the old days, the UPNP services could be used to dynamically update state but recently all these services are deprecated. In your case what still works properly is the "player" services (avtransport, renderingcontrol) allowing an external UPNP/DLNA controller to play music, video, pictures on your TV. The other services such as nservice, multiscreen etc are mostly used for discovery purposes, where an app "finds" your TV and then uses proprietary peer-2-peer comm to do things on your TV, like cast Netflix to your TV etc.

DJPsycho82 commented 5 years ago

Ok, thnx. So it isn't very useful in this case. That's a bummer.

dcorsus commented 5 years ago

@DJPsycho82 Any info is useful, on occasion we (I) discover something that is actually new to some model and opens up new opportunities. Still hoping to stumble on a log here or there that might give us insight on how we can use the websockets to get dynamic state ....

DJPsycho82 commented 5 years ago

I hope so. Thx for your reaction. Think we will manage it! When I find something I will post it 😊. But I'm not the best on this work field. Hopefully Kevin will get some information from this Samsung developer guy😊

dcorsus commented 5 years ago

" But Hopefully Kevin will get some information from this Samsung developer guy😊"

I hope so to. I had emailed Samsung (source code) team to point me to some specific file names we learned off in one of the debug postings to be told: "that why we post the source so YOU can find it" ... quite useless.

Cheers,

Dirk

ASoTNetworks commented 5 years ago

I am having the same issue as this even after I ran pip install websocket-client==0.48.0.

I noticed ~/.samsungctl/token.txt is empty is this suppose to have the token?

iAbadia commented 5 years ago

I am having the same issue as this even after I ran pip install websocket-client==0.48.0.

I noticed ~/.samsungctl/token.txt is empty is this suppose to have the token?

setup.py has a requirement for websocket-client 0.54.0. You'll need to uninstall websocket-client, install 0.48.0 and also edit setup.py to require that version instead of 0.54.0.

Spoiler alert: I've tried this and I still get the request on TV + Connection Failure on the cmd.

BTW @kdschlosser a thousand thanks for working on this while Ape is afk 🙏🙏

kdschlosser commented 5 years ago

@dcorsus I stumbled across an e-mail address for the smartview application. It was for the sole purpose of requesting the source code to the application. According to Samsung the smartview application is opensource. But the source code is not publicly accessible. You have to specifically request it and they will send it to you (for some crazy reason i do not see it happening). I do not remember where i saw that e-mail address. I wonder if it is in the smartview application.

HA! it is in the application...

Open Source Announcement To send inquiries and requests for questions regarding open sources, contact Samsung via Email (oss.request@samsung.com). Mozilla Public License, version 2.0

maybe someone wants to send an e-mail requesting the latest source code to smart view. This will be of great help we can take a look and see what the thing is actually doing.

kdschlosser commented 5 years ago

May as well ask for the source code to the Samsung Tizen OS, the whole thing not the crap they have online.

kdschlosser commented 5 years ago

OK i am going to fix the issue with the websockets right now. It is going to be a a crappy hack. because I do not want to modify a currently installed version. But what I will do is I will check to see if the websocket-client is installed. and check the version of it. if it is a newer version then 0.48 I will ten prompt if the user wants me to downgrade it. I do not want to screw up someone elses module that may depend on a newer version of the websocket-client library. this way the user will know that the thing has been downgraded.

I am also going to combine those 3 branches into a single branch. and I will key up some code to run tests against it.

kdschlosser commented 5 years ago

ok so here is the new branch.

https://github.com/kdschlosser/samsungctl/tree/combination_branch

it has the code for the mouse, the voice control and also the applications all into a single branch. I have also updated the setup routine to handle the websocket-client library issues.

so just run

python setup.py install

if you have the wrong version of the websocket-client library installed don't worry about it. this is going to check and if it is the wrong version it will prompt you if you want to download.

NIX users. you will probably have to sudo the installation

dcorsus commented 5 years ago

@kdschlosser Hey Kevin, off the charts work here!!!! Just in case you wanted to add text entry support as well, the cmd string would be: {""method"":""ms.remote.control"",""params"":{""Cmd"":""" & ToBase64(xxtheTextxxx) & """,""TypeOfRemote"":""SendInputString"",""DataOfCmd"":""base64""}}

On a different topic, Tizen studio just delivered their version 5.0 TV emulator. It now seems to support the "TokenAuthSupport" but they may have forgotten to active the SSL port 8002 URGGHHH I was hoping that the new emulator version would allow us to dig deeper into how events work but no joy so far. I have to admit that I haven't seen any reference that this would only work on Intel and not AMD, you can turn off thinks like VT or GPU support. Either way, if you have questions and want to try one more time to install the emulator (v4!!), if you can get it to work, you would be able to test most of your code (websockets) by yourself. Cheers and again, thanks for your hard work!! Dirk

kdschlosser commented 5 years ago

their emulator is crap. it does not work on AMD processors (which is what I have (i'm cheap LOL) So i can't use it to run tests on. even tho it appears it wouldn't work anyway.

kdschlosser commented 5 years ago

there was a new merge to the combination branch. there are some fixes that @iAbadia did up that have been added to it. I want to have this library support python 2. the merge includes fixes for python 2 compatibility as well. I believe I have already gone over the code and made everything else python 2 compatible already. if someone happens across something that is not right lemme know or submit a PR for the fix.

kdschlosser commented 5 years ago

I am tired of my code having bugs. So at the moment I am writing a test suite for the library. and I am going to add Appveyor to test everything out. I do not see a need to add TravisCI to run tests because there is nothing in the code that is OS specific save for the saving of the token file. which is such a tiny amount of code I am not concerned about it. I am more familiar with setting up the Appveyor build process so I can do that faster.

So after I finish up adding the testing i will not accept any PR that extend the functionality unless tests have been added for that functionality. I want the author of the PR to do it because they have already done the legwork and know what the expected responses from a TV should be. this is needed to do 2 things to check the message that is sent. and to build a return message (if needed) and to test that the code that processes any returned messages is correct. this is going to take me a while to write it is a very large addition but I feel it is one that is needed due to how complex this library is getting and is going to get in the future.

jnimmo commented 5 years ago

Would it be worth removing the code for the legacy models - as that works fine in the current samsungctl, and calling this something else, only focusing on supporting the new firmware websockets with this version? I suppose not removing legacy stuff means there is a chance it could be pulled back into the main samsungctl branch. I certainly will only be using it for controlling ssl websockets on 8002

kdschlosser commented 5 years ago

there isn't any issues with the legacy code. it works just fine. I have bad arthritis in my hands. quite often I am pressing keys I do not mean to.

arsaboo commented 5 years ago

@kdschlosser Since there is no PyPi package, is it possible to specify the github package URL to test it out in Home Assistant. Something like this?

REQUIREMENTS = [
    'https://github.com/kdschlosser/samsungctl/archive/0.7.1.zip'
]
kdschlosser commented 5 years ago

the only thing that needs to be done to use this in Home Assistant. is you neeed to install home assistant. then edit the requirements file locate samsungctl and change the version to 0.8.0b

after you have done that clone this repository. then run

python setup.py install

after it installs then you can install the samsung TV support into home assistant the usual way you would

what home assistant does i it checks to see if the library is already installed and that it meets the version that is required by home assistant. because you changed the version required by home assistant and manually installed samsungctl, home assistant will use what is already there.

kdschlosser commented 5 years ago

@dcorsus

I do know about the text entry command. I have not gotten to that as of yet.

I still have not been informed if updates work or not. I think people are still having problems with the websocket-client problems.

I did create a branch that has combined all 3 of the updates i did. along with fixing the websiocket-client problems. it is located here

https://github.com/kdschlosser/samsungctl/tree/combination_branch

dcorsus commented 5 years ago

Answer from Samsung on open source request

SAMSUNG OSRC COMMENTS DELIVERY NOTIFICATION]

Dear Customer,

Thank you for your interest in our product.

Our proprietary code could contain our technology.

So we only publish Open source code covered under license which has obligation of publishing source code.(ex. GPL, LGPL, MPL...etc) It would be appreciated if you can understand our situation.

Please accept our apology for not being able to handle your request up to your satisfaction.

Thank you.

Sincerely yours,

cnschulz commented 5 years ago

I read that as:

Sincerely (up) yours

On Wed, 9 Jan 2019, 03:17 dcorsus <notifications@github.com wrote:

Answer from Samsung on open source request

SAMSUNG OSRC COMMENTS DELIVERY NOTIFICATION]

Dear Customer,

Thank you for your interest in our product.

Our proprietary code could contain our technology.

So we only publish Open source code covered under license which has obligation of publishing source code.(ex. GPL, LGPL, MPL...etc) It would be appreciated if you can understand our situation.

Please accept our apology for not being able to handle your request up to your satisfaction.

Thank you.

Sincerely yours,

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kdschlosser/samsungctl/issues/9#issuecomment-452357959, or mute the thread https://github.com/notifications/unsubscribe-auth/ABNw5Jg0aBr9UrZkY3wnwRN1Wemaqw31ks5vBMSugaJpZM4ZgP5A .

arsaboo commented 5 years ago

@kdschlosser So, I ran the combination_branch using the approach listed here. The component works and I am able to see the status of the TV ( I have a 75-inch NU8000 TV). However, when I try to toggle the state (power on/off), I get the error:

Log Details (ERROR)
Tue Jan 08 2019 16:06:10 GMT-0500 (Eastern Standard Time)

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 277, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/media_player/samsungtv.py", line 217, in turn_off
    self.send_key('KEY_POWER')
  File "/home/homeassistant/.homeassistant/custom_components/media_player/samsungtv.py", line 166, in send_key
    self.get_remote().control(key)
  File "/home/homeassistant/.homeassistant/custom_components/media_player/samsungtv.py", line 151, in get_remote
    self._remote = self._remote_class(self._config)
  File "/home/homeassistant/.homeassistant/custom_components/samsungctl/remote.py", line 13, in __init__
    self.remote = RemoteWebsocket(config)
  File "/home/homeassistant/.homeassistant/custom_components/samsungctl/remote_websocket.py", line 54, in __init__
    self.open()
  File "/home/homeassistant/.homeassistant/custom_components/samsungctl/remote_websocket.py", line 121, in open
    raise RuntimeError('Connection Failure')
RuntimeError: Connection Failure
kdschlosser commented 5 years ago

@arsaboo

I have to add how to handle thee power shutting off on the TV's still. I have to think about how I am going to do that. what is taking place is when you shut the power off to the TV it turns off the network adapters in the TV as well. so the connection gets cut. I have to think of a good mechanism that will automatically reconnect the TV.

The other thing is that I have not instituted a WOL feature into the library as of yet. so you are not going to be able to power the TV on via thee remote. I think there are 2 different ways to power the TV on. I have to dig into that bit of it.

I am able to see the status of the TV

define "status" what exactly are you getting back from thee TV?

kdschlosser commented 5 years ago

@dcorsus great that is fantastic. because that is thee license they have for the whole smartview application.

you can send them this image along with thee copy of the license disclosure just below it. and state that according to the license you have in the smartview application I should be allowed a copy of the source code. Would you please comply and send me the source code.

You can also chop this head right off before they try and stuck it out there, Inform them that the license included in the smartview application is broken into 3 sections.

SmartView License (as a whole) SSL License SSLeay License

image

Open Source Announcement

To send inquiries and requests for questions regarding open sources, contact Samsung via Email (oss.request@samsung.com).

Mozilla Public License, version 2.0

1.Definitions
1.1. “Contributor” means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.

1.2. “Contributor Version” means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor’s Contribution.

1.3. “Contribution” means Covered Software of a particular Contributor.

1.4. “Covered Software” means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof.

1.5. “Incompatible With Secondary Licenses” means that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License.

1.6. “Executable Form” means any form of the work other than Source Code Form.

1.7. “Larger Work” means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software.

1.8. “License” means this document.

1.9. “Licensable” means having the right to grant, to the maximum extent possible,whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License.

1.10. “Modifications” means any of the following: 
any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or any new file in Source Code Form that contains any Covered Software.

1.11. “Patent Claims” of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version.

means an individual or a legal entity exercising rights under this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
means the form of the work preferred for making modifications.
means an individual or a legal entity exercising rights under this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses.
means the form of the work preferred for making modifications.
means an individual or a legal entity exercising rights under this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.

means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses.

means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version.

means an individual or a legal entity exercising rights under this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.

means the form of the work preferred for making modifications.

means an individual or a legal entity exercising rights under this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.

means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses.

means the form of the work preferred for making modifications.

means an individual or a legal entity exercising rights under this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.

2. License Grants and Conditions
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version.

2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution.

2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor: for any code that a Contributor has removed from Covered Software; or for infringements caused by: (i) Your and any other third party’s modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or under Patent Claims infringed by Covered Software in the absence of its Contributions.
This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section .

2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3).

2.5. Representation
Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License.

2.6. Fair Use
This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents.

2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1.

3. Responsibilities
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients’ rights in the Source Code Form.

3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then: such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients’ rights in the Source Code Form under this License.

3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s).

3.4. Notices
You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies.

3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction.

4. Inability to Comply Due to Statute or Regulation
If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.

5. Termination
5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.

5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate.

5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination.

6. Disclaimer of Warranty
Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer.

7. Limitation of Liability
Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party’s negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.

8. Litigation
Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party’s ability to bring cross-claims or counter-claims.

9. Miscellaneous
This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.

10. Versions of the License
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.

10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward.

10.3. Modified Versions
If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License).

10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached.

Exhibit A - Source Code Form License Notice
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.

You may add additional accurate notices of copyright ownership.

Exhibit B - “Incompatible With Secondary Licenses” Notice
This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0.

The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the OpenSSL License and the original SSLeay license apply to the toolkit. See below for the actual license texts. Actually both licenses are BSD-style Open Source licenses. In case of any license issues related to OpenSSL please contact openssl-core@openssl.org.

OpenSSL License
Copyright (c) 1998-2007 The OpenSSL Project.  All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)"

4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.

5. Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project.

6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"

THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This product includes cryptographic software written by Eric Young (eay@cryptsoft.com).  This product includes software written by Tim Hudson (tjh@cryptsoft.com).

Original SSLeay License
Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved.

This package is an SSL implementation written by Eric Young (eay@cryptsoft.com). 
The implementation was written so as to conform with Netscapes SSL.

This library is free for commercial and non-commercial use as long as the following conditions are aheared to.  The following conditions apply to all code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code; not just the SSL code.  The SSL documentation included with this distribution is covered by the same copyright terms except that the holder is Tim Hudson (tjh@cryptsoft.com).

Copyright remains Eric Young's, and as such any Copyright notices in the code are not to be removed. If this package is used in a product, Eric Young should be given attribution as the author of the parts of the library used. This can be in the form of a textual message at program startup or in documentation (online or textual) provided with the package.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software must display the following acknowledgement:
"This product includes cryptographic software written by Eric Young (eay@cryptsoft.com)"
The word 'cryptographic' can be left out if the rouines from the library being used are not cryptographic related :-).
4. If you include any Windows specific code (or a derivative thereof) from the apps directory (application code) you must include an acknowledgement: "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"

THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The licence and distribution terms for any publically available version or derivative of this code cannot be changed.  i.e. this code cannot simply be copied and put under another distribution licence [including the GNU Public Licence.]

Apache License, Version 2.0

Foundation Projects People Get Involved Download Support Apache Home ≫ Licenses

Apache License Version 2.0, January 2004

http://www.apache.org/licenses/ 

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.

"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
arsaboo commented 5 years ago

@kdschlosser I am able to see whether the TV is on/off. That is being correctly reported.

kdschlosser commented 5 years ago

If they still will not give up the source code I will file a complaint with Mozilla about fraudulent use of their License. An OOOHHH boy trust you me. Mozilla is all gung ho about opensource and some heads will roll over this.

jnimmo commented 5 years ago

@arsaboo

I have to add how to handle thee power shutting off on the TV's still. I have to think about how I am going to do that. what is taking place is when you shut the power off to the TV it turns off the network adapters in the TV as well. so the connection gets cut. I have to think of a good mechanism that will automatically reconnect the TV.

The other thing is that I have not instituted a WOL feature into the library as of yet. so you are not going to be able to power the TV on via thee remote. I think there are 2 different ways to power the TV on. I have to dig into that bit of it.

I am able to see the status of the TV

define "status" what exactly are you getting back from thee TV?

Ohhh so the KEY_POWEROFF won't work at the moment? I would've just expected power off would close the connection with the TV and samsungctl not need to deal with reconnecting? Then Home Assistant deals with the WOL side of it to turn back on

arsaboo commented 5 years ago

Yes, I tried turning the TV off and it gave me the error.

I am going to test some more, but looks like I am able to turn the TV on using the component.

keatontaylor commented 5 years ago

My experience with an NU8000 65" is the same as @arsaboo. Nothing seems to work except state reporting on/off.