Drivers for Samsung Appliances controlled via SmartThings Cloud API

Howdy, the rate limit only applies to subscription modifications (deletion and/or subscribe) in OAuth. If you 'change your mind' over and over again when selecting devices for subscriptions you will eventually get paused for 15min. This really isn't a big problem - just something to know about.

That rate limit doesn't apply to EVENTS once you subscribe to device. In fact, I haven't seen any limits on EVENTS including some very noisy power meters hitting every few seconds. The subscription cycle uses the OAuth token for keep alive which is required every 24hours at minimum.

The device modification (setter/getter) use the PAT.

I do a 'make good' status poll (with the PAT) whenever the OAuth refreshes.

LMK if you want any other information on how it works. So far it has been remarkably stable.

2 Likes

Thanks, I continue my investigation relative to how to handle the Samsung Appliances.

I think I noticed in your code that the only component that is supported is "main" (hardcoded in the method to create the device command). A lot of the Samsung devices have multiple components (i.e., the refrigerator). Obviously something for down-the road.

I also notice that you do get the status for devices occasionally. I have noted/tested that this data may not match the true state of the device attributes until AFTER a device refresh command is sent. (This is for at least the Samsung TV and Samsung Soundbar.) Example of testing not using refresh: Change the TV channel. The SmartThings phone interface reflects this change almost immediately. The status query to the device will not until a refresh is sent.

BTW - I love what you are implementing. I am concerned on setting up some of the data fields for my own drivers. That and the (I think) components issues will hold me back.

Yup, just 'main' at the moment. Should support everything by end of week.

It isn't a huge lift since I already had the concept of multiple HE devices -> one ST device, just need to work in the 'component' id into the mix and test out. It is required for some of the Buttons out there.

1 Like

My code for the Samsung Refrigerator (the most complex) handled this (in my own awkward way) and auto created the children.

1 Like

Any idea why I would be seeing this error?

ST Refrigerator: distResp: [status:ERROR, httpCode:400, errorMsg:Bad Request]

If it has not happened before, check / update your API code is my best option.

If it has happened before, I need debug logging of a command (or refresh cycle) that culminates with the error message.

I have the Samsung Cube smart air filter and it'd be great if I can have it integrated into Hubitat. Is this something can potentially be done thru this development? Thanks!

Possible; however, I am currently slammed for new development. I will get back with you in a March.

Dave

1 Like

Thanks in advance!

Still planned. Personal issues have reduced my productivity.

2 Likes

Thank you so much for keeping this in mind!

I saw that you created a test code for the Samsung oven, and since I now have an extra C-5 doing nothing, I installed the Hubithings code and the test code for the oven. It was very easy to do and the oven updates the device page instantly! Commands also seem to be working immediately from the driver page. Let me know if you need me to try anything out.

1 Like

Can anyone confirm if the API should still be working with all the ST changes? I have the Samsung HVAC drivers set up and get success returns in the logs but there is no connection to the real world. Off and cool change the virtual device but not the real one :grinning: the temps returned are equally random.

I would switch to HubiThings Replica, that is an upgrade from this and the author here has converted most of his drivers to work with that as well. It works great for my Fridge and Oven.

Thanks for the recommendation. Will do.

@djgutheinz Hi! So I have installed the HVAC driver. However since the smartthings/token link did not work I just took the auth token from the hubithings replica driver which I previously connected and still have. However even though I saw all the Samsung devices in the log and used the correct device id for the settings, nothing just seems to be working. Also see the log below. It seems fine. I wonder why does the AC not reacting at all?

turn on log-debug then do a save preferences. Send me the log. It has been a LONG time since I wrote this and I do not have the device (I did this for and in-coordination with another user).

See the screenshots. I did it from a phone hope thats ok?


Tested with Samsung TV using same SmartThings interface. It is working OK.

Two potential errors.
Invalid device id. Would throw : Den TV-4.1-1: distResp: [status:ERROR, httpCode:403, errorMsg:Forbidden]

Invalid API Key: Would throw: Den TV-4.1-1: distResp: [status:ERROR, httpCode:401, errorMsg:Unauthorized]

I will look at more this weekend (hopefully).

@djgutheinz the readme for the samsung refrigerator is referencing oven devices. Just fyi.

I was wondering if this integration can pull the set temp and current temp of the freezer / fridge on these devices.

I am using another integration and do not see this data populated. Curious if i install this integration if id have access to the temps?..

Many thanks in advance