New OH3 Binding - Midea Air Conditioning (LAN)

Hello Jacek,

it would be a great thing if you could maybe help with updating your binding for the Midea V3 devices.
I’m happy to help you collect all the possible data you need for this, just tell me what you need and how to get the data.
I think you could help a lot of people here in the community with this.
I would be really, really grateful.

Regards
Dirk

Did anybody found a solution/workaround?
Seems there’s an issue with versions.

openhab> diag 353
openHAB Add-ons :: Bundles :: MideaAC Binding (353)
---------------------------------------------------
Status: Installed
Unsatisfied Requirements:
osgi.wiring.package; filter:="(&(osgi.wiring.package=org.apache.commons.lang)(&(version>=2.6.0)(!(version>=3.0.0))))"
Declarative Services
1 Like

Tried this binding with our brand new kasai multi split ac which uses the midea protocol. But same error as the other guys here :frowning: I’m running openHAB 3.1 on build #2358. Any help would be appreciated on how to fix this error.

2021-06-04 16:38:20.123 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.mideaac-3.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.mideaac [274]
  Unresolved requirement: Import-Package: org.apache.commons.lang; version="[2.6.0,3.0.0)"
	at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:440) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.8]

It probably is related to latest changes in openHAB itself. See Removal of dependency on 'org.apache.commons.*' · Issue #7722 · openhab/openhab-addons · GitHub for more information.

With the latest openHAB snapshot 3.1 build #2414 I get another similar exception :frowning:

2021-06-04 17:00:03.154 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.mideaac-3.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.mideaac [235]
  Unresolved requirement: Import-Package: javax.measure; version="[1.0.0,2.0.0)"
	at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:440) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.8]

So I guess the binding code needs to be updated to work with the latest openHAB changes. I could have a look in the code but don’t know how the process of updating and building a new bundle looks like?

Is there a list of supporter air conditioning models? I wonder if COMFEE MSAF5-09HRDN8-QE SET WiFi is supported.

Hi,

Comfee, Dimstal and various other air conditioners are manufactured under these trade names by Midea.
Unfortunately, the NetHome WiFi module from firmware version 3 no longer works with this openHAB binding.
I have therefore taken a different path and have built with 2 components an MQTT capable interface, which now works absolutely reliable for several weeks.
The NetHome WiFi module is simply replaced by this small electronic circuit - done.
This makes you completely independent of the Midea Cloud.
The idea comes from the forum here and you can find it here.
If you want to rebuild the electronics you can ask me for the PCB layout (hole pattern).

Good luck
Dirk

1 Like

How can we help to make this binding work with oh 3?

I have OH 3.1.0.M1 and it works for me.

Probably there must be some metadata changed in build process, but I don’t know what exactly.

If somebody can advice me I can do it, rebuild and share.

Hi,

Have you seen the work done in GitHub - kueblc/midea-msmart at support-8370 and GitHub - WMP/midea-ac-py at support-8370 to add support for midea version 3? Would it be possible to use/reproduce it here? What would be the best way to go about it?

Thanks

1 Like

Regarding

Unresolved requirement: Import-Package: org.apache.commons.lang; version="[2.6.0,3.0.0)"

please check newest release.

@JacekDob Thanks for your effort and the new binding version. Unfortunately with the latest openHAB snapshot 3.1 build #2414 I still get another similar exception :frowning:

2021-06-22 19:13:25.030 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/openhab/addons/org.openhab.binding.mideaac-3.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.mideaac [279]
  Unresolved requirement: Import-Package: javax.measure; version="[1.0.0,2.0.0)"

	at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:440) ~[org.eclipse.osgi-3.16.200.jar:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.8]

Beside that I am struggling with the stability of my wifi dongles :frowning: Does anyone also had/have problems with the EU-OSK103 wifi dongles being offline after some time and not coming online again? The only solution right now is to completely disconnect them from power and plug them in again. In my router I just see several connect and disconnect attempt before they went offline. But I have no clue what is going on.

Version 20210621

With OH 3.1.0
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.mideaac [247]
Unresolved requirement: Import-Package: javax.measure; version="[1.0.0,2.0.0)"

    at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1781) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi-3.16.200.jar:?]

Wtih OH 3.2.0 Snap
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.mideaac [239]
Unresolved requirement: Import-Package: javax.measure; version="[1.0.0,2.0.0)"

    at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1781) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) ~[org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.16.200.jar:?]
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi-3.16.200.jar:?]

This is expected because openHAB 3.1 updated a library responsible for handling of measurement units. PR must be updated against latest release in order to work.

Some one around who can do this job? By the way, is it planned to release this addon to the usual bindings?

4 Likes

Regarding Unresolved requirement: Import-Package: javax.measure; version="[1.0.0,2.0.0)"
please check latest release - not tested but fixed according to forum.

Happy to do it, but expirienced member in it more than welcome.

Have you seen the work done in GitHub - kueblc/midea-msmart at support-8370 and GitHub - WMP/midea-ac-py at support-8370 to add support for midea version 3? Would it be possible to use/reproduce it here? What would be the best way to go about it?

This binding is directly based on those pythons scripts. I am not aware about anything besides this.

Thanks for your reply. The [support-8370] branches linked to above contain new code for supporting midea version 3. Have you seen that?

Hi,
I got the same error:

And I tried the newest release

Thx.

I chek it, but unforunatly same error

saw same error as well had to crack open the jar and edit Manifest.MF file to this then it worked javax.measure;version="[1.0,2.3)",javax.measure.quantity;version="[1.0,2.3)" only issue now is when it shows temp as Fahrenheit the value is still displayed as Celsius but at least it works now probably not the right way to really fix it but wanted to see if it worked with my units US cooper hunter mini splits with the osk102 wireless dongle . They both picked right up with no issues as soon as I did discover. Now to figure out how to trigger the turbo mode on a timed manner and my server room will be chilly all the time!
Update: also tested on 3.2.0 snapshot after changing Manifest.MF file and it also works but as expected The temp unit value does not change from Celsius even when toggling the item the unit does pick global value from regional settings but the actual conversion does not apply . :unamused: