Samsung Oven/Range and Cooktop Sync Time API

I want to be able to sync the range’s clocks when there is a power outage, daylight saving time changes, etc.
In the SmartThings mobile app’s device settings, there is an option to Sync Time. So this is supposed to be an API for setting device time. I have searched for suitable commands in all oven/range capabilities and have not been able to find any command that can be used to set the time.
Do you have any idea what API I can use to set device time?

@orangebucket is the API guru, if there is one he might know about it or can find it.

Appliance integrations are something of a mystery to me. As far as I can make out the integrations are directly with the app so it is behaving more like a ‘remote control’ app, and I’ve no idea what the mechanism is for any broader integration with the SmartThings ecosystem and what its extent is.

Yes, device integration is a mystery.
I believe the SmartThings application communicates with the range/oven driver via the OCF/execute API.
I also heard that there is OCF Device Spy. The only OCF Device Spy I’ve found works on Windows. I’m not sure if this will help me or not.
Are there any other tools that could help to see the OCF traffic?

You can set the time with this command:
smartthings devices:commands <device id> 'main:execute:execute("/configuration/vs/0", {"x.com.samsung.da.currentTime":"2023-07-09T13:37:00"})'

Be careful not to use dates far in the past or the future because you might break certificate verification on the oven.

If you’re going to automate this, avoid making requests at midnight, the start of the hour/minute or the same time every day. Aside from causing spikes in load you’ll delay the time getting to the oven meaning it’ll be out of sync.

Maybe one day ovens will automatically get their time from NTP over the local network instead of needing a cloud service.

1 Like

Hi Simon,

Thank you very much for sharing this undocumented command. It really works!

As far as NTP is concerned, NTP does not recognize time zones. Looking at the timestamps, I can tell that smart ovens and fridges already have the current UTC time. I’m assuming the problem with displaying the time is the time zone (Determining the time zone from a network IP address may not be accurate and they don’t want it to be a service call generator.)

Thank you for sharing possible issues with implementing clock automation. I was going to update the clock every day. But now I think that I will do it once in a while. I couldn’t find an easy way to tell if the oven clock is out of sync. I’ll probably update the time with a home automation voice command. Power outages don’t happen often and this should work for me well.

By the way, are there any other configuration commands? For example, it would be nice to be able to override the default oven setting of 350 degrees because in 99% of times we use 375 degrees for baking.

This just comes from the SmartThings app, so I can’t make it do anything it doesn’t already do. It would be really nice to be able to change the default temperatures.

One problem with updating the time is that doing it during cooking with an end time set could be confusing, but that’s no excuse for never automatically updating it.

I think there is some way to retrieve the current time, because the app is doing that, but I don’t know how it does it and the API we have for custom commands doesn’t return data.

The only other extra command in the app is the sound setting:
smartthings devices:commands <device id> 'main:execute:execute("/mode/vs/0", {"x.com.samsung.da.options":["Sound_On"]})'
smartthings devices:commands <device id> 'main:execute:execute("/mode/vs/0", {"x.com.samsung.da.options":["Sound_Off"]})'

Thanks, Simon!

I found the “x.com.samsung.da.options” definition in my notes. So, it’s documented somewhere. There is nothing really useful except the sound options. I also tried change the default bake setpoint using “x.com.samsung.da.modeSpec”:

smartthings devices:commands ‘main:execute:execute(“/mode/vs/0”, {“x.com.samsung.da.modeSpec”:[{ “mode” : “Bake”, …“tempDefaultF” : “375”, … }]})’

Smartthings replied with “ACCEPTED” which means that the command is OK but no action was taken.

It looks like that the 350 degrees setpoint is hard-coded. I’m done with this for now (actually my wife doesn’t complain about the 350 degree default settings :slight_smile: )

Hi Simon,

I have hooked up the oven clock adjustment to my home automation system. Works great. Now I can say, “Alexa, set the oven’s clock.” instead of looking for a phone and browsing through a lot of menus. Thank you. I couldn’t have done this without your help.

Now I have another question that you may be able to help me with. My Samsung refrigerator automation stopped working last week because Samsung changed the response of the refrigerator status request. I’m looking for the

components.main.execute.data.value.payload.“x.com.samsung.da.autofill”

value to get the auto water fill status. It used to work for years, but now this data is missing in the server response. However, the SmartThings app works fine. Do you have an idea how the app gets the auto water fill status?

Use logcat on the Android app and hope that it logs information about the requests it makes.

Well I would think that functionality could be added to this stove with a simple firmware update… though we just got our new Samsung range, and that function is still missing.

Maybe they were being sarcastic when they gave it the “SmartThings” label.

Hi, could you please break down the steps you used to achieve this? I’m new to home automation running home assistant and would like to be able to sync the clock on my samsung ovens. I have two oven and microwave i have synced the time on the mobile app but after a week or so they no longer match. I want to automate the sync every few days so the clocks display the same time. Thanks

Hi Barry,

I am not familiar with home assistant and I have no idea how the home assistant can manage this.

If I would need to implement the clock synchronization only, I would probably create a StartThings SmartApp and hosted it on Amazon as a AWS Lambda. (see Building First SmartApp for Dummies).

It should be a very simple stateless app. Each time it wakes up by timer, it enumerates all devices and sends the execute commands to devices with clocks as @Simon4 described above.

In this case, if you want to update clocks, you install the app; if you want to stop it, you uninstall the app. No UI, no data to persist. Easy.

Thanks,

Will look into this,

Barry

smartthings devices:commands <device id> 'main:execute:execute("/configuration/vs/0", {"x.com.samsung.da.currentTime":"2023-07-09T13:37:00"})'

Could you tell me how to issue this same command via API? I want to build it into a script inside Home Assistant, and I’m unable to install the SmartThings CLI in that environment. (It’s possible but would be wiped out by updates.)

I tried looking through the smartthings CLI source code but could not find any references to currentTime, and I’m not finding this on their API documentation page either.

I’d suggest setting the environment variable SMARTTHINGS_DEBUG to something truthy, for example for the Windows command line …

set SMARTTHINGS_DEBUG=true

… and running the CLI command again. It will then show you the API calls it is using.

1 Like

I’m hoping you can help as I’m getting an error when running this via CLI.

I[m getting an invaluid argument on {“x.com.samsung.da.currentTime”:“2023-07-09T13:37:00”})’

I’m figuring out things as I go here but wondering if you can confirm that this command should still be working?

It works for me so far (see the log below). However, Samsung could change firmware and it may not work for newer models.

SmartApp: => POST : https://api.smartthings.com/v1/devices/<GUID>/commands
{
    "commands" : [
        {
            "component" : "main",
            "capability" : "execute",
            "command" : "execute",
            "arguments" : [
                "/configuration/vs/0",
                {
                    "x.com.samsung.da.currentTime" : "2024-11-02T23:49:16" 
                }
            ]
        }
    ]
}
SmartApp: <= OK
{
    "results" : [
        {
            "id" : "<GUID>",
            "status" : "COMPLETED"
        }
    ]
}

Thanks for confirming. The microwave is a few years old. Do you know if I actually need a smartthings hub for this to work? I use homeassistant and don’t want a hub just so I can keep the time on my microwave up to date.

Samsung appliances connect to the SmartThings via the cloud as OCF devices, so NO hub is needed.