Fibaro RGBW Controller (DTH link in post 32, police light smartapp link in post 79)

I think that’s parameter 71 in the settings, have you got it to 0 illumination set to white or 1 Last set colour memorized?

I appreciate the troubleshooting suggestion @Alwas. I have verified that parameter 71 was set to 1 Last set colour memorized. In further troubleshooting I believe the behavior is related to how this DTH code is really geared towards handling the device when utilizing input channels, where in my setup I am not.

The “on” capability that begins on line 1015 of the code evaluates each channel to see if there is saved level which is not zero. If there are no saved levels for any channels then it turns all channels on, which defaults to a level of 255. I have commented out the line for troubleshooting:

 (1..4).each { channel ->
     // If there is a saved level which is not zero, then apply the saved level:
     newLevel = device.latestValue("savedLevelCh${channel}") ?: -1
     if (newLevel.toInteger() > 0) {
         cmds << setLevelChX(newLevel.toInteger(), channel)
         isAnyOn = true
     }
 }
 if (!isAnyOn) { // However, if none of the channels were turned on, turn them all on.
     (1..4).each { channel ->
         // Commented the below code out to prevent changing all lights on for troubleshooting
         //if ( 8 != state.channelModes[channel] ) { cmds << onChX(channel)}
     }
 }

This does now prevent the DTH from turning all channels on if the device is already in an “on” state. However I have also noticed another action that will cause the lights to turn on white. If the DTH is passed the “on” command with a level value (Example: Smart Lighting App automation to “turn on and set level” on motion), it sets that level value for all channels, resulting with an output color of white.

The end behavior I am looking to achieve is to be able to set the color of the lights via any method (Device tiles in ST, a CORE piston, voice command via Ask Alexa). Then once the lights are turned off be able to turn them on again and set the level via any method and have them retain the last color set.

@zcapr17

just wanted to say thanks, your DTH’s have saved me three times now.

SOLVED - did a full power off with the hub and took the batteries out for 20 minutes, everything now working perfectly

Looking for some help with this DTH.

Problem
The DTH is not responding at all to any commands sent from the app (e.g. power on, change colour, poll) but the app updates to reflect any physical switch changes immediately.

Background

  • The Fibaro module is sat about 8 feet away from the hub.
  • Using the most recent codersaur DTH from Github.
  • Am only using RGB (no W), so have customised the code to remove the White channel and also reflected this in the Config.
  • This is a brand new out of the box Fibaro module.
  • I have similar issues if using the official DTH which SmartThings identified during initial pairing.

A recent copy of the device log is copied below:
SmartThings Device Log

Any help greatly appreciated, as am about to install two more of these modules.
Should I try using doing a hard reset of the module itself?

The link to the DTH isn’t working for me. Any one else have a direct link?

Sorry, I removed the whitespace. Try: https://github.com/codersaur/SmartThings/tree/master/devices/fibaro-rgbw-controller

@zcapr17 i’m using your DH but i’m having trouble with it. on one of my controllers it’s not turning on, it gets stuck on “turning on” for a minute then turns off.

what does this error mean…

4d521f56-9b87-4ea8-a163-f4fa0cb9430c 10:48:33: error java.lang.NullPointerException: Cannot invoke method getAt() on null object @ line 1510
4d521f56-9b87-4ea8-a163-f4fa0cb9430c 10:48:33: error java.lang.NullPointerException: Cannot invoke method getAt() on null object @ line 1510
4d521f56-9b87-4ea8-a163-f4fa0cb9430c 10:47:27: error java.lang.NullPointerException: Cannot invoke method getAt() on null object @ line 1033
4d521f56-9b87-4ea8-a163-f4fa0cb9430c 10:47:27: info Aaa Fibaro RGBW Controller: on()

i bought a new controller because i thought the controller may of been faulty, but the same behaviour happens…

Looks like some of the state variables are not initialised.

Have you updated and saved the settings from the Smartphone app?

i did it from the IDE, and i copied the settings from one of the controllers in the garden.

Well then, follow the installation instructions, and that should solve your issues.

Just realised I forgot to create a thread for my device handler, so I just created one:

@Alwas, if you’ve got any further issues, please raise them on the dedicated thread above.

Hi!

I just installed codersaur’s Fibaro RGBW Controller as described but infortunatelly I can’t make it working. When I click on Fibaro RGBW Controller box in Smartthings app main page (initially set to OFF), the box change the status to TURNINGON but nothing happens, my leds don’t turn on.

Please find below what I see in the Logs

Fibaro RGBW Controller: onX(): Setting channel 4 switch to on.
Fibaro RGBW Controller: onX(): Setting channel 3 switch to on.
Fibaro RGBW Controller: onX(): Setting channel 2 switch to on.
Fibaro RGBW Controller: onX(): Setting channel 1 switch to on.
Fibaro RGBW Controller: on()

If I click on the box again, which during a couple of minutes is set to TURNINGON, nothing happens either. Please find below what I can see in the Logs

java.lang.NullPointerException: Cannot invoke method toInteger() on null object @ line 1673
Fibaro RGBW Controller: offX(): Setting channel 1 switch to off.
Fibaro RGBW Controller: off()

However, if I use Smartthings Fibaro RGBW controller, I can handle the Leds without any problem.

FYI: my leds strips is RGB, so I don’t have any any wire paired to either “W” input or “INT4” input.

Could you please help me?

Thanks!

Have you completed the device settings and hit Done from the smartphone app?

I followed the installation instructions for RGB. I even went throught all configuration params and clicked done in all of them.

Just to be sure, could you kindly advise the device settings I should have followed?

Looks like device.latestValue("levelCh${channel}") is returning null, which makes me think you are not receiving any reports from the device.

Open the Live Logging. Then enable the debug logging in the device settings, and then try turning the device on and off, and also setting the level with the slider. Please post (or PM me) the results from the log.

The logs when turning on are in my post above. Regarding the slider action please fine it below:

eb85f736-06fc-434f-9f6a-c53f67c855fd 0:26:36 CEST: error java.lang.NullPointerException: Cannot invoke method toInteger() on null object @ line 1073
eb85f736-06fc-434f-9f6a-c53f67c855fd 0:26:36 CEST: trace Fibaro RGBW Controller: setLevel(): Level: 66

Two weird things I see:
-power is always set to 11.2W

  • in my devices I always see the status in INACTIVE

Hit the refresh button. What do you get in the logs?

You should get some messages like parse(): Parsing raw message...

Nothing happens: eb85f736-06fc-434f-9f6a-c53f67c855fd 1:03:44 CEST: trace Fibaro RGBW Controller: refresh()

hmm, so you are getting no response from the device at all. PM me the full description of the device from the IDE. (The screen that shows Data, Raw Description, Current States, Preferences etc…)

Here you are:

Name: Fibaro RGBW Controller
Label
Type Fibaro RGBW Controller Javier
Version: Published
Device Network Id: 1
Status: INACTIVE
Hub: Home Hub
Last Activity At: 2017-04-16 11:15 AM CEST
Date Created: 2017-04-15 4:16 PM CEST
Last Updated: 2017-04-17 12:27 AM CEST
Data: No data found for device
Raw Description: zw:L type:1101 mfr:010F prod:0900 model:1000 ver:25.25 zwv:3.52 lib:03 cc:27,72,86,26,60,70,32,31,85,33 epc:5 ep:[‘1101 26’]
Current States
switch: off
level: 26
energy: 0.01 kWh
power: 11.2 W
hue: 82.74509803921569
saturation: 100
color:#f600ff
activeProgram: 0