Created At

Nov 27, 2023

Last Update

Nov 28, 2023

Platforms

Yubii Home Pro, HC 3

Views

944

Download

79

Type Scene

The "Light Butler" is a Lua script designed for the Fibaro Home Center 3 (HC3) system. It automates the control of lighting fixtures in a home based on input from motion sensors. Key components of the script include:

  1. Device List (devices): This list contains the ID numbers of motion sensors and their corresponding lamps across various rooms in the house. Each device pair is also assigned a time interval (in seconds), which determines how long the lamp should remain active after the last detected movement.

  2. Minimum Battery Level (min_battery_level): A variable specifying the minimum percentage of battery charge for the motion sensors. Actions are not executed if the battery level is below this threshold.

  3. Helper Functions:

    • wasMotionDetected(): Checks if motion was detected within the set interval.
    • isBatteryLevelOk(): Verifies whether the sensor's battery level is above the minimum required level.
    • isDeviceReachable(): Ensures the sensor is reachable and not offline.
  4. Lamp Control (turnOffLamp): A function to turn off the lamps.

  5. Main Script: A loop that goes through each device pair, using the functions to decide whether a lamp should be turned off. The decision is based on the absence of detected motion, acceptable battery status, and sensor reachability.

Instructions for Using the "Light Butler" Script

  1. Setup in HC3: This script needs to be implemented in the Fibaro Home Center 3. Log into the HC3 user interface and navigate to the Lua scripts section.

  2. Customize the Device List: Update the devices list to include the specific ID numbers of your motion sensors and lamps. Ensure that the IDs correctly correspond to the devices in your home.

  3. Set the Minimum Battery Level: Modify the min_battery_level variable as needed to set the desired minimum battery level for the sensors.

  4. Activate the Script: After the script has been adjusted and uploaded, it should run automatically. It regularly checks the status of the sensors and controls the lamps accordingly.

  5. Monitoring and Maintenance: Regularly monitor the system for proper functioning and update the device list as needed, such as when new sensors or lamps are added.

 

 

 

 

1 Comment,  Want to add comment please login
650e7eb06b84aba42b00840e791ee061

If it was in english it would be more helpfull

Load more comments
© 2024. Nice-Polska Sp. z o.o.Privacy policyTerms & ConditionsFeedback