Broadlink / Floureon/Hysen-Thermostat Binding

Still got some errors.
error 34 is still there
second one maybe caused because the 0 is missing here ?!
2019-12-20T23:9:19

2019-12-20 23:10:43.423 [ERROR] [al.handler.FloureonThermostatHandler] - Error while retrieving data for broadlink:floureonthermostat:BroadLink-OEM-T1-eb-ce-97

java.lang.IllegalArgumentException: 2019-12-20T23:9:19 is not in a valid format.

	at org.eclipse.smarthome.core.library.types.DateTimeType.<init>(DateTimeType.java:101) ~[?:?]

	at org.eclipse.smarthome.core.library.types.DateTimeType.valueOf(DateTimeType.java:120) ~[?:?]

	at org.openhab.binding.broadlink.internal.handler.FloureonThermostatHandler.refreshData(FloureonThermostatHandler.java:214) ~[?:?]

	at org.openhab.binding.broadlink.internal.handler.FloureonThermostatHandler.handleCommand(FloureonThermostatHandler.java:71) ~[?:?]

	at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:233) ~[?:?]

	at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:300) ~[?:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

	at java.lang.Thread.run(Thread.java:748) [?:?]

Caused by: java.time.format.DateTimeParseException: Text '2019-12-20T00:00:00T23:9:19' could not be parsed, unparsed text found at index 19

	at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1952) ~[?:?]

	at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851) ~[?:?]

	at java.time.LocalDateTime.parse(LocalDateTime.java:492) ~[?:?]

	at org.eclipse.smarthome.core.library.types.DateTimeType.parse(DateTimeType.java:187) ~[?:?]

	at org.eclipse.smarthome.core.library.types.DateTimeType.<init>(DateTimeType.java:96) ~[?:?]

	... 12 more

same here 2019-12-20T0:36:07

2019-12-20 23:37:12.459 [ERROR] [al.handler.FloureonThermostatHandler] - Error while retrieving data for broadlink:floureonthermostat:BroadLink-OEM-T1-eb-d2-fe

java.lang.IllegalArgumentException: 2019-12-20T0:36:07 is not in a valid format.

	at org.eclipse.smarthome.core.library.types.DateTimeType.<init>(DateTimeType.java:101) ~[?:?]

	at org.eclipse.smarthome.core.library.types.DateTimeType.valueOf(DateTimeType.java:120) ~[?:?]

	at org.openhab.binding.broadlink.internal.handler.FloureonThermostatHandler.refreshData(FloureonThermostatHandler.java:214) ~[?:?]

	at org.openhab.binding.broadlink.internal.handler.FloureonThermostatHandler.handleCommand(FloureonThermostatHandler.java:71) ~[?:?]

	at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:233) ~[?:?]

	at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:300) ~[?:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

	at java.lang.Thread.run(Thread.java:748) [?:?]

Caused by: java.time.format.DateTimeParseException: Text '2019-12-20T00:00:00T0:36:07' could not be parsed, unparsed text found at index 19

	at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1952) ~[?:?]

	at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851) ~[?:?]

	at java.time.LocalDateTime.parse(LocalDateTime.java:492) ~[?:?]

	at org.eclipse.smarthome.core.library.types.DateTimeType.parse(DateTimeType.java:187) ~[?:?]

	at org.eclipse.smarthome.core.library.types.DateTimeType.<init>(DateTimeType.java:96) ~[?:?]

	... 12 more

Is not working for the RM2 and RM3 with your latest build.

Here is the log when I try to send a command on either.

2019-12-20 22:03:47.349 [ERROR] [org.quartz.core.JobRunShell         ] - Job DEFAULT.Timer 3 2019-12-20T22:03:47.347-06:00: Proxy for org.eclipse.xtext.xbase.lib.Procedures$Procedure0: [ {

  <XFeatureCallImplCustom>.sendCommand(<XStringLiteralImpl>)

  <XFeatureCallImplCustom>.sendCommand(<XStringLiteralImpl>)

  <null>.DelayTimer = <XNullLiteralImplCustom>

} ] threw an unhandled Exception: 

java.lang.IllegalArgumentException: Couldn't invoke 'assignValueTo' for feature JvmVoid:  (eProxyURI: home.rules#|::0.2.16.2.0.1.7.6.1.1.0.2::0::/1)

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.assignValueTo(XbaseInterpreter.java:1314) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:1302) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:227) ~[?:?]

	at org.eclipse.smarthome.model.script.interpreter.ScriptInterpreter.doEvaluate(ScriptInterpreter.java:226) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:215) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:458) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:239) ~[?:?]

	at org.eclipse.smarthome.model.script.interpreter.ScriptInterpreter.doEvaluate(ScriptInterpreter.java:226) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:215) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.evaluate(XbaseInterpreter.java:201) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.ClosureInvocationHandler.doInvoke(ClosureInvocationHandler.java:46) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.AbstractClosureInvocationHandler.invoke(AbstractClosureInvocationHandler.java:29) ~[?:?]

	at com.sun.proxy.$Proxy299.apply(Unknown Source) ~[?:?]

	at org.eclipse.smarthome.model.script.internal.actions.TimerExecutionJob.execute(TimerExecutionJob.java:48) ~[?:?]

	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [bundleFile:?]

	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [bundleFile:?]

==> /var/log/openhab2/events.log <==

2019-12-20 22:03:47.375 [nt.ItemStatePredictedEvent] - LivingRoomEchoDot_Speak predicted to become NULL

==> /var/log/openhab2/openhab.log <==

2019-12-20 22:03:47.374 [ERROR] [org.quartz.core.ErrorLogger         ] - Job (DEFAULT.Timer 3 2019-12-20T22:03:47.347-06:00: Proxy for org.eclipse.xtext.xbase.lib.Procedures$Procedure0: [ {

  <XFeatureCallImplCustom>.sendCommand(<XStringLiteralImpl>)

  <XFeatureCallImplCustom>.sendCommand(<XStringLiteralImpl>)

  <null>.DelayTimer = <XNullLiteralImplCustom>

} ] threw an exception.

org.quartz.SchedulerException: Job threw an unhandled exception.

	at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [bundleFile:?]

	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [bundleFile:?]

Caused by: java.lang.IllegalArgumentException: Couldn't invoke 'assignValueTo' for feature JvmVoid:  (eProxyURI: home.rules#|::0.2.16.2.0.1.7.6.1.1.0.2::0::/1)

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.assignValueTo(XbaseInterpreter.java:1314) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:1302) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:227) ~[?:?]

	at org.eclipse.smarthome.model.script.interpreter.ScriptInterpreter.doEvaluate(ScriptInterpreter.java:226) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:215) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:458) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:239) ~[?:?]

	at org.eclipse.smarthome.model.script.interpreter.ScriptInterpreter.doEvaluate(ScriptInterpreter.java:226) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:215) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.evaluate(XbaseInterpreter.java:201) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.ClosureInvocationHandler.doInvoke(ClosureInvocationHandler.java:46) ~[?:?]

	at org.eclipse.xtext.xbase.interpreter.impl.AbstractClosureInvocationHandler.invoke(AbstractClosureInvocationHandler.java:29) ~[?:?]

	at com.sun.proxy.$Proxy299.apply(Unknown Source) ~[?:?]

	at org.eclipse.smarthome.model.script.internal.actions.TimerExecutionJob.execute(TimerExecutionJob.java:48) ~[?:?]

	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[?:?]

	... 1 more

==> /var/log/openhab2/events.log <==

2019-12-20 22:03:47.384 [nt.ItemStatePredictedEvent] - BROADLINK predicted to become AV_BOX_POWER

2019-12-20 22:03:47.390 [vent.ItemStateChangedEvent] - BROADLINK changed from SOUND_BAR_POWER to AV_BOX_POWER

==> /var/log/openhab2/openhab.log <==

2019-12-20 22:03:47.368 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.broadlink.handler.BroadlinkRemoteModel2Handler@1d817d04': bundleContext

java.lang.NoSuchFieldError: bundleContext

	at org.openhab.binding.broadlink.handler.BroadlinkRemoteHandler.lookupCode(BroadlinkRemoteHandler.java:110) ~[?:?]

	at org.openhab.binding.broadlink.handler.BroadlinkRemoteHandler.handleCommand(BroadlinkRemoteHandler.java:87) ~[?:?]

	at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source) ~[?:?]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_232]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_232]

	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]

	at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]

	at com.sun.proxy.$Proxy360.handleCommand(Unknown Source) [?:?]

	at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:74) [bundleFile:?]

	at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]

	at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source) ~[?:?]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_232]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_232]

	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]

	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_232]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]

	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]

That is exactly the issue. I fixed it for seconds, but did not apply it for the other temporal fields. Now the same conversion is applied: https://github.com/flo-02-mu/openhab2-addons/releases/download/0.1.9-bl/org.openhab.binding.broadlink-2.5.0-SNAPSHOT.jar

@GameEnder I’m confused, what do you mean by “sending a command”? So far RM2 and RM3 are not really supported - I’d be happy to include them, if they can be reached with the same API. Do these devices appear using the auto-discovery? Or are you maybe using another binding?

They used to work fine with the old 2.4.0 add-on. You use a rule to send a IR code to the Command Channel. They show up in auto discovery, and are listed as a option to manually discover.

Okay, so you are referring to this binding: Broadlink binding for RMx, A1, SPx and MP. Any interest?
I had a closer look and apparently that binding covers all the broadlink-devices except the no-name devices like the Floureon-Thermostats. So most likely it is easier to stick to that one.
Eventually it might make sense to include my floureon-stuff into the existing binding - but the state of that looks a bit weird (no original code, currently not building, etc.)
If you prefer using my binding, I added a skeleton for the RMx - you still cannot send commands to it, but I’d like to be interested if the device gets detected properly at all and maybe if the temperature-channel gets updated. Then I can add the command-sending in the same way like in the other binding:
https://github.com/flo-02-mu/openhab2-addons/releases/download/0.1.10-bl/org.openhab.binding.broadlink-2.5.0-SNAPSHOT.jar

1 Like

I was using this version until OH 2.5.0. I was hoping your version was forked from the earlier version, but has been fixed for 2.5.0.

Hello Florian,

today I tested your addon (0.1.9).
Great work, I just have 2 problems:

First problem: Sensor show only internal / external (INTERNAL_TEMP_EXTERNAL_LIMIT I see only in logs eg. Thermostat1921683112_Sensor changed from INTERNAL_TEMP_EXTERNAL_LIMIT to INTERNAL).
When I tried to change status of the sensor via Openhab, it switches to the external (1 value) and not going to back to internal (0 value).

Second problem: Is it possible to do something with refresh interval from device?

best regards, Juraj

Hello Florian, Im not familiar with github.
Here you can download source (including jar file) with working internal temp external limit:
used ver. : 0.1.10
https://www.dropbox.com/s/o6qxj867rkt0py8/org.openhab.binding.broadlink.zip?dl=0

Hello Florian, dear all,
thanks for the binding. I can confirm that it works well with a Floor Heating Thermostat from BEOK Controls, Series TDS, Model 23.
After putting the binding in the addons directory of my openhab 2.5 installation, the thing was immediately detected. It works like a charm!
Best regards
Dieter

Hello,

is it possible to include in the binding also the update of the time and day of the week on the thermostat? At startup it is 0:00.
Other than that, it seems to work on a Beok thermostat.

Thank you!

Hello Florian. Sorry for my late reply but I was not home for few weeks.

When using the Broadlink Binding the thermostat is discovered and added to the PaperUi control screen but it is inoperative.

I have attached the log file with the log setup you have indicatedopenhab-broadlink.log (311.0 KB)

Thank You @poki123 , I added your changes to the code!

you can also use a rule in openhab for this.
i update the time with openhab start to prevent power failure
and sunday morning for a general compare (summer/wintertime change, …)

Hello,
and how do you address the time/day of the week? I miss this information.
I know only about the channels that are in the Thing list (setpoint, mode, …) - which can be accessed by mqtt.
Thank you.

why do u use mqtt when u have this binding? The thing is created automaticly by it.
u just have to create a item with all nessessary stuff. For the correct time/date i use the NPT binding

here is a small code snipet of mine

*.items :

Switch      bl_thermostat_whz_power             "Power"                                                                                                         { channel="broadlink:floureonthermostat:BroadLink-OEM-xX-Xx-xX-Xx:power" }
String      bl_thermostat_whz_mode              "Mode"                          <heating>                                                                       { channel="broadlink:floureonthermostat:BroadLink-OEM-xX-Xx-xX-Xx:mode" }
Number      bl_thermostat_whz_roomtemp          "Room Temperature [%s °C]"      <temperature>                                                                   { channel="broadlink:floureonthermostat:BroadLink-OEM-xX-Xx-xX-Xx:roomtemperature" }
Switch      bl_thermostat_whz_active            "Heating indicator"             <switch>                                                                        { channel="broadlink:floureonthermostat:BroadLink-OEM-xX-Xx-xX-Xx:active" }
Number      bl_thermostat_whz_setpoint          "Set Temperature to [%s °C]"    <temperature>                                                                   { channel="broadlink:floureonthermostat:BroadLink-OEM-xX-Xx-xX-Xx:setpoint" }
Number      bl_thermostat_whz_offsettemp        "Temperature Offset [%s °C]"    <temperature>                                                                   { channel="broadlink:floureonthermostat:BroadLink-OEM-xX-Xx-xX-Xx:temperatureoffset" }
Switch      bl_thermostat_whz_remotelock        "Lock Remote"                   <lock>                                                                          { channel="broadlink:floureonthermostat:BroadLink-OEM-xX-Xx-xX-Xx:remotelock" }
DateTime    bl_thermostat_whz_datetime          "DateTime [%s]"                 <time>                                                                          { channel="broadlink:floureonthermostat:BroadLink-OEM-xX-Xx-xX-Xx:time" }

*.rules :

//set time on StartUp

rule "Set thermostate DateTime on StartUp"
when System started
then
     bl_thermostat_whz_datetime.sendCommand(Date.state as DateTimeType)
end

//set time weekly on Sunday 9:00

rule "Set thermostate DateTime weekly on sunday 9:00"
when Time cron "0 0 9 ? * SUN *"
then
     bl_thermostat_whz_datetime.sendCommand(Date.state as DateTimeType)
end

Hello,

I am using this binding on my Raspberry Pi and works pretty well - except that I realized that my openhab.log in /var/log is full with exceptions (every minute I have one):

2020-02-12 20:48:08.209 [ERROR] [al.handler.FloureonThermostatHandler] - Error while retrieving data for broadlink:floureonthermostat:192-168-100-11
java.lang.IllegalArgumentException: 2020-2-12T20:48:4 is not in a valid format.
	at org.eclipse.smarthome.core.library.types.DateTimeType.<init>(DateTimeType.java:128) ~[bundleFile:?]
	at org.eclipse.smarthome.core.library.types.DateTimeType.valueOf(DateTimeType.java:147) ~[bundleFile:?]
	at org.openhab.binding.broadlink.internal.handler.FloureonThermostatHandler.refreshData(FloureonThermostatHandler.java:214) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.time.format.DateTimeParseException: Text '2020-2-12TT00:00:0020:48:4' could not be parsed at index 5
	at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2046) ~[?:?]
	at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1948) ~[?:?]
	at java.time.LocalDateTime.parse(LocalDateTime.java:492) ~[?:?]
	at org.eclipse.smarthome.core.library.types.DateTimeType.parse(DateTimeType.java:256) ~[bundleFile:?]
	at org.eclipse.smarthome.core.library.types.DateTimeType.<init>(DateTimeType.java:122) ~[bundleFile:?]
	... 8 more

Would you please check what cause this issue and fix it? :slight_smile:
Thank you!

@Attila_P do u use the latest version? This error should be fixed since 0.1.9

Hi All,

Im using the binding so far OK. My Thermo has a 2 wire probe into my floor, but I’m not sure which channel to use to read that temperature. is it roomtemperature or roomtemperatureexternal sensor? I’ve set it to roomtemperatureexternalsensor which i believe to be correct

Setting the Thermo to SEN 1 which should be Floor sensor still does the same thing. Shows 1, then 28, then 24 (24 seems about right). The LCD displays it fine though.


11:32:41.123 [INFO ] [smarthome.event.ItemStateChangedEvent] - Ensuite_Temp changed from 1 to 27.5
11:32:41.123 [INFO ] [smarthome.event.ItemStateChangedEvent] - Ensuite_Temp changed from 27.5 to 24.0
11:32:41.126 [INFO ] [smarthome.event.ItemStateChangedEvent] - Ensuite_Temp changed from 24.0 to 1

Any thoughts for those using an external NTC sensor?

Cheers

Hello!

You are right! I used 0.1.7 which was linked in the first post. There is a newer, which works well.
For anybody else who is not so experienced with git (like me): you can find the most recent version here:


In this moment the last version is 0.1.9: https://github.com/flo-02-mu/openhab2-addons/releases/tag/0.1.9-bl
Works like a charm, thank you! :smiling_face_with_three_hearts:

1 Like