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
andyp 6
I have this scene to turn mu outside lights on and off at night, but I keep getting this error which stops the script. and it is exactly the same error line every time
[DEBUG] 16:51:57: Outside Light Script started at Sat Oct 1 16:51:57 2016
[DEBUG] 20:47:00: line 35: unexpected character @ character: 1 0:1 [�] line:
[DEBUG] 20:47:00: �
This is the script. I commented out line 35 but it made no difference
--[[
%% autostart
%% properties
%% globals
--]]
local debug = true;
local function log(str) if debug then fibaro:debug(str); end; end
local sourceTrigger = fibaro:getSourceTrigger();
-- check script instance count in memory
if (tonumber(fibaro:countScenes()) > 1) then
log("Script already running.");
fibaro:abort();
end
log("Outside Light Script started at " .. os.date());
while true do
local TODFlag = fibaro:getGlobalValue("itisnight")
--log("Time of day is :" ..TODFlag );
local lightstate = (fibaro:getValue(232, "value"))
--log("The light is :" ..lightstate );
if TODFlag == "1"
then
if
lightstate == "1"
then
-- do nothing
else
fibaro:call(232, "turnOn");
-- log("Outside Lights on at ".. os.date()); -This was line 35 till I commented it out
end
else -- means it is not night
if
lightstate == "0" -- lights are off
then
-- do nothing
else
-- turn lights off
fibaro:call(232, "turnOff");
-- log("Outside Lights off at ".. os.date());
end
end
end
Can anyone tell me where I am going wrong, or point me in the right direction.
8 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.