New Gree Air Conditioner Binding

Sorry for the late reply, i was kinda busy.

It worked, and as a newbie, this whole story is a kind of mess, i didn’t even use this binding, i was using the “default/official” one, because i haven’t find markus’s work. The others outdated.
Thanks for the reply, and for this awesome binding.

Ohh somehow Fan Speed doesn’t work. As i assume i should ask for numbers from the assistant right?

No. Binding uses internally the numbers. I will try my one. I was uing it last summer and usually fan speed was auto and we did not change it.

I see. Just take your time :smiley:
I also would like to create some short of power off timer with OpenHab, but i can’t really find any relevant topic. So like when i say “Turn off AC in 30 minutes” it’ll trigger some type of item that triggers a rule, that’s my imagination. Would that be a difficult task?

Well… All of the sudden it just started acting weird. When i try to control the AC from Google Home/Voice, the events.log contains all of them that they were successful, but nothing happens with the AC:

2021-05-31 17:34:29.325 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'GreeMode_GA' received command off
2021-05-31 17:34:29.325 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GreeMode_GA' changed from heat to off

or

2021-05-31 17:37:16.723 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'GreeMode_GA' received command cool
2021-05-31 17:37:16.725 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GreeMode_GA' changed from off to cool

I’ve reinstalled the whole OpenHAB, with new UUID, etc.

GreeMode_GA is a group item. When it receives order from google must trigger your local orders. I have forgotten to share one thing sorry. There is a rule behind:

rule "Translate Mode from GA 2"
    when
         Item GreeMode_GA changed
    then        
        if(GreePower.state == OFF) {
            sendCommand(GreePower,ON)
        }
        if(GreeMode_GA.state == "auto" ) {
          sendCommand(GreeMode,0) 
         }
        if(GreeMode_GA.state == "cool" ) {
            sendCommand(GreeMode,1)
         }
         if(GreeMode_GA.state == "dry" ) {
            sendCommand(GreeMode,2) 
         }
         if(GreeMode_GA.state == "fan-only" ) {
            sendCommand(GreeMode,3) 
         }
        if(GreeMode_GA.state == "heat" ) {
            sendCommand(GreeMode,4)
         }
        if(GreeMode_GA.state == "off" ) {
            sendCommand(GreePower,OFF)
         }
end

Here it comes the numbers to the text what was your previous question.

No it wouldn’t. It is more google topic but you can make a workaround. If you create a virtual switch item, link to google and it triggers your rule what turn ac down delayed your’re done.

Hi @kovacsi2899 If you wrap-up the complete topic I could include it in the README (I think some stuff is in, but not in a all-consistent section)

Ok. I try to put it together over the weekend in a generic way.

Thanks, but i guess the rule isn’t necessary, at least from my experience. Something might be changed since you did this setup.
There was some type of communication error with my AC, i reset the WiFi, and reconnected.

It isn’t really important, but i still didn’t manage to get it working for the fan speed. Could you look at it?

Yes I’m going to look at it. Google connection still under developing. When I created this rule this change was at the beginning about 2020 spring as I remember. When Google had introduced thermostat and HVAC traits. Mode channel was handelable only this tricky way this time. It still works for me, but I will check it over the weekend. If mode channel works, fan speed should work as well as I remember that it was working for me. Now nothing works at me with voice (AC on/off and modes are working from Google app, but fan speed was working only with voice) but I have issue on Google side with naming. So let me fix it and I come back how it does work.

Alright. I don’t know whats going on, but in fact, the rule still necessary. I had to change this:

if(GreePower.state == OFF) {
    sendCommand(GreePower,ON)
}

and this:

if(GreeMode_GA.state == "off" ) {
    sendCommand(GreePower,OFF)
}

to this:

if(GreePower.state == OFF) {
    GreePower.sendCommand("ON")
}

and this

if(GreeMode_GA.state == "off" ) {
    GreePower.sendCommand("OFF")
}

Hali,

I have started to play with that. My rule modification was not necessary, but at the moment, on/off/cool modes are working with Google, so I need to work on that. It is connected the Google Assistant connection definately. Solution for fan speed change is to use fan speed trait what is not part of thermostat trait anymore. That’s why my solution stopped to work. Here is my solution:

Dimmer   GreeWindspeed       "Gree Fan speed"                            {channel="gree:airconditioner:210dfeb98f:windspeed", ga="Fan" [ speeds="0=auto:auto,1=Low:low,2=MediumLow:mediumlow,3=Medium:medium,4=MediumHigh:mediumhigh,5=High:high", lang="en", ordered=true, name="Fanspeed" ] }

At the moment auto/low/medium/high orders are working. The two middle is not, but reason is that google does not recognises words well I think. So if we play with the names in the trait we will have solution. Pls bare in mind that trick is fan speeed became dimmer channel. so here 0,1…,5 equals percentage to google but it is equivalent of the names in the binding. So target is that we need to get exact number from google to change fan speed. Verbal order change Fanspeed higher and lower works so if you have speed on high it will step one leve back to order “lower” what will be mmediumhigh anyway. But lets play and have a 100% solution.

“Increase/decrease the fan” steps one up/down works.

BR
Istvan

Increase/decrease the fan” gives me this response from Google Assistant: “Actually, Fanspeed doesn’t support that functionality.”, and doesn’t do anything.
Change fan speed to [number/string]” works, but only with a similar rule that you shared with GreeMode_GA:

rule "Translate FanSpeed from GA"
    when
         Item GreeWindspeed changed
    then        
        if(GreeWindspeed.state == 0 ) {
            AirConditioner_WindSpeed.sendCommand(0)
        }
        if(GreeWindspeed.state == 1 ) {
            AirConditioner_WindSpeed.sendCommand(1)
        }
        if(GreeWindspeed.state == 2 ) {
            AirConditioner_WindSpeed.sendCommand(2) 
        }
        if(GreeWindspeed.state == 3 ) {
            AirConditioner_WindSpeed.sendCommand(3) 
        }
        if(GreeWindspeed.state == 4 ) {
            AirConditioner_WindSpeed.sendCommand(4)
        }
        if(GreeWindspeed.state == 5 ) {
            AirConditioner_WindSpeed.sendCommand(5)
        }
end

So basically it’s working, that’s good enough for me, thanks again Sir :smiley:

Your welcome, but for fanspeed you do not need this rule.
For mode change and on/off you need it as Google changes your group item: Group Gree_Modechannel but binding mode item is String GreeMode therefore the link between Google group item and binding mode item is made by the rule. Here we have one Fanspeed item and Google can set it direct without rule. In a meantime I’m trying to change my items accoding to the new Google settings. It looks like now:

Group Gree_Modechannel "Airconditioner" { ga="Thermostat"  [modes="on=ON:on, off=OFF:off, heat=HEAT:heat, cool=COOL:cool, dry=DRY:dry, fan-only=FAN-ONLY:fan-only", name="Airconditioner", roomHint="Upstairs"] } // új Gree bindinggal
        Switch   GreePower           "Power"                                     {channel="gree:airconditioner:210dfeb98f:power" }
        String   GreeMode            "Airconditioner mode"   (Gree_Modechannel)  {channel="gree:airconditioner:210dfeb98f:mode", ga="thermostatMode" }
        Number   GreeTemperature     "Temperature [%.1f °C]" (Gree_Modechannel)  {channel="gree:airconditioner:210dfeb98f:temperature", ga="thermostatTemperatureSetpoint"}
        Dimmer   GreeWindspeed       "Gree Fan speed"                            {channel="gree:airconditioner:210dfeb98f:windspeed", ga="Fan" [ speeds="0=auto:auto,1=Low:low,2=MediumLow:mediumlow,3=Medium:medium,4=MediumHigh:mediumhigh,5=High:high", lang="en", ordered=true, name="Fanspeed", roomHint="Upstairs" ] }
        Switch   GreeAir             "Air mode"                                  {channel="gree:airconditioner:210dfeb98f:air"}
        Switch   GreeDry             "Turbo mode"                                {channel="gree:airconditioner:210dfeb98f:dry"}
        Switch   GreeTurbo           "Turbo"                                     {channel="gree:airconditioner:210dfeb98f:turbo"}
        Number   GreeSwingvertical   "Swing mode"                                {channel="gree:airconditioner:210dfeb98f:swingUpDown"}
        String   GreePowersave       "Power save"                                {channel="gree:airconditioner:210dfeb98f:powersave"}
        Switch   GreeLight           "Light"                                     {channel="gree:airconditioner:210dfeb98f:light"}
        Switch   GreeHealth          "Health mode"                               {channel="gree:airconditioner:210dfeb98f:health"}
        String   GreeQuiet           "Quiet mode"                                {channel="gree:airconditioner:210dfeb98f:quiet"}
        Number:Temperature GreeCurrentTemperature "Current temperature"          {channel="gree:airconditioner:210dfeb98f:currentTemperature"}

This is not the final one as it does not switch modes dry and fan-only with voice. All the rest is ok. Can you try and share your experience?

Thanks for keeping this binding alive! Please help me set up the SafeHeat option. I installed the “org.openhab.binding.gree-3.1.0-SNAPSHOT” but the SafeHeat option just won’t respond. It works fine from the official GREE app.
OH 3.0.2

Hi Guys,
This binding is very solid, and I really like it.

But… My AC is one of these portable ones, which I move/connect as needed. So most of the year, it is not powered, and therefore I get constant log items; (one every 12’th second, normally)

2021-07-02 08:08:32.329 [INFO ] [ng.gree.internal.handler.GreeHandler] - f4911e6fae19: Unable to connect to air conditioner

Is there a way to suppress these?

You can set the log level of the binding to OFF. See documentation: Logging

Or you can disable the Thing in openHAB, which prevents the binding from trying to connect to the device.

Thanks, two good solutions! I choosed the binding OFF method, so I don’t have to go into oh when I plug it the next time. Just hope I remember this, if I am chasing down a malfunction… :slight_smile: