Fibaro Motion Sensor Code


#1

Hi, I’m trying to create a smart app for a Fibaro Motion Sensor, using code by CSC. When I paste it into the ‘From Code’ area and press create, I get this message:

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

I have zero programming experience and don’t know what any of those words mean, but would be very grateful for any help.

I am essentially trying to adjust temperature perimeters and turn off the LED on the motion sensor.

Thanks very much.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #2

The code you are pasting is a “DEVICE TYPE Handler” definition, not a SmartApp.

Paste the code under “My Device Handlers”, not “My SmartApps”…


#3

Thanks for the quick reply, it’s very much appreciated.
Cheers.