SmartThings Community

Fibaro dimmer 2 with toggle light switch

(Fred) #14

Cool ok. When we had our house renovated we went for these black nickel screwless type switches and sockets which look great but I didn’t see much choice in momentary switches of this style. Plus, I’m reticent to replace the switches at the moment as they are so knew and weren’t exactly cheap! That’s not to say I wouldn’t change in future but for now I’d like to have the dimming ability.

Just trying to create the smartapp on the ide using the code from the above author and once I paste the code and click create I get the following error:

No signature of method: script1482264827848121989170.metadata() is applicable for argument types: (script1482264827848121989170$_run_closure1) values: [script1482264827848121989170$_run_closure1@32a972b] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)

Any idea?

(Fred) #15

Oh wait I’ve just realised I copied the wrong code! In the github location there is a folder called smartapps and a folder called device types. I didn’t do the obvious thing!

(Robin) #16

I would hazard a guess you are trying to past the code into a new smart app instead of a new device handler. (Or you missed a bit when you did the copy)

Click on 'device handlers’
Click on 'create new Device Handler’
Select 'from code’
Paste code
Click ‘create’ at the bottom
Click ‘save’ at the top
Click ‘publish’ > ‘for me’ at the top

Should all be done and ready to assign to your device when it arrives.

(Fred) #17

Yep cool you were spot on. I’ve now created the device handler ready to assign it to the dimmer 2 once that’s installed. The github location also has code for a couple of smartapps and I’ve just realised that those aren’t required for the device handler right? They are just additional smartapps I can add to control the dimmer in certain ways?

(Robin) #18

Correct… Those are good smartapps but really you only need one… CoRE.

(Fred) #19

Ah ok, I will check out CoRE then :slight_smile:

(Fred) #20

CoRE seems really good but I need to spend some time learning about how it works etc. In the meantime, can I just check that just with the custom device handler assigned to the dimmer 2 I will be able to dim and brighten the lights? Will I do that through the Smartthings app and will I be able to set a percentage amount by which the lights are dimmed for a very basic dimming capability?

(Fred) #21

Also obviously I can’t see the actual dimmer 2 device in my devices list on the IDE but just testing where I would assign the custom handler to the device and when I click to edit any of my existing devices I see a bunch of fields but none where I would assign the handler. Are the fields different depending on the device? So far I’ve only got two mobile phones as presence sensors and a power outlet.

(Robin) #22

With just the DH you will have full primary control… you don’t need CoRE.

In addition to the slider bar within the device view itself, native apps like smart lighting and routines can control on / off / dim no problem, but they won’t respond to the scene ID’s rendering S2 fairly useless.

If you find CoRE a bit to complicated (and it is) you could use the Fibaro dimmer scenes app by @hajar

CoRE gives you extreme control with options such as IF, AND, OR, XOR, THEN, THEN IF, BUT IF etc. Very useful when you really start getting stuck into you specific use cases.

If there is anything in particular you want your automation to achieve, describe it on here or on the CoRE peer support thread and lots of people will be fighting to give you solutions… This is a great community!!

(Robin) #23

To assign a device handler to a device:

First, associate the device to ST (for the dimmer 2 that requires you to quickly click the ‘b’ button 3 times whilst ST is set to add new devices)

  • Go to ‘devices’ in the IDE
  • Click the Device you want to change
  • Click edit at the bottom
  • Change ‘type’ to the DH you want (it opens a long drop down list of standard handlers, custom handlers are added to the bottom of the list seperately from the main alphabetical ordering)
  • click save

Note - when you initially associate a device with ST, it will automatically be assigned a DH. The Dimmer 2’s get assigned to ‘Fibaro Dimmer’ but this built in handler is for the Dimmer 1 and won’t work.

(Fred) #24

Perfect! Many thanks @robinwinbourne
Looking forward to installing the dimmers now…

(Fred) #25

Dimmer scenes smartapp by @hajar and CoRE now installed :slight_smile: I’ll start looking into pistons now…

(Tefo Giliana) #26

I am one of the late adopter. Bought a ST Hub and 2 Fibaro dimmer 2. Do I follow the same process as outlined above? I am in South Africa using the U.K. Standard items (mentioned above)

(Fred) #27

Yes you should be able to follow the same process to get then up and running. I now have the dimmer modules installed in 5 rooms with the custom device handlers assigned and ability to dim via the ST app and the switch. Note, I still have toggle switches and I can dim up, down, turn off and turn on from the switch - you just have to learn the click combinations to get these actions to happen.

(Tefo Giliana) #28

I have connected the Fibaro double switch using both the S1 and S2 but cannot find the S2 on ST, even after downloading the Multi-Channel Control SmartApp. Can someone help please.

(Fred) #29

For what it’s worth, once my ST hub ‘found’ the double switch 2 device as part of the pairing process I could immediately see an S1 and S2 ‘thing’ listed in the app. I can’t remember what default device handler ST assigned to the double switch but I had installed the custom device handler for the double switch 2 which can be found on these forums so I applied that and it all works fine. Have you tried pairing again?

(Tefo Giliana) #30

Hi Fred. Thanks for the reply. All of the 5 switches I installed have the same issue. I even called a professional electrician for the installation to make sure that these are connected properly. It maybe the handler I am using?? If you can remember the one you used kindly share with me. Thanks once again!!

(Fred) #31

Strange - the handler I used is from the post here: [RELEASE] Fibaro Single Switch 2 FGS-213 & Double Switch 2 FGS-223

I see three ‘devices’ showing in my IDE for the double switch 2, one for the parent module itself and then one each for S1 and S2. The parent device handler is using the custom DTH I’ve linked to above. The S1 and S2 devices have a handler of type ‘Child Metering Device’ which was assigned automatically and I didn’t change.

(Robin) #32

For the Dimmer 2 there is no switch 2 to interact with from the app side of things… all the physical switch 2 does is send a scene ID to the hub which you can see in the devices ‘recently tab’… you can’t press switch 2 from the ST app / DTH.

To activate the scene ID’s… go to the device settings page (click the cog symbol whilst viewing the device), and change parameter 28 to option 1.

To respond to a scene ID you would use a smartapp like webCoRE.

(Tefo Giliana) #33

Thanks Fred. Will delete the handler that I have and install the one you