Closed ChrisTav424 closed 2 years ago
Hi, thanks, I'll look at this. It's definitely bug on my side. Look out for a fix tomorrow.
Thanks for the quick response! Really grateful, let me know if you need anything from me :)
Hi, can you enable Homebridge in debug mode and send me the log? It will show more info as to what is happening during the startup sequence when the error is being thrown.
I enabled debug in HOOBS and this is what it gave me, hope it helps :) Thanks again for helping with this
18/09/2021, 17:08:35Shutting down
18/09/2021, 17:08:35Samsungtv Control Bridge stopping
18/09/2021, 17:08:35Samsungtvht Bridge stopping
18/09/2021, 17:08:35Samsungtv 2014 Bridge stopping
18/09/2021, 17:08:35Broadlink Rm Pro Bridge stopping
18/09/2021, 17:08:35Samsungtvht BridgeSamsung TV HTWARNINGSamsung TV: updateDeviceState: currentPowerState 0, currentMediaState 2 [STOP], currentInputId 999 [undefined], currentSourceType undefined
18/09/2021, 17:08:40Stopped
18/09/2021, 17:09:00hub is running on port 80
18/09/2021, 17:09:01Samsungtvht Bridge starting
18/09/2021, 17:09:01Samsungtv Control Bridge starting
18/09/2021, 17:09:02Samsungtv 2014 Bridge starting
18/09/2021, 17:09:02Broadlink Rm Pro Bridge starting
18/09/2021, 17:09:03Samsungtvht BridgeInitializing HAP-NodeJS v0.9.4...
18/09/2021, 17:09:04Samsungtvht BridgeLoaded plugin 'homebridge-samsungtvht'
18/09/2021, 17:09:04Samsungtvht BridgeRegistering platform 'homebridge-samsungtvht.samsungtvht'
18/09/2021, 17:09:04Samsungtvht BridgeLoading 1 platforms...
18/09/2021, 17:09:04Samsungtvht BridgeSamsung TV HTWARNINGAPI event: didFinishLaunching
18/09/2021, 17:09:04Samsungtvht BridgeSamsung TV HTWARNINGconfig { doublePressTime: 250, pingResponseOn: 'received, 0% packet', devices: [ { infoButton: 'KEY_MENU', arrowDownButtonTripleTap: 'KEY_DOWN', arrowLeftButton: 'KEY_LEFT', selectButtonDoubleTap: 'KEY_SOURCE', arrowDownButton: 'KEY_DOWN', playPauseButtonDoubleTap: 'KEY_PAUSE', arrowUpButtonTripleTap: 'KEY_UP', muteButton: 'KEY_MUTE', ipAddress: '192.168.1.64', powerOffButton: 'KEY_POWEROFF', arrowUpButtonDoubleTap: 'KEY_CHUP', voldownButton: 'KEY_VOLDOWN', backButton: 'KEY_RETURN', manufacturer: 'Samsung', arrowRightButton: 'KEY_RIGHT', selectButtonTripleTap: 'KEY_HDMI', volupButton: 'KEY_VOL_UP', viewTvSettingsCommand: 'KEY_MENU', powerOnStartupTime: 4, infoButtonDoubleTap: 'KEY_INFO', arrowRightButtonTripleTap: 'KEY_RIGHT', arrowLeftButtonTripleTap: 'KEY_LEFT', type: 'television', playPauseButtonTripleTap: 'KEY_STOP', firmwareRevision: '2.0.24', backButtonDoubleTap: 'KEY_EXIT', infoButtonTripleTap: 'KEY_TOOLS', arrowRightButtonDoubleTap: 'KEY_FF', powerOnCommand: "echo 'on 0' | cec-client -s -d 1", arrowDownButtonDoubleTap: 'KEY_CHDOWN', playPauseButton: 'KEY_PLAY', arrowUpButton: 'KEY_UP', modelName: 'UE40H6400', arrowLeftButtonDoubleTap: 'KEY_REWIND', name: 'Samsung TV', selectButton: 'KEY_ENTER', serialNumber: '05f5e101', voldownButtonTriplePress: 'KEY_MUTE', backButtonTripleTap: 'KEY_RETURN' } ], pingResponseOff: 'received, 100% packet', name: 'Samsung TV HT', platform: 'samsungtvht', doublePressDelayTime: 300, debugLevel: 3, pingCommand: 'ping -c 1 -w 10', triplePressTime: 450 }
18/09/2021, 17:09:04Samsungtvht BridgeSamsung TV HTChecking devices found in config for homebridge-samsungtvht
18/09/2021, 17:09:04Samsungtvht BridgeSamsung TV HTLoading device 1: Samsung TV 192.168.1.64
18/09/2021, 17:09:04Samsungtvht BridgeSamsung TV HTWARNINGprepareAccessory
18/09/2021, 17:09:04Samsungtvht BridgeSamsung TV HTWARNINGprepareAccessoryInformationService
18/09/2021, 17:09:04Samsungtvht BridgeSamsung TV HTWARNINGprepareTelevisionService
18/09/2021, 17:09:04Samsungtvht BridgeSamsung TV HTWARNINGprepareTelevisionSpeakerService
18/09/2021, 17:09:04Samsungtvht BridgeSamsung TV HTWARNINGprepareInputSourceServices
18/09/2021, 17:09:04Samsungtvht BridgeSamsung TV HTWARNINGprepareInputSourceServices inputs undefined
18/09/2021, 17:09:05Samsungtvht BridgePreparing Advertiser for 'Samsung TV FC09' using bonjour-hap backend!
18/09/2021, 17:09:05Samsungtvht BridgePreparing Advertiser for 'Samsungtvht Bridge C12F' using bonjour-hap backend!
18/09/2021, 17:09:05Samsungtvht BridgeStarting to advertise 'Samsung TV FC09' using bonjour-hap backend!
18/09/2021, 17:09:05Samsungtvht BridgeSamsung TV FC09 is running on port 43443.
18/09/2021, 17:09:05Samsungtvht BridgeStarting to advertise 'Samsungtvht Bridge C12F' using bonjour-hap backend!
18/09/2021, 17:09:05Samsungtvht BridgeBridge is running on port 51826.
18/09/2021, 17:09:08Samsungtvht BridgeSamsung TV HTWARNINGSamsung TV: updateDeviceState: currentPowerState null, currentMediaState 2 [STOP], currentInputId 999 [undefined], currentSourceType undefined
18/09/2021, 17:09:08Samsungtvht BridgeSamsung TV HTSamsung TV: Power changed from 0 OFF to null undefined
18/09/2021, 17:09:08Samsungtvht BridgeERROR[Samsung TV FC09@Samsung TV@Active] characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics
18/09/2021, 17:09:08Samsungtvht BridgeSamsung TV HTSamsung TV: Media state changed from 0 PLAY to 2 STOP
18/09/2021, 17:09:09Samsungtvht BridgeSamsung TV HTWARNINGSamsung TV: updateDeviceState: currentPowerState 1, currentMediaState 2 [STOP], currentInputId 999 [undefined], currentSourceType undefined
18/09/2021, 17:09:09Samsungtvht BridgeSamsung TV HTSamsung TV: Power changed from 0 OFF to 1 ON
18/09/2021, 17:09:11Samsungtvht BridgeSamsung TV HTWARNINGSamsung TV: updateDeviceState: currentPowerState 1, currentMediaState 2 [STOP], currentInputId 999 [undefined], currentSourceType undefined
18/09/2021, 17:09:13Samsungtvht BridgeSamsung TV HTWARNINGSamsung TV: updateDeviceState: currentPowerState 1, currentMediaState 2 [STOP], currentInputId 999 [undefined], currentSourceType undefined
18/09/2021, 17:09:15Samsungtvht BridgeSamsung TV HTWARNINGSamsung TV: updateDeviceState: currentPowerState 1, currentMediaState 2 [STOP], currentInputId 999 [undefined], currentSourceType undefined
OK, I believe I know what is happening. I made the code more robust and pushed v0.0.6. Try it any let me know if the problem is cured.
@ChrisTav424 so you are not able to get the popup message on your TV during the "first pairing"? Right?
@jsiegenthaler The UE40H6400 maybe has another pairing method, with different ports as our D and E Models? I didnt checked this out exactly. But maybe a hint...
@huddx01 Yes that's right. I can get it using a universal remote on my phone and I can get to 192.168.1.64:8001/api/v2/ successfully but don't get it from this plugin at the moment.
@jsiegenthaler I'm not home at the moment but will give the new code a try when I get home.
Thank you both :)
@ChrisTav424 Let us know... I think i can imagine what it could depend on, if it shouldn't work.
It's not showing the update in HOOBS, I can see the latest version in git though. Is there a delay before it reaches the HOOBS plugin library?
I installed it manually using the following (showed as 0.0.6 in the log) but still get the same error which makes me think it hasn't installed properly.
sudo npm install -g homebridge-samsungtvht
Hi. I do not have HOOBS and thus cannot say what HOOBS does or does not do, or how often HOOBS updates it's list of available packages or versions. On my Raspberry Pi and Homebridge, the new version shows up within about 10 seconds of publishing. The NPM repository is showing 0.0.6 as the current version: https://www.npmjs.com/package/homebridge-samsungtvht
But if you have installed it manually, then great.
To continue debugging your setup, please do this
"debugLevel": 5,
is present in the config. See my config example here: https://github.com/jsiegenthaler/homebridge-samsungtvht#configurationThen reboot Homebridge, and send me the log. The log will have more debug entries, especially for the powerStateMonitor, which is where the problem lies I believe.
I need to see all the samsungtvht entries, but other entries and sensitive information can be removed.
Thanks
I've installed homebridge today instead of HOOBS. Here is the full debug log. I tried powering on and off from HomeKit.
I've changed the password since running this :)
All looks good, you just need to update Node:
[19/09/2021, 18:34:27] The plugin "homebridge-samsungtvht" requires Node.js version of >=14.17.6 which does not satisfy the current Node.js version of v14.17.4. You may need to upgrade your installation of Node.js - see https://git.io/JTKEF
Great, have updated Node.js successfully.
Getting closer, but I still can't get the pin on the TV
Ah. That is another issue. I was focused on solving the "UE40H6400 - characteristic was supplied illegal value: null " error!
I just went through the sequence to pair a new network remote to my Samsung D-5000 TV:
First enable network remote control on the TV: Menu > Plug & Play > Network Remote Control > ON
Ensure TV is connected to Ethernet LAN and you know it's IP address
Ensure IP address is configured in the plugin
Then turn on the TV, let the plugin detect the TV power-on state (wait for it to show the TV is on). This means the ping is working and the IP address is correct
Then open the iOS Remote Control and tap any button to send a command.
The TV will display New remote Node.JS S...(00:00:00:00) has been detected. Choose whether to use the remote control [ Allow ] [ Deny ]
Your TV menu options may be different if you have a different TV model to me. Just look for the network remote control setting.
Does your H-series TV have Smart TV+ or Allshare? Where are you in the world?
I'm in the UK. I don't have the Smart TV + streaming service but it does have apps like Netflix etc and I can control the tv using apps like "SamRemote".
I'll try removing it from HomeKit and attempt again but initially still get the same problem where it doesn't show the pin :(
Thanks again for your help with this!
Hi @ChrisTav424
I am sure I have discovered the problem. The C, D, ES, EH and F series all have Network Remote Control and work without a PIN. The H-series requires a PIN for authentication. The samsung-remote that I use for the network remote control was designed for the Network Remote Control and does not support the PIN needed for the H series.
An alternative exists samsung-tv-control which appears to support legacy Samsung TVs (using Network Remote Control without PIN) and the newer TVs. I will experiment with this, but as I do not have an H-series TV, I would need your assistance.
I have opened issue https://github.com/jsiegenthaler/homebridge-samsungtvht/issues/3 to track the request for the H series
In the meantime, I will close this issue as the original problem has been fixed.
Describe Your Problem: I'm getting the error below on my Samsung UE40H6400 and I don't get a pin displayed on the TV. Is there anything I can do?
Logs:
Plugin Config:
Environment: