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
71.05k stars 29.71k forks source link

Samsung SmartThings Fridge Sensors showing up as unknown #98785

Open Airforc opened 1 year ago

Airforc commented 1 year ago

The problem

Samsung Smart Fridge sensors show up as unknown in HA. Only functional sensor is 'Contact' for door status.

Additionally SmartThings shows multiple useful commands for the fridge, icemaker on/off, temp set points, etc. None of these are exposed to HA. Seems counterproductive.

image

What version of Home Assistant Core has the issue?

core-2023.8.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

smartthings

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Other forum post showed manipulating the smart things config for the fridge in order to get temp sensors to show up, but that option is not available to modify on the smart things website. https://community.home-assistant.io/t/samsung-refrigerator-via-smarthings-all-sensors-except-one-reporting-uknown-state/377028/6

home-assistant[bot] commented 1 year ago

Hey there @andrewsayre, mind taking a look at this issue as it has been labeled with an integration (smartthings) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `smartthings` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign smartthings` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


smartthings documentation smartthings source (message by IssueLinks)

moebis commented 12 months ago

I'm having a similar problem with Samsung Fridges. Unknown Temps:

image

So I added this to my configuration.yaml:

#Samsung Frige

rest:
    scan_interval: 60
    resource: https://api.smartthings.com/v1/devices/XXX/status
    headers:
      Authorization: Bearer XXX
    sensor:
      - name: "samsung_cooler_temperature"
        value_template: "{{ value_json.components.cooler.temperatureMeasurement.temperature.value }}"
        unit_of_measurement: '°C'
        icon: "mdi-thermometer"
        device_class: "temperature"

      - name: "samsung_cooler_set_temperature"
        value_template: "{{ value_json.components.cooler.thermostatCoolingSetpoint.coolingSetpoint.value }}"
        unit_of_measurement: '°C'
        icon: "mdi-thermometer"
        device_class: "temperature"

      - name: "samsung_freezer_temperature"
        value_template: "{{ value_json.components.freezer.temperatureMeasurement.temperature.value }}"
        unit_of_measurement: '°C'
        icon: "mdi-thermometer"
        device_class: "temperature"

      - name: "samsung_freezer_set_temperature"
        value_template: "{{ value_json.components.freezer.thermostatCoolingSetpoint.coolingSetpoint.value }}"
        unit_of_measurement: '°C'
        icon: "mdi-thermometer"
        device_class: "temperature"

    binary_sensor:
      - name: "samsung_cooler_door"
        value_template: "{{ value_json.components.cooler.contactSensor.contact.value }}"
        device_class: "opening"

      - name: "samsung_frezzer_door"
        value_template: "{{ value_json.components.freezer.contactSensor.contact.value }}"
        device_class: "opening"

And now in a separate panel I see this, and it says its a duplicate, how do I get everything working on the Fridge device?

image
andrewskujins commented 11 months ago

Screenshot 2023-09-27 023413 My fridge works in the SmartThings app but does not receive any data at all in HA.

chrwei commented 11 months ago

Also getting a couple unknows. I can get the values via the rest api thought, so they are available via some method. Screenshot 2023-10-12 175158

This is possibly a fridge model/age thing, mine's only about a year old. In the v1 api data mine shows cooler and freezer doors separate, as well as cooler and freezer temperatures. Also the ice maker on/off (which would be amazing to be able to control via automations, like "don't make ice in the middle of the night!"). Below is the "https://api.smartthings.com/v1/devices/XXX/status" response for my model. I have trimmed out objects that either are not relevant to this issue or are features that my fridge doesn't support and thus are not good examples.

{
    "components": {
        "icemaker": {
            "switch": {
                "switch": {
                    "value": "off",
                    "timestamp": "2023-10-10T19:06:32.203Z"
                }
            }
        },
        "cooler": {
            "contactSensor": {
                "contact": {
                    "value": "closed",
                    "timestamp": "2023-10-12T21:35:55.984Z"
                }
            },
            "temperatureMeasurement": {
                "temperature": {
                    "value": 39,
                    "unit": "F",
                    "timestamp": "2023-09-04T23:38:56.611Z"
                }
            },
            "custom.thermostatSetpointControl": {
                "minimumSetpoint": {
                    "value": 34,
                    "unit": "F",
                    "timestamp": "2023-08-13T13:31:36.867Z"
                },
                "maximumSetpoint": {
                    "value": 44,
                    "unit": "F",
                    "timestamp": "2023-08-13T13:31:36.867Z"
                }
            },
            "thermostatCoolingSetpoint": {
                "coolingSetpoint": {
                    "value": 39,
                    "unit": "F",
                    "timestamp": "2023-08-13T13:32:52.537Z"
                }
            }
        },
        "freezer": {
            "contactSensor": {
                "contact": {
                    "value": "closed",
                    "timestamp": "2023-10-12T19:11:58.587Z"
                }
            },
            "temperatureMeasurement": {
                "temperature": {
                    "value": 5,
                    "unit": "F",
                    "timestamp": "2023-09-04T23:34:56.637Z"
                }
            },
            "custom.thermostatSetpointControl": {
                "minimumSetpoint": {
                    "value": -8,
                    "unit": "F",
                    "timestamp": "2023-08-13T13:31:36.867Z"
                },
                "maximumSetpoint": {
                    "value": 5,
                    "unit": "F",
                    "timestamp": "2023-08-13T13:31:36.867Z"
                }
            },
            "thermostatCoolingSetpoint": {
                "coolingSetpoint": {
                    "value": 5,
                    "unit": "F",
                    "timestamp": "2023-08-13T17:01:32.128Z"
                }
            }
        },
        "main": {
            "demandResponseLoadControl": {
                "drlcStatus": {
                    "value": {
                        "drlcType": 1,
                        "drlcLevel": 0,
                        "duration": 0,
                        "override": false
                    },
                    "timestamp": "2023-08-13T16:37:07.209Z"
                }
            },
            "contactSensor": {
                "contact": {
                    "value": "closed",
                    "timestamp": "2023-10-12T21:35:55.984Z"
                }
            },
            "powerConsumptionReport": {
                "powerConsumption": {
                    "value": {
                        "energy": 59924,
                        "deltaEnergy": 7,
                        "power": 61,
                        "powerEnergy": 0.0,
                        "persistedEnergy": 0,
                        "energySaved": 0,
                        "start": "2023-10-12T21:25:47Z",
                        "end": "2023-10-12T21:42:37Z"
                    },
                    "timestamp": "2023-10-12T21:42:37.728Z"
                }
            },
            "refrigeration": {
                "defrost": {
                    "value": "off",
                    "timestamp": "2023-08-13T16:38:02.506Z"
                },
                "rapidCooling": {
                    "value": "off",
                    "timestamp": "2023-08-13T17:01:54.699Z"
                },
                "rapidFreezing": {
                    "value": "off",
                    "timestamp": "2023-08-13T13:31:36.881Z"
                }
            },
            "samsungce.powerCool": {
                "activated": {
                    "value": false,
                    "timestamp": "2023-08-13T17:01:54.699Z"
                }
            },
            "custom.energyType": {
                "energySavingSupport": {
                    "value": false,
                    "timestamp": "2023-08-13T13:31:37.347Z"
                },
                "drMaxDuration": {
                    "value": 1440,
                    "unit": "min",
                    "timestamp": "2023-08-13T13:31:37.013Z"
                },
                "energyType": {
                    "value": "2.0",
                    "timestamp": "2023-08-13T13:31:36.373Z"
                },
                "energySavingLevel": {
                    "value": null
                },
                "supportedEnergySavingLevels": {
                    "value": null
                },
                "energySavingOperation": {
                    "value": null
                },
                "energySavingOperationSupport": {
                    "value": false,
                    "timestamp": "2023-08-13T13:31:37.013Z"
                }
            },
            "samsungce.powerFreeze": {
                "activated": {
                    "value": false,
                    "timestamp": "2023-08-13T13:31:36.881Z"
                }
            },
            "temperatureMeasurement": {
                "temperature": {
                    "value": null
                }
            },
            "thermostatCoolingSetpoint": {
                "coolingSetpoint": {
                    "value": null
                }
            }
        }
   }
}
maczkus commented 10 months ago

I have the same issue as @andrewskujins . Any solution?

Arnaud73 commented 10 months ago

Hello,

Same issue here: image

However, the same fridge appears correctly in Homey: image

jkosharek commented 9 months ago

Same issue here: image

And in the Smartthings app: image

attig78 commented 9 months ago

same here: image

attig78 commented 9 months ago

I did some analysis if this can help. I had a play with the SmartThings API for my fridge "22K_REF_LCD_FHUB7.0", and it seems that home assistant is only downloading the capabilities of the "main" component:

https://api.smartthings.com/v1/devices/<token>/components/main/status

however the fridge has a few more components: freezer, cooler, cvroom, etc... and these are nested in the first object:

https://api.smartthings.com/v1/devices/<token>/components/freezer/capabilities/temperatureMeasurement/status

moebis commented 8 months ago

They have had a fix in peer review for 4+ months now. When they're not pushing updates that completely break the install (like the one back in Sept/Oct that made me quit this projecti), they are ignoring much needed features. So happy I went back to Homebridge. It's really just TMI, and they're a bit snobby about community input.

tomcemerka commented 7 months ago

Same here:

image

chrwei commented 7 months ago

@moebis

They have had a fix in peer review for 4+ months now.

Do you have a link to that? we should be commenting on the fix, especially those of us capable of testing it.

jkosharek commented 7 months ago

@moebis

They have had a fix in peer review for 4+ months now.

Do you have a link to that? we should be commenting on the fix, especially those of us capable of testing it.

Does it need a bump or something?

BoGnY commented 7 months ago

99924 is the fix... closed because stale 😨

moebis comment helped me 👍🏻

image

jkosharek commented 7 months ago

So how do we get the PR opened and processed?

chrwei commented 7 months ago

thanks for that link. looks like it's stale because it has issues that were not addressed. one of the issues is that it that it only works on certain types, so it wouldn't actually work for all the fridge's components anyway.

it also depends on an upstream PR that's still open, and does have recent activity, and looks like maybe is getting the data it returns changed (for the better) so the integration would need redone anyway.

what would help is if you're capable of pulling those dev versions and testing the PRs, do so and provide feedback and fixes.

jkosharek commented 7 months ago

thanks for that link. looks like it's stale because it has issues that were not addressed. one of the issues is that it that it only works on certain types, so it wouldn't actually work for all the fridge's components anyway.

it also depends on an upstream PR that's still open, and does have recent activity, and looks like maybe is getting the data it returns changed (for the better) so the integration would need redone anyway.

what would help is if you're capable of pulling those dev versions and testing the PRs, do so and provide feedback and fixes.

I am willing to test/try, how would one install a dev version?

chrwei commented 7 months ago

you follow the instructions for the given projects. start with pysmartthings to make sure it returns the right data. probably will have to make a test script to call the methods if it doesn't have one already I haven't looked at that one yet, but probably will soon.

issue-triage-workflows[bot] commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

jkosharek commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

I have the latest versions of everything and this one is still an issue

attig78 commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

I have the latest versions of everything and this one is still an issue

same here. Still an issue. I think the person assigned to this has moved on as his linkedin shows is not working for SmartThings anymore.

adrianbn commented 4 months ago

Same, it would be sad to get this closed as stale.

niekniek89 commented 2 months ago

@moebis Hello,

With which tool did you read the api? I succeeded, but I get very strange values ​​back. I think my fridge has different JSON values, when I use yours, everything is "unknown"

i get:

1 {4} id : freezer label : freezer capabilities [7] 0 {2} id : contactSensor version : 1 1 {2} id : temperatureMeasurement version : 1

poughkeepsee commented 4 weeks ago

In the interest of keeping this alive, I bought a new Samsung fridge, model RB38C607AS9, getting the same issue as others above, temperature unavailable/unknown

Screenshot 2024-08-08 at 13 35 50