[SOLVED] Homematic QuantityType in M6 build problem

HI,
actually I downgraded my openHAB system. So it is working again. But this item for example did the problem with M6. Also without working a rule, it was not possible to assign manually a new SV to Homematic device.

Number Wohnzimmer_FBH_SV "Soll Temperatur" <temperature> (gT_SV) {channel="homematic:HM-TC-IT-WM-W-EU:e7adadb7:MEQ1574558:2#SET_TEMPERATURE"}

You will need to change the item to:

Number:Temperature Wohnzimmer_FBH_SV "Soll Temperatur" <temperature> (gT_SV) {channel="homematic:HM-TC-IT-WM-W-EU:e7adadb7:MEQ1574558:2#SET_TEMPERATURE"}

Once that’s done then we can have a look at the rules

1 Like

This is what I tried after reading the documentation.
But also didn´t work to me. Same error message.

Regarding the error created by the rule: Actually I faven´t this error anymore, due to my downgrade to M5. I cannot remeber in detail. Sorry for that.

Well, you are going to have to bite the bullet and upgrade again and work your way through the errors.
It’s likely to be the same error everywhere. So once we solved one, you’ll be able to do the rest.
BUT
Change you homematic items to add the unit, just as above

Then in the rules, whenever you are working with an item state do this:

(item.state as QuantityType<Number>).doubleValue

To convert the UoM value to a plain number

Also get rid of your Thread::sleep for 30s. BAD IDEA
Use a timer instead:

	        case "4" : {
			logInfo(filename, "Wohnung Heizmodus: Aus (Sommer)")
			WZ1_Heizung_Mode.sendCommand (3)
			WZ2_Heizung_Mode.sendCommand (3)
			KU1_Heizung_Mode.sendCommand (3)
			KU2_Heizung_Mode.sendCommand (3)
			SZ_Heizung_Mode.sendCommand (3)
			BD_Heizung_Mode.sendCommand (3)
			EZ_Heizung_Mode.sendCommand (3)
			BR_Heizung_Mode.sendCommand (3)
			createTimer(now.plusSeconds(30), [ |
			    WZ1_Heizung_SetTemp.sendCommand(tempOff)
			    WZ2_Heizung_SetTemp.sendCommand(tempOff)
			    KU1_Heizung_SetTemp.sendCommand(tempOff)
			    KU2_Heizung_SetTemp.sendCommand(tempOff)
			    SZ_Heizung_SetTemp.sendCommand(tempOff)
			    BD_Heizung_SetTemp.sendCommand(tempOff)
			    EZ_Heizung_SetTemp.sendCommand(tempOff)
			    BR_Heizung_SetTemp.sendCommand(tempOff)
                        ])
		}

1 Like

Yes, you are right. I need some time to do the upgrade and the investigation. Maybe end of this week.

The Thread::sleep came from another user, I know about these behaviours and try to use timers if necessairy.
Thanks for your support.

Sebastian

I was asking Wouter, how to downgrade the homematic binding back to M5.
For those who want to keep M6 within the older rules: follow the instructions below.

Yes you could try the M5 version again by:

  1. Uninstalling the Homematic binding via Paper UI
  2. Download the org.eclipse.smarthome.binding.homematic-0.10.0.oh240M5.jar
  3. Add the JAR to the /addons directory

Another way is to use that download URL for updating the bundle to the M5 version using the Console.
This is what it looks like when reverting a SNAPSHOT version of the binding to the M5 version again:

openhab> bundle:list|grep Homematic
209 │ Active   │  80 │ 0.10.0.201811171951    │ Eclipse SmartHome Homematic Binding
openhab> bundle:update 209 https://openhab.jfrog.io/openhab/libs-milestone-local/org/eclipse/smarthome/binding/org.eclipse.smarthome.binding.homematic/0.10.0.oh240M5/org.eclipse.smarthome.binding.homematic-0.10.0.oh240M5.jar
openhab> bundle:list|grep Homematic
209 │ Active   │  80 │ 0.10.0.oh240M5         │ Eclipse SmartHome Homematic Binding
2 Likes

In the mean time there have been some fixes for the binding, e.g. https://github.com/eclipse/smarthome/pull/6565 , but I am not sure whether they will solve this problem. But you can try install the latest version of the Homematic binding manually.

M7 still has the described problem. I did some further testing, here are the results:

M7, M6, M5 fail with the following setup:
Item definition:

Number:Temperature HM_Wohnzimmer_RTherm_SetTemp "Set Temperature"    (gTemperatureSet)  {channel="homematic:HM-CC-RT-DN:ccu:OEQ2084718:4#SET_TEMPERATURE"}

Rule:

rule "TestSwitch"
when
    Item TestSwitch changed to ON
then
    TestSwitch.sendCommand(OFF)
    var test = 20.5|°C
    logInfo("Test", "set " + test.toString + " " + test.class.toString)
    logInfo("Test", "get " + HM_Wohnzimmer_RTherm_SetTemp.state.toString + " " + HM_Wohnzimmer_RTherm_SetTemp.state.class.toString)
    HM_Wohnzimmer_RTherm_SetTemp.sendCommand(test);
end

Log output:

2018-12-01 21:08:53.026 [INFO ] [.eclipse.smarthome.model.script.Test] - set 20.5 °C class org.eclipse.smarthome.core.library.types.QuantityType
2018-12-01 21:08:53.035 [INFO ] [.eclipse.smarthome.model.script.Test] - get 20.5 °C class org.eclipse.smarthome.core.library.types.QuantityType
2018-12-01 21:08:53.055 [WARN ] [ematic.handler.HomematicThingHandler] - Can't convert type QuantityType with value '20.5 °C' to FLOAT value with DecimalTypeConverter for 'OEQ2084718:4#SET_TEMPERATURE', please check the item type and the commands in your scripts

M5 works with the following setup:
Item definition:

Number HM_Wohnzimmer_RTherm_SetTemp "Set Temperature"    (gTemperatureSet)  {channel="homematic:HM-CC-RT-DN:ccu:OEQ2084718:4#SET_TEMPERATURE"}

Rule:

rule "TestSwitch"
when
    Item TestSwitch changed to ON
then
    TestSwitch.sendCommand(OFF)
    var test = 20.5
    logInfo("Test", "set " + test.toString + " " + test.class.toString)
    logInfo("Test", "get " + HM_Wohnzimmer_RTherm_SetTemp.state.toString + " " + HM_Wohnzimmer_RTherm_SetTemp.state.class.toString)
    HM_Wohnzimmer_RTherm_SetTemp.sendCommand(test);
end

Log output (no error):

2018-12-01 21:13:11.626 [INFO ] [.eclipse.smarthome.model.script.Test] - set 20.5 class java.lang.Double
2018-12-01 21:13:11.641 [INFO ] [.eclipse.smarthome.model.script.Test] - get 21.5 class org.eclipse.smarthome.core.library.types.DecimalType

I installed the homematic binding included in the M5 build of Openhab into an M7 Openhab installation as mentioned by @alkaline above. So the issue is definitely in the binding and not in other components of Openhab. If I should test anything else, just let me know.

Link to the homematic binding included in the M5 build: https://openhab.jfrog.io/openhab/libs-milestone-local/org/eclipse/smarthome/binding/org.eclipse.smarthome.binding.homematic/0.10.0.oh240M5/org.eclipse.smarthome.binding.homematic-0.10.0.oh240M5.jar

just a note: Since M5, there have been several PRs on the [homematic] binding, so maybe one of them broke this HomematicThingHandler for your case. You can check which recent ones were included in the M7 here.

I didn’t find a similar Issue open on https://github.com/eclipse/smarthome/issues?q=homematic

Maybe this is worth posting an Issue there. You have all the info for a developer to reproduce this.

Jep, I will post an issue in the ESH repo. Just wanted to give an update here. Maybe you could keep in mind that this is currently broken and should be fixed before Openhab 2.4 is released (or just ship the binding version included in the M5 build for a release build).

1 Like

I don’t think that this is possible :slight_smile:

There have been many bug fixes implemented since M5 in the binding. They need to check your situation and fix it.

I am not 100% sure that your rule is correct… I will try to check some stuff and post more info.
Meanwhile, plz go ahead and post your configs on the ESH github issue.

Opened issue for reference:

1 Like

I am facing the same Problem. Even when i change the Temp from Paper UI i get the Same error. So i think its an Problem with the Binding and not with the Config.

im faced with exact the same error, too.

After upgrading from 2.3 to 2.4 M6, I have exactly the same problem and cannot set the temperature :frowning:

I am facing the same Problem. Even when i change the Temp from Paper UI i get the Same error. So i think its an Problem with the Binding and not with the Config.

Oh yes, forgot to mention this. Will add this to the GitHub issue.

@all
The temporary fix can be found here [SOLVED] Homematic QuantityType in M6 build problem - #17 by alkaline just take care to replace the 209 in the second command with the correct bundle ID returned by the first command in the first column.

Any news on this issue?

I have tried it today with latest build and could not reproduce the problem. Here is what I did: https://github.com/eclipse/smarthome/issues/6612#issuecomment-444207537

After deleting all Thermostates and readd them to Openhab all works like before!

Hey,

what exactly have you done to solve this issue?

I deleted one thermostat via PaperUI (not the channels separately, but the entire thing), rebootet Openhab and added it again (it was automatically found via the inbox menu).

But without success, the following failure message is this in the ouput:

2018-12-08 08:22:56.664 [WARN ] [ematic.handler.HomematicThingHandler] - Can’t convert type QuantityType with value ‘20.5 ℃’ to FLOAT value with DecimalTypeConverter for ‘MEQ1466222:1#SET_TEMPERATURE’, please check the item type and the commands in your scripts