Welcome to Smart Home Forum by FIBARO
Dear Guest,
as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.
As a member you can:
- Start new topics and reply to others
- Follow topics and users to get email updates
- Get your own profile page and make new friends
- Send personal messages
- ... and learn a lot about our system!
Regards,
Smart Home Forum by FIBARO Team

Question
dw89 8
Hi All,
May be a stupid question but I've never really thought of it until I just tried to debug a script. Basically I tried (for debug purposes) to get the 'value' of a doorsensor and it's 'armed' status. When I did this and tried to print out to screen all I get is an error saying that cannot concatenate a NIL value for _test (below). Basically saying it cannot put a null value into the variable. So my question is what to do? I am guessing it will work properly when the id for the device is triggered and, guess, is awake and so it's value is past through to scene script but can we not pull values from battery devices at all? Either that or am I doing something else wrong?
KR, Dave segment of code below:
if tonumber(fibaro:getValue(_outerSpotsDeviceI, "value")) == 0 then
fibaro:call(_outerSpotsDeviceI, "turnOn");
else
local _test tonumber(fibaro:getValue(_silveloxFDoorID, "value"));
-- local _test = 10;
local _test1 tonumber(fibaro:getValue(_silveloxFDoorID, "armed"));
fibaro:debug('Kitchen Lights already on');
fibaro:debug('Silvelox id: ' .._test); -- ..'and is: ' .._test1);
end
[ Added: 2015-01-11, 00:48 ]
Woah the forums are busy at the minute!?
>300 views and no thoughts anyone??
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.