How to write Parameter on Master using Homematic Binding

Hi there!

I would like to set a MASTER config parameter of a Homematic wall-mounted temperature control device (a HM-TC-IT-WM-W-EU). I have configured the bridge, communication and updating the device via OpenHAB 2 Beta4 is working correctly, e.g. for setting the boost mode:

Switch bathroom_BOOST_MODE "Boost-Mode enabled" <fire> {channel="homematic:HG-HM-TC-IT-WM-W-EU:0b000000:MEQ0xxxxxx:2#BOOST_MODE", forceUpdate="true"}

This parameter is located in the VALUES-section of the device if I print the configuration on the Homegear console. Now, i would like to update the SHOW_HUMIDITY setting, which can be toggled between 0 and 1 and is located on channel 0 of the MASTER-section. I tried a few ways to do that, e.g.:

Switch bathroom1_SHOW_HUMIDITY "Show current humidity" <humidity> {channel="homematic:HG-HM-TC-IT-WM-W-EU:0b000000:MEQ0xxxxxx:0:MASTER#SHOW_HUMIDITY"}
Switch bathroom2_SHOW_HUMIDITY "Show current humidity" <humidity> {channel="homematic:HG-HM-TC-IT-WM-W-EU:0b000000:MEQ0xxxxxx:MASTER#SHOW_HUMIDITY"}
Switch bathroom3_SHOW_HUMIDITY "Show current humidity" <humidity> {channel="homematic:HG-HM-TC-IT-WM-W-EU:0b000000:MEQ0xxxxxx:MASTER:0#SHOW_HUMIDITY"}

None of these is working. The resulting error in the log file is always this:

21:24:50.587 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update 'ON' for item 'bathroom_SHOW_HUMIDITY' to handler for channel 'homematic:HG-HM-TC-IT-WM-W-EU:0b000000:MEQ0xxxxxx:0:MASTER#SHOW_HUMIDITY', because no thing with the UID 'homematic:HG-HM-TC-IT-WM-W-EU:0b000000:MEQ0xxxx:0' could be found.

I already looked at the source code and at there is a HmParamsetType which seems to support the MASTER-section and I found at least this topic stating that setting MASTER-parameters is possible.

The homematic devices are interfaced with Homegear in version 0.6.7.

Can anybody help me on that?

You can not map the MASTER paramset to an item. They are implemented as thing configurations and you can edit them with PaperUI.

Hi!

Thanks for your answer! Okay, I was hoping you would say that this is possible :wink:
Fortunately, I now found another way to achieve what I want: I made Homegear available via MQTT and now set the value via MQTT (how to do this is documented here).

For anybody also stumbling on this problem, this is my configuaration (using the OpenHAB 1.x MQTT binding):

Item:

Switch bathroom_SHOW_HUMIDITY "Show humidity" <humidity> {mqtt=">[default:homegear/default/config/19/0/MASTER:command:*:MAP(switchhumidity.map)]", forceUpdate="true"}

Transformation file (switchhumidity.map)

ON={"SHOW_HUMIDITY": 1}
OFF={"SHOW_HUMIDITY": 0}

It only works in writing mode, reading out the current value is not possible as far as I know, but it is a good starting point!

1 Like

Thanks for making me aware of that! I am using homegear for a while and did not realize there was a MQTT interface added at some point…

Would be interested in all other things you are doing this way. I would be especially interested in connecting and disconnecting a door sensor from a light switch (based on time of day) and in a nice way to set up my AUTO heating programs directly from openHAB rules.

Actually, this is the only setting I am changing via this way at the moment. In future, I want to change the programmed heating schedule, but I am planning to do that rather via hm-prowee than manually.

Nevertheless, I think what you want should be possible, as I have seen that there is a thing “Homematic Gateway Extras” which seems to expose your self-written Homegear scripts (from /var/lib/homegear/scripts). Linking and unlinking of devices is possible in scripts.M aybe you can manage to do it via that way.

Why isn’t it possible directly. I would like to set the button lock for the HM-CC-RT-DN’s. Now I have to create a homegear script for this… :wink:

I wrote this homegear script if somebody is interested. Running it from openHAB via gateway extras. Will enable button lock for HM-CC-RT-DN (peer 1)

 #!/usr/bin/env php
<?php
	include_once("Connect.php");
	
	$Client->send("putParamset", array(1, 0, "MASTER", array("BUTTON_LOCK" => true)));

//BUTTON_LOCK: standard lock
//GLOBAL_BUTTON_LOCK: hard lock. you cant unlock it from device itself
//MODUS_BUTTON_LOCK: only mode and boost is locked

?>
1 Like

I have to agree with @lopez1de. As a homematic user myself I would love to be able to read and change parameters from inside openHAB.

@gerrieg Is the implementation effort too high or is there another reason for not providing this functionality directly with the binding?

1 Like

Though it works well, I would ditch the hackish way using MQTT for an offically supported method through the Homematic binding.

1 Like

It’s already implemented, you can do this in PaperUI in the Thing configuration. Currently it’s not possible to set the parameters in rules, this must be implemented in the core framework. But you can try to analyse the REST API calls from PaperUI and call the same methods in a rule.

1 Like

Not everyone is using Paper UI :unamused:
How do we do these settings in configuration files? This problem seems pretty similar to what happened with Astro and the offset http://docs.openhab.org/addons/bindings/astro/readme.html#full-example
What do you think? Setting parameters in rules would be nice, setting parameters at all would be a good start :wink:

I also don’t use PaperUI and use config files.

The Astro offset is a channel config, the MASTER parameters for Homematic are implemented as thing parameters. That’s something different. You have to ask the core developers, when they support changing these parameters in scripts/config files.