[solved] openHAB 2 and Philio PSR04 Smart Color Button

Hi everyone and thanks for sharing!

I’m trying to get my PSR04 dimming functionality working with OH2, but fail miserably. After reading this and other threads, I’ve gotten it to report ON/OFF (either 0 or 100), but not the dimming level in between. @TheNetStriker, in what file did you do the change to PercentType?

On a little off-topic note since we all seem to share the weirdness of the PSR04, what device do you use to dim lights?

Hi Henrik, the file you are looking for is compiled into the Z-Wave plugin. So there is no easy way to change this. You would have to download the whole sourcecode, change the file, compile the Z-Wave plugin and install this plugin on your Openhab device.

@chris I’ve just tried to add this change in the Z-Wave device list, but I didn’t figure out how to change that part using the web interface. The property name of the “switch_dimmer” channel should be changed from “binding::OnOffType" to "binding::PercentType”. Could you please change this in the Z-Wave database so the dimmer can be used as an actual dimmer and not just an on/off switch? I have the z-wave plugin with this change running for over a year and I never had any problems.

Alright, thanks David! I thought i did have the source code and build environment, but after looking around a bit more, I now understand that the Z-Wave binding for OH2 is in a separate git repository, https://github.com/openhab/org.openhab.binding.zwave. I’ll give it a go and see if I can get it to work on my end.

So, after some painful exclusion/inclusion problems, I managed to reproduce your fix, David @TheNetStriker. It works as a charm!

I’ve got two items defined, just to make sure the change doesn’t break the ON/OFF functionality when switching to PercentType:

Dimmer dimmerButton01       "Dimmer button"        { channel="zwave:device:7c9a9101:node11:switch_dimmer" }
Switch dimmerButton01Switch "Dimmer button switch" { channel="zwave:device:7c9a9101:node11:switch_dimmer" }

When I adjust the dimming level on the PSR04 in vertical mode, I get the following updates:

dimmerButton01 changed from 28 to 0
dimmerButton01Switch changed from ON to OFF
...
dimmerButton01 changed from 0 to 62
dimmerButton01Switch changed from OFF to ON

When using it in horizontal mode, I get the following updates:

dimmerButton01 changed from 0 to 100
dimmerButton01Switch changed from OFF to ON
...
dimmerButton01 changed from 100 to 0
dimmerButton01Switch changed from ON to OFF

I’m not sure how to handle the change in the git repo, but it would be nice to see it included there. Are the thing definition files automatically generated from the device database? Ping @chris, if you have the time.

This requires a change to the database exporter. I’ve just made this change so it should flow into the system in the next day or so.

Fantastic! I really appreciate all the work you put in, Chris.