LED-strip with MQTTv2 and TheHookup sketch

Hi,

I wanted to share the experiment I did to get more familiar with the MQTTv2 binding that was recently released as part of OpenHab 2.4

I decided to take an LED-strip github arduino project from TheHookup, which comes with H.A support and add the sitemap, items, rules, things for OpenHab to it, without modifying the original sketch.

The original sketch works with little effort out of the box on nodemcu’s as well as on sonoff basic’s and with H.A.

Next I wanted to see how easy it is to get the sketch to work, without modifications to the sketch, with the latest version of openhab and MQTTv2. This actually appeared to be very straightforward and i am impressed of how easy it was and how robust everything works

I put the items, things, rules and sitemap files on my github page, with some more explanation:

Great work OpenHab developers.

JJ

4 Likes

I was wondering whether there is an option to have the slider scale go beyond 100
Currently, I use the following rule to accomplish this:

rule “Set Chance value for Glitter Effects”
when
Item ChanceGlitterTemp changed
then
var Number tmp = (ChanceGlitterTemp.state as DecimalType).intValue * 255 / 100
sendCommand( ChanceGlitterHookup, tmp )
end