openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.71k forks source link

Heatmiser binding bug - RUNMODE not working #2178

Open NigelCoxon opened 9 years ago

NigelCoxon commented 9 years ago

If I try and use the RUNMODE parameter like this: Switch KitchenRunmode "Kitchen Run Mode" {heatmiser="1:RUNMODE" }

I can see an error in the log Unknown or unsupported Heatmiser function: 1:RUNMODE

After a quick browse through the code HestmiserGenericBindingProvider.java does not test for RUNMODE resulting in the error. It looks like it was intended to be implememted - HeatmiserThermostat.java includes code to process RUNMODE

cdjackson commented 9 years ago

Can you provide the full error - looking at the code it looks like it should be implemented as a command, but I’m not using it in my system so I’m not 100% sure.

NigelCoxon commented 9 years ago

There's not a lot more to say. I have a single line item file containing: Switch KitchenRunmode "Kitchen Run Mode" {heatmiser="1:RUNMODE" }

I start Openhab with debug enabled, stop it after a while and look at openhab.log which contains:

19:21:33.662 [DEBUG] [i.internal.GenericItemProvider:334 ] - Start processing binding configuration of Item 'KitchenRunmode (Type=SwitchItem, State=Uninitialized)' with 'HeatmiserGenericBindingProvider' reader. 19:21:33.662 [ERROR] [eatmiserGenericBindingProvider:122 ] - Unknown or unsupported Heatmiser function: 1:RUNMODE 19:21:33.662 [DEBUG] [.b.h.internal.HeatmiserBinding:74 ] - Heatmiser binding activated 19:21:33.662 [DEBUG] [.b.h.internal.HeatmiserBinding:213 ] - HEATMISER updated() method is called! 19:21:33.677 [INFO ] [.service.AbstractActiveService:169 ] - Heatmiser Refresh Service has been started 19:21:33.677 [DEBUG] [.b.h.internal.HeatmiserBinding:129 ] - HEATMISER execute() method is called! 19:21:43.688 [DEBUG] [.b.h.internal.HeatmiserBinding:129 ] - HEATMISER execute() method is called! 19:21:53.688 [DEBUG] [.b.h.internal.HeatmiserBinding:129 ] - HEATMISER execute() method is called! 19:22:03.689 [DEBUG] [.b.h.internal.HeatmiserBinding:129 ] - HEATMISER execute() method is called!

That's all there is. Let me know if I can provide any further info

cdjackson commented 9 years ago

There's not a lot more to say.

Thanks - the full error provides a lot more information though (everyone ignores the stuff on the left of the message, but it’s very useful).

From the quick look it seems that this is supported as a command, but the binding reader doesn’t allow it… Really this binding needs some TLC - I spent some time adding the wifi thermostats last year but haven’t had the time to finish it. I’ll try and add this in, but I’m travelling over the coming days so will look at it next week. I think it’s just a 1 line change to add this as a command - the actual command itself looks like it’s all supported in the thermostat class...

NigelCoxon commented 9 years ago

Thanks Chris I reported this for completeness, but it isn't that important to my setup, and I could certainly live without it at the moment.

teichsta commented 9 years ago

could you please take care of this @cdjackson? Thanks a lot, Thomas E.-E.

SkynetHome commented 9 years ago

NigelCoxon: I am working on this. I dont have a Heatmiser so can you clarify something. Do you just need the RUNMODE command recognized as simple ON/OFF or does this need to have the functionality of creating a set time to run like HOLIDAY MODE or HOLD MODE?

mfarewell commented 7 years ago

I have committed a fix for the RUNMODE issue to my fork of openhab. Essentially the solution is the same as SkynetHome except I have added a variable dcbRunMode to the Thermostat so that you can read and write the RUNMODE to the thermostats. I have built and had this running on my heating system for a couple of months without issue. This is my first commit and am trying to work out how to get this change proposed, so apologies if I have broken protocol.