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!



Smart Home Forum by FIBARO Team

UHAS (Universal Home Automation System) for HC2 1.0.3

   (1 review)

1 Screenshot

About This File


UHAS v1.0.3 (Universal Home Automation System) for HC2




UHAS is a set of scenes and Virtual Devices (VD) that provide the following capabilities:

  • Auto translation of all scenes, VD's, predefined global variables, and messages to 31 different languages (19 directly supported by HC2) (NOTE – not all languages are translated, and users are very welcomed to help with translations that are not yet done)
  • Scheduled and repeating events based on time of day, week, month, and season including Scene FTBE which provides repeating and scheduled actions
  • Advanced Notification Center (ANC) brings centralized notifications with support for most popular services like Pushover, Telegram, GroupMe, WhatsApp and Signal, Sonos TTS and LaMetric TIME smart clock notifications
  • Advanced Lighting Control (ALC) with integration for Philips HUE, Nanoleaf, LIFX and Blebox devices (will be provided in separate package)

  • Very Smart Blinds (VSB) automation

  • Presence monitoring and control with geofencing and Netatmo presence

  • Weather state and forecast with notifications and integration for Netatmo weather station and WeatherFlow and Tempest weather stations

  • Home consumption monitoring and recording

  • Appliance monitoring - with notifications

  • Safety alarms fire and flood

  • Security alarm integration ready with provided global variables

  • Irrigation control based on FIBARO devices

  • Scenes ready to use with Fibaro dimmer 2, Fibaro keyFob, Fibaro Swipe, Fibaro Button and Remotec ZRC-90 central scene activation with built in support for ANC

  • HC2 system status notifications, automatic backups and many more...



  • UHAS has been developed for the Fibaro Home Centre 2 (HC2) home automation controller, as a series of modules, which are responsible for one particular action or job, and the user can interact with them as a group, or on their own.
  • UHAS provides an advanced Home Automation (HA) set of features, ready to be used out of the box with minimum user effort to set up and run. Running code is provided as part of the system, doing most of the settings for the user or a systems installer.
  • UHAS is primarily intended to be used by users of the Fibaro HC2 system who wish to have fully featured HA without the need to learn LUA programming and spending a lot of time with coding Virtual Devices and scenes.
  • UHAS can also become a part of a mature Fibaro system installation which has developed with many modules to cover more advanced HA and more devices.
  • UHAS Virtual Devices and scenes use proprietary code developed by author. This code is developed to minimise users involvement in installation and setting of the system. Most of the necessary setting is done by the UHAS components and other settings are simplified and minimised as much as possible. This was also possible because all UHAS VD's and scenes use role system that is used to find necessary components for actions to be performed.
  • UHAS Virtual devices category is set automatically during translation or changing of the main icon. This means that most of the VD's should show in proper category in new mobile app as lights, blinds, gates, ambience, climate, safety, security, multimedia, remotes and other. The same goes for scenes, when scenes save their settings after first manual run then also category is set.



  1. Fibaro Home Center 2 (HC2) with firmware version 4.120 or higher (recommended but not necessary expanded RAM memory to at least 2Gb)

  2. Configured and installed z-wave devices – I.e., light switches, motion sensors, lux detectors etc.



  1. NEW USERS - Please download provided UHAS v1.0.3 Installation package and UHAS Installation and User Manual v1.0.3 EN
  2. EXISTING USERS - if your UHAS is:
    1. Not yet started with installation then please download full package UHAS v1.0.3 Installation package and install.
    2. Still on v1.0 or V1.0.1 then please first download UHAS v1.02. upgrade package and install. Lastly download and install UHAS v1.03. upgrade package
    3. Installed v1.0.2 then please download UHAS v1.03. upgrade package and install.

NOTE - Upgrade instructions are provided in UHAS Installation and User Manual v1.0.3 EN

ADDITIONAL NOTE - In UHAS Installation and User Manual v1.0.3 EN instructions for ALC scene upgrade say:

UPGRADE INSTRUCTIONS – This upgrade is recommended. To upgrade and keep your ALC Scene settings please copy new code from ALC Scene v1.3.3.lua from line:
-- NEW v1.3.3 - copy code from here to the end of scene code to keep your settings above this line

to the end of code.

The mentioned line I forget to add to the code before making upgrade package, therefore please copy new code from line:

-- THE CODE BELOW DOES NOT REQUIRE MODIFICATION BY THE USER to the  end of code. Thanks goes to @MiZ for pointing that out 🙏




UHAS uses its own unique global code variables. This means that UHAS will NOT influence the current system scenes, scripts, or virtual devices in any way, even if any of Sankotronic’s earlier UHAS beta versions and standalone scenes or VD's (Virtual Devices) are being used. There is no need for any changes to be made to the existing code before the installation of UHAS. The UHAS global variables are created and controlled automatically by the system so that you do not need to maintain them manually.



  • 92 Virtual Devices
  • 53 scenes
  • Icon sets for all the above VD's and scenes



I want to BIG thank to @clowg for helping me with translations and writing manual these last days speeding up publishing UHAS.

BIG thank to @gucio1234 and his son Cyprian for making logo for UHAS and 3D printed with real gears! I just love it ❤️


I also want to thank many of you who helped during testing of UHAS beta versions and with translations! @clowg, @speedoxx007 ,@Bodyart, @jimicr, @gucio1234, @jompa68, @Sjekke, @robw, @rbhun, @lennypenny, @FunkFib, @MarcoT, @Orgli, @MarcoTorino71 and many others. Your help is greatly appreciated. Apologies to all other not mentioned nice people who contributed in making UHAS.

I also want to thank gurus of this forum @petergebruers, @jgab, @cag014, @SmartHomeEddy and others for help with coding in LUA.

And of course a BIG thank to Fibaro for providing Home Center 2 and Home Center 3 for developing purposes!


BIG THANKS! also to all UHAS users for their donations! Your support is greatly appreciated! 🙏



Permission to use, copy, modify and distribute this software and its documentation for educational, research, personal use and non-profit purposes, without fee and without a signed licensing agreement is hereby granted, provided that the copyright notice, with "Terms and conditions" and "Disclaimer" appear in all copies, modifications and distributions. It is strictly forbidden to sell, rent, lease and/or lend this software for profit without prior consent from the Author.



This software is provided by copyright owner "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the author and distributor be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

Fibar Group S.A. and their employees are not responsible for support of the UHAS. Please contact the author Sankotronic, on the Fibaro Forum, for any questions or support required.


Edited by Sankotronic
Added additional note

What's New in Version 1.0.3   See changelog


UHAS v1.0.3 upgrade changes:


  1. TTS Translations Scene v2.0.1 – All languages added translations for CO alarm.
  2. System Control VD v1.5.1 – Reboot router button code – changed code to send message when button is pressed
  3. (ABC) Advanced Battery Check VD v1.6.2 – Update button code – corrected total price calculation. Battery devices that are found dead will now show last reported battery level. Update display button code – corrected code so that dead devices still show with last reported battery level
  4. Main Scene FTBE v2.8.5 – Corrected message formatting for scheduled scene and virtual devices. Added function calculateTimeString(base_time,difference,operator) at the beginning of the scene so users can now use it to calculate different time for specific actions.
  5. Sun Calculator Scene v1.1.3 – scene changed to add and update regularly following global variables:
    1. UHASSunAltitude
    2. UHASSunAzimuth
    3. UHASMoonAltitude
    4. UHASMoonAzimuth
    5. UHASMoonPhase
  6. ANC Notifications scene v1.7.2 – Corrected sending of HC popup message when message body is different than the push message.
  7. Netatmo Weather Station Scene v3.0.1 – Changed code to support Netatmo Indoor Main Base Module without paired outdoor module that can be used as Netatmo Aircare module (coach).
  8. Philips HUE2 all VD v1.0.3 – Process button code – modified code to separately check for opening global variable UHAS_CST_[id] error and return of error from HUE2 scene for easier fault finding on all HUE2 family VD.
  9. ALC Config VD v1.2.2 – Main Loop code – added translation for CO Alarm (co_alarm) light state that is also added to ALC scene.
  10. ALC Scene v1.3.3 – Added co_alarm light state that can be used together with new CO Alarm suite.
  11. ALC Light State Control VD v1.2 – Main Loop code – corrected code to properly handle global variable UHAS_VD_[VD_ID] and add missing value for alc_ctrlID which may cause VD buttons code to fail if more than one ALC Light State Control VD is installed per room.
  12. VSB Config VD v1.0.3 – Main loop – added translations for curtains and for co_alarm blinds state.
  13. VSB scene v1.0.5 –  added support for CO Alarm (co_alarm) blind state which can be setup to open blinds in case alarm is activated. Further corrected code for checking what blind state to use depending on home state and other conditions.
  14. DW Check scene v1.0.2 – corrected code that is handling notifications. HC popup message will be properly received and will contain list of all doors and windows found open. Also done better generation of TTS notification and e-mails.
  15. CO alarm scene v1.1.1(NEW) added. Please follow installation instructions: CO Alarm Scene
  16. CO Alarm VD v1.1.1(NEW) added. Please follow installation instructions: CO Alarm VD
  17. Air Quality VD v1.4.2 – Main loop code – minor corrections done to the code. Update button code – corrected debug line on code line 129 causing code to stop on error in some cases.
  18. Appliance Monitoring VD v1.0.1 – Main loop code – corrected VD translation for State label that was missing.
  19. Appliance Monitoring Scene v1.2.1 – Corrected code to properly set HC popup message icon. Added code that will send consumption for last working cycle when appliance is finish.
  20. Home Energy VD v1.4.1 – Update button code – corrected code to properly update notifications before sending. Instead of sending name of the HC2 it will now send name of the monitored energy device.
  21. Sonos API News VD v1.0.1 – Corrected main loop code to properly end news if presence is set to away during news broadcast.
  22. Sonos ARC News VD v1.0.1 – Corrected main loop code to properly end news if presence is set to away during news broadcast. Corrected update button code to properly display state when no Sonos ARC Player is found
  23. Auto Volume scene v1.3.1 – Corrected code to properly handle volume adjustment when presence is set to away or cinema or projector light states are activated.



  • Like 9
  • Thanks 7

User Feedback

Recommended Comments


thanks for yuor excellent project!!!

I need of your support, because I have a problem with Netatmo Camera VD.

I have the following error.

I have installed seversal scene+VD of UHAS (not all) but following the manual, maybe some/one scene/VD that I didn't have installed was necessary to work correctly the Netatmo Camera VD?

Anyway, he camera is found...

Can you help me?

Thanks in advance for your support


Immagine 2022-10-16 105834.png

Immagine 2022-10-16 110321.png

Link to comment
Share on other sites

Hi @bresaola80,


Thank you for your interest in UHAS.

Just install TTS Translations scene and it should work. Even scene is called TTS Translations some translations are still used for normal messages so it must be installed even if you don't use TTS. It is pointed out in manual that UHAS translation module all scenes and VD must be installed.


  • Like 1
Link to comment
Share on other sites



Just to inform you that UHAS Sonos collection is tested with the latest Sonos OS S2 version 15.8 (build 75145120) for Play 1, Play 3, Sonos One and Sonos Roam and is working properly.

Link to comment
Share on other sites

Hi @Sankotronic!

Two questions to you:

1. How can I get hold of the sunset/sunrise times from the global tables in my own scenes?

2. All messages UHAS send over Whatsapp start with the name of the HC2, but not the once from FTBE (for example 'Scheduled event:....'). Would it be possible to add the HC2 name for those messages also?


Best regards


Link to comment
Share on other sites

3 hours ago, MiZ said:

1. How can I get hold of the sunset/sunrise times from the global tables in my own scenes?


Hi @MiZ,


1. Can you be a bit more specific on this one?


3 hours ago, MiZ said:

2. All messages UHAS send over Whatsapp start with the name of the HC2, but not the once from FTBE (for example 'Scheduled event:....'). Would it be possible to add the HC2 name for those messages also?


Yes it is possible. Will do that for next update which I hope I will publish in a month time. Can't do it now since I'm leaving home for work in two days. Thanks for using UHAS!

Link to comment
Share on other sites

1) I want to make some actions based on the sunset/sunrise times in my own scenes and am wondering how to get the correct times?

2) Great, thx!



Link to comment
Share on other sites

Hi @MiZ,


1) Please check manual for Main Timers scene, Sunrise & Sunset VD and Sun Calculator suite if installed. You can still use Main scene FTBE to run your scenes at sunrise/sunset times as needed. You can also use Main scene FTBE to change some global variable at scheduled time that will then trigger your scene etc.


Link to comment
Share on other sites

My need is to check if one of my scenes is triggered before or after sunrise/sunset. If I understand the manual correctly, these times are found in the UHASSuncalc variable? What is the syntax? getGlobalValue(“???”)


Link to comment
Share on other sites

Hi @MiZ,


You can get sunrise and sunset times from global UHASBaseTimers:

local bT=json.decode(fibaro:getGlobalValue("UHASBaseTimers"))

local sunrise = bT.time.morning
local sunset  = bT.time.evening


Or from global variable UHASSuncalc if Sun Calculator suite is installed:

local sC=json.decode(fibaro:getGlobalValue("UHASSuncalc"))

local sunrise = sC.sun.rise
local sunset  = sC.sun.set



  • Like 1
Link to comment
Share on other sites

Join the conversation

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

Add a comment...

×   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...