mmende / homebridge-samsungtv-control

A homebridge plugin to control your Samsung SmartTV
Apache License 2.0
26 stars 14 forks source link

No Buttons in HK to switch Channels or adjust Volume #20

Closed CameronVIE closed 4 years ago

CameronVIE commented 4 years ago

Hi everybody!

I configured this plugin in HomeBridge and got the Icon to HKit. Fine. State is looking good - Icon is white and tells "on". If i klick the Icon it gets grey and TV shuts down. But i am missing Buttons for switching channels or adjusting volume :) Switching the device on is not supported, isn't it? IOS13 Thank you very much for any hint! Best regards, CameronVIE

eutampieri commented 4 years ago

I think because this plugin doesn't support the new Television class

https://github.com/homebridge/HAP-NodeJS/blob/master/src/accessories/TV_accessory.ts here's an implementation @mmende could you please update the plugin so that it exposes the tv as a Television instead than a switch?

mmende commented 4 years ago

@eutampieri I will have a look into that if I find time to do so... Kind regards

AndyVRD commented 4 years ago

@eutampieri I will have a look into that if I find time to do so... Kind regards

@mmende Any change you can look at this? Thx

mmende commented 4 years ago

Not yet... sorry

TheEngineerGuy commented 4 years ago

Looking forward to it. If we could implement it as a TV, would be pretty cool.

AndyVRD commented 4 years ago

Looking forward to it. If we could implement it as a TV, would be pretty cool.

I have got it working as a tv, you can also use the TV remote app from Control Center. :)

TheEngineerGuy commented 4 years ago

How did you do that @AndyVRD ?

AndyVRD commented 4 years ago

How did you do that @AndyVRD ?

Used the forked one by Xeenon with the correct config. Send me a message if you want help get it working.

TheEngineerGuy commented 4 years ago

kk Let me give that a shot.

AndyVRD commented 4 years ago

kk Let me give that a shot.

"accessories": [ { "accessory": "samsungTv", "name": "Television", "ip_address": "192.168.X.X", "enabledInputs": [ { "id": "HDMI" } ] } ],

TheEngineerGuy commented 4 years ago

Where is his NPM package? I found him on github, but cant see the package on NPM.

EDIT: ignore, I found it

AndyVRD commented 4 years ago

Where is his NPM package? I found him on github, but cant see the package on NPM.

It’s not on NPM, I have installed it from the UI-X.

TheEngineerGuy commented 4 years ago

kk Let me give that a shot.

"accessories": [ { "accessory": "samsungTv", "name": "Television", "ip_address": "192.168.X.X", "enabledInputs": [ { "id": "HDMI" } ] } ],

Can I enable multiple inputs like below?


            "accessory": "samsungTv",
            "name": "Television",
            "ip_address": "192.168.X.X",
            "enabledInputs": [
                {
                    "id": "TV",
                    "id": "HDMI1",
                    "id": "HDMI2",
                    "id": "HDMI3"
                }
            ]
AndyVRD commented 4 years ago

Don’t have tested that yet, I can give it a go on my Homebridge test setup.

TheEngineerGuy commented 4 years ago

Ok, so I got it working. And I can turn the TV 'off' with it, but not 'On'. Which I am guessing is probably because WOL is not working on my TV. Do we know if Samsung TVs accept WOL over Wifi?

mmende commented 4 years ago

I am working on a complete overhaul of the plugin where the TV is correctly exposed as television etc.. I even managed to get exact volume, brightness and mute state values via upnp. At the moment I am trying to discover all TV's in the network automatically and add support for the newer TV's that must be paired via websockets, however I didn't find a library that would work with our tizen based samsung tv (UE40J6350) ... can anybody recommend a library that works with that and other tizen based models?

TheEngineerGuy commented 4 years ago

Here’s one

https://github.com/Ape/samsungctl

mmende commented 4 years ago

I've tried these so far but non of them seem to work with my tizen based tv:

https://github.com/kdschlosser/samsungctl https://github.com/Ape/samsungctl https://github.com/Toxblh/samsung-tv-control

The pairing screen just never shows up. Unfortunately my tizen tv is from the J-series which like the H-series seems to be especially nasty to control. Besides that my new plugin works really well with my other TV that supports the legacy protocol. I will publish an early version in the next days.

TheEngineerGuy commented 4 years ago

That is pretty inconsistent for a “standard” API, no wonder Samsung is deprecating older TVs from its app.

For me personally I just have an old ES from 2012, as long as that works, two thumbs up from me to your effort my friend.

AndyVRD commented 4 years ago

I am working on a complete overhaul of the plugin where the TV is correctly exposed as television etc.. I even managed to get exact volume, brightness and mute state values via upnp. At the moment I am trying to discover all TV's in the network automatically and add support for the newer TV's that must be paired via websockets, however I didn't find a library that would work with our tizen based samsung tv (UE40J6350) ... can anybody recommend a library that works with that and other tizen based models?

There is already a good working Tizen plugin for Homebridge. Note that “real” TV’s are not exposed as a normal HomeKit accessory and need to be bridged manually. I use this (https://github.com/tavicu/homebridge-samsung-tizen#readme) plugin for my Tizen based Samsung TV and works fine. So maybe you think that you’re J-serie is not working because you didn’t bridged it manually?

Btw, hope to see you’re updated plugin coming soon for the old Samsung Tv’s. My opinion will be to just update the plugin with the new functions and don’t add support for the Tizen based ones... :)

AndyVRD commented 4 years ago

Ok, so I got it working. And I can turn the TV 'off' with it, but not 'On'. Which I am guessing is probably because WOL is not working on my TV. Do we know if Samsung TVs accept WOL over Wifi?

Old tv’s don’t support WOL (LAN/WIFI), the tv disconnects soon as it going in standby mode.

TheEngineerGuy commented 4 years ago

@mmende Any news on the new plugin Martin?

mmende commented 4 years ago

Yes. You can already test the new plugin. The current version is v2.0.0-alpha.3, plugin name stays the same. The new repository is located here. The plugin should discover your Samsung TV's automatically over upnp and log the usn (required to customize inputs e.g.). Concerning this issue, with the new plugin the inputs show up directly in the Home app when press-holding the tv. Volume is also exposed but I could't find out where in iOS the volume controls would appear. The remote keys e.g. don't show up in the Home app but in control center (under the remote button).

mmende commented 4 years ago

I am closing all issues in this repository now as I consider this code base deprecated. If you encounter problems with the reimplementation of the plugin that can be found here please open issues in the new repository.