copy the Jar file (above) to the ‘addons’ folder of your Openhab installation (usually /opt/openhab/addons).
Copying the jar file to the addons folder will automatically instal it in Openhab
Next in Openhab, open PaperUI and go to the Inbox
Press the ‘+’ at the top of the screen to add a new Thing
‘Gree Air Binding’ should now be listed in the available Bindings to be added
Select ‘Gree Air Binding’
Keep pressing the right arrow until you see a screen titled “Configure Gree AirConditioner”
Enter the IP Address of your Gree Airconditioner in the “Network Address” field.
NOTE: Your airconditioner must have a static IP address.
Finally press the Tick button at the top of the screen.
Hi Hector,
What model of air conditioner do you have?
Also, can you install the „wifi smart” smart phone app from Gree and see if that can connect to you air-conditioner?
It kight be possible that your air-conditioner is „locked”. Check the documentatuon of your airconditioner..
My Openhab binding uses exactly tye same protocol and commands as the original Gree app…
Thanks,
John
My air conditioner is a AIRMAX brand but it use the “WifiSmart App” or the “Gree Smart App” I assign an IP via the Router. I will try the disable and reenable the binding when I get home I will update the status. I’m currentle using the 2 apps
WifiSmart with account for cloud and local access
GreeSmart for local access
–
I will try to find how to check is the device is not lock and try to unlock it
Hi Hector,
When thia binding initializes a connection to the airconditioner, it interrogates the device and checks that the manufacturer=„gree”.
Tonight I will add some debug info to the binding and we can try to see what your device returns.
John
Hi Hector,
Looking at the logs, your Airconditioner is not replying to the interrogation packet sent to it by the binding.
(it is not replying at all so the binding doesnt get to the part where it checks if it’s a ‘Gree’).
_Step 1: Tap and hold “a0b417ac” to enter the page “Edit device”. Tap “Image” to _
_select the source of image. Select from “Default images” or “Take photo” or “Choose _
_from photos” and save an image. _
_Step 2: Tap “Name” to change device name, Save it and the new device name will _ be shown. enable button ‘Lock device’ to lock the device other smart phone can’t search the device now
Can you follow the steps above using the Gree Wifi Smart App and make sure that the ‘Lock Device’ option is NOT set?
Just as I finished writing the mail above, I suddenly realised what is the problem…
(I still think it’s worth to make sure that your airconditioner is nore locked to your phone).
If it is not, then I think I know what the problem is…
Looking at your logs… your device has an IP address of 192.168.10.54
My binding expects the network address to be 192.168.1.XX and is therefore broadcasting to 192.168.1.255
Since your device is on 192.168.10.XX it does not get the broadcast…
In your case the broadcast address should be 192.168.10.255
I need to make some changes to the Binding to calculate the broadcast address based on the IP you set in the configuration of the Thing…
Please be patient while I make some changes…
NOTE: We will still need to examine the results of the response of your device once we get passed this problem…
I’ve updated the binding to handle a configurable Broadcast address.
The address is now part of the attributes of the Thing and has a default value of 255.255.255.255 which might work for you.
If my default Broadcast address doesnt work for you, please calculate the correct address using this:
Please download the latest version and try again… from HERE
Again, your airconditioner might reply with a different manufacturer but we wil get to that problem if it comes up.
How I can create a update button on the site mat to get the current status of the air for example the air is on On state but on openhab is no update yet it only update is I turn it off then on
I will like to create a "Get Current status or Refresh Status button on the sitemap to get the current values of the item without changing the status
2018-01-30 22:23:08.282 [DEBUG] [nding.greeair.handler.GreeAirHandler] - GreeAirconHandler config for greeair:greeairthing:b2d08bb1 is GreeAirconConfig{ipAddress=192.168.10.54}
2018-01-30 22:23:08.288 [TRACE] [nding.greeair.handler.GreeAirHandler] - Greeair Binding Sending scan packet to /255.255.255.255
2018-01-30 22:23:08.364 [TRACE] [nding.greeair.handler.GreeAirHandler] - Greeair Binding Response received from address /192.168.10.54
2018-01-30 22:23:08.367 [TRACE] [nding.greeair.handler.GreeAirHandler] - Greeair Binding Response : {“t”:“dev”,“cid”:“f4911e09ce0b”,“bc”:“gree”,“brand”:“gree”,“catalog”:“gree”,“mac”:“f4911e09ce0b”,“mid”:“10001”,“model”:“gree”,“name”:“Master Room”,“series”:“gree”,“vender”:“1”,“ver”:“V1.1.13”,“lock”:0}
2018-01-30 22:23:13.288 [WARN ] [ome.core.thing.internal.ThingManager] - Initializing handler for thing ‘greeair:greeairthing:b2d08bb1’ takes more than 5000ms.
2018-01-30 22:23:13.377 [DEBUG] [nding.greeair.handler.GreeAirHandler] - GreeAircon found 1 Gree Devices during scanning
2018-01-30 22:23:13.584 [INFO ] [nding.greeair.handler.GreeAirHandler] - Gree AirConditioner Device greeair:greeairthing:b2d08bb1 from was Succesfully bound
==> /var/log/openhab2/events.log <==
2018-01-30 22:23:13.599 [hingStatusInfoChangedEvent] - ‘greeair:greeairthing:b2d08bb1’ changed from INITIALIZING to ONLINE
==> /var/log/openhab2/openhab.log <==
2018-01-30 22:23:13.602 [DEBUG] [nding.greeair.handler.GreeAirHandler] - Start Greeair automatic refresh with 1 second intervals
2018-01-30 22:23:13.611 [DEBUG] [nding.greeair.handler.GreeAirHandler] - Greeair executing automatic update of values
The binding checks the status of the airconditioner every second and updates the status of any items. So you should not need to do it yourself.
So just for me to understand…
Now the device is online and you can created items etc?
Can you turn the device on and off using the openhab item?
The problem now is that item statuses are not in sync with the device?
Have you checked the event.log to see if statuses are changing or if there are any errors?
The refresh interval is configured in the Thing configuration in Openhab.
This refresh interval is how often Openhab queries the air conditioner for it’s current status.
Can you check your value?
In PaperUI: Configuration->Things->->Press the pencil button at the top->
Look at the value in the “Refresh time interval” field.
Mine is set to value 1 which means Openhab will query the airconditioner every second.
If that is not the problem, I will add some trace info to the log to show the status being returned from the airconditioner.