Closed nashant closed 1 year ago
Please attach diagnostic file
{
"home_assistant": {
"installation_type": "Unknown",
"version": "2022.3.1",
"dev": false,
"hassio": false,
"virtualenv": false,
"python_version": "3.9.5",
"docker": false,
"arch": "x86_64",
"timezone": "Europe/London",
"os_name": "Linux",
"os_version": "5.11.0-49-generic",
"run_as_root": false
},
"custom_components": {
"frigate": {
"version": "2.2.2",
"requirements": []
},
"midea_ac": {
"version": "0.2.2",
"requirements": [
"msmart==0.2.2",
"pycryptodome",
"pycryptodomex",
"click"
]
},
"hpprinter": {
"version": "1.0.6",
"requirements": [
"xmltodict==0.12.0"
]
},
"hacs": {
"version": "1.23.0",
"requirements": [
"aiogithubapi>=21.11.0"
]
},
"watchman": {
"version": "0.5.0",
"requirements": [
"prettytable==3.0.0"
]
},
"pyscript": {
"version": "1.3.3",
"requirements": [
"croniter==1.3.4",
"watchdog==2.1.6"
]
},
"scheduler": {
"version": "v0.0.0",
"requirements": []
},
"ambient_lighting": {
"version": "1.0.0",
"requirements": []
},
"london_tfl": {
"version": "0.1.4",
"requirements": []
},
"dwains_dashboard": {
"version": "2.0.7",
"requirements": []
},
"eventsensor": {
"version": "3.0.0",
"requirements": []
},
"samsungtv_smart": {
"version": "0.5.0",
"requirements": [
"websocket-client>=0.58.0",
"wakeonlan>=2.0.0",
"aiofiles>=0.6.0"
]
},
"tapo_control": {
"version": "3.4.1",
"requirements": [
"pytapo==1.2.1",
"onvif-zeep-async==1.2.0"
]
},
"var": {
"version": "0.12.3",
"requirements": []
},
"nest_protect": {
"version": "0.3.0",
"requirements": []
},
"ui_lovelace_minimalist": {
"version": "v0.0.6-hotfix2",
"requirements": []
}
},
"integration_manifest": {
"domain": "samsungtv_smart",
"name": "SamsungTV Smart",
"documentation": "https://github.com/ollo69/ha-samsungtv-smart",
"issue_tracker": "https://github.com/ollo69/ha-samsungtv-smart/issues",
"requirements": [
"websocket-client>=0.58.0",
"wakeonlan>=2.0.0",
"aiofiles>=0.6.0"
],
"dependencies": [],
"codeowners": [
"@jaruba",
"@ollo69",
"@screwdgeh"
],
"config_flow": true,
"version": "0.5.0",
"is_built_in": false
},
"data": {
"entry": {
"entry_id": "2c391707d46361699ae7a89ab4bd526e",
"version": 1,
"domain": "samsungtv_smart",
"title": "Lounge TV (SmartThings)",
"data": {
"host": "172.16.0.30",
"name": "Lounge TV",
"port": 8002,
"ws_name": "Home",
"mac": "**REDACTED**",
"id": "0da3a196-7be5-4730-ae7d-77bbf5f7d3bf",
"device_name": "[TV] Lounge TV",
"device_model": "QE65Q95TATXXU",
"device_os": "Tizen",
"api_key": "**REDACTED**",
"device_id": "65419c9c-2662-d8a0-26ca-beac69f65d23",
"token": "**REDACTED**"
},
"options": {
"use_st_status_info": true,
"use_st_channel_info": true,
"show_channel_number": true,
"power_on_method": 2,
"logo_option": 2,
"app_load_method": 1,
"dump_apps": false,
"app_launch_method": 1,
"wol_repeat": 1,
"power_on_delay": 30,
"ping_port": 0,
"use_mute_check": true
},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "user",
"unique_id": "0da3a196-7be5-4730-ae7d-77bbf5f7d3bf",
"disabled_by": null
},
"device": {
"name": "Lounge TV",
"name_by_user": null,
"model": "QE65Q95TATXXU ([TV] Lounge TV)",
"manufacturer": "Samsung Electronics",
"sw_version": "Tizen",
"disabled": false,
"disabled_by": null,
"entities": {
"media_player.lounge_tv": {
"name": null,
"original_name": "Lounge TV",
"disabled": false,
"disabled_by": null,
"entity_category": null,
"device_class": null,
"original_device_class": "tv",
"icon": null,
"original_icon": "mdi:television",
"unit_of_measurement": null,
"state": {
"state": "on",
"attributes": {
"source_list": [
"TV",
"Denon",
"PS5",
"Plex",
"iPlayer",
"ITV Player",
"All4",
"Disney Plus",
"Prime Video",
"YouTube",
"My5",
"UKTV Play",
"BT Sport"
],
"volume_level": 0.0,
"is_volume_muted": false,
"media_content_type": "video",
"app_id": "TV/HDMI",
"source": "TV/HDMI",
"ip_address": "172.16.0.30",
"device_class": "tv",
"icon": "mdi:television",
"friendly_name": "Lounge TV",
"supported_features": 90045
},
"last_changed": "2022-03-12T06:39:55.012484+00:00",
"last_updated": "2022-03-12T06:39:55.012484+00:00"
}
}
}
}
}
}
Can you try to set the advanced option TCP port used to check power status
from 0
to 9197
and check if fix this issue?
Done, will report back
Any news here?
Bingo! That did the trick, thanks
Not bingo. Turns out it's not fixed
Is there any reason it doesn't just use a standard ICMP ping rather than trying to connect on a TCP port? I've nmap scanned it while on and the following are open: 7678/tcp open unknown 8001/tcp open vcom-tunnel 8002/tcp open teradataordbms 8080/tcp open http-proxy 8187/tcp open unknown 9119/tcp open mxit 9197/tcp open unknown 12345/tcp open netbus 15500/tcp open unknown 26101/tcp open unknown 37671/tcp open unknown 42939/tcp open unknown 43799/tcp open unknown 50125/tcp open unknown 59231/tcp open unknown
I'm going to leave connection attempts running overnight to all of them and see what happens
Solved my problem with this:
- name: Lounge TV Power State
platform: command_line
device_class: power
command: "( nc -z -w 2 172.16.0.30 9197 && echo 'open' ) || echo 'closed'"
scan_interval: 3
payload_on: open
payload_off: closed
Not solved! Literally every port opens :(
Having several TCP port open for communication is normal. I don't see any issue. Unfortunately some Samsung TV activate communication during activities as software upgrade checks or channels search, so integration detect it as on. A work around should use a power consumption sensor, create a binary sensor based on real power usage and associate it to integartion in advanced integration option. If power usage is under a specific limit, means that TV screen is off and so can be considered as off,
Is it not possible through SmartThings? The Samsung app always reports the correct power state. It would be really useful if there were at least a single port that only opened when the TV is actually on
Smartthings power info is not reliable at all. I just have 1 TV, and in my case power state is always reported correctly. It would be good have information about a port to use to monitor for power status, but I don't have any information on this.
So the ports that absolutely seem to open every time the TV gets chatty are: 7678/tcp open unknown 8001/tcp open vcom-tunnel 8002/tcp open teradataordbms 8080/tcp open http-proxy 8187/tcp open unknown 9119/tcp open mxit 9197/tcp open unknown 12345/tcp open netbus 15500/tcp open unknown
There's one I haven't tested and that's 26101. That's the only one that doesn't seem ephemeral. I'll test that and report back
26101 opens too. But I had nmap running for the last 7 hours and the first time it opened ports was 1 hour ago. How are you monitoring for the ports? Can you point me to the code?
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
Describe the bug My TV sometimes reports an incorrect state. I believe this happens when either the tv (in standby) or SmartThings issues an
ms.channel.connect
event immediately prior to requesting the app list. I discovered this through an automation based on the state of the media_playerExpected behavior media_player reports correct state
Environment details:
Output of HA logs