New Gree Air Conditioner Binding

I my setup (just added a GREE Thing manually) I works as expected:

23:58:01.535 [ndlerExecutor-1] INFO  smarthome.event.ItemCommandEvent:53 - Item 'gree_airconditioner_89893c25_swingUpDown' received command 3
23:58:01.536 [ndlerExecutor-1] INFO  smarthome.event.ItemStatePredictedEvent:53 - gree_airconditioner_89893c25_swingUpDown predicted to become NULL
23:58:22.292 [ndlerExecutor-1] INFO  smarthome.event.ItemCommandEvent:53 - Item 'gree_airconditioner_89893c25_swingLeftRight' received command 3
23:58:22.293 [ndlerExecutor-1] INFO  smarthome.event.ItemStatePredictedEvent:53 - gree_airconditioner_89893c25_swingLeftRight predicted to become NULL
23:58:48.115 [ndlerExecutor-1] INFO  smarthome.event.ItemCommandEvent:53 - Item 'gree_airconditioner_89893c25_mode' received command eco
23:58:48.115 [ndlerExecutor-1] INFO  smarthome.event.ItemStatePredictedEvent:53 - gree_airconditioner_89893c25_mode predicted to become NULL

MidLeft etc. als Options, which will be mapped to Numbers. I selected MidUp from swingUpDown selection list, which gets converted to 3

	<channel-type id="swingUpDown">
		<item-type>Number</item-type>
		<label>Swing Up/Down</label>
		<description>Sets the vertical swing action on the Air Conditioner: OFF: 0, Full Swing: 1, Up: 2, MidUp: 3, Mid: 4, Mid Down: 5, Down: 6</description>
		<state>
			<options>
				<option value="0">OFF</option>
				<option value="1">Full</option>
				<option value="2">Up</option>
				<option value="3">MidUp</option>
				<option value="4">Mid</option>
				<option value="5">MidDown</option>
				<option value="6">Down</option>
			</options>
		</state>
	</channel-type>

Same with swingLeftRight. I selected MidLeft, which gets converted to 3.

and I selected mode=Echo, which will be mapped to “eco”. So far it looks good for me

Keep in mind: The verticalXXX channel was renamed to swingUpDown, swingLeftRight and quiet are new channels (my quiet is NAN, because I have no unit so it doesn’t get filled)
.

It seems that I had some cached data
 after cache cleaning, it started working properly. Thanks for help !!

I remaped all channels. As Swing channels were renamed and I used the old one caused the problem that Angle change was not working. Now I configured both new channels and tried. Both are operational and device gives a beep that receive the order. I deactivated SwingLeftRight as it does nothing on my device. GreeSwingUpDown works as it was before the change. So all channels are up & running. I have also tried auto discovery and it works as well. I use VisualStudio to manage my channels/items. Auto Create Items from Channels worked what means that auto item creation has to work in PaperUI as well I guess. If you need some log pls let me know. I turned on Trace logging of Gree binding and I can send if you need.

Thanks for the feedback, good jon😀
Did you tried temp changes? There were a lot of mini changes (data types) requested by the review. There is a bunch of outstanding ones, then I hope the review is done and we get jnto 2.5.6😎

I tried everything yesterday. All was working except fan angle due to new channels. Now all are working. Anyway I use 2.5.6 snapshot.

@markus7017 Unfortunately, I can’t test the new version. I’m using OH 2.4 and new version bundle doesn’t work.

2020-06-02 14:31:59.219 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.gree-2.5.5-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.gree [236]
Unresolved requirement: Import-Package: com.google.gson; version=“[2.8.0,3.0.0)”

I’ve already had several approaches to upgrade my OH to 2.5 but each ended in instability and a problem with various bundles. I will probably try the latest version OH soon and then check your bundle.

you just need to copy gson285.jar to the addons folder
try

bundle:install http://central.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar 

from within the OH console or download the file and copy it to the addons folder.

@Piotras did you tried this approach

Guys, again I need your help to do final testing

  • all view change requests are done
  • I fixed various issues in the language resources (incl. code page, turbo/dry mixup, missing translations due to typos in the properties file)
  • Channel quiet was changed to strong values: off/auto/quit, it should also accept 0-2 as NumberType

However, the discovery feature is now broken, I implemented a requested change, but as a result GREE doesn’t show up in PaperUI:Inbox:Scan. I’m waiting on feedback from the reviewer.
Nevertheless you could help moving forward

  • delete your thing
  • re-add it manually just specifying the IP address
  • check for proper language resources
  • check that all functions are working
  • try out the new quiet channel commands

That would help to speed up the process while I’m waiting on the feedback with regards to auto discovery (I assume it’s a little change).

Everything works except:
2020-06-07 17:10:39.959 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/GreeQuiet’ with an invalid status value ‘ON’.

2020-06-07 17:10:45.485 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/GreeQuiet’ with an invalid status value ‘OFF’.

I think I need to change the item. What are the suitable statuses?
I need to check language settings if you want, just let me know how.

quiet is now a String : off/auto/quiet are the values

it seems working:
2020-06-07 20:37:04.608 [ome.event.ItemCommandEvent] - Item ‘GreeQuiet’ received command auto

2020-06-07 20:37:04.609 [nt.ItemStatePredictedEvent] - GreeQuiet predicted to become auto

2020-06-07 20:37:04.609 [vent.ItemStateChangedEvent] - GreeQuiet changed from off to auto

2020-06-07 20:37:05.710 [ome.event.ItemCommandEvent] - Item ‘GreePowersave’ received command ON

2020-06-07 20:37:05.710 [nt.ItemStatePredictedEvent] - GreePowersave predicted to become ON

2020-06-07 20:37:05.712 [vent.ItemStateChangedEvent] - GreePowersave changed from OFF to ON
but not on my machine
So I think it should work on a device where this option is avaiable.

ok, I didn’t got feedback, but fixed the discovery problem :slight_smile:

Please verify the latest build from my side we are done.

@orzechszek please verify the quiet function/chanel, I fixed the Item-Type (now String; off/auto/quiet )

Please use this link and make sure you are removing 2.5.5-SNAPSHOT before adding 2.5.6-SNAPSHOT to the addons folder
https://github.com/markus7017/myfiles/blob/master/gree/org.openhab.binding.gree-2.5.6-SNAPSHOT.jar?raw=true

Quiet mode is working fine but as number type.

Active │ 80 │ 2.5.6.202006072144 │ openHAB Add-ons :: Bundles :: Gree Binding

image

did Ou removed and re-added the thing
did you used the latest build, this was the last fix I made and you have to change your item type to String (the binding still accepts nunber)

Hi,
I did a test for v. 2.5.6
Autodiscovery works fine.
I tried to add my AC twice: manually and via discovery and always Quiet mode is recognized as Number not String.
One question regarding Wind speed - which commands need to be send?

2020-06-08 09:59:28.247 [ome.event.ItemCommandEvent] - Item 'gree_airconditioner_f4911ec4bc25_windspeed' received command 1
2020-06-08 09:59:28.251 [nt.ItemStatePredictedEvent] - gree_airconditioner_f4911ec4bc25_windspeed predicted to become 1
2020-06-08 09:59:28.255 [WARN ] [ng.gree.internal.handler.GreeHandler] - Invalid command value 1 for channel windspeed
2020-06-08 09:59:28.259 [vent.ItemStateChangedEvent] - gree_airconditioner_f4911ec4bc25_windspeed changed from 1.0 to 1

@markus7017
I installed and it works well. I have only one problem. There are duplicates in the list of operating modes

Something like this appeared in my logs:

2020-06-08 10:19:05.964 [vent.ItemStateChangedEvent] - gree_airconditioner_f4911ec4bc25_windspeed changed from 1.0 to 1970-01-01T00:00:03.000+0000

java.lang.RuntimeException: {"error":"partial write: field type conflict: input field \"value\" on measurement \"gree_airconditioner_f4911ec4bc25_windspeed\" is type float, already exists as type string dropped=1"}

Openhab restart didn’t help

Above issue was related to influxdb where windspeed measurement was previously created as String. After dropping a measurement, there is not such error any more, but seems that my AC doesn’t react on Wind speed changes :frowning:

Settings:
things file:
Thing gree:airconditioner:1ec4bc25 "Gree AC" [ ipAddress="192.168.100.120", broadcastAddress="192.168.100.255", refresh=10 ]

items file:
Number gree_airconditioner_f4911ec4bc25_windspeed "Wind speed" (ACGree) {channel="gree:airconditioner:1ec4bc25:windspeed"}

sitemap file:
Switch item=gree_airconditioner_f4911ec4bc25_windspeed label="Fan Speed" mappings=[0="Auto", 1="Low", 2="Medium Low", 3="Medium", 4="Medium High", 5="High"] icon=fan

logs:
2020-06-08 12:32:13.104 [ome.event.ItemCommandEvent] - Item ‘gree_airconditioner_f4911ec4bc25_windspeed’ received command 1
2020-06-08 12:32:13.109 [nt.ItemStatePredictedEvent] - gree_airconditioner_f4911ec4bc25_windspeed predicted to become 1
2020-06-08 12:32:13.112 [vent.ItemStateChangedEvent] - gree_airconditioner_f4911ec4bc25_windspeed changed from 0 to 1
2020-06-08 12:32:19.373 [ome.event.ItemCommandEvent] - Item ‘gree_airconditioner_f4911ec4bc25_windspeed’ received command 2
2020-06-08 12:32:19.378 [nt.ItemStatePredictedEvent] - gree_airconditioner_f4911ec4bc25_windspeed predicted to become 2
2020-06-08 12:32:19.384 [vent.ItemStateChangedEvent] - gree_airconditioner_f4911ec4bc25_windspeed changed from 1 to 2

please make sure to have installed the latest build. I changed that around mid night, maybe you have the version from 9pm

I think I have the latest:

Active x 80 x 2.5.6.202006072206 x org.openhab.binding.gree

I’ve downloaded it today morning