home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.91k stars 30.98k forks source link

Samsung Appliance Lights Not Imported By SmartThings Integration #121808

Open nopoz opened 4 months ago

nopoz commented 4 months ago

The problem

I have a Samsung Oven and Range/Microwave with SmartThings capability. The oven has a light in its interior and the range has a light that shines down on the oven cook top. Neither of these lights are imported with the Smartthings integration. The name of these components returned by the Smartthings API is "samsungce.lamp".

What version of Home Assistant Core has the issue?

core-2024.7.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

SmartThings

Link to integration documentation on our website

https://www.home-assistant.io/integrations/smartthings/

Diagnostics information

Debugged the issue with the SmartThings CLI to verify they can be seen and controlled:

oven light:

~ $ SMARTTHINGS_DEBUG=true smartthings devices:component-status <oven_device_id> main/capabilities/samsungce.lamp -j
[2024-07-11T12:47:12.796] [DEBUG] login-authenticator - authentication - enter
[2024-07-11T12:47:12.800] [DEBUG] rest-client - making axios request: {"url":"https://api.smartthings.com/devices/<oven_device_id> ","method":"get","headers":{"Content-Type":"application/json;charset=utf-8","Accept":"application/vnd.smartthings+json;v=20170916","User-Agent":"@smartthings/cli/1.8.1 darwin-x64 node-v18.5.0","Accept-Language":"en-CA","Authorization":"Bearer 61c70632-xxxx-xxxx-xxxx-xxxxxxxxxxxx"},"params":{}}
[2024-07-11T12:47:13.335] [DEBUG] login-authenticator - authentication - enter
[2024-07-11T12:47:13.336] [DEBUG] rest-client - making axios request: {"url":"https://api.smartthings.com/devices/<oven_device_id> /components/main/capabilities/samsungce.lamp/status","method":"get","headers":{"Content-Type":"application/json;charset=utf-8","Accept":"application/json","User-Agent":"@smartthings/cli/1.8.1 darwin-x64 node-v18.5.0","Accept-Language":"en-CA","Authorization":"Bearer 61c70632-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}}
{
    "brightnessLevel": {
        "value": "off",
        "timestamp": "2024-07-11T14:06:42.138Z"
    },
    "supportedBrightnessLevel": {
        "value": [
            "off",
            "high"
        ],
        "timestamp": "2023-07-14T20:56:49.164Z"
    }
}

microwave/range light:

~ $ SMARTTHINGS_DEBUG=true smartthings devices:component-status <microwave_device_id> hood/capabilities/samsungce.lamp -j
[2024-07-11T12:49:48.624] [DEBUG] login-authenticator - authentication - enter
[2024-07-11T12:49:48.631] [DEBUG] rest-client - making axios request: {"url":"https://api.smartthings.com/devices/<microwave_device_id>","method":"get","headers":{"Content-Type":"application/json;charset=utf-8","Accept":"application/vnd.smartthings+json;v=20170916","User-Agent":"@smartthings/cli/1.8.1 darwin-x64 node-v18.5.0","Accept-Language":"en-CA","Authorization":"Bearer 61c70632-xxxx-xxxx-xxxx-xxxxxxxxxxxx"},"params":{}}
[2024-07-11T12:49:49.134] [DEBUG] login-authenticator - authentication - enter
[2024-07-11T12:49:49.135] [DEBUG] rest-client - making axios request: {"url":"https://api.smartthings.com/devices/<microwave_device_id>/components/hood/capabilities/samsungce.lamp/status","method":"get","headers":{"Content-Type":"application/json;charset=utf-8","Accept":"application/json","User-Agent":"@smartthings/cli/1.8.1 darwin-x64 node-v18.5.0","Accept-Language":"en-CA","Authorization":"Bearer 61c70632-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}}
{
    "brightnessLevel": {
        "value": "high",
        "timestamp": "2024-07-11T16:00:39.900Z"
    },
    "supportedBrightnessLevel": {
        "value": [
            "off",
            "low",
            "high"
        ],
        "timestamp": "2023-09-21T22:49:26.150Z"
    }
}

The only device that was imported with the current SmartThings Integration was a microwave "switch" but this does not control the microwave light:

~ $ SMARTTHINGS_DEBUG=true smartthings devices:component-status <microwave_device_id> main/capabilities/switch -j
[2024-07-11T12:54:16.030] [DEBUG] login-authenticator - authentication - enter
[2024-07-11T12:54:16.035] [DEBUG] rest-client - making axios request: {"url":"https://api.smartthings.com/devices/<microwave_device_id>","method":"get","headers":{"Content-Type":"application/json;charset=utf-8","Accept":"application/vnd.smartthings+json;v=20170916","User-Agent":"@smartthings/cli/1.8.1 darwin-x64 node-v18.5.0","Accept-Language":"en-CA","Authorization":"Bearer 61c70632-xxxx-xxxx-xxxx-xxxxxxxxxxxx"},"params":{}}
[2024-07-11T12:54:16.568] [DEBUG] login-authenticator - authentication - enter
[2024-07-11T12:54:16.569] [DEBUG] rest-client - making axios request: {"url":"https://api.smartthings.com/devices/<microwave_device_id> /components/main/capabilities/switch/status","method":"get","headers":{"Content-Type":"application/json;charset=utf-8","Accept":"application/json","User-Agent":"@smartthings/cli/1.8.1 darwin-x64 node-v18.5.0","Accept-Language":"en-CA","Authorization":"Bearer 61c70632-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}}
{
    "switch": {
        "value": "on",
        "timestamp": "2024-07-11T15:59:36.415Z"
    }
}

I verified with manually created shell_commands and light templates in configuration.yaml that these lights can be controlled by Home Assistant.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 4 months ago

smartthings documentation smartthings source

bakernigel commented 2 months ago

It seems like the Smartthings core integration is no longer being updated.

I have created a modified version of the core integration that should provide the missing sensors and controls for Samsung appliances.

See https://github.com/bakernigel/smartthings

I only have three devices on my Smartthings account - Family Hub, Wall Oven and Dishwasher and my integration works well with these. Note that I am not able to test whether the integration will break other devices, particularly non Samsung devices, so use it at your own risk.

I have a Samsung double wall oven which uses samsungce.lamp and my integration provides switches for the upper and lower oven lights so I'm hoping it will fix the issue with your lights.

If you are willing to act as a guinea pig, please give it a try and let me know if it works for you.

cwpenhale commented 2 months ago

Made my Samsung microwave range light accessible! Looks like the UI for setting up the token lost its instruction text though. I was able to follow the old steps, and it worked, but the instructions are gone :) Thanks for your contribution.