Echonet Lite Binding

logo`

This binding supports devices that make use of the Echonet Lite specification
(ECHONET Specifications | ECHONET).

Supported Things

  • Mitsubishi Electric MAC-568IF-E Wi-Fi interface (common on most Mitsubishi Heat Pumps).

Changelog

Version 0.1

  • initial release

Resources

Binary

Source Code

1 Like

Hi Mike,

I’ve been looking for a binding for EchoNet Lite for a while and this is great, Thank you for your work.

I’m running OpenHab on a Windows Server Machine (mainly because the server is running other tasks so it made sense to use it for OpenHab as well).

To make a long story short I’d like to bring your attention to a bug.
This Bug looks to be only when running on Windows. Your Binding works great when running OpenHab on a test Linux Virtual Machine (Running on the same Windows box).
I tried on a few other Windows machine and it fails on all of them.

Because Windows has the IPV6 protocol running alongside IPV4 the Multicast discovery is failing (see screen shot below).
Disabling IPV6 in the network interface doesn’t fix the problem.

I’m not a programmer but did a google search and found this stack overflow link that may assist in identifying the problem. https://stackoverflow.com/questions/39111465/java-datagramchannel-multicast-defaults-to-ipv6

I know this binding is new and not many use windows so I understand it’s not a priority but I thought it best to bring attention to it now.

If you need any help beta testing this on Windows then let me know I’m happy to do that.

Thank you for the bug report. I’ll try the suggested option from the Stackoverflow post. There maybe a couple of other changes that are needed, e.g. explicitly checking that the network interface to be used is not loopback and supports IPv4. May also need a configuration option to specify the network interface to to be used.

I’ll make the simple change first (keep an eye on the github PR for changes). Beta testing would be appreciated.

1 Like

HI Mike,

I saw you did an update of the binding.

Sorry to say it didn’t work on windows again. (and again Linux is fine).
The error is different and its caused a Java exception in the logs (see below)

The error in the log below is a bit weird as it says my NIC is not configured for IPv4.

2022-08-04 17:51:22.107 [INFO ] [te.internal.EchonetLiteBridgeHandler] - Binding echonet channel
2022-08-04 17:51:22.204 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.echonetlite.internal.EchonetLiteBridgeHandler@7206d454': Unable to start networking thread
java.lang.IllegalStateException: Unable to start networking thread
at org.openhab.binding.echonetlite.internal.EchonetLiteBridgeHandler.initialize(EchonetLiteBridgeHandler.java:295) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor47.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.io.IOException: Network interface not configured for IPv4
at sun.nio.ch.DatagramChannelImpl.innerJoin(DatagramChannelImpl.java:992) ~[?:?]
at sun.nio.ch.DatagramChannelImpl.join(DatagramChannelImpl.java:1017) ~[?:?]
at org.openhab.binding.echonetlite.internal.EchonetChannel.(EchonetChannel.java:53) ~[?:?]
at org.openhab.binding.echonetlite.internal.EchonetLiteBridgeHandler.start(EchonetLiteBridgeHandler.java:81) ~[?:?]
at org.openhab.binding.echonetlite.internal.EchonetLiteBridgeHandler.initialize(EchonetLiteBridgeHandler.java:293) ~[?:?]
... 9 more
2022-08-04 17:51:22.206 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'echonetlite:bridge:bad6083ab3': Unable to start networking thread

Let me know if you need more info or if theres anything else you’d like to me to check.

I think I just need to check that it has a working IPv4 address attached to it. I’ll make that change later in the week.

1 Like

I’ve just pushed a change to check that all interfaces that it tries to join with have an IPv4 address. If that fails, then I think I will need to add a configuration option to specify a network (address and mask) to determine which interface should be used.

1 Like

HI Mike,

That looks to have done it!!

The Bridge is online and was able to discover my 2 Mitsubishi Aircons without a problem.
I’ve added them as things and linked a few channels as a test.
Currently working well and all of this running natively on a Windows server.

Thank you very much for your efforts. I will keep an eye out for any future updates and keep you informed of anything strange or good!!

Legend!