Jump to content

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


  • 0

Hi, dos this work on HC3? I pasted the code an I get "[ERROR] [CONDITION_ERROR]: (load):35: unexpected symbol near 'local'


Question

Posted

I'm new to this, can I make this work on HC3? I'm trying to edit the code, but I'm just getting the same error. In the code below I have marked the line that refers to the error.

 

"[ERROR] [CONDITION_ERROR]: (load):35: unexpected symbol near 'local'"

 

--[[
%% autostart
%% properties
2093 value
--]]

--[[
  HC-Humidity-Fan-Control
  
  Script to control humidity in your bathroom.
  
  Author: Peter Gebruers, aka "petergebruers". Meet me here:
 

Please login or register to see this link.


  Or here:
 

Please login or register to see this link.


  
  The full project is on the Fibaro forum:
 

Please login or register to see this link.

  See also:
 

Please login or register to see this link.

  Licensing, warranty and liability, governed by:
  "Attribution 4.0 International (CC BY 4.0)", available at:
 

Please login or register to see this link.


  
  Version 1.0.0: public release
--]]


-------- USER SETTINGS BEGIN --------

-- sensorDeviceID is the ID of the (slave) device which reports humidity.
-- If you want to test this script, set it to any dimmer, it will act
-- as a "humidity" sensor by dimming up and down.
-- Check if this ID matches the value in the header of this script!
local sensorDeviceID = 2093

-- fanDeviceID is the ID of the (slave) device which controls the fan.
-- This scene automatically detects if it is a switch or a dimmer.
-- If you want to test this script, set it to any dimmer, it will act
-- as a fan. Brightness will be an indication of fan speed.
local fanDeviceID = 2278

-- humidityUpperLimit and humidityLowerLimit determine % level at which
-- the fan should start/stop (taking into account delays and timing below).
-- I recommend 80-70 or 75-70 but feel free to experiment and share your
-- thoughts.
local humidityUpperLimit = 75
local humidityLowerLimit = 70

-- delayMinutes delays the start of the fan, when humidity first exceeds
-- its threshold. This avoids turning on the fan while you are in the
-- shower. Can be set to 0.
local delayMinutes = 20

-- fanRunMinutes limits the maximum amount of time the fan can run
-- without interruption. The assumption is, if the fresh air is humed,
-- the fan could run forever. Used with fanSleepMinutes to determine an
-- on/off regime. Note: stopping and starting this scene resets this timer.
local fanRunMinutes = 2*60

-- fanSleepMinutes determines how long the fan should stay off, after
-- fanRunMinutes was exceeded. The assumption is, weather conditions will
-- have changed after several hours, so it is worth trying again.
local fanSleepMinutes = 4*60

-- timeSpeedupFactor makes time appear to go faster if you set this
-- above 1. Setting it to 60 will cause a one minute period to elapse
-- in 1 second. This greatly helps while debugging this script.
local timeSpeedupFactor = 1

-- autostartSleepSec delays start of this script at boot time,
-- to allow for startup of all HC services.
-- A value of 30 - 45 seconds is recommended.
local autostartSleepSec = 30

-- minFanLevel sets a the lowest level which can be
-- send to the fan. An induction motor will stall if this
-- value is too low and then it might overheat.
-- If your fan exceeds 30 W, use a proper "inverter drive"!
local minFanLevel = 50

-- function log(msg) is a shortcut for fibaro:debug.
-- It can also be used to remove debugging. To do so,
-- Set log to an empty function.
local function log(msg) fibaro:debug(msg) end
-- local function log() end

-------- USER SETTINGS END --------
 

4 answers to this question

Recommended Posts

  • 0
Posted
1 hour ago, FlipC said:

can I make this work on HC3?

I won't work on HC3. It'll need complete rewrite.

  • 0
  • Inquirer
  • Posted

    OK thanks. Do you know if there is a verson for HC3?

    Please login or register to see this attachment.

    • 0
    Posted

    have you seen this?

     

     

     

    • 0
  • Inquirer
  • Posted

    Thanks. No, I will check it out:)

     

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...