New Gree Air Conditioner Binding

Did you tried the new build? and using the simplified approach for GA integration?

Depending on what do you mean new build. My one is from 29th 21:00. I use latest GA features. Pls check my pervious posts and you see my GA settings. I do not know what do you mean under simplified approach.

sorry, forgot to mention that there is a new one implementing the above mention features
(mode channel accepting strong, hungarian translations as provided by you)

@Piotras this build also includes your changes

@kovacsi2899 @Piotras @vespaman @Mihai_Badea
Did you had a chance to test the latest build? Then I could submit the final changes to the PR and push forward with it. I think there is a chance to get that in 2.5.5 if we are done this weekend.

It works. My device was discovered and added. Item descripton is in Hungarian, probably because this is my default language. Hungarian characters are strange but I think this is my OH set up problem. I have same problem with Hungarian text anyhow with OH. What is strange that there are places where it correct and PAPER UI has this problem.

Also I received information, that all modes of GA are avaiable. It means I can finish my set up and all Aircon modes can be used through OH: openHAB Google Assistant Integration v2.0. I will work on that next week.

that’s good new so @Piotras changes have no negative impact on the original GREEs

I think we are facing a problem with the character set, I did a simple copy&paste. Do you have a Windows system? (I‘m on macOS…)

Did you tried the String/textual mode commands? If those work I‘ll change the channel‘s Item-Type to String?

What do you mean under textual mode commands? Does Mode channel will accept text? It would be better as GA integration will be one step less. What about languages? Will itt accept all language or just the actual one? I use GA in English and it provides english strings: https://developers.google.com/assistant/smarthome/traits/temperaturesetting.html

I can’t change modes, just on and off works. I just tried it. After last update I did not erase tmp and catch folders.

I won’t expect that you get language specific tags. This would mean that the device has to support all different languages. I expect that voice recognition is handled separately and then Google generates the command to the device with defined keywords (as documented).

I’ll pull out the Hungarian translation until we figured out the character problem. This can go to another PR.

I moved the file here: https://github.com/markus7017/myfiles/blob/master/gree/gree_hu.properties
I think the character encoding is corrupted

No it doesn’t work.
events.log:

2020-05-02 20:06:35.683 [ome.event.ItemCommandEvent] - Item 'GreeMode' received command fan-only
2020-05-02 20:06:35.685 [nt.ItemStatePredictedEvent] - GreeMode predicted to become fan-only
2020-05-02 20:06:35.685 [vent.ItemStateChangedEvent] - GreeMode changed from off to fan-only

gree.log:

```csv
2020-05-02 20:05:43.961 [TRACE] [ree.internal.discovery.GreeAirDevice] - Response from device: {"t":"dat","mac":"2059a0b49c2f","r":200,"cols":["Pow","Mod","SetTem","WdSpd","Air","Blo","Health","SwhSlp","Lig","SwingLfRig","SwUpDn","Quiet","Tur","StHt","TemUn","HeatCoolType","TemRec","SvSt","NoiseSet"],"dat":[0,2,22,1,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0]}

2020-05-02 20:06:43.963 [DEBUG] [ng.gree.internal.handler.GreeHandler] - Executing automatic update of values

2020-05-02 20:06:43.963 [DEBUG] [ng.gree.internal.handler.GreeHandler] - Fetching status values from device.

2020-05-02 20:06:43.980 [TRACE] [ree.internal.discovery.GreeAirDevice] - Response from device: {"t":"dat","mac":"2059a0b49c2f","r":200,"cols":["Pow","Mod","SetTem","WdSpd","Air","Blo","Health","SwhSlp","Lig","SwingLfRig","SwUpDn","Quiet","Tur","StHt","TemUn","HeatCoolType","TemRec","SvSt","NoiseSet"],"dat":[0,2,22,1,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0]}

2020-05-02 20:07:43.981 [DEBUG] [ng.gree.internal.handler.GreeHandler] - Executing automatic update of values

2020-05-02 20:07:43.981 [DEBUG] [ng.gree.internal.handler.GreeHandler] - Fetching status values from device.

2020-05-02 20:07:44.003 [TRACE] [ree.internal.discovery.GreeAirDevice] - Response from device: {"t":"dat","mac":"2059a0b49c2f","r":200,"cols":["Pow","Mod","SetTem","WdSpd","Air","Blo","Health","SwhSlp","Lig","SwingLfRig","SwUpDn","Quiet","Tur","StHt","TemUn","HeatCoolType","TemRec","SvSt","NoiseSet"],"dat":[0,2,22,1,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0]}

2020-05-02 20:08:44.540 [DEBUG] [ng.gree.internal.handler.GreeHandler] - Executing automatic update of values

2020-05-02 20:08:44.540 [DEBUG] [ng.gree.internal.handler.GreeHandler] - Fetching status values from device.

2020-05-02 20:08:44.558 [TRACE] [ree.internal.discovery.GreeAirDevice] - Response from device: {"t":"dat","mac":"2059a0b49c2f","r"

nothing in that time.
Item and sitemap:

Selection label="Mód [%s]" item=GreeMode mappings=["auto"="Auto", "cool"="Cool", "dry"="Dry", "fan-only"="Fan", "heat"="Heat", "on"="On", "off"="Off"] icon=fan_box
String   GreeMode            "Gree mode"             (Gree_Modechannel)  {channel="gree:airconditioner:2059a0b49c2f:mode" }
your code goes here

So I tried to clear the catch and tmp folders. Then I tried to stitch between modes with strings. Same it does not work. Then I reverted back mode channel to numbers but same, it does not work either, so somthing is wrong with your last update. Back to language topic. You can put it into the PR, nothing to do with the binding. This is my OH setup problem. Probably the font is wrong in the browser and I have to change it somehow.

Hello, I have corrected the file. Pls check. I received following message in Github: We’ve detected the file encoding as ISO-8859-1 . When you commit changes we will transcode it to UTF-8 .
This can be the source of the problem. I think if it converted my typo to UTF-8 and it seems to be good, it might work. If not, then I checked UTF-8 and it contains the Hungarian letters. Then I will check the exact codes of letter ű, ő. These two letters are the trouble makers only.

ű LATIN SMALL LETTER U WITH DOUBLE ACUTE (U+0171) c5b1
ő LATIN SMALL LETTER O WITH DOUBLE ACUTE (U+0151) c591

you are right, sorry I had a wrong bracket, please try again, sending mode as String or Number

Great Job @markus7017

I have one more suggest. The binding connect only to Air Conditioner in the same ip subnet where OH is located, because it uses broadcast to discover device. I use two other ip subnet so typical in my situation it won’t work, but I use My AC ip address as broadcast and it works.

Can you change discover proces ? If you know AC ip address, it should connect direct to device. If we don’t know, we can use broadcast to discover device.

Unfortunately, I am not able to test your work yet, because I use OH version 2.4. I have to make migrations, but the previous ones were not very successful (problem with some binding)

Here are my mappings:

String:
item=GreeMode mappings=[“auto”=“Auto”, “cool”=“Cool”, “dry”=“Dry”, “fan-only”=“Fan”, “heat”=“Heat”, “on”=“On”, “off”=“Off”]

Number:
item=GreeMode mappings=[0=“Auto”, 1=“Cool”, 2=“Dry”, 3=“Fan”, 4=“Heat”, 5=“On”, 6=“Off”]

String still does not work. Numbers are working now. Changing mode to 5 (on) turns on. Mode 6 (off) does not work. Or I was impatient I do not now. I should wait a little bit for on as well. It was not as fas as using the Power channel. Pls check my charset commits, I think we can find the solution.

please provide the log

interesting, there is no special handling on numbers, so 5+6 go directly to the A/C. I’m not sure if 5 is really ON. Could you play with 7,8,9 - maybe we find OFF.

where did you make the changes? (which repo)? I don’t see a PR

If you have a A/C on a different subnet just add the Thing manually. I changed the code already that there is no discovery if IP address is specified. Discovery only takes place when discovering a thing from the Inbox, so longer on Thing initialization.

Did you tried it? I see no reason why the binding does not run von 2.4. It’s not supported, but usually most bindings still run on 2.4 unless they use special 2.5 features. The code I ported came from 2.3 so there is a good chance.

As info I use 2.5.5 #104. I’ll do trials you requested late afternoon.