hobbyquaker / hmcon

Homematic Interface and Configuration
Other
30 stars 4 forks source link

How to use with OpenHAB #28

Closed srijken closed 8 years ago

srijken commented 8 years ago

It seems that OpenHAB uses TclRegaScript for its RPC calls (see https://github.com/openhab/openhab/blob/master/bundles/binding/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/communicator/client/CcuClient.java)

I'm using the Raspberry Pi module attached to GPIO. The HomeMatic web interface works, and I can control my devices with that.

There is some communication, because in the log I can see the Device ID of the Raspberry Pi CCU interface

2016-04-05 22:07:24.058 [INFO ] [.b.h.i.c.HomematicCommunicator] - Homematic ServerId[name=CCU,version=?,address=MEQ1...]
2016-04-05 22:07:24.071 [INFO ] [o.o.b.h.i.c.client.CcuClient  ] - Starting CcuClient
2016-04-05 22:07:24.204 [INFO ] [b.h.i.communicator.StateHolder] - Loading Homematic datapoints
2016-04-05 22:07:24.384 [ERROR] [.b.h.i.c.HomematicCommunicator] - Could not start Homematic communicator: Connection refused
org.openhab.binding.homematic.internal.communicator.client.HomematicClientException: Connection refused
    at org.openhab.binding.homematic.internal.communicator.client.CcuClient.sendScript(CcuClient.java:322) ~[bundlefile:na]
    at org.openhab.binding.homematic.internal.communicator.client.CcuClient.sendScriptByName(CcuClient.java:254) ~[bundlefile:na]
    at org.openhab.binding.homematic.internal.communicator.client.CcuClient.iterateAllDatapoints(CcuClient.java:126) ~[bundlefile:na]
    at org.openhab.binding.homematic.internal.communicator.StateHolder.loadDatapoints(StateHolder.java:84) ~[bundlefile:na]
    at org.openhab.binding.homematic.internal.communicator.HomematicCommunicator.start(HomematicCommunicator.java:93) ~[bundlefile:na]
    at org.openhab.binding.homematic.internal.bus.HomematicBinding.updated(HomematicBinding.java:95) [bundlefile:na]

Is there a way to make your installer work with OpenHAB and its HomeMatic binding?

hobbyquaker commented 8 years ago

I must admit that I don't really know if Openhab's Homematic Binding can work without the "Rega". But since the Binding supports Homegear I think it should be possible, because (afaik) Homegear also doesn't have the "Rega". I guess we should ask the Developer of Openhab's Homematic Binding if and how this is possible. If it's really not possible I will have to remove Openhab references in the Hmcon Readme.

hobbyquaker commented 8 years ago

I did some research and I fear this won't work :-( see https://groups.google.com/forum/#!topic/openhab/DIK9wb0lTi4 Since OpenHAB 1.5 the Homematic Binding requires the Rega. Bummer! I can't understand why the OpenHAB guys made this decision,. The "Rega" is terribly unreliable and a kinda useless piece of Software if you have your "Logic Layer" in another Software anyway.

So I see following possible actions for you now:

My personal suggestion would be the last point. YMMV.

hobbyquaker commented 8 years ago

the developer of the homematic binding told me that it will be possible with openhab 2 again. so there is another possibility for you now: wait for openhab 2 :-)

srijken commented 8 years ago

I'm also looking into mqtt-smarthome right now. Got it more or less working. The nice thing about OpenHab is that it's easy to create a smartphone app to control things. Next step I'm going to try is connecting OpenHab to MQTT and control things that way