veista / smartthings

A fork of the Home Assistant SmartThings Integration. This adds better support for Samsung OCF Devices.
169 stars 39 forks source link

Adding support for Oven #12

Open sisimomo opened 2 years ago

sisimomo commented 2 years ago

The issue # 66 was created in a similar repository (pysmartthings). However, this other repository will only support devices using the ST standard. So @veista responded saying he could support oven in his fork. So here we are.

We discussed the subject a lot in the issue in the other repository. So go see the previous issue to read the messages we exchanged

We will therefore continue the discussion here.

Thank you!

veista commented 2 years ago

Hi,

I didn't have time to look into the temperature/mode/timer settings. I winged a sound select for you to the latest update. Tell me if it works as it should.

veista commented 2 years ago

I can look at the missing features during the weekend. If you could generate an access token for me that would be great and also if you had time to chat in a voip conversation for example discord 3rawler#2178.

sisimomo commented 2 years ago

I just tested the latest update, and it's perfect it works as it's supposed to.

But, I discovered a new problem.

The oven temperature is not translated into the unit of measurement used by Home Assistant (Configurable under "Configuration" -> "General" -> "Unit System"). In my case I use Celsius degrees, Home Assistant tells me that the oven is at 79°C but it should display 26°C.

For your information, this problem is also present in pysmartthings. When you have solved the problem, I'll create an issue in his repository quoting your commit fixing the problem.

image

About the conversation and the API key, I don't see any problem there. I just sent you a request on discord, so we can make an appointment and I will send you the API key.

Just to let you know that I'm in Quebec, so I'm in the America/Toronto time zone (UTC-5) and I'm not very good at English (I speak French). My English is functional, but noting more.

veista commented 2 years ago

That is no problem. I live in Finland so (UTC+2). I noticed that problem too from your picture. I maybe fixed this. Also I noticed that you are missing Meat Probe temperature sensor. You can try the latest update if it fixed the issue. image

sisimomo commented 2 years ago

That totally normal, my oven dosen't have this features. The model over it prbably have it but wasn't worth it!

sisimomo commented 2 years ago

Here is a list of all requests about the oven integration:

# Description Completed %
1 See the states of each cooktop burners individually instead of a single entity representing the entire cooktop. Something like this:
100%
2 Add the ability to remotely start the oven. If the "Smart Control" button is active, the oven should start directly without physically switching to the oven. If it is not, the order will be sent to the oven, but you will have to go to the oven and click on the "Start" button to start the oven:

After a bit of research, I discovered that unfortunately the "Smart Control" button is not persistent, as explained here:

When the door is open, Smart Control is disabled.
Smart Control is disabled when cooking is completed.

Basically, it's not a set and forget thing. Has to be pressed after every time you're finished using the oven. And if someone uses it in between then of course they'd have to press it as well.
0%
3 Add an entity representing the state of the "Smart Control" button. The state will determine whether the user will to click on the button "Start" after sending the command to the oven to really start the oven.
100%
4 Another thing, it would be more convenient for the oven light to be a Boolean and not a dropdown.
Go see this comment and this comment to understand why this feature will not be implemented.
100%
5 Add the ability to remotely activate/deactivate the Kids lock. For a family with children, an automation on this button would be extremely relevant. (Not Possible) 100%
6 Add the ability to activate/deactivate the sound of the oven when it finishes preheating and when the timer ends. (It is possible to do it through the application). Something like this:
100%
7 Fix the following bug:
The oven temperature is not translated into the unit of measurement used by Home Assistant (Configurable under "Configuration" -> "General" -> "Unit System"). In my case I use Celsius degrees, Home Assistant tells me that the oven is at 79°C but it should display 26°C. I think it comes from the fact that the unit of measurement of SmartThings is not taken into consideration when the value put in the Home Assistant sensor. In my example, the unit of measurement in SmartThings is Fahrenheit while in Home Assistant the temperature is displayed in Celsius.
After a bit of research, I noticed that the oven thermometer can only read a temperature above 175°F.

For your information, this problem is also present in pysmartthings.
100%
8 Add an entity representing the if any cooktop burner are still hot. I'm not sure if it will be possible since this sensor is not visible in the application. (Not Possible)
100%
9 The names/ids of the following entities must be fix; Oven Oven Completion Time, Oven Oven Door State, Oven Oven Job State, Oven Oven Machine State, Oven Oven Mode, Oven Oven Operation Time, Oven Oven Progress, Oven Oven Set Point

All entity names/ids have been renamed except for "Oven Oven Mode".
90%
10 The entity named "Oven Set Point" should have unit of measurement Fahrenheit or Celsius depending of SmartThings unit. 0%
11 The entity named "Oven Operation Time" should always show value in this format "00:00:00". Sometimes it is written in the second example "1800" instead of "00:30:00". 0%
12 The entity named "Remote Control Enabled" should be a binary sensors. It should also be named "Remote Control". 50%

PS I'll try to keep this feature request list updated to keep everything in one place.

veista commented 2 years ago

Your list looks great. Did you test if request 7 got fixed?

veista commented 2 years ago

That totally normal, my oven dosen't have this features. The model over it prbably have it but wasn't worth it!

Ok. Then this is a bug in the ST API implementation for your model.

sisimomo commented 2 years ago

Your list looks great. Did you test if request 7 got fixed?

I still have the issue. Here a screenshot.

And for request 3, I have the impression it will be possible. In the Json response of the request "https://api.smartthings.com/v1/devices/9c14cb83-7d88-93a0-4a60-5d1ab490f2bb/status", we can find this key/value combination:

"remoteControlStatus": {
    "remoteControlEnabled": {
        "value": "false",
            "timestamp": "2022-01-14T01:08:52.902Z"
        }
}
veista commented 2 years ago

Are you sure you have your unit system in metric now? In config.yaml check that unit_system: metric and you did not modify this unit in customize.yaml. I can not replicate this issue.

veista commented 2 years ago

Is feature 5 available in the st mobile application?

veista commented 2 years ago

Warming center is not a binary value sensor.

veista commented 2 years ago

I will change problem 10 and 11 into OCF since eiher this information is not available in ST or is hindered by a bug in pysmartthings.

Xitro01 commented 2 years ago

I own a Samsung Dual Cook oven, so following this thread. Could test some stuff if desirable as well.

veista commented 2 years ago

I own a Samsung Dual Cook oven, so following this thread. Could test some stuff if desirable as well.

Hi, Thanks for your offer and interest in the project! At the moment I am a bit busy with other projects, but I am working on a more convenient way of handling OCF devices. This update would render adding device specific bugs and model specific attributes obsolete. This would make the library more versatile and robust, so if you could wait for this update before we start adding device specific attributes to the library. I promise to release this update during this year.

sisimomo commented 2 years ago

Hi,

I know this is an old discussion. But I would just like to report an error message that I get on 2 independent instances. Platform smartthings does not generate unique IDs. ID 9c14cb83-7d88-93a0-4a60-5d1ab490f2bb.temperature already exists - ignoring sensor.oven_temperature_measurement

Would it be possible to fix the error when you get some time please :)?