Fryer / oven through OH in Alexa

Hey guys!

I got a Xiaomi Air Fryer that - via the Xiaomi skill - supports Alexa.
Is there any way to get a similar functionality with the OH skill as well? I’m looking in particular for a way to get the remaining cooking time through Alexa.

However, Alexa doesn’t even discover anything using this code:

Group gAirFryer "Fritteuse" <status> {alexa="Oven"}


How is this represented in OH? Could you share the relevant item definition?

This is expected. A group endpoint with no functionalities will not be discovered (except for devices configured with networking capabilities). You need to add item members to that group and model them as the functionalities they each represent.

For example, if you want to have power control:

Group gAirFryer "Fritteuse" <status> {alexa="Oven"}
Switch AirFryerPower "Power" (gAirFryer) {alexa="PowerState"}

If you only need power control on that device, modeling as a single endpoint is sufficient. (The default device attribute for Oven device is PowerState)

Switch gAirFryer "Fritteuse" {alexa="Oven"}

Thanks for clarifying - I actually thought Alexa would get the according attributes that can be used from the child items automatically.
So if I’d add the appropriate capabilities to the items it might work, right?

Current item definition is like this (no attributes added yet):

Group gAirFryer "Fritteuse" <status> {alexa="Oven"}
String gAirFryer_actions "Actions" (gAirFryer) {channel="miio:generic:airfryer:actions"}
Number gAirFryer_status "Air Fryer - Status" (gAirFryer) {channel="miio:generic:airfryer:status"}
Number gAirFryer_fault "Air Fryer - Device Fault" (gAirFryer) {channel="miio:generic:airfryer:fault"}
Number:Time gAirFryer_target_time "Air Fryer - Target Time" (gAirFryer) {channel="miio:generic:airfryer:target_time"}
Number:Temperature gAirFryer_target_temperature "Air Fryer - Target Temperature" (gAirFryer) {channel="miio:generic:airfryer:target_temperature"}
Number:Time gAirFryer_left_time "Air Fryer - Left Time" (gAirFryer) {channel="miio:generic:airfryer:left_time"}
String gAirFryer_recipe_id "Custom - Recipe Id" (gAirFryer) {channel="miio:generic:airfryer:recipe_id"}
Number:Time gAirFryer_work_time "Custom - Work Time" (gAirFryer) {channel="miio:generic:airfryer:work_time"}
Number:Temperature gAirFryer_work_temp "Custom - Work Temp" (gAirFryer) {channel="miio:generic:airfryer:work_temp"}
Number:Time gAirFryer_appoint_time "Custom - Appoint Time" (gAirFryer) {channel="miio:generic:airfryer:appoint_time"}
Number gAirFryer_food_quantity "Custom - Food Quantity" (gAirFryer) {channel="miio:generic:airfryer:food_quantity"}
Number gAirFryer_preheat_switch "Custom - Preheat Switch" (gAirFryer) {channel="miio:generic:airfryer:preheat_switch"}
Number:Time gAirFryer_appoint_time_left "Custom - Appoint Time Left" (gAirFryer) {channel="miio:generic:airfryer:appoint_time_left"}
Number gAirFryer_turn_pot "Custom - Turn Pot" (gAirFryer) {channel="miio:generic:airfryer:turn_pot"}

Correct but it depends on the capabilities supported by the Alexa API and if they were ported to the skill.

A good portion of the capabilities for the device you are trying would fall under the cooking capabilities umbrella which still need to be implemented at the skill level.

So currently, you can only configure very basic capabilities such as PowerState on these devices and could setup some customized generic capabilities. Although, you won’t be able to easily configure the remaining cooking time since no attributes are supporting Number:Time items at the moment at the skill level.

Out of curiosity, what’s the difference between target_time, left_time, work_time, appoint_time and appoint_time_left channels? That certainly a lot of different timers.

Thanks! So if it’s a) not implemented in the skill yet and b) currently only available in EN via Amazon, it’s no use pursuing it at the moment I guess.

I just got the machine a couple of days ago, haven’t even used it yet :smiley: I just wanted to see whats possible in OH with it and added all the items to see if it works in the first place :wink:
So target_time is the total time that it’s supposed to be running, left_time obviously the remaining time. Not sure about the other ones - both appoint_time give me the currently passed minutes, work_time stays at NULL. :man_shrugging:

One thing we could do is extend RangeValue to support Number:Time. That way you could get the actual number (without a unit) back at least.

Once implemented and released, you would be able to configure your item as:

Group gAirFryer "Air Fryer" <status> {alexa="Oven"}
Number:Time gAirFryer_left_time "Air Fryer - Left Time" (gAirFryer) {alexa="RangeValue" [capabilityNames="Time Left", nonControllable=true], channel="miio:generic:airfryer:left_time"}

Alexa, what’s the time left on air fryer?
=> Air fryer time left is <number>

Sounds great! Is there an ETA on the next release cycle?

No ETA but you can watch the project on GitHub and get notified when new releases are published.

@mancer The change for this one has been released. Keep in mind that if you are using the GUI, the existing Main UI integration will not reflect this change which should shortly be available in the 3.3 snapshot. In the meantime, you will have to configure it via the code tab.

Thanks for letting me know! Just tried it out and it works as intended.
Now the only thing missing would be a German translation for the cooking API :smiley: Do you know if there’s a roadmap on such things as translations on Amazon side?

1 Like

From experience, Amazon isn’t very big in advertising roadmaps unfortunately. They even have features that were advertised as coming soon that are more than 2 years old. It seems that they are shifting their focus lately on adding their own smart home devices.