[SOLVED] Homematic QuantityType in M6 build problem

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

Hi,

got it running, too.
I deleted all HM heating things from openhab. After this, I added them again from inbox.
After this procedure and some minor changes in my rules, all is running well.

Sebastian

1 Like

Hi all,

unfortunately, for me this solution is not applicable. I have done all the steps you mentioned, but it will not work.
But what i found out is that the following listed failure code will show up only for one heating thermostat. But I have installed in total 5 thermostats, meaning that for the other 4 the code is running well.

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

Meaning that only the device MEQ1466222 has a problem, the other ones are still working good.

When having deleted all the things and started a new search via inbox, the following entries in my log file occured and showed some issues, maybe someone know something about it?

2018-12-15 07:54:43.840 [INFO ] [ng.homematic.internal.misc.MiscUtils] - Datapoint name 'BackupHomegear.sh' contains invalid characters, new Datapoint name 'BackupHomegear_sh'

2018-12-15 07:54:43.846 [INFO ] [ng.homematic.internal.misc.MiscUtils] - Datapoint name 'ReadMe.txt' contains invalid characters, new Datapoint name 'ReadMe_txt'

2018-12-15 07:54:43.850 [INFO ] [ng.homematic.internal.misc.MiscUtils] - Datapoint name 'RestoreHomegear.sh' contains invalid characters, new Datapoint name 'RestoreHomegear_sh'

2018-12-15 07:54:43.855 [INFO ] [ng.homematic.internal.misc.MiscUtils] - Datapoint name 'Test.php' contains invalid characters, new Datapoint name 'Test_php'

2018-12-15 07:54:43.860 [INFO ] [ng.homematic.internal.misc.MiscUtils] - Datapoint name 'Connect.php' contains invalid characters, new Datapoint name 'Connect_php'

2018-12-15 07:54:43.888 [INFO ] [rnal.type.HomematicTypeGeneratorImpl] - Multiple firmware versions for device type 'BC-RT-TRX-CyN' found (1.0, 1.1). Make sure, all devices of the same type have the same firmware version, otherwise you MAY have channel and/or datapoint errors in the logfile

many thanks for the help!

Hi!

The entries in the log are updated Homematic system variables and Script, which you can then use in openhab.
When you update one system variable, all of them are updated by openhab.
As openhab does not support some characters they are replaced by underscores, thats what you can see in the log.