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.11k stars 29.79k forks source link

Smartthings Integration Refrigerator temperature and set point unknown #61075

Open gwheels opened 2 years ago

gwheels commented 2 years ago

The problem

New Refrigerator with refrigerator and freezer temperature and setpoints showing in Smartthings, but show as "unknown" in smartthings integration.

Screenshot 2021-12-05 220341

What version of Home Assistant Core has the issue?

core-2021.11.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Smartthings

Link to integration documentation on our website

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

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

smartthings documentation smartthings source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years 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! (message by CodeOwnersMention)

firstof9 commented 2 years ago

This happens because the smartthings API responds with:

        "main": {
...
            "temperatureMeasurement": {
                "temperature": {
                    "value": null
                }
            },
...

The measurement and setPoint have moved under the "cooler" key instead:

        "cooler": {
            "contactSensor": {
                "contact": {
                    "value": "closed",
                    "timestamp": "2021-12-08T18:13:24.859Z"
                }
            },
            "custom.disabledCapabilities": {
                "disabledCapabilities": {
                    "value": [],
                    "timestamp": "2021-07-27T01:19:43.145Z"
                }
            },
            "temperatureMeasurement": {
                "temperature": {
                    "value": 37,
                    "unit": "F",
                    "timestamp": "2021-12-02T16:11:13.294Z"
                }
            },
            "custom.thermostatSetpointControl": {
                "minimumSetpoint": {
                    "value": 34,
                    "unit": "F",
                    "timestamp": "2021-07-27T01:19:42.452Z"
                },
                "maximumSetpoint": {
                    "value": 44,
                    "unit": "F",
                    "timestamp": "2021-07-27T01:19:42.452Z"
                }
            },
            "thermostatCoolingSetpoint": {
                "coolingSetpoint": {
                    "value": 37,
                    "unit": "F",
                    "timestamp": "2021-07-27T01:19:42.452Z"
                }
            }
        },

Similar with the freezer info:

        "freezer": {
            "contactSensor": {
                "contact": {
                    "value": "closed",
                    "timestamp": "2021-12-08T07:17:33.154Z"
                }
            },
            "custom.disabledCapabilities": {
                "disabledCapabilities": {
                    "value": [],
                    "timestamp": "2021-07-27T01:19:43.145Z"
                }
            },
            "temperatureMeasurement": {
                "temperature": {
                    "value": 0,
                    "unit": "F",
                    "timestamp": "2021-11-13T23:31:15.088Z"
                }
            },
            "custom.thermostatSetpointControl": {
                "minimumSetpoint": {
                    "value": -8,
                    "unit": "F",
                    "timestamp": "2021-07-27T01:19:42.452Z"
                },
                "maximumSetpoint": {
                    "value": 5,
                    "unit": "F",
                    "timestamp": "2021-07-27T01:19:42.452Z"
                }
            },
            "thermostatCoolingSetpoint": {
                "coolingSetpoint": {
                    "value": 0,
                    "unit": "F",
                    "timestamp": "2021-07-27T01:19:42.452Z"
                }
            }
        },

So in order for this to work again I think the library would need updating to allow enumeration of all the keys under "components".

gwheels commented 2 years ago

Thanks. Which library needs the update, and who manages it?

firstof9 commented 2 years ago

Library is pysmartthings, keep in mind I'm not 100% sure that's where the issue is located.

coffeexclutter commented 2 years ago

I'm in the same boat. I would love to see an update on this one.

kernelpanic85 commented 2 years ago

I had the same issue and found that going into the Smartthings IDE and setting the type to Samsung OCF Refrigerator on the parent device and then Samsung OCF Refrigerator Compartment on the child devices seemed to fix it. I still have an issue with HA not reporting all the sensor values that are present from the Smartthings API, but I suppose that is a separate issue.

gwheels commented 2 years ago

That did the trick! once I determined that the Smartthings IDE is on the Samsung smartthings website. I can now see the refrigerator temperature and setpoint.

How did you configure the freezer child device? I have set the "Refrigerator Freezer" and "freezer" child devices as Samsung OCF Refrigerator Compartment type and tried both the same and unique device network ID's but the temperature and setpoint are not passing to HA like the refrigerator compartment.

kernelpanic85 commented 2 years ago

Yes, that seems like a separate issue. I found a bunch of closed issues on Github regarding this and they seem to say that the integration currently doesn't enumerate all the info from the child devices so we are missing all of those sensors. Maybe we can re-surface this and hopefully someone can take a look?

gwheels commented 2 years ago

Hopefully so. Still, some progress is good.

kernelpanic85 commented 2 years ago

@andrewsayre any hope of getting the full child components into the integration for the refrigerators?

markdepalma commented 2 years ago

I had the same issue and found that going into the Smartthings IDE and setting the type to Samsung OCF Refrigerator on the parent device and then Samsung OCF Refrigerator Compartment on the child devices seemed to fix it. I still have an issue with HA not reporting all the sensor values that are present from the Smartthings API, but I suppose that is a separate issue.

This worked for me too!

firstof9 commented 2 years ago

any hope of getting the full child components into the integration for the refrigerators?

You may run into API limitations if you attempt to subscribe to too many entries. Currently the SmartThings API limits you to 40 subscriptions per app. Not sure why 40, seems like weird limit myself.

markdepalma commented 2 years ago

any hope of getting the full child components into the integration for the refrigerators?

You may run into API limitations if you attempt to subscribe to too many entries. Currently the SmartThings API limits you to 40 subscriptions per app. Not sure why 40, seems like weird limit myself.

Wondering the same here. I have the base fridge/energy stats working but freezer is a child object and not present. I could create my own integration if I have to...

firstof9 commented 2 years ago

I could create my own integration if I have to...

It's been done, I'm sure the author wouldn't mind some additional collaboration.

https://github.com/veista/smartthings

markdepalma commented 2 years ago

I could create my own integration if I have to...

It's been done, I'm sure the author wouldn't mind some additional collaboration.

https://github.com/veista/smartthings

Ah, I didn't know about this. Will check it out later. Thanks!

markdepalma commented 2 years ago

Just added on support for my fridge using the work already done by you. Created a pull request: https://github.com/veista/smartthings/pull/23.

github-actions[bot] commented 2 years 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.

gwheels commented 2 years ago

Stale? Seems so harsh. Still haven't been able to work through this.

How does this look for freezer settings IDE? Obviously temp and setpoint there, but not passing to the HA integration.

ascrnsht

janivr commented 1 year ago

Any fix to not show freezer data, but only cooler? Any workaround I can use?

janivr commented 1 year ago

Just added on support for my fridge using the work already done by you. Created a pull request: veista/smartthings#23.

Installed this but got only 4 entities, cooler temp is in but not freezer temp.

coffeexclutter commented 1 year ago

Nice! Thank you!

The only problem I'm having when I do that is with the device ID. Did your device already have a Device Network ID? Mine is blank when I try to change the device type, but requires it to change the device type.

On Wed, Mar 23, 2022, 9:17 PM kernelpanic85 @.***> wrote:

I had the same issue and found that going into the Smartthings IDE and setting the type to Samsung OCF Refrigerator on the parent device and then Samsung OCF Refrigerator Compartment on the child devices seemed to fix it. I still have an issue with HA not reporting all the sensor values that are present from the Smartthings API, but I suppose that is a separate issue.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/61075#issuecomment-1077051233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORTJZOK2RQH5YCQ36ZLND3VBPUE7ANCNFSM5JNSTELA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

kernelpanic85 commented 1 year ago

I think I added a Device Network ID to mine. It let me change it no problem. My device type is Samsung OCF Refrigerator.

gwheels commented 1 year ago

I think I added a Device Network ID to mine. It let me change it no problem. My device type is Samsung OCF Refrigerator.

When you add the Device Network ID, does it push the freezer child device to the Smartthings Integration? I've tried both a unique or the same Network ID number as the parent refrigerator ID. Neither causes a new entity in the integration. The freezer temp is present in the native smartthings app (as is my deli drawer), so I know it's there on the Smartthings side.

bearhntr commented 1 year ago

I am trying to follow this - and not sure things are working. I did Uninstall the SmartThings - followed the steps for putting the HACS version - and I am getting a little more -- but still not sure what is wrong. I would really like to get this working - as I hate having to use the ALEXA Link to SmartThings. I also have a RANGE to get installed, a DISHWASHER and a RANGE-HOOD MICROWAVE (soon as my new floors get installed. Wondering if they are all going to give me fits too. Seems there is no way to update Firmware or Software on these things like the Family Hub Fridge does on its own.

image

bearhntr commented 1 year ago

The WASHER-- definately shows more information - but you have to turn it ON to get more. Been my complaint to SAMSUNG for 1.5 years -- they are Supposed to be SMART, why do I have to walk to it to turn it ON?

image

and the DRYER

image

bearhntr commented 1 year ago

What I see in the ENTITIES

image

bearhntr commented 1 year ago

Now I am seeing these in the logs:

This error originated from a custom integration.

Logger: custom_components.smartthings.smartapp Source: custom_components/smartthings/smartapp.py:330 Integration: SmartThings First occurred: 15:03:38 (12 occurrences) Last logged: 15:03:38

Failed to create subscription for 'refrigeration' under app 'd94a6276-373b-44ee-a774-4591f6bd3fd0': Unprocessable Entity (422): {"requestId": "B306B799-CCB1-4E08-BE5C-66300A48013D", "error": {"code": "LimitError", "message": "subscription limit exceeded", "details": []}} Failed to create subscription for 'custom.error' under app 'd94a6276-373b-44ee-a774-4591f6bd3fd0': Unprocessable Entity (422): {"requestId": "9E0B6D9A-63C4-45BD-A896-0049CFF2A26B", "error": {"code": "LimitError", "message": "subscription limit exceeded", "details": []}} Failed to create subscription for 'custom.soundmode' under app 'd94a6276-373b-44ee-a774-4591f6bd3fd0': Unprocessable Entity (422): {"requestId": "C2BC46EE-5D0F-4A31-BF86-99D0AC50697D", "error": {"code": "LimitError", "message": "subscription limit exceeded", "details": []}} Failed to create subscription for 'samsungce.detergentState' under app 'd94a6276-373b-44ee-a774-4591f6bd3fd0': Unprocessable Entity (422): {"requestId": "65E0441F-8CC7-4D5C-81A2-E31DAE1BAAC0", "error": {"code": "LimitError", "message": "subscription limit exceeded", "details": []}} Failed to create subscription for 'custom.launchapp' under app 'd94a6276-373b-44ee-a774-4591f6bd3fd0': Unprocessable Entity (422): {"requestId": "E9705533-E0AF-446C-8DFB-675ABAAF5BEF", "error": {"code": "LimitError", "message": "subscription limit exceeded", "details": []}}

======================= This error originated from a custom integration.

Logger: custom_components.smartthings.smartapp Source: custom_components/smartthings/smartapp.py:376 Integration: SmartThings First occurred: 15:03:37 (1 occurrences) Last logged: 15:03:37

Some device attributes may not receive push updates and there may be subscription creation failures under app 'd94a6276-373b-44ee-a774-4591f6bd3fd0' because 62 subscriptions are required but there is a limit of 40 per app

=============================

firstof9 commented 1 year ago

and the DRYER

Work around for the dryer is to turn on "Cycle Sync" or whatever it's called. This will make the dryer stay on and connected.

Some device attributes may not receive push updates and there may be subscription creation failures under app 'd94a6276-373b-44ee-a774-4591f6bd3fd0' because 62 subscriptions are required but there is a limit of 40 per app

I'm in the same boat here with you, but 69 subscriptions of 40

veista stated they're working on a new library so this will likely help with these issues.

bearhntr commented 1 year ago

@firstof9

Thank You -- I think that setting exists on both WASHER and DRYER - but when it is turned ON on the Washer -- you cannot open the door.

I really wish that SAMSUNG would fix these things....they are supposed to be the leader in "SmartAppliances" -- well theirs ar DUMB! LOL

bearhntr commented 1 year ago

Nothing appears to be working. I have rebooted the devices and the HA 3x times now.

I am getting this in the LOGS in HA (below)....also when using the 'other' (non-HACS) Integration, there was a 'Home Assistant" showing in the IDE areas - not so with this one.

=============[errors] Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/smartthings/switch.py:231 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 18:44:48 (2 occurrences) Last logged: 18:44:56

[139804722897888] 409, message='Conflict', url=URL('https://api.smartthings.com/v1/devices/8afdcf72-f409-44bb-bbf3-b1f18a29d026/commands') Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 202, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 207, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call await result File "/config/custom_components/smartthings/switch.py", line 231, in async_turn_on await getattr(self._device, self._on_command)(set_status=True) File "/usr/local/lib/python3.10/site-packages/pysmartthings/device.py", line 1022, in switch_on result = await self.command(component_id, Capability.switch, Command.on) File "/usr/local/lib/python3.10/site-packages/pysmartthings/device.py", line 825, in command response = await self._api.post_device_command( File "/usr/local/lib/python3.10/site-packages/pysmartthings/api.py", line 147, in post_device_command return await self.post(API_DEVICE_COMMAND.format(device_id=device_id), data) File "/usr/local/lib/python3.10/site-packages/pysmartthings/api.py", line 395, in post return await self.request("post", self._api_base + resource, data=data) File "/usr/local/lib/python3.10/site-packages/pysmartthings/api.py", line 376, in request resp.raise_for_status() File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 409, message='Conflict', url=URL('https://api.smartthings.com/v1/devices/8afdcf72-f409-44bb-bbf3-b1f18a29d026/commands')

firstof9 commented 1 year ago

Looks like you're attempting to turn something on, you can't do that from what I've experienced.

bearhntr commented 1 year ago

and the DRYER

Work around for the dryer is to turn on "Cycle Sync" or whatever it's called. This will make the dryer stay on and connected.

Some device attributes may not receive push updates and there may be subscription creation failures under app 'd94a6276-373b-44ee-a774-4591f6bd3fd0' because 62 subscriptions are required but there is a limit of 40 per app

I'm in the same boat here with you, but 69 subscriptions of 40

veista stated they're working on a new library so this will likely help with these issues.

I found it -- it is called AUTO CYCLE LINK -- and I have turned it ON (for the Dryer) does not exist for the Washer.

bearhntr commented 1 year ago

Looks like you're attempting to turn something on, you can't do that from what I've experienced.

I am still trying to figure out why this NEW HACS SmartThings integration (while it does pull back the MFG and other information now from SmartThings) -- does not make an entry in the SmartThings IDE -- like the other one did. I would call the IDE and I would have to Sign In and then choose ALLOW for it to talk to the devices.

atkjedi commented 1 year ago

Just added on support for my fridge using the work already done by you. Created a pull request: veista/smartthings#23.

Installed this but got only 4 entities, cooler temp is in but not freezer temp.

yeah I installed the Custom integration and still not seeing the fridge temp (new 2022 family Hub) image

jhhoffma3 commented 1 year ago

Just added on support for my fridge using the work already done by you. Created a pull request: veista/smartthings#23.

Installed this but got only 4 entities, cooler temp is in but not freezer temp.

yeah I installed the Custom integration and still not seeing the fridge temp (new 2022 family Hub) image

Same. Tried changing "type" of each sensor in SmartThings API device settings, which provided temp data to display in SmartThings (in pic below), but not in ST Integrations. image

Particpant commented 1 year ago

This is still occurring, lots of sensors / toggles available via smart things for appliances aren't exposed to HA.

bearhntr commented 1 year ago

Has anyone has any success with getting HA and SmartThings to work? Either the 'built-in' one or the Custom Integration? I continually get these errors:

Some device attributes may not receive push updates and there may be subscription creation failures under app 'd94a6276-373b-44ee-a774-4591f6bd3fd0' because 62 subscriptions are required but there is a limit of 40 per app

I have tried creating another account - but not had any success there either.

scfigg commented 1 year ago

Just added on support for my fridge using the work already done by you. Created a pull request: veista/smartthings#23.

Installed this but got only 4 entities, cooler temp is in but not freezer temp.

yeah I installed the Custom integration and still not seeing the fridge temp (new 2022 family Hub) image

Same. Tried changing "type" of each sensor in SmartThings API device settings, which provided temp data to display in SmartThings (in pic below), but not in ST Integrations. image

I just installed this integration with our new fridge. Same issue here. Ever end up figuring out a fix?

atkjedi commented 1 year ago

I was able to get values by adding in my model manually to the custom integration editing the following files Custom components/smartthings (binary_sensor.py, number.py, select.py, sensor.py and switch.py)

My model number was 22K_REF_LCD_FHUB7

Got the info on this from here https://github.com/veista/smartthings/issues/22

Screenshot_20230106_005442_Home Assistant

Note: I also had to update the contact sensors to look for close vs closed

https://github.com/veista/smartthings/issues/32#event-7751733236

Swallowtail23 commented 1 year ago

@atkjedi you have the same fridge as me, a 22K_REF_LCD_FHUB7. I notice your temperature is coming through correctly (37F). Mine comes through as 20C, even though the API says 3C. The setpoint says 3C, the fridge itself says it's at 3C, SmartThings API and app say it's at 3C... but this integration says it's at 20C.

Particpant commented 1 year ago

That's cool, but why can't the standard smart things integration get that stuff? Isn't the point of having a smart things integration that it's the only way to interface with samsung appliances?

kernelpanic85 commented 1 year ago

I was able to get values by adding in my model manually to the custom integration editing the following files Custom components/smartthings (binary_sensor.py, number.py, select.py, sensor.py and switch.py)

My model number was 22K_REF_LCD_FHUB7

Got the info on this from here veista/smartthings#22

Screenshot_20230106_005442_Home Assistant

Note: I also had to update the contact sensors to look for close vs closed

veista/smartthings#32 (comment)

I'm still having trouble with my fridge. Could you screenshot what your fridge looks like in the Smartthings IDE? What parent and child devices show up and what do you have their type set to?

atkjedi commented 1 year ago

Screenshot_20230421_140900_Chrome

Sure, here it is in the IDE, but I did not make any changes because of the way things are now handles in Smart things. All of the child objects are also placeholder types. In fact I removed and re-added my fridge so it has the default settings because changes I made in the IDE caused problems (that I can't remember now)

gwheels commented 1 year ago

Loading the veista smartthings custom integration and adding my model number (TP2X_REF_20K) from the smartthings IDE into the Custom components/smartthings files binary_sensor.py, number.py, select.py, sensor.py and switch.py did the trick. Thanks all. ascrnsht

kernelpanic85 commented 1 year ago

Screenshot_20230421_140900_Chrome

Sure, here it is in the IDE, but I did not make any changes because of the way things are now handles in Smart things. All of the child objects are also placeholder types. In fact I removed and re-added my fridge so it has the default settings because changes I made in the IDE caused problems (that I can't remember now)

Loading the veista smartthings custom integration and adding my model number (TP2X_REF_20K) from the smartthings IDE into the Custom components/smartthings files binary_sensor.py, number.py, select.py, sensor.py and switch.py did the trick. Thanks all. ascrnsht

Thanks guys for the screenshots. Perhaps my TP6X_REF_16K fridge is just not as smart, or requires more changes somewhere else like the pysmartthings library or something. I'm not really sure. It's not the family hub model with the screen, but I still see lots of data in the Smartthings IDE that is not showing up in HA at all like your fridges.

image image

firstof9 commented 1 year ago

Perhaps my TP6X_REF_16K fridge is just not as smart

Add your model number to the files listed in this PR

kernelpanic85 commented 1 year ago

Perhaps my TP6X_REF_16K fridge is just not as smart

Add your model number to the files listed in this PR

I can, but I made those changes locally and they did not make any difference. This is all I've got with those changes in place:

image

issue-triage-workflows[bot] commented 1 year 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.

jhhoffma3 commented 1 year ago

I don't know that it's stale, but there's certainly something wrong without with the addon or (more likely) the SmartThings API.

My setup and integrations all became unavailable some time ago (months?). First my Fridge basically lost everything overnight and then, more recently, my washer and dryer are "unavailable".

I did notice that the website that used to take you to the API is different and then old site is no longer available.