I have Fibaro Dimmers installed in the house with toggle switches. Everything is working very well. The question I have is if anyone managed to assign other actions to double clicks? For example, in my bedroom there is a wall switch that controls ceiling lights. It would be nice if with double click it would be possible to switch on small bedside lights, instead of ceiling lights. So far I haven’t found a way of registering double clicks on a Fibaro Dimmer and processing them in ST. I tried Double Tap and variations of it like Better Double Tap etc but none of them seem to react to double clicks of the wall switch that controls Fibaro Dimmer.
If anyone has any ideas or suggestions I’d be very grateful. Don’t mind coding it up via device handler or smartapp as well if anyone has a good suggestion of how it could possibly work in ST infrastructure.
Well, the code I posted is for toggle switches. So you would need t adjust it a bit, but it should be very straightforward. Two things you need to change:
1)Parameter that controls Fibaro Dimmer if it works in toggle or momentary mode. Set it to momentary mode.
2)Review the manual of Fibaro Dimmer 2 to see what the differences in triggered scene IDs there is for toggle and momentary switches and add those to the code to generate the events you are after if I didn’t cover all of the scenes. I’ll try to do that tonight and push the code update if you don’t do that before me.
Let me know how you’re getting on with this new capability of Fibaro Dimmers.
I just pushed out an update which allows to control all of the Fibaro Dimmer 1 and Fibaro Dimmer 2 parameters directly in ST app, without any need to fiddle with the code.
Also considerably simplified the code of the device handlers and smartapp. Removed button capability of the dimmers and just added an attribute for handling scenes. Also one smartapp can now handle both types of dimmers.
Thinking about what rules now to assign to those extra capabilities of fibaro dimmers. For example, double click on any of the switch in the staircase makes all lights in the staircase to come on or off. Quite handy.
Great to see you’re really getting to grips with this!
I’ve just about began to experiment. My first job - I have a double momentary switch in my living room, S1 and S2 connected to two different switches. Currently S1 controls the main light, S2 does nothing. I’d love S1 to retain it’s functionality and S2 to control a lamp in the corner which contains a smart bulb.
Perhaps after that, a double tap of the downstairs hall light would carry out the ‘good night’ procedure and switch all d/s lights off.
No worries. Let me help you. Its quite simple. You should definitely be able to achieve it. This is a high-level overview of what you need to do:
1)Install the Fibaro Dimmer 1 or 2 device handlers in your ST IDE, depending on which type of dimmers you are using and switch one of your dimmers to the new device type. First make it work with one, then you can do the same with the rest.
2)Open ST app and enter the settings of the device, where you should see all dimmer settings configurable. Adjust them to what you are usually using. If unsure, check which parameters were set in your previous device type. For momentary switch you need to set parameter 20 to 0. In order to enable scenes you need to set parameter 28 to 1.
3)After you finish setting the parameters of the device, open “Recently” tab of the dimmer in ST SmartApp. This is where you can watch what is happening to your dimmer when you try single, double or triple taps on both S1 and S2. Try switching the lights on/off double/triple taps. You should see messages like “Scene id 25 was activated”. If you do see such messages then all good, you have successfully enabled scenes functionality of your Fibaro Dimmer.
4)The next step is to start listening to those scenes activations and do something about them. For that I have created a very basic smartapp, which allows you to turn on/off/toggle any switch capable device. It is very easy to extend the app with other types of devices that you want to control via code or to use virtual switches for routines and then you don’t need to bother with any additional code. So once you installed the app you need to choose your Fibaro Dimmer (or multiple dimmers) that you expect to activate scenes. Choose which scene ids you’d like to listen to and choose which switches you’d like to be turned on/off/toggled when those scenes are activated. You can install as many instances of the app as you need, if you’d like to create lots of different rules for different scenes or Fibaro Dimmers.
And that’s it. You can start enjoying extra functionality of your dimmers. I also have a double switch, where 1st switch controls my kitchen lights and 2nd switch had nothing to do. Now I configured it to control lights in the hallway. Works like a charm. Of course you need to make sure that your second switch is connected to Fibaro Dimmer S2 in order for it to cause dimmer to activate scenes.
Let me know how you’re getting along with it. Happy to help more.
Hm, these parameters are “single choice” parameters and if you choose one of the options you should not have the problem. But obviously you do, but I am clueless why this might be happening. Just tried changing these parameters myself and everything seem to work as expected.
Did you ensure you have the latest firmware and app installed? If that doesn’t help, then another idea would be to try to remove the device completely and then add it again. Be careful with device removal though, don’t do it if you don’t know how to re-add a Z-Wave device. If you force the removal, you might not be able to easily add it back in again.
Is your second switch correctly wired to S2?
Here is the dump of my non-default settings for Kitchen, where I use S2, may be it will help to find the differences:
parameterNumber: 13, size: 1, scaledConfigurationValue: 1 // Force auto-calibration of the load without FIBARO Bypass 2
parameterNumber: 19, size: 1, scaledConfigurationValue: 99 // Forced switch on brightness level
parameterNumber: 20, size: 1, scaledConfigurationValue: 1 // Enable Dimmer to work with Toggle Switch
parameterNumber: 26, size: 1, scaledConfigurationValue: 0 // S2 can control dimmer as well
parameterNumber: 28, size: 1, scaledConfigurationValue: 1 // Scene activation functionality
parameterNumber: 29, size: 1, scaledConfigurationValue: 0 // S1 operates as S1, S2 operates as S2
parameterNumber: 30, size: 1, scaledConfigurationValue: 2 // 0=forced leading edge control, 1=forced trailing edge control, 2=control mode selected automatically (based on auto-calibration)
parameterNumber: 32, size: 1, scaledConfigurationValue: 0 // On/Off Mode (0=Dimmer,1=On/Off,2=Auto)
parameterNumber: 35, size: 1, scaledConfigurationValue: 0 // Auto Calibration (0=No after Power On, 1=On First Power On, 2=On Each Power On)
parameterNumber: 39, size: 2, scaledConfigurationValue: 350 // Power limit - OVERLOAD 1-350
parameterNumber: 54, size: 1, scaledConfigurationValue: 1 // 0=Self-measurement inactive, 1=Self-measurement active
I wouldn’t leave any other parameters blank, just set them to default values.
Regarding 29, it does definitely flip S1 and S2 and you should see that in the change of the scene IDs that get activated. But the change isn’t instant - it takes about 30s to settle in once you press done.
Switched from my android phone to my iPad. There it’s working just fine. Strange…
Another question, I have already setup most of my dimmer2’s with config parameters in the code or by auto calibration. Is there a way to readout the parameters already loaded in the dimmer2. If I switch to your device handler and just want to change one parameter, it will change all the parameters listed in the app and override my previous parameters/configuration
Hm, interesting. I don’t have an Android device and so cannot check it. But there is nothing in the developer documentation that behaviour of iOS and Android with regard to preferences of device handlers should be different. So must be a bug in the Android app then.
Regarding your question: my suggestion is to just take a look into the code of your device handlers, check what parameter settings are there and type them into the preferences of the new device handler. Basically just copy parameter settings from old device handler code to new device handler preferences. You just need to do it once and that’s it. If you copy the parameters one to one, then it should not change behaviour of your dimmers. It might only trigger re-callibration (if the respective parameter is set so).
I’ve got this working now, S1 maintains manual control (sends scene commands, but I choose to ignore them). All the usual double taps, hold to start at a low dim, hold to dim options are there for S1. A tap of S2 turns the lamp on or off (Aeotec RGBW LED bulb).