Homematic-IP already under development?

Hi,
HM IP Communication is working fine for me with the new binding. - Thank you very much!
I only have two HM IP Devices and both Thermostats are reporting the temperatures without problems.

Will send you a trace next days…

Hi!

Great! I’ve already received a trace from Rainer, metadata looks good, so the current status:

Metadata: confirmed
Receiving values: confirmed
Sending values: pending

Can you confirm, that sending values to a device is also working?

seems unfunctional at the moment:

2016-03-25 12:10:06.642 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘Kinderzimmer_Temp_Set’ received command 22.0
2016-03-25 12:10:06.643 [ERROR] [l.communicator.HomematicCommunicator] - null sending (<?xml version="1.0" encoding="ISO-8859-1"?>setValue000393C98XXXXXD:1SET_POINT_TEMPERATURE22.0)
org.openhab.binding.homematic.internal.communicator.client.HomematicClientException: null sending (<?xml version="1.0" encoding="ISO-8859-1"?>setValue000393C98XXXXX:1SET_POINT_TEMPERATURE22.0)
at org.openhab.binding.homematic.internal.communicator.client.XmlRpcClient.sendMessage(XmlRpcClient.java:111)[10:org.openhab.binding.homematic:1.9.0.201603201557]
at org.openhab.binding.homematic.internal.communicator.client.BinRpcClient.setDatapointValue(BinRpcClient.java:175)[10:org.openhab.binding.homematic:1.9.0.201603201557]
at org.openhab.binding.homematic.internal.communicator.client.BaseHomematicClient.setDatapointValue(BaseHomematicClient.java:72)[10:org.openhab.binding.homematic:1.9.0.201603201557]
at org.openhab.binding.homematic.internal.communicator.client.CcuClient.setDatapointValue(CcuClient.java:232)[10:org.openhab.binding.homematic:1.9.0.201603201557]
at org.openhab.binding.homematic.internal.communicator.HomematicPublisher.sendToClient(HomematicPublisher.java:79)[10:org.openhab.binding.homematic:1.9.0.201603201557]
at org.openhab.binding.homematic.internal.communicator.HomematicPublisher.execute(HomematicPublisher.java:65)[10:org.openhab.binding.homematic:1.9.0.201603201557]
at org.openhab.binding.homematic.internal.communicator.HomematicCommunicator.publishToHomematicServer(HomematicCommunicator.java:323)[10:org.openhab.binding.homematic:1.9.0.201603201557]
at org.openhab.binding.homematic.internal.communicator.HomematicCommunicator.receiveType(HomematicCommunicator.java:284)[10:org.openhab.binding.homematic:1.9.0.201603201557]
at org.openhab.binding.homematic.internal.communicator.HomematicCommunicator.receiveCommand(HomematicCommunicator.java:251)[10:org.openhab.binding.homematic:1.9.0.201603201557]
at org.openhab.binding.homematic.internal.bus.HomematicBinding.internalReceiveCommand(HomematicBinding.java:176)[10:org.openhab.binding.homematic:1.9.0.201603201557]
at org.openhab.core.binding.AbstractBinding.receiveCommand(AbstractBinding.java:97)[144:org.openhab.core.compat1x:2.0.0.201603142138]
at org.openhab.core.events.AbstractEventSubscriber.handleEvent(AbstractEventSubscriber.java:42)[144:org.openhab.core.compat1x:2.0.0.201603142138]
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415)[3:org.apache.karaf.services.eventadmin:4.0.3]
at org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:90)[3:org.apache.karaf.services.eventadmin:4.0.3]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_65]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_65]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]
Caused by: java.lang.NullPointerException
at org.openhab.binding.homematic.internal.communicator.client.XmlRpcClient.sendMessage(XmlRpcClient.java:85)[10:org.openhab.binding.homematic:1.9.0.201603201557]
… 18 more

I just ordered a HM-IP device. I’ll let you know in this thread when it works.

It’s now working with Homematic classic and IP devices. I can receive and set the temperature, set the manual / auto mode etc. Use min. version 1.8.2 of OpenHab.
Thanks to Gerhard who provided an updated version.

Here is the version i’ve sent to Rainer: https://drive.google.com/file/d/0Bw7zjCgsXYnHeFR2NVl0aTRua1E/view?usp=sharing
My HMIP-PSM fully works. I am going to create a PR in the next days.

Can you post the items definitions for the HMIP-PSM to switch the socket and read the power measurements? I own one and use it via programs on the CCU2 - but this is only a workaround.

Thank you,

You can switch the binding into TRACE mode, then you will see all possible channels and datapoints. To switch the socket, use channel 3 and STATE. All available DP’s for HMIP-PSM:

    <channel number='0'>
      <datapoint name='CONFIG_PENDING' value='' valueType='2' writeable='false' />
      <datapoint name='DUTY_CYCLE' value='false' valueType='2' writeable='false' />
      <datapoint name='OPERATING_VOLTAGE' value='0.000000' valueType='4' min='0.000000' max='25.200000' writeable='false' />
      <datapoint name='UNREACH' value='false' valueType='2' writeable='false' />
    </channel>
    <channel number='1'>
      <datapoint name='PRESS_LONG' value='' valueType='2' writeable='false' />
      <datapoint name='PRESS_SHORT' value='' valueType='2' writeable='false' />
    </channel>
    <channel number='2'>
      <datapoint name='PROCESS' value='0' valueType='16' subType='29' valueList='STABLE;NOT_STABLE' min='STABLE' max='NOT_STABLE' writeable='false' />
      <datapoint name='SECTION' value='0' valueType='16' subType='0' valueList='' min='0' max='15' writeable='false' />
      <datapoint name='STATE' value='false' valueType='2' writeable='false' />
    </channel>
    <channel number='3'>
      <datapoint name='ON_TIME' value='' valueType='4' min='0.000000' max='8580000.000000' writeable='true' />
      <datapoint name='PROCESS' value='0' valueType='16' subType='29' valueList='STABLE;NOT_STABLE' min='STABLE' max='NOT_STABLE' writeable='false' />
      <datapoint name='SECTION' value='0' valueType='16' subType='0' valueList='' min='0' max='15' writeable='false' />
      <datapoint name='STATE' value='false' valueType='2' writeable='true' />
    </channel>
    <channel number='4'>
      <datapoint name='ON_TIME' value='' valueType='4' min='0.000000' max='8580000.000000' writeable='true' />
      <datapoint name='PROCESS' value='0' valueType='16' subType='29' valueList='STABLE;NOT_STABLE' min='STABLE' max='NOT_STABLE' writeable='false' />
      <datapoint name='SECTION' value='0' valueType='16' subType='0' valueList='' min='0' max='15' writeable='false' />
      <datapoint name='STATE' value='false' valueType='2' writeable='true' />
    </channel>
    <channel number='5'>
      <datapoint name='ON_TIME' value='' valueType='4' min='0.000000' max='8580000.000000' writeable='true' />
      <datapoint name='PROCESS' value='0' valueType='16' subType='29' valueList='STABLE;NOT_STABLE' min='STABLE' max='NOT_STABLE' writeable='false' />
      <datapoint name='SECTION' value='0' valueType='16' subType='0' valueList='' min='0' max='15' writeable='false' />
      <datapoint name='STATE' value='false' valueType='2' writeable='true' />
    </channel>
    <channel number='6'>
      <datapoint name='CURRENT' value='0.000000' valueType='4' min='0.000000' max='65535.000000' writeable='false' />
      <datapoint name='ENERGY_COUNTER' value='0.000000' valueType='4' min='0.000000' max='838859.100000' writeable='false' />
      <datapoint name='ENERGY_COUNTER_OVERFLOW' value='false' valueType='2' writeable='false' />
      <datapoint name='FREQUENCY' value='50.030000' valueType='4' min='29.520000' max='70.470000' writeable='false' />
      <datapoint name='POWER' value='0.000000' valueType='4' min='0.000000' max='163830.000000' writeable='false' />
      <datapoint name='VOLTAGE' value='236.600000' valueType='4' min='0.000000' max='409.500000' writeable='false' />
    </channel>  
2 Likes

Thank you, now I can use the power switch on channel 3 from openhab and have a feedback when the button on the device pressed!
I get Voltage, and the Energy Counter via channel 6.

Group energy_Chart_1
Number IP_Socket_1_Current 		"Strom [%.2f A]"		<energy>	(Heating,Energy)					{homematic="address=0001D3C990BCF2, channel=6, parameter=CURRENT"}
Number IP_Socket_1_Voltage 		"Spannung [%.1f V]"		<energy>	(Heating,Energy)					{homematic="address=0001D3C990BCF2, channel=6, parameter=VOLTAGE"}
Number IP_Socket_1_EnergyCounter 	"E Zähler [%.2f Wh]"		<energy>	(Heating,Energy,energy_Chart_1)				{homematic="address=0001D3C990BCF2, channel=6, parameter=ENERGY_COUNTER"}
Number IP_Socket_1_EnergyCounter_over 	"E Zähler Over [%.2f Wh]"	<energy>	(Heating,Energy)					{homematic="address=0001D3C990BCF2, channel=6, parameter=ENERGY_COUNTER_OVERFLOW"}
Number IP_Socket_1_Energy 		"Leistung [%.2f W]"		<energy> 	(Heating,Energy,energy_Chart_1)				{homematic="address=0001D3C990BCF2, channel=6, parameter=POWER"}
Switch IP_Socket_1_Switch		"Heizung"			<heating>	(Switches,myopenhab)					{homematic="address=0001D3C990BCF2, channel=3, parameter=STATE"}
Number	Chart_Energy_Period		"Ausschnitt"			<clock>

I do not get the current and power updated on the UI. Is there a certain frequency how often these values are sent to openHAB?
EDIT: Sorry, all works as expected!

A (final) question. Is it possible that sending a state command (i.e. ON) is send to the device even is it is already in this state (i.e. ON). This can eat up the duty cicle, So a rule switching thins on or off has to do something like:

`if (item.state==ON) {
  sendCommand(item,OFF)
} else {
  sendCommand(item,ON)
}

I expected that either openHAB, the binding or the CCU take care to keep on air time low as possible, but I ran into timeouts and only changing my rules like the code above made it working agin.

Chris

I think you mean forceUpdate

Hello Gerhard,

at first thanks you for your work adding Homematic IP to OpenHAB :slight_smile: as I started with Homematic I only bought Homematic IP devices as i think this will be the future from Homematic.

I also saw there is a pull request for the homematic binding for version 1.9 to add that to the official version. As my knowledge with source code pull requests is very limited, can you give us an overview when it might be released? Is there something we could do to help you to get that added?

@gerrieg

is it possible to use it with Homematic IP Access Point or is a CCU still needed when using HM IP devices only?

You need a CCU, a Homematic IP Access Point has no RPC service.

mhh ok
I thought there might be a chance … because when I read the documentation about “Homematic IP” the CCU seems only Optional…

So I thought maybe the IP Access Point can directly trigger the devices and I can setup all local without cloud

would have been a second good solution besides zwave for me :-/

The “IP Access Point” is only cloud based. But you can dump it to the trash and start using a CCU2. As an assembly set (here in Germany) you got it for around 80 Euro. There is no soldering is required you need to put the pieces together and use some screw. Sometimes if you an ELV customer you got a magazine which offered a 10 Euro voucher, so you could get the whole construct for 70 Euro. BUT that would be offtopic now :wink:

@gerrieg Any idea when we could merge the pull request?

Hallo,

I’m using the 1.9 binding as published above (OpenHAB 1.8.3). Everything was working “good” with my Homematic IP Devices (2x HMIP-PSM). Sometimes I had to restart the ccu and/or unplug the socket because it stopped responding. I think this was not openHAB related. Today I updated the ccu2 firmware trying to solve the problem, because a electric heater is connected to one of the sockets and it is cold outside ;). Now I’m using firmware 2.25.15. I had to do several restarts, but now the devices are working inside the ccu2 web ui. But I get the following Warning

2016-12-17 13:41:28.113 [WARN ] [.b.h.i.c.HomematicCommunicator] - Can’t find DatapointConfig[address=0001D3C990BCF2,channel=0,parameter=RSSI_DEVICE], value is not published to openHAB!

anything I have to be worried? The sockets seam to be working as usual. (Sending ON/OFF commands to the sockets and reading power values)

Thanks for the modified snapshot. It works perfectly. One important thing to mention for the people that also try it:
In your openhab.cfg you need to insert:

homematic:homematicIP.enabled=true

(Taken from the official 1.x binding docs)

Hi Gerhard @gerrieg ,

i was surprised when i found out that the Acces point API is already in reverse engineering.

Do you have any plans to integrate that in the HM (or a new) binding? Even a “read only” binding would already enable users to use the AP Heating scenario + to swithch the blinds based on the window sensors…

Best
Michael

It’s not possible with this API. The homematic binding loads and generates all the device metadata needed from the gateway. I can’t see any device metadata in this rest api wrapper.
For this you need a extra homematic-ip-cloud binding. But it’s much simpler to buy a CCU2.

Exactly. And if you don’t enjoy the speed of the CCU2, you can always use RaspberryMatic.

I have yet to see any advantages of HomematicIP vs. Homematic products. Do any exist?
If you use openHAB you already enjoy a replacement of WebUI programs.