[RELEASE] Fibaro Dimmer 2 (FGD-212) - Advanced DTH (V2)

fibaro
dth_lighting
communitydevices

(codersaur) #1

#Fibaro Dimmer 2 (FGD-212) - Advanced DTH
Version: 2.02 (2017-02-27)
Source: https://github.com/codersaur/SmartThings/tree/master/devices/fibaro-dimmer-2


Thanks to everyone who’s provided feedback on earlier versions of the Fibaro Dimmer 2 device handler. Today I’m releasing a major update, so it’s about time I put it in its own thread. :blush:

Key features in V2.02:

  • Z-Wave parameters can be configured using the SmartThings GUI.
  • (NEW) Multi-channel device associations can be configured using the SmartThings GUI.
  • (NEW) Child protection modes can be configured using the SmartThings GUI.
  • (NEW) Fault tile indicates burnt-out bulb / overload / firmware / hardware and other errors.
  • (NEW) Scene tile indicates last activated scene.
  • (NEW) Sync tile indicates when all configuration options are successfully synchronised with the physical device.
  • (NEW) Dimmer level range is now 0-100% (instead of 0-99%).
  • Nightmode feature allows switch-on brightness level to be controlled on a schedule.
  • (NEW) Logger functionality enables critical errors and warnings to be saved to the logMessage attribute.
  • (NEW) Proactive Reports option.

Main screen with scene, sync, and fault indicators:

Configuring Multi-channel Device Associations and Protection Settings:

Nightmode and Logging Settings:

Logger Functionality:

The logger functionality allows critical error and warning messages to be saved to the device’s logMessage attribute (not that there should be many :smirk:). This offers a way to store and review historical messages without having to keep the IDE Live Logging screen open.

Full installation instructions and a user guide can be found on github: https://github.com/codersaur/SmartThings/tree/master/devices/fibaro-dimmer-2

All feedback welcome!

Z


Fibaro 2 Dimmer (212 not 211)
How to set Multichannel Associations to endpoints of a device
Fibaro Dimmer 2 Integration
Fibaro Dimmer 2 - have to press switch twice to turn on/off
Hub Firmware Release Notes - 18.18
Is there a way to set up a z-wave association between two devices?
Fibaro dimmer 2 (fgd 212) with dual lights
Simple flip switches with Z-wave
Fibaro dimmer 2 problems
Some advice on my planned build (UK)
New Device - Fibaro Keyfob - 24 actions
Fibaro Dimmer 2 Parameters Update
Best way forward (new U.K. user)
Wall switch
Fibaro Dimmer 2
Fibaro 2 Dimmer (212 not 211)
Control the dimmer level, using voice?
Fibaro 2 Dimmer (212 not 211)
Virtual Dimmer in Association groups?
Fibaro dimmer 2 shows as socket icon
Wireless Switch for New Light in UK - Best Solution?
Fibaro dimmer 2 with toggle light switch
Fibaro Dimmer 2 Scene Activation
Wall switch don’t work with Fibaro d2
Fibaro 2 Dimmer (212 not 211)
Fibaro 212 installarion
Smart dimmers under existing wall switches (UK hub, German home)
UK Lighting Query
Fibaro Dimmer 2 (FGD-212) Pairs but Doesn't Work
Fibaro 212, Dimming issues
Fibaro Dimmer 2 (FGD-212) Pairs but Doesn't Work
Some advice on my planned build (UK)
Fibaro Dimmer 2 (FGD-212) Pairs but Doesn't Work
Fibaro Dimmer 2 reports status but won't sync or take commands
Fibaro dimmer working with a standard light switch
Fibaro dimmer 2 not reporting status
Dimmer slider to 100%
Fibaro 212 with direct power connection and LED non-dimmable lamps
Fibaro Dimmer Double Click Action
Fibaro dimmer
Fibaro 2 Dimmer (212 not 211)
Where to put create a schedule?
#2

Great work!

I have a couple of questions.

When performing a forced autocalibration (setting paramter 14) The config will always say sync pending.
Parameter 1 and 2 is not updated to the new values performed by the autocalibration.

Is it possible to fix the bug when setting the config from an android phone.
Something like this? Fibaro 2 Dimmer (212 not 211)


(codersaur) #3

Ah, good call! I propose to fix this by checking if P13 is > 0 (I think you meant P13, not P14 above), if it is, then it’ll nullify any target values of P1 and P2 (and also P13 after it’s sent). This will allow the device to sync. It’ll log a warning if the user has set values for P1 and P2 at the same time as forcing auto-calibration.

I don’t think there are any other read-write parameters that are changed during calibration. Can you confirm that it is just P1, P2, and presumably P13, that prevent syncing?

For the record, this is a great example of where it would be useful to be able to update the actual input values of preferences on the settings page. Unfortunately, due to ‘security restrictions’ this is not something that is currently possible on the SmartThings platform.

It’s absolutely crazy that SmartThings STILL haven’t fixed the issue of processing defaultValues on Android. Simply saying not to use defaultValue in the docs isn’t that helpful when the feature works and is very useful on iPhones. :imp::imp:
In this version I have made it easier for Android users to comment out the defaultValue statements by isolating them on their own lines. Maybe, just maybe, I will finally have to capitulate and comment them out by default. :sleepy:


(codersaur) #4

FWIW: Feature Request: Allow Android to process defaultValue for inputs (like iPhone)


(Robin) #5

Please don’t… maybe put separate iOS and android options on GitHub instead.


Detect client when rendering tiles and preferences?
(codersaur) #6

I really want to avoid this as it will get messy. I mean, what happens when someone has both iPhone and Android smartapps on different phones connected to the same SmartThings account…?

FYI, a related request: Detect client when rendering tiles and preferences?


(Robin) #7

They can just use the iOS version, initialise with iOS and then it’ll be fine for them on Android going forward.


(codersaur) #8

UPDATE: 2017-02-25: v2.01:

  • Preferences: defaultValues are commented out by default to cater for Android users. iPhone users can uncomment these lines if they wish (search for “iPhone”).
  • updated(): Fix to allow device to sync after a forced auto-calibration.
  • updateSyncPending(): If a target value is null, then it does not need syncing.

#9

Great!

Just tested and it now says synced after an autocalibration.

With default values off, can I change just the paramters I need to change and hit Done, or are they all a required input so I have to go through the whole list?


(codersaur) #10

Device Parameters are not required, if you leave them blank they won’t be synced, to avoid over-writing auto-calibrated values.

Some of the other settings are required (like Logging levels) but if you miss these, you should see a red bar next to them (at least you will on an iPhone).


#11

This is just what I wanted :+1:


(EinarS) #12

Great improvement for this device!


(Mark Rhoades Brown) #13

I just wish to thank you for this. I got this dimmer just over a week ago and have been having issues with it. I can confirm that this works extremely well.

I would like to mention, that after applying the device handler initially, it takes a while before the dimmer responds correctly - I set it to turn off and it would dim down to 1% and stay on, after a while this seems to subside. After ~5 minutes it started responding correctly and in a timely fashion.

Also worth mentioning, I am an android user, so I took off all of the ‘required’ and ‘defaultValue’ properties.

Regards,

Mark


(codersaur) #14

Sounds like you might need to be using the Fibaro Bypass module? Or, perhaps you have set relatively large values for the Dimming Step Time parameters #6 and #8, so it takes a really long time to transition between levels?


(Mark Rhoades Brown) #15

Hi David,

Thanks- my explanation was very poorly described. I have modified it so it is more concise. This issue was only temporary. As for the bypass module, I am extremely that in my house (in the UK) the ring main for the lights is in the switch back box, rather than up in the ceiling- it means that I can set it up using 3 wire mode.

Regards,

Mark.


(codersaur) #16

By 3-wire mode, I assume you mean you have the dimmer wired to the neutral as well as live. Note, this eliminates one reason to use the bypass module, but some people may find they still need a bypass module if they have a small number of bulbs on the circuit (as even in 3-wire mode, the dimmer leaks a small amount of current to the load, meaning some bulbs flicker when the dimmer is off).

E.g. I have all my dimmers connected to Live and Neutral in the ceiling, but I still need to use bypass modules on circuits with only a handful of LEDs.


(Steve Bratt) #17

That’s fantastic that you’ve done this for us android users! As your device handler is great and not having access to any iOS devices it was extremely difficult to set up. I had the situation where because of some default values stuck in the ide on Android i couldnt even edit the device handler in the IDE, I get a weird server error from smartthings.

Also it meant that you can’t leave any values blank as the page won’t save, so instead of using the auto calibrated options you had to guess the values like start brightness and end max brightness. I managed to finally get around this by setting the value to perform an auto calibration everytime I saved the settings which overwrote the settings.

I raised another case with the Dev team and heard nothing back at all about the issue with default values on android.

I would like to say that once I was able to get the default value code removed with the previous handler it has worked flawlessly. I’ll test this new handler as soon as I can with solely android and let you know how I get on, but I assume there won’t be an issue


(Steve Bratt) #18

@zcapr17 now that this works well with android too, have you thought about submitting it to smartthings as official? It certainly looks ready.


(codersaur) #19

I have thought about it, but I am going to wait until the Android/iPhone differences are ironed out, and also for some of the missing capabilities to be standardised (i.e. it currently has non-standard capabilities for “Fault” and “Scene Controller”, plus another which I am thinking of adding is “Child Protection”).


(Alwas) #20

I would really like someone from SmartThings to explain to me why they have a personal vendetta against android users. They must see posts here every week of new users complaining about “spinning wheels”, “you are not authorized” and ST app meltdowns, surely.
I updated one of dimmers to this new exciting DH, pressed edit then I get a blank screen and the whole ST app crashes and starts again from the main screen. I did this 3 times just to be sure. I went into the IDE and manually set the default parameters, from another dimmer, it’s still not working, there were some new parameters left blank, because I don’t know what to put in there. So I’ve got back to a previous working DH. Maybe it’s better to put all that default parameters back in, and let everyone with an Android just fend for themselves within the IDE.
Until SmartThings makes the platform equal for both Android and iPhone users.


Feature Request: Allow Android to process defaultValue for inputs (like iPhone)