Coder Social home page Coder Social logo

homebridge-samsungtv2016's People

Contributors

akramhussein avatar kyleaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-samsungtv2016's Issues

"Connects" to a 2016 TV w/ Tizen... but doesn't work. Help?

I will jump into this, sadly with a problem but no much to add on how to find a solution. I have a:

  "name": "[TV] Samsung 6 Series (50)",
  "version": "2.1.0",
  "device": {
    "type": "Samsung SmartTV",
    "modelName": "UN50KU6300",
    "ip": "192.168.1.13",
    "firmwareVersion": "Unknown",
    "name": "[TV] Samsung 6 Series (50)",
    "resolution": "3840x2160",
    "countryCode": "US",
    "msfVersion": "2.1.0",
    "smartHubAgreement": "true",
    "OS": "Tizen"

Once this plugin installed, I can see it in the Home app as an accessory, and also on the Homebridge. It stays the TV is on. When I try to turn it off, instantaneously the TV asks me for an allow permission. I allow. But the switch off, doesn't work.

At the same time, I can't change the location of the TV (to living room), or the name of the TV on the Home app.

Also using another app: Koogeek Home brings this error: https://imgur.com/gallery/v3xBg

If anyone has an idea on how to fix this, I am all ears and eyes.

ps. I researched all other Samsung TV plugins, this work better with 2016 tvs. Thank you for your work.

ps 2. This is the log from booting up Homebridge, no errors so far:

[12/30/2016, 6:18:58 AM] Loaded plugin: homebridge-nest
[12/30/2016, 6:18:58 AM] Registering platform 'homebridge-nest.Nest'
[12/30/2016, 6:18:58 AM] ---
[12/30/2016, 6:18:59 AM] Loaded plugin: homebridge-samsungtv2016
[12/30/2016, 6:18:59 AM] Registering accessory 'homebridge-samsungtv.SamsungTV2016'
[12/30/2016, 6:18:59 AM] ---
[12/30/2016, 6:18:59 AM] Loaded config.json with 1 accessories and 1 platforms.
[12/30/2016, 6:18:59 AM] ---
[12/30/2016, 6:18:59 AM] Loading 1 platforms...
[12/30/2016, 6:18:59 AM] Initializing Nest platform...
[12/30/2016, 6:18:59 AM] Fetching Nest devices.
[12/30/2016, 6:18:59 AM] Loading 1 accessories...
[12/30/2016, 6:18:59 AM] [TV Living room] Initializing SamsungTV2016 accessory...

Error: connect EHOSTUNREACH

I'm getting a weird error that crashes my homebridge running on a pi 3, is anyone else getting this? The IP below is my Samsung TV. After homebridge crashes, and I restart it, it seems to work as long as I have the TV on. I'm not sure if it's crashing just after a period of time, or after the TV is turned off.

Accessory [Homebridge] Setting Characteristic "On" to value false +3ms
events.js:141
throw er; // Unhandled 'error' event
^

Error: connect EHOSTUNREACH 10.0.1.12:8001
at Object.exports._errnoException (util.js:870:11)
at exports._exceptionWithHostPort (util.js:893:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1062:14)

No luck with UE22H5600 :(

Tested on UE22H5600 and can confirm nothing happens when the request is sent for on or off despite the log looking positive

Unhandled error...

Hi

On my Samsung TV, I got the following problem:

events.js:160
throw er; // Unhandled 'error' event
^

Error: connect ECONNREFUSED 192.168.0.10:8001
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14)

any idea?
Thanks
Séb

Wake on lan not working anymore, firmware 1180

Not sure if its the new firmware 1180, but wake on lan is no longer working from home app.
Interesting, I can send a wake on lan to the tv successfully using the fing app on my iphone.
KU6300 series tv.

Support for Text Input

Legacy TVs support text being sent through the remote. I wonder if that is also possible with the new models. Maybe through some other params in this request:

        payload = json.dumps({
            "method": "ms.remote.control",
            "params": {
                "Cmd": "Click",
                "DataOfCmd": key,
                "Option": "false",
                "TypeOfRemote": "SendRemoteKey"
            }
        })

is this dead ?

i see a fork of your GitHub which added mute, can't how ever make it work hehe
but never the less! it is possible to add functions somehow ?

Unable to turn off

Installed the plugin, works well to turn TV on, but does not turn off. (Defaulted to a Switch in Home app)
Snip of Syslog when attempting to turn off from an on state-

Dec 31 11:33:26 homepi homebridge[21821]: [12/31/2016, 11:33:26 AM] [Bedroom TV] received on command: 0
Dec 31 11:33:26 homepi rsyslogd-2007: action 'action 17' suspended, next retry is Sat Dec 31 11:34:56 2016 [try http://www.rsyslog.com/e/2007 ]
Dec 31 11:33:26 homepi homebridge[21821]: [12/31/2016, 11:33:26 AM] [Bedroom TV] sending power key
Dec 31 11:33:26 homepi homebridge[21821]: [12/31/2016, 11:33:26 AM] [Bedroom TV] successfully powered off tv

I am not sure how to debug/investigate the "action 17 suspended) line...

Partial dump from "http://192.168.1.124:8001/api/v2/" in browser-
"name": "[TV] Samsung 6 Series (50)",
"version": "2.1.0",
"type": "Samsung SmartTV",
"model": "16_JAZZL_UHD_BASIC",
"modelName": "UN50KU6300",
"description": "Samsung DTV RCR",
"networkType": "wireless",
"firmwareVersion": "Unknown",
"name": "[TV] Samsung 6 Series (50)",
"OS": "Tizen"

"type": "Samsung SmartTV",
"uri": "http://192.168.1.124:8001/api/v2/",
"remote": "1.0",
"isSupport": "{"remote_available":"true","remote_fourDirections":"true","remote_touchPad":"true","remote_voiceControl":"false","DMP_available":"true","DMP_DRM_PLAYREADY":"false","DMP_DRM_WIDEVINE":"false","EDEN_available":"true"}"
}

Suggestions? Thanks for any help.

Series K

Hi , i have a SAMSUNG UE65KS9000 , and i have some issues with home bridge , and maybe there is a thing i do not understand.
First, in home on iOS, samsungTv is show like a switch, so you can just on or off...
Second problem, if i tried to switch Off Tv with the switch, my homebridge stop running because a problem....

Can you help me, if you need i can give log for error.
Thanks your you're help ;)

Plugin Connection Timeout crashing Homebridge

I would like to start by saying thank you Kyleaa. So far your work on this plugin has been great.

After the last update, where with the last Samsung tv's it is possible to turn on and off the screen, looks like it brought an issue that affects the whole Homebridge app.

I am not a developer, but I managed to get the log before it crashes. Looks like it is something related to the plugin trying to check on the TV but not response back. What I am sure is that there was no response because the TV was off. When the TV is on, and all the time it is running, the plug-in doesn't crash Homebridge.

Here is the log:

pi@raspberrypi:~ $ homebridge 
*** WARNING *** The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs>
*** WARNING *** The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister>
[1/13/2017, 7:37:13 PM] Loaded plugin: homebridge-nest
[1/13/2017, 7:37:13 PM] Registering platform 'homebridge-nest.Nest'
[1/13/2017, 7:37:13 PM] ---
[1/13/2017, 7:37:14 PM] Loaded plugin: homebridge-samsungtv2016
[1/13/2017, 7:37:14 PM] Registering accessory 'homebridge-samsungtv.SamsungTV2016'
[1/13/2017, 7:37:14 PM] ---
[1/13/2017, 7:37:14 PM] Loaded config.json with 1 accessories and 1 platforms.
[1/13/2017, 7:37:14 PM] ---
[1/13/2017, 7:37:14 PM] Loading 1 platforms...
[1/13/2017, 7:37:14 PM] Initializing Nest platform...
[1/13/2017, 7:37:14 PM] Fetching Nest devices.
[1/13/2017, 7:37:14 PM] Loading 1 accessories...
[1/13/2017, 7:37:14 PM] [TV Living room] Initializing SamsungTV2016 accessory...
[1/13/2017, 7:37:15 PM] Software version for Living Room Thermostat (nesty) is: 5.6-7
[1/13/2017, 7:37:15 PM] Temperature unit for Living Room Thermostat (nesty) is: Fahrenheit
[1/13/2017, 7:37:15 PM] Current temperature for Living Room Thermostat (nesty) is: 68 F
[1/13/2017, 7:37:15 PM] Current humidity for Living Room Thermostat (nesty) is: 50%
[1/13/2017, 7:37:15 PM] Target temperature for Living Room Thermostat (nesty) is: 68 F
[1/13/2017, 7:37:15 PM] Away for Living Room Thermostat (nesty) is: 0
[1/13/2017, 7:37:15 PM] Initializing platform accessory 'Living Room Thermostat (nesty)'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 031-45-154 │     
    └────────────┘     
                       
[1/13/2017, 7:37:16 PM] Homebridge is running on port 51826.
[1/13/2017, 7:38:10 PM] [TV Living room] received on command: 1
[1/13/2017, 7:38:10 PM] [TV Living room] TV API is active
[1/13/2017, 7:38:10 PM] [TV Living room] sending power key
[1/13/2017, 7:38:10 PM] [TV Living room] websocket connect
[1/13/2017, 7:38:10 PM] [TV Living room] successfully powered on tv
[1/13/2017, 7:38:11 PM] [TV Living room] websocket closed
[1/13/2017, 7:38:17 PM] [TV Living room] received on command: 0
[1/13/2017, 7:38:17 PM] [TV Living room] sending power key
[1/13/2017, 7:38:17 PM] [TV Living room] websocket connect
[1/13/2017, 7:38:17 PM] [TV Living room] successfully powered off tv
[1/13/2017, 7:38:18 PM] [TV Living room] websocket closed
[1/13/2017, 7:38:28 PM] [TV Living room] received on command: 1
[1/13/2017, 7:38:28 PM] [TV Living room] TV API is active
[1/13/2017, 7:38:28 PM] [TV Living room] sending power key
[1/13/2017, 7:38:28 PM] [TV Living room] websocket connect
[1/13/2017, 7:38:28 PM] [TV Living room] successfully powered on tv
[1/13/2017, 7:38:29 PM] [TV Living room] websocket closed
[1/13/2017, 7:57:09 PM] [TV Living room] received on command: false
[1/13/2017, 7:57:09 PM] [TV Living room] sending power key
[1/13/2017, 7:57:09 PM] [TV Living room] websocket connect
[1/13/2017, 7:57:09 PM] [TV Living room] successfully powered off tv
[1/13/2017, 7:57:10 PM] [TV Living room] websocket closed
[1/13/2017, 8:13:53 PM] [TV Living room] No response from TV
[1/13/2017, 8:29:37 PM] [TV Living room] No response from TV
[1/13/2017, 8:29:41 PM] [TV Living room] No response from TV
[1/13/2017, 8:31:48 PM] [TV Living room] No response from TV
[1/13/2017, 9:10:30 PM] [TV Living room] No response from TV
[1/13/2017, 9:17:10 PM] Away for Living Room Thermostat (nesty) is: 1
[1/13/2017, 10:25:44 PM] Current humidity for Living Room Thermostat (nesty) is: 45%
[1/13/2017, 10:51:34 PM] Current humidity for Living Room Thermostat (nesty) is: 50%
[1/14/2017, 1:55:43 AM] Current humidity for Living Room Thermostat (nesty) is: 45%
[1/14/2017, 2:11:34 AM] Away for Living Room Thermostat (nesty) is: 0
[1/14/2017, 2:11:36 AM] Current temperature for Living Room Thermostat (nesty) is: 67 F
[1/14/2017, 2:17:36 AM] Current heating for Living Room Thermostat (nesty) is: Heating
[1/14/2017, 2:17:36 AM] Target temperature for Living Room Thermostat (nesty) is: 72 F
[1/14/2017, 2:17:36 AM] Target heating for Living Room Thermostat (nesty) is: Heating/Cooling
[1/14/2017, 2:18:38 AM] Current temperature for Living Room Thermostat (nesty) is: 68 F
[1/14/2017, 2:25:10 AM] Current temperature for Living Room Thermostat (nesty) is: 69 F
[1/14/2017, 2:25:19 AM] Target temperature for Living Room Thermostat (nesty) is: 71 F
[1/14/2017, 2:25:19 AM] Target temperature for Living Room Thermostat (nesty) is: 70 F
[1/14/2017, 2:27:09 AM] [TV Living room] No response from TV
[1/14/2017, 2:30:24 AM] Current temperature for Living Room Thermostat (nesty) is: 70 F
[1/14/2017, 2:32:12 AM] [TV Living room] No response from TV
[1/14/2017, 2:32:24 AM] Current heating for Living Room Thermostat (nesty) is: Off
[1/14/2017, 2:39:07 AM] Current temperature for Living Room Thermostat (nesty) is: 71 F
[1/14/2017, 2:42:33 AM] Current temperature for Living Room Thermostat (nesty) is: 70 F
[1/14/2017, 2:53:47 AM] [TV Living room] No response from TV
[1/14/2017, 3:02:15 AM] [TV Living room] No response from TV
[1/14/2017, 3:56:59 AM] [TV Living room] No response from TV
[1/14/2017, 4:52:42 AM] Current temperature for Living Room Thermostat (nesty) is: 71 F
[1/14/2017, 4:56:00 AM] [TV Living room] No response from TV
[1/14/2017, 5:01:38 AM] [TV Living room] No response from TV
[1/14/2017, 5:07:08 AM] Current temperature for Living Room Thermostat (nesty) is: 70 F
[1/14/2017, 5:17:15 AM] Current temperature for Living Room Thermostat (nesty) is: 71 F
[1/14/2017, 5:32:00 AM] [TV Living room] No response from TV
[1/14/2017, 6:00:05 AM] Current temperature for Living Room Thermostat (nesty) is: 70 F
[1/14/2017, 6:27:12 AM] Current temperature for Living Room Thermostat (nesty) is: 69 F
[1/14/2017, 6:33:24 AM] Current heating for Living Room Thermostat (nesty) is: Heating
[1/14/2017, 6:38:17 AM] Target temperature for Living Room Thermostat (nesty) is: 71 F
[1/14/2017, 6:38:26 AM] Target temperature for Living Room Thermostat (nesty) is: 69 F
[1/14/2017, 6:38:36 AM] Current heating for Living Room Thermostat (nesty) is: Off
[1/14/2017, 6:38:36 AM] Target temperature for Living Room Thermostat (nesty) is: 68 F
[1/14/2017, 6:39:12 AM] [TV Living room] No response from TV
[1/14/2017, 6:43:55 AM] [TV Living room] No response from TV
[1/14/2017, 6:48:07 AM] Current temperature for Living Room Thermostat (nesty) is: 70 F
[1/14/2017, 6:52:28 AM] [TV Living room] No response from TV
[1/14/2017, 6:56:33 AM] Current temperature for Living Room Thermostat (nesty) is: 69 F
[1/14/2017, 7:03:13 AM] [TV Living room] received on command: 0
[1/14/2017, 7:03:13 AM] [TV Living room] sending power key
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: connect ETIMEDOUT 192.168.1.13:8001
    at Object.exports._errnoException (util.js:1022:11)
    at exports._exceptionWithHostPort (util.js:1045:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)
pi@raspberrypi:~ $ 

If there is something I could help to solve this, count with me.

Thank you for your time.

Rest API reference

Hi,
where can I find the rest API reference you are using in this project.

Cheers

No request to connect.

Hi People,

I am unable to connect to one of my TV's. One is working perfectly and the other is not showing the request to allow to controll. It's a EU55HU7500.

Just updated to the last version.

Log:
[1/8/2017, 2:41:12 PM] [TV Slaapkamer] TV API is active
[1/8/2017, 2:41:18 PM] [TV Slaapkamer] received on command: 0
[1/8/2017, 2:41:18 PM] [TV Slaapkamer] sending power key
[1/8/2017, 2:41:19 PM] [TV Slaapkamer] websocket connect
[1/8/2017, 2:41:19 PM] [TV Slaapkamer] successfully powered off tv
[1/8/2017, 2:41:20 PM] [TV Slaapkamer] websocket closed

Config.json code:

 {
		"accessory": "SamsungTV2016",
		"name": "TV Woonkamer",
		"ip_address": "192.168.16.80",
		"mac_address": "5C:49:7D:08:E6:5C"
	}, {
		"accessory": "SamsungTV2016",
		"name": "TV Slaapkamer",
		"ip_address": "192.168.16.81",
		"mac_address": "50:56:BF:FA:AA:4C"
	}

Any suggestions?

Thanks, Mike

Functions available for the TV

@kyleaa Thanks for creating a plugin for the SamsungTV. Am I correct that it only supports power on and power off at the moment?

Note that I have it running on a Raspberry Pi Zero W. Wake on Lan seems to work over WiFi as well since I can switch my TV On and Off.

I am hoping to be able to do input selection and other features as well (e.g. it would be great to select Netflex on the TV via Homekit ;-) )

Note I am using it with the UE55KS8000, if I am not mistaken equivalent to the UN55KS9000 in the USA.

Console says "successfully powered off tv" but TV is still on

The log says that things are happening, but I've been watching TV this whole time and it has neither turned on nor turned off. Any way I can debug more?

[2/16/2017, 11:37:25 PM] [Living Room TV] TV API is active
[2/16/2017, 11:39:57 PM] [Living Room TV] received on command: 0
[2/16/2017, 11:39:57 PM] [Living Room TV] sending power key
[2/16/2017, 11:39:57 PM] [Living Room TV] websocket connect
[2/16/2017, 11:39:57 PM] [Living Room TV] successfully powered off tv
[2/16/2017, 11:39:58 PM] [Living Room TV] websocket closed
[2/16/2017, 11:40:16 PM] [Living Room TV] received on command: 1
[2/16/2017, 11:40:16 PM] [Living Room TV] TV API is active
[2/16/2017, 11:40:16 PM] [Living Room TV] sending power key
[2/16/2017, 11:40:16 PM] [Living Room TV] websocket connect
[2/16/2017, 11:40:16 PM] [Living Room TV] successfully powered on tv
[2/16/2017, 11:40:17 PM] [Living Room TV] websocket closed

Initial state

Hi there!

Just tested this on my KS8000 and it works great! One issue I have is that the initial state is not being retrieved at the moment.

Can we find a way to connect to the TV and determine if it is on of off, when homebridge starts?

wake on lan - KS8000

I was playing with this plugin today. I have Samsung ks8000. Switching TV "ON" only works if I immediately do that after the switch off command. If there is a gap of few minutes then TV doesn't respond and log shows wake on lan successful but tv doesn't turn on. I have a wired connection to my TV.
So I dig a bit into the ips and found that when I switch off then for few seconds tv's ip is live. But after few seconds there is no ip at all. I used nmap -sn 192.168.x.x/24 to scan all ips in that range. And tv's ip is not detected. But as soon as I switch on tv with remote IP is back again.

Is that the behavior that you are also seeing? or I am missing some settings?

Another minor issue is, if tv is on and I ask siri to switch it "ON". It will turn it off. :)

Can we make it poll current status before it sends the command?

Hey @kyleaa,

First of all thanks for the plug in! works great to both turn it on and off (I too have the tv connected through ethernet)

I have a "Movie Time" scene which essentially turns the lights off and the TV to "on". However, if I press the scene button when the TV is already on, it will turn it off. Is there a way to make it check if its already on before sending the command so it doesn't turn it off?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.