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

getting rgbw data from tables for scene


Question

Posted

I have a several RGBW units and I want to run them using scenes. I want to be able to easily set up scenes where each rgbw is a different colour and I want to be able to select colours by name (mauve, green, maroon etc) rather than manually set the individual colour settings

 

I've read the excellent article by @AutoFrank but I've got a lot to learn about tables and what I've done so far does work but its clumsy and difficult to use at scale

 

I’ve created a table with the RGBW settings for 140 colours. Here’s a sample showing how I formatted the table.

 

light_settings ={

  

maroon={r=128,g=0,b=0,w=0},

dark_red={r=139,g=0,b=0,w=0},

brown={r=165,g=42,b=42,w=0},

firebrick={r=178,g=34,b=34,w=0},

crimson={r=220,g=20,b=60,w=0},

red={r=255,g=0,b=0,w=0},

tomato={r=255,g=99,b=71,w=0},

coral={r=255,g=127,b=80,w=0},

indian_red={r=205,g=92,b=92,w=0},

light_coral={r=240,g=128,b=128,w=0},

dark_salmon={r=233,g=150,b=122,w=0},

salmon={r=250,g=128,b=114,w=0}

}

 

I store this as a global Json file

 

So far I’ve managed to decode the file and use it to set the colour of an RGBW with the following code

 

 

rgbw_light = 689

 

--Decode the Json global table

 

local light_settings = json.decode(fibaro:getGlobalValue("g_light_set"))

 

-- get the colour references from the decoded table – in this case the colour is salmon

 

r=(light_settings.salmon.r)

 

g=(light_settings. salmon.g)

 

b=(light_settings. salmon.b)

 

w=(light_settings. salmon.w)

 

--turns the light on

fibaro:call(rgbw_light, "setColor", r,g,b,w)

 

OK this works, but its clumsy and if I have a scene with 10 rgbw and I want them all different colours it’s a lot of individual modifications with a high chance of error. I'm trying to improve the code in two ways

 

1.     I’d like to be able to have one piece of code that gets all four of the rgbw settings from the table in one go, rather than have to repeat the code 4 times 

2.     I’d like to be able to set the colour to look up from the table – eg “salmon” as a local variable so I can set the colour in a section with all the other variables rather than delve into the middle of the code each time I want to make a change. I can’t figure out how to join a variable to the lookup code line and make it work.

 

Any help with this would be really appreciated

 

HC2 v 4.60

10 answers to this question

Recommended Posts

  • 0
Posted

Hi @Rosavision,

 

Here are two examples:

Please login or register to see this code.

 

These are just simple examples. It is possible to make it more complex by for example setting up 7 different combinations of rgbw lights and scenes and then use them for each day of the week. LUA is very good with data stored in tables. I used tables a lot :-)

 

  • Like 1
  • 0
  • Inquirer
  • Posted

    Hi @Sankotronic thanks so much, this is fantastic and I learn a lot from you which I can use in the future when working with tables.

     

    The scene worked perfectly and I now added a brightness table so I can adjust the brightness of each :)

     

    Cheers

    • 0
    Guest Benrive
    Posted
    On 3/26/2021 at 6:15 PM, Rosavision said:

    Hi @Sankotronic thanks so much, this is fantastic and I learn a lot from you which I can use in the future when working with tables.

     

    The scene worked perfectly and I now added a brightness table so I can adjust the brightness of each :)

     

    Cheers

     

    Hi @Rosavision,

     

    I am installing 12 Fibaro RGBW devices in my house, my idea is to configure them in HSB mode and through input 3 activate a scene.
    Actually these devices are to have the same color throughout the house (regardless of where they are). I would like both the color and the brightness to be adjusted according to the time of day.
    I think the simplest thing would be to use tables as you have commented.

     

    Could you share how you have managed to do it through LUA?

    • 0
  • Inquirer
  • Posted

    Hi @Benrive

     

    I'm a Newbie and not a very experienced coder, but I'll share how I've done this and then maybe others can help to improve my terrible coding! The good news is that the coding I've done seems to be stable! 

     

    1.  I use a JSON table to store various RGBW settings so for example for different times of day

    2 Then use use a brilliant chunk of code by @jgab which is a scene which enables numerous other scenes to run at specific times.

     

    3. I have then written scenes which call get the desired colour settings from the JSON table and set a number of global variables. This means that I can set the lights to dimmer and warmer at night and brighter and whiter during the day.

    4. I then have scenes for every room which run if a door is opened or if someone walks down a corridor and these scenes get the light settings from the global variables

     

    It seems more complicated than it should be and I'm sure that there is a much more streamlined way to do this, but it works

     

    This is all on HC2 and I'm just starting to get my head around how to do this on HC3. At the moment the steps above do not use the brilliant code from Sankotronic@, but I'm using it in a development version and its fantastic.

     

    Let me know if you'd like me to post the actual code I'm using. I'm happy to do so as long as you don't laugh too much !!!

     

    • 0
    Guest Benrive
    Posted (edited)
    On 11/11/2021 at 3:52 PM, Rosavision said:

    Hi @Benrive

     

    I'm a Newbie and not a very experienced coder, but I'll share how I've done this and then maybe others can help to improve my terrible coding! The good news is that the coding I've done seems to be stable! 

     

    1.  I use a JSON table to store various RGBW settings so for example for different times of day

    2 Then use use a brilliant chunk of code by @jgab which is a scene which enables numerous other scenes to run at specific times.

     

    3. I have then written scenes which call get the desired colour settings from the JSON table and set a number of global variables. This means that I can set the lights to dimmer and warmer at night and brighter and whiter during the day.

    4. I then have scenes for every room which run if a door is opened or if someone walks down a corridor and these scenes get the light settings from the global variables

     

    It seems more complicated than it should be and I'm sure that there is a much more streamlined way to do this, but it works

     

    This is all on HC2 and I'm just starting to get my head around how to do this on HC3. At the moment the steps above do not use the brilliant code from Sankotronic@, but I'm using it in a development version and its fantastic.

     

    Let me know if you'd like me to post the actual code I'm using. I'm happy to do so as long as you don't laugh too much !!!

     

    Hello @Rosavision,

     

     

    I would never laugh at a code and less if it is working. I am a newbie like you or even worse, since it is possible that when I see your code I will not be able to understand it thoroughly.


    Really what you are doing is just what I want to do.
    I want my RGBW modules after activating the ignition pulse to activate one or more scenes where depending on the time of day and even the amount of light, I have a different color (dimmer at night and brighter in the morning).
    You would have to regulate the type of color and brightness.


    I would appreciate if you share it, since it would be the base from which I would start and of course if I manage to improve it I would have no problem sharing it here.

     

    I'm Working on a HC3

     

    Thank you very much for your honest answer.

    Edited by Benrive
    • 0
  • Inquirer
  • Posted

    Hi @Benrive. Yep of course I share what I have. As you are using HC3 I will give you the scenes I'm developing for HC3 at the moment. Its not all done, but I'll post more when its ready.

     

    To start with on HC3 there is good capability for triggering scenes based on time so I no longer need to use the time scheduler built by @gjab (but on HC2 it is a life saver) :)

     

    1 I create a JSON table which contains the light settings which can be called by scripts. This scene creates one global variable with all the settings. I trigger this manually becasue it only needs to run once to set the global variable and thenonly if you ever want to change the colour settings. Note that I use RGBW in a number of ways as you will see on the scene below. I use it to control ambient (CCT) LED's with warm & cold white, where each RGBW controls two ambient LEDs. I also use it as normal RGBW device and as a RGB device and also as 4 x single colour LED,s. NOTE you will need to set up a variable called     g_light_set     on the variables tab before you run the scene or you will get an error

     

     

     

     

     

    --This scene is the master colour set engine for the lighting system. 

    --It saves the colour settings table to a global variable called "global_light_set"

    -- this table can then be recalled by any scene to set the correct colours

     

    --STEP1

    --update settings or add new settings to this table called "light_settings"

    print("Nested table example")

       light_settings ={

     --for 24 voltage AL used in movement scene

      al_1 = {c=90, w=1},

      al_2 = {c=90, w=33},

      al_3 = {c=90, w=66},

      al_4 = {c=90, w=90},

      al_5 = {c=66, w=90},

      al_6 = {c=33, w=90},

      al_7 = {c=1, w=90},

     

      --for 24 volt RGBW used in movement scene

      rgbw_1 = {r=1, g=1, b=40, w= 255},

      rgbw_2 = {r=1, g=1, b=26, w= 255},

      rgbw_3 = {r=1, g=1, b=13, w= 255},

      rgbw_4 = {r=1, g=1, b=1, w= 255},

      rgbw_5 = {r=252, g=90, b=1, w= 73},

      rgbw_6 = {r=180, g=64, b=1, w= 52},

      rgbw_7 = {r=30, g=10, b=1, w= 7},

     

     

      -- for 24 volt RGB used in movement scene

      rgb_1 = {r=255, g=255, b=255, w=1},

      rgb_2 = {r=255, g=197, b=200, w=1},

      rgb_3 = {r=255, g=197, b=190, w=1},

      rgb_4 = {r=255, g=197, b=180, w=1},

      rgb_5 = {r=255, g=197, b=170, w=1},

      rgb_6 = {r=255, g=197, b=160, w=1},

      rgb_7 = {r=255, g=197, b=143, w=1},

     

      -- colour pallet for ambience scenes  

      

    maroon={r=128,g=1,b=1,w=1},

    dark_red={r=139,g=1,b=1,w=1},

    brown={r=165,g=42,b=42,w=1},

    firebrick={r=178,g=34,b=34,w=1},

    crimson={r=220,g=20,b=60,w=1},

    red={r=255,g=1,b=1,w=1},

    tomato={r=255,g=99,b=71,w=1},

    coral={r=255,g=127,b=80,w=1},

    indian_red={r=205,g=92,b=92,w=1},

    light_coral={r=240,g=128,b=128,w=1},

    dark_salmon={r=233,g=150,b=122,w=1},

    salmon={r=250,g=128,b=114,w=1},

    light_salmon={r=255,g=160,b=122,w=1},

    orange_red={r=255,g=69,b=1,w=1},

    dark_orange={r=255,g=140,b=1,w=1},

    orange={r=255,g=165,b=1,w=1},

    gold={r=255,g=215,b=1,w=1},

    dark_golden_rod={r=184,g=134,b=11,w=1},

    golden_rod={r=218,g=165,b=32,w=1},

    pale_golden_rod={r=238,g=232,b=170,w=1},

    dark_khaki={r=189,g=183,b=107,w=1},

    khaki={r=240,g=230,b=140,w=1},

    olive={r=128,g=128,b=1,w=1},

    yellow={r=255,g=255,b=1,w=1},

    yellow_green={r=154,g=205,b=50,w=1},

    dark_olive_green={r=85,g=107,b=47,w=1},

    olive_drab={r=107,g=142,b=35,w=1},

    lawn_green={r=124,g=252,b=1,w=1},

    chart_reuse={r=127,g=255,b=1,w=1},

    green_yellow={r=173,g=255,b=47,w=1},

    dark_green={r=1,g=100,b=1,w=1},

    green={r=1,g=128,b=1,w=1},

    forest_green={r=34,g=139,b=34,w=1},

    lime={r=1,g=255,b=1,w=1},

    lime_green={r=50,g=205,b=50,w=1},

    light_green={r=144,g=238,b=144,w=1},

    pale_green={r=152,g=251,b=152,w=1},

    dark_sea_green={r=143,g=188,b=143,w=1},

    medium_spring_green={r=1,g=250,b=154,w=1},

    spring_green={r=1,g=255,b=127,w=1},

    sea_green={r=46,g=139,b=87,w=1},

    medium_aqua_marine={r=102,g=205,b=170,w=1},

    medium_sea_green={r=60,g=179,b=113,w=1},

    light_sea_green={r=32,g=178,b=170,w=1},

    dark_slate_gray={r=47,g=79,b=79,w=1},

    teal={r=1,g=128,b=128,w=1},

    dark_cyan={r=1,g=139,b=139,w=1},

    aqua={r=1,g=255,b=255,w=1},

    cyan={r=1,g=255,b=255,w=1},

    light_cyan={r=224,g=255,b=255,w=1},

    dark_turquoise={r=1,g=206,b=209,w=1},

    turquoise={r=64,g=224,b=208,w=1},

    medium_turquoise={r=72,g=209,b=204,w=1},

    pale_turquoise={r=175,g=238,b=238,w=1},

    aqua_marine={r=127,g=255,b=212,w=1},

    powder_blue={r=176,g=224,b=230,w=1},

    cadet_blue={r=95,g=158,b=160,w=1},

    steel_blue={r=70,g=130,b=180,w=1},

    corn_flower_blue={r=100,g=149,b=237,w=1},

    deep_sky_blue={r=1,g=191,b=255,w=1},

    dodger_blue={r=30,g=144,b=255,w=1},

    light_blue={r=173,g=216,b=230,w=1},

    sky_blue={r=135,g=206,b=235,w=1},

    light_sky_blue={r=135,g=206,b=250,w=1},

    midnight_blue={r=25,g=25,b=112,w=1},

    navy={r=1,g=1,b=128,w=1},

    dark_blue={r=1,g=1,b=139,w=1},

    medium_blue={r=1,g=1,b=205,w=1},

    blue={r=1,g=1,b=255,w=1},

    royal_blue={r=65,g=105,b=225,w=1},

    blue_violet={r=138,g=43,b=226,w=1},

    indigo={r=75,g=1,b=130,w=1},

    dark_slate_blue={r=72,g=61,b=139,w=1},

    slate_blue={r=106,g=90,b=205,w=1},

    medium_slate_blue={r=123,g=104,b=238,w=1},

    medium_purple={r=147,g=112,b=219,w=1},

    dark_magenta={r=139,g=1,b=139,w=1},

    dark_violet={r=148,g=1,b=211,w=1},

    dark_orchid={r=153,g=50,b=204,w=1},

    medium_orchid={r=186,g=85,b=211,w=1},

    purple={r=128,g=1,b=128,w=1},

    thistle={r=216,g=191,b=216,w=1},

    plum={r=221,g=160,b=221,w=1},

    violet={r=238,g=130,b=238,w=1},

    magenta={r=255,g=1,b=255,w=1},

    orchid={r=218,g=112,b=214,w=1},

    medium_violet_red={r=199,g=21,b=133,w=1},

    pale_violet_red={r=219,g=112,b=147,w=1},

    deep_pink={r=255,g=20,b=147,w=1},

    hot_pink={r=255,g=105,b=180,w=1},

    light_pink={r=255,g=182,b=193,w=1},

    pink={r=255,g=192,b=203,w=1},

    antique_white={r=250,g=235,b=215,w=1},

    beige={r=245,g=245,b=220,w=1},

    bisque={r=255,g=228,b=196,w=1},

    blanched_almond={r=255,g=235,b=205,w=1},

    wheat={r=245,g=222,b=179,w=1},

    corn_silk={r=255,g=248,b=220,w=1},

    lemon_chiffon={r=255,g=250,b=205,w=1},

    light_golden_rod_yellow={r=250,g=250,b=210,w=1},

    light_yellow={r=255,g=255,b=224,w=1},

    saddle_brown={r=139,g=69,b=19,w=1},

    sienna={r=160,g=82,b=45,w=1},

    chocolate={r=210,g=105,b=30,w=1},

    peru={r=205,g=133,b=63,w=1},

    sandy_brown={r=244,g=164,b=96,w=1},

    burly_wood={r=222,g=184,b=135,w=1},

    tan={r=210,g=180,b=140,w=1},

    rosy_brown={r=188,g=143,b=143,w=1},

    moccasin={r=255,g=228,b=181,w=1},

    navajo_white={r=255,g=222,b=173,w=1},

    peach_puff={r=255,g=218,b=185,w=1},

    misty_rose={r=255,g=228,b=225,w=1},

    lavender_blush={r=255,g=240,b=245,w=1},

    linen={r=250,g=240,b=230,w=1},

    old_lace={r=253,g=245,b=230,w=1},

    papaya_whip={r=255,g=239,b=213,w=1},

    sea_shell={r=255,g=245,b=238,w=1},

    mint_cream={r=245,g=255,b=250,w=1},

    slate_gray={r=112,g=128,b=144,w=1},

    light_slate_gray={r=119,g=136,b=153,w=1},

    light_steel_blue={r=176,g=196,b=222,w=1},

    lavender={r=230,g=230,b=250,w=1},

    floral_white={r=255,g=250,b=240,w=1},

    alice_blue={r=240,g=248,b=255,w=1},

    ghost_white={r=248,g=248,b=255,w=1},

    honeydew={r=240,g=255,b=240,w=1},

    ivory={r=255,g=255,b=240,w=1},

    azure={r=240,g=255,b=255,w=1},

    snow={r=255,g=250,b=250,w=1},

    black={r=1,g=1,b=1,w=1},

    dim_grey={r=105,g=105,b=105,w=1},

    grey={r=128,g=128,b=128,w=1},

    dark_grey={r=169,g=169,b=169,w=1},

    silver={r=192,g=192,b=192,w=1},

    light_grey={r=211,g=211,b=211,w=1},

    gainsboro={r=220,g=220,b=220,w=1},

    white_smoke={r=245,g=245,b=245,w=1},

    white={r=255,g=255,b=255,w=1},

      

    -- ambient lights used for ambience scenes

    al_1_9={c=100,w=0},

    al_1_8={c=89,w=0},

    al_1_7={c=69,w=0},

    al_1_6={c=46,w=0},

    al_1_5={c=26,w=0},

    al_1_4={c=11,w=0},

    al_1_3={c=4,w=0},

    al_1_2={c=1,w=0},

    al_1_1={c=0,w=0},

    al_2_9={c=100,w=33},

    al_2_8={c=89,w=29},

    al_2_7={c=69,w=23},

    al_2_6={c=46,w=15},

    al_2_5={c=26,w=8},

    al_2_4={c=11,w=4},

    al_2_3={c=4,w=1},

    al_2_2={c=1,w=0},

    al_2_1={c=0,w=0},

    al_3_9={c=100,w=66},

    al_3_8={c=89,w=59},

    al_3_7={c=69,w=46},

    al_3_6={c=46,w=30},

    al_3_5={c=26,w=17},

    al_3_4={c=11,w=8},

    al_3_3={c=4,w=3},

    al_3_2={c=1,w=1},

    al_3_1={c=0,w=0},

    al_4_9={c=100,w=10},

    al_4_8={c=89,w=9},

    al_4_7={c=69,w=7},

    al_4_6={c=46,w=5},

    al_4_5={c=26,w=3},

    al_4_4={c=11,w=1},

    al_4_3={c=4,w=0},

    al_4_2={c=1,w=0},

    al_4_1={c=0,w=0},

    al_5_9={c=66,w=100},

    al_5_8={c=59,w=89},

    al_5_7={c=46,w=69},

    al_5_6={c=30,w=46},

    al_5_5={c=17,w=26},

    al_5_4={c=8,w=11},

    al_5_3={c=3,w=4},

    al_5_2={c=1,w=1},

    al_5_1={c=0,w=0},

    al_6_9={c=33,w=100},

    al_6_8={c=29,w=89},

    al_6_7={c=23,w=69},

    al_6_6={c=15,w=46},

    al_6_5={c=8,w=26},

    al_6_4={c=4,w=11},

    al_6_3={c=1,w=4},

    al_6_2={c=0,w=1},

    al_6_1={c=0,w=0},

    al_7_9={c=0,w=100},

    al_7_8={c=0,w=89},

    al_7_7={c=0,w=69},

    al_7_6={c=0,w=46},

    al_7_5={c=0,w=26},

    al_7_4={c=0,w=11},

    al_7_3={c=0,w=4},

    al_7_2={c=0,w=1},

    al_7_1={c=0,w=0},

      

    --single lights used for ambience scenes

     

    sl_9={sl=100},

    sl_8={sl=90},

    sl_7={sl=80},

    sl_6={sl=70},

    sl_5={sl=60},

    sl_4={sl=50},

    sl_3={sl=40},

    sl_2={sl=30},

    sl_1={sl=10},

      

      }

    -- STEP2 

    --encodes the table above as a json table

    print("before encode")

     

      jTable = json.encode(light_settings)

    print("after encode")

    --STEP 3

    --Saves the encoded file as a global variable called "g_light_set"

    fibaro.setGlobalVariable("g_light_set", jTable)

    --STEP4

    --This is a test to ensure that the table decodes wthout an error

    print("before decode")

    local decoded_light_settings = json.decode(fibaro.getGlobalVariable("g_light_set"))

     

    print("after decode")

     

    print("test a few")

     

    fibaro.debug("test",decoded_light_settings.al_1.c)

    fibaro.debug("test", decoded_light_settings.rgbw_3.r)

    print(decoded_light_settings.rgbw_7.r)

    local test=(decoded_light_settings.blue.r)

    print (test)

    local test=(decoded_light_settings.rgb_3.g)

    print (test)

    local test=(decoded_light_settings.light_grey.g)

    print (test)

    --[[

    Version 1.0

     Set up and tested basic functions

    version 1.1

    removed settings for 15 volt

    version 1.2

    added settings for RGB

    version 1.3

    added white to rgb as the fibaro hardware needs a setting for white even though it does not use it for rgb

    added colour pallet for scenes. Added 140 colours for rgbw. Added single light settings which just adjusts 

    brightness of a single LED or round pin plug lamp

    Version 1.4 

    removed all zero value from light settings to remove the problem of light poling on / off when using both scenes and wall light switches

    Version 2.0

    Updated syntax for HC3

    --]]

     

    2. I use scenes which are triggered at different times of day which get data from the above table, so typically in the morning when I want the lights to be warm, I would search the table for numbers 5, 6 or 7 which tend to be warmer. NOTE that you will need to set up variables on the variables table (eg, g_al_cold, g_al_warm, g_rgbw_red, etc) before you run the scene or you will get an error

     

    Trigger

     

    {

      isTrigger = true,

      operator = "==",

      property = "sunrise",

      type = "date",

      value = -60

    }

     

    Scene

     

    --[[

    This scene decodes  JSON table g_light_set and sets glabal light setting variables  which are then call on by movement sensor scenes so that light ambience changes during the day

     

    The scene requires user input to set the correct light ambience set from the 

    light settings table

    ]]

     

    local decoded_light_settings = json.decode(fibaro.getGlobalVariable("g_light_set"))

    print("after decode")

    local num = 7 -- set this number from 1 to 7 where 1 is coldest white & 7 is warmest white

    local ref={

    decoded_light_settings["al_"..num].c, 

    decoded_light_settings["al_"..num].w, decoded_light_settings["rgbw_"..num].r, decoded_light_settings["rgbw_"..num].g, decoded_light_settings["rgbw_"..num].b, decoded_light_settings["rgbw_"..num].w, decoded_light_settings["rgb_"..num].r, decoded_light_settings["rgb_"..num].g, decoded_light_settings["rgb_"..num].b, decoded_light_settings["rgb_"..num].w, decoded_light_settings["sl_"..num].sl,}

    local g= {"g_al_cold", "g_al_warm", "g_rgbw_red", "g_rgbw_green", "g_rgbw_blue", "g_rgbw_white", "g_rgb_red", "g_rgb_green", "g_rgb_blue", "g_rgb_white","g_sl"}

    print("after table set")

    if#g>0 then

    for i = 1,#g do

    --fibaro.call(g[i])

    fibaro.setGlobalVariable(g[i], tostring(ref[i]))

    print("after global varoables set")


     

    end

    end

     

    --[[

    V1.0

    Moved from HC2 to HC3 and adapted to use data tables

    v2.0

    added local variable so that the reference number to look up on table only needs to be put in once :)

     

    ]]

     

     

    3. I'm just working on a scene which is triggered by a movement sensor which gets the required global variables and turns the lights on. It allows for all lights to be set to the same "ambience" but also allows for each lights to be set to different brightnesses, so that you set the brightness exactly for different spaces in a room. SO far I have only done it for ambient and single colour lights and I should have it working with RGBW in a few days. NOTE this is very BETA based on work I've done this evening but needs improving and it's probably buggy

     

    Trigger

     

    {

      conditions = { {

          id = 48,

          isTrigger = true,

          operator = "==",

          property = "value",

          type = "device",

          value = true

        } },

      operator = "any"

    }

     

     

    Scene

    local motion = 48

    local l={112,114,115} -- set the cold, warm and single light ID's

    local mult = {1,1,1} -- set multiplier for each light

    local maxTime = 10  -- max time the sensor should be safe before turning off

    local sleepTime = 2   -- time in seconds between each check of the sensor

     

    --function for sleep delay

     

    os = { time = function() return api.get("/settings/info").timestamp end} 

    function fibaro.sleep(t) t=t/1000+os.time(); while t >= os.time() do end end

     

    -- for ambiant lights

    local cw= tonumber(fibaro.getGlobalVariable("g_al_cold"))

    local ww= tonumber(fibaro.getGlobalVariable("g_al_warm"))

    local sl= tonumber(fibaro.getGlobalVariable("g_sl"))

     

    print(tostring("cw="..cw))

    print(tostring("cw="..ww))

    print(tostring("cw="..sl))

    fibaro.debug("TestTag","setting value")

     

    local amb={cw,ww,sl}

    if#l>0 then

    for i = 1,#l do

     

    fibaro.debug("TestTag","Turning on")

    fibaro.call(l[i], "setValue",tonumber(string.format("%.0f", ((amb[i])*(mult[i])))))

     

    end

     

    fibaro.debug("test"," cw ="..(fibaro.getValue(112,"value")))

    fibaro.debug("test"," ww ="..(fibaro.getValue(114,"value")))

    fibaro.debug("test"," sl ="..(fibaro.getValue(115,"value")))

    end

     

    local safeTime = 0

    while safeTime < maxTime do                    

      fibaro.sleep(sleepTime*1000)                 

      safeTime=safeTime+sleepTime                   -- count up safeTime

      fibaro.debug("TestTag","Counting up safeTime ",safeTime,maxTime)

      if fibaro.getValue(motion,'value') == true then -- motion breached

         safeTime=0                                 -- reset safeTime

       fibaro.debug("TestTag", "reset")

      end

    end 

      

    fibaro.debug("TestTag","Turning off")   

    fibaro.call(l,'turnOff')   


     

    --[[

    v2.1

    Added get global light setting for ambient light

    Added database lookup to set correct light setting for ambient light 

    Added new simplified rounding format becasue fibaro RGBW doesn't  work with decimals   

    ]]

     

     

    I hope this works for you. Let me know how you get on :)

    • 0
  • Inquirer
  • Posted

    And a big call out to @jgab who gave me fantastic help on how to work with time delays and also solved some syntax challenges I couldn't fix.

     

    Also to @Sankotronic who taught me how to work with tables

     

    Without this help I would never have been able to do the stuff I just posted

     

    I'm sure that there is plenty more improvement opportunities and @Sankotronic I continue to work (and struggle) with tables, but as you said, they are great fun to work with and almost limitless potential

    • 0
    Guest Benrive
    Posted
    18 hours ago, Rosavision said:

    Hi @Benrive. Yep of course I share what I have. As you are using HC3 I will give you the scenes I'm developing for HC3 at the moment. Its not all done, but I'll post more when its ready.

     

    To start with on HC3 there is good capability for triggering scenes based on time so I no longer need to use the time scheduler built by @gjab (but on HC2 it is a life saver) :)

     

    1 I create a JSON table which contains the light settings which can be called by scripts. This scene creates one global variable with all the settings. I trigger this manually becasue it only needs to run once to set the global variable and thenonly if you ever want to change the colour settings. Note that I use RGBW in a number of ways as you will see on the scene below. I use it to control ambient (CCT) LED's with warm & cold white, where each RGBW controls two ambient LEDs. I also use it as normal RGBW device and as a RGB device and also as 4 x single colour LED,s. NOTE you will need to set up a variable called     g_light_set     on the variables tab before you run the scene or you will get an error

     

     

     

     

     

    --This scene is the master colour set engine for the lighting system. 

    --It saves the colour settings table to a global variable called "global_light_set"

    -- this table can then be recalled by any scene to set the correct colours

     

    --STEP1

    --update settings or add new settings to this table called "light_settings"

    print("Nested table example")

       light_settings ={

     --for 24 voltage AL used in movement scene

      al_1 = {c=90, w=1},

      al_2 = {c=90, w=33},

      al_3 = {c=90, w=66},

      al_4 = {c=90, w=90},

      al_5 = {c=66, w=90},

      al_6 = {c=33, w=90},

      al_7 = {c=1, w=90},

     

      --for 24 volt RGBW used in movement scene

      rgbw_1 = {r=1, g=1, b=40, w= 255},

      rgbw_2 = {r=1, g=1, b=26, w= 255},

      rgbw_3 = {r=1, g=1, b=13, w= 255},

      rgbw_4 = {r=1, g=1, b=1, w= 255},

      rgbw_5 = {r=252, g=90, b=1, w= 73},

      rgbw_6 = {r=180, g=64, b=1, w= 52},

      rgbw_7 = {r=30, g=10, b=1, w= 7},

     

     

      -- for 24 volt RGB used in movement scene

      rgb_1 = {r=255, g=255, b=255, w=1},

      rgb_2 = {r=255, g=197, b=200, w=1},

      rgb_3 = {r=255, g=197, b=190, w=1},

      rgb_4 = {r=255, g=197, b=180, w=1},

      rgb_5 = {r=255, g=197, b=170, w=1},

      rgb_6 = {r=255, g=197, b=160, w=1},

      rgb_7 = {r=255, g=197, b=143, w=1},

     

      -- colour pallet for ambience scenes  

      

    maroon={r=128,g=1,b=1,w=1},

    dark_red={r=139,g=1,b=1,w=1},

    brown={r=165,g=42,b=42,w=1},

    firebrick={r=178,g=34,b=34,w=1},

    crimson={r=220,g=20,b=60,w=1},

    red={r=255,g=1,b=1,w=1},

    tomato={r=255,g=99,b=71,w=1},

    coral={r=255,g=127,b=80,w=1},

    indian_red={r=205,g=92,b=92,w=1},

    light_coral={r=240,g=128,b=128,w=1},

    dark_salmon={r=233,g=150,b=122,w=1},

    salmon={r=250,g=128,b=114,w=1},

    light_salmon={r=255,g=160,b=122,w=1},

    orange_red={r=255,g=69,b=1,w=1},

    dark_orange={r=255,g=140,b=1,w=1},

    orange={r=255,g=165,b=1,w=1},

    gold={r=255,g=215,b=1,w=1},

    dark_golden_rod={r=184,g=134,b=11,w=1},

    golden_rod={r=218,g=165,b=32,w=1},

    pale_golden_rod={r=238,g=232,b=170,w=1},

    dark_khaki={r=189,g=183,b=107,w=1},

    khaki={r=240,g=230,b=140,w=1},

    olive={r=128,g=128,b=1,w=1},

    yellow={r=255,g=255,b=1,w=1},

    yellow_green={r=154,g=205,b=50,w=1},

    dark_olive_green={r=85,g=107,b=47,w=1},

    olive_drab={r=107,g=142,b=35,w=1},

    lawn_green={r=124,g=252,b=1,w=1},

    chart_reuse={r=127,g=255,b=1,w=1},

    green_yellow={r=173,g=255,b=47,w=1},

    dark_green={r=1,g=100,b=1,w=1},

    green={r=1,g=128,b=1,w=1},

    forest_green={r=34,g=139,b=34,w=1},

    lime={r=1,g=255,b=1,w=1},

    lime_green={r=50,g=205,b=50,w=1},

    light_green={r=144,g=238,b=144,w=1},

    pale_green={r=152,g=251,b=152,w=1},

    dark_sea_green={r=143,g=188,b=143,w=1},

    medium_spring_green={r=1,g=250,b=154,w=1},

    spring_green={r=1,g=255,b=127,w=1},

    sea_green={r=46,g=139,b=87,w=1},

    medium_aqua_marine={r=102,g=205,b=170,w=1},

    medium_sea_green={r=60,g=179,b=113,w=1},

    light_sea_green={r=32,g=178,b=170,w=1},

    dark_slate_gray={r=47,g=79,b=79,w=1},

    teal={r=1,g=128,b=128,w=1},

    dark_cyan={r=1,g=139,b=139,w=1},

    aqua={r=1,g=255,b=255,w=1},

    cyan={r=1,g=255,b=255,w=1},

    light_cyan={r=224,g=255,b=255,w=1},

    dark_turquoise={r=1,g=206,b=209,w=1},

    turquoise={r=64,g=224,b=208,w=1},

    medium_turquoise={r=72,g=209,b=204,w=1},

    pale_turquoise={r=175,g=238,b=238,w=1},

    aqua_marine={r=127,g=255,b=212,w=1},

    powder_blue={r=176,g=224,b=230,w=1},

    cadet_blue={r=95,g=158,b=160,w=1},

    steel_blue={r=70,g=130,b=180,w=1},

    corn_flower_blue={r=100,g=149,b=237,w=1},

    deep_sky_blue={r=1,g=191,b=255,w=1},

    dodger_blue={r=30,g=144,b=255,w=1},

    light_blue={r=173,g=216,b=230,w=1},

    sky_blue={r=135,g=206,b=235,w=1},

    light_sky_blue={r=135,g=206,b=250,w=1},

    midnight_blue={r=25,g=25,b=112,w=1},

    navy={r=1,g=1,b=128,w=1},

    dark_blue={r=1,g=1,b=139,w=1},

    medium_blue={r=1,g=1,b=205,w=1},

    blue={r=1,g=1,b=255,w=1},

    royal_blue={r=65,g=105,b=225,w=1},

    blue_violet={r=138,g=43,b=226,w=1},

    indigo={r=75,g=1,b=130,w=1},

    dark_slate_blue={r=72,g=61,b=139,w=1},

    slate_blue={r=106,g=90,b=205,w=1},

    medium_slate_blue={r=123,g=104,b=238,w=1},

    medium_purple={r=147,g=112,b=219,w=1},

    dark_magenta={r=139,g=1,b=139,w=1},

    dark_violet={r=148,g=1,b=211,w=1},

    dark_orchid={r=153,g=50,b=204,w=1},

    medium_orchid={r=186,g=85,b=211,w=1},

    purple={r=128,g=1,b=128,w=1},

    thistle={r=216,g=191,b=216,w=1},

    plum={r=221,g=160,b=221,w=1},

    violet={r=238,g=130,b=238,w=1},

    magenta={r=255,g=1,b=255,w=1},

    orchid={r=218,g=112,b=214,w=1},

    medium_violet_red={r=199,g=21,b=133,w=1},

    pale_violet_red={r=219,g=112,b=147,w=1},

    deep_pink={r=255,g=20,b=147,w=1},

    hot_pink={r=255,g=105,b=180,w=1},

    light_pink={r=255,g=182,b=193,w=1},

    pink={r=255,g=192,b=203,w=1},

    antique_white={r=250,g=235,b=215,w=1},

    beige={r=245,g=245,b=220,w=1},

    bisque={r=255,g=228,b=196,w=1},

    blanched_almond={r=255,g=235,b=205,w=1},

    wheat={r=245,g=222,b=179,w=1},

    corn_silk={r=255,g=248,b=220,w=1},

    lemon_chiffon={r=255,g=250,b=205,w=1},

    light_golden_rod_yellow={r=250,g=250,b=210,w=1},

    light_yellow={r=255,g=255,b=224,w=1},

    saddle_brown={r=139,g=69,b=19,w=1},

    sienna={r=160,g=82,b=45,w=1},

    chocolate={r=210,g=105,b=30,w=1},

    peru={r=205,g=133,b=63,w=1},

    sandy_brown={r=244,g=164,b=96,w=1},

    burly_wood={r=222,g=184,b=135,w=1},

    tan={r=210,g=180,b=140,w=1},

    rosy_brown={r=188,g=143,b=143,w=1},

    moccasin={r=255,g=228,b=181,w=1},

    navajo_white={r=255,g=222,b=173,w=1},

    peach_puff={r=255,g=218,b=185,w=1},

    misty_rose={r=255,g=228,b=225,w=1},

    lavender_blush={r=255,g=240,b=245,w=1},

    linen={r=250,g=240,b=230,w=1},

    old_lace={r=253,g=245,b=230,w=1},

    papaya_whip={r=255,g=239,b=213,w=1},

    sea_shell={r=255,g=245,b=238,w=1},

    mint_cream={r=245,g=255,b=250,w=1},

    slate_gray={r=112,g=128,b=144,w=1},

    light_slate_gray={r=119,g=136,b=153,w=1},

    light_steel_blue={r=176,g=196,b=222,w=1},

    lavender={r=230,g=230,b=250,w=1},

    floral_white={r=255,g=250,b=240,w=1},

    alice_blue={r=240,g=248,b=255,w=1},

    ghost_white={r=248,g=248,b=255,w=1},

    honeydew={r=240,g=255,b=240,w=1},

    ivory={r=255,g=255,b=240,w=1},

    azure={r=240,g=255,b=255,w=1},

    snow={r=255,g=250,b=250,w=1},

    black={r=1,g=1,b=1,w=1},

    dim_grey={r=105,g=105,b=105,w=1},

    grey={r=128,g=128,b=128,w=1},

    dark_grey={r=169,g=169,b=169,w=1},

    silver={r=192,g=192,b=192,w=1},

    light_grey={r=211,g=211,b=211,w=1},

    gainsboro={r=220,g=220,b=220,w=1},

    white_smoke={r=245,g=245,b=245,w=1},

    white={r=255,g=255,b=255,w=1},

      

    -- ambient lights used for ambience scenes

    al_1_9={c=100,w=0},

    al_1_8={c=89,w=0},

    al_1_7={c=69,w=0},

    al_1_6={c=46,w=0},

    al_1_5={c=26,w=0},

    al_1_4={c=11,w=0},

    al_1_3={c=4,w=0},

    al_1_2={c=1,w=0},

    al_1_1={c=0,w=0},

    al_2_9={c=100,w=33},

    al_2_8={c=89,w=29},

    al_2_7={c=69,w=23},

    al_2_6={c=46,w=15},

    al_2_5={c=26,w=8},

    al_2_4={c=11,w=4},

    al_2_3={c=4,w=1},

    al_2_2={c=1,w=0},

    al_2_1={c=0,w=0},

    al_3_9={c=100,w=66},

    al_3_8={c=89,w=59},

    al_3_7={c=69,w=46},

    al_3_6={c=46,w=30},

    al_3_5={c=26,w=17},

    al_3_4={c=11,w=8},

    al_3_3={c=4,w=3},

    al_3_2={c=1,w=1},

    al_3_1={c=0,w=0},

    al_4_9={c=100,w=10},

    al_4_8={c=89,w=9},

    al_4_7={c=69,w=7},

    al_4_6={c=46,w=5},

    al_4_5={c=26,w=3},

    al_4_4={c=11,w=1},

    al_4_3={c=4,w=0},

    al_4_2={c=1,w=0},

    al_4_1={c=0,w=0},

    al_5_9={c=66,w=100},

    al_5_8={c=59,w=89},

    al_5_7={c=46,w=69},

    al_5_6={c=30,w=46},

    al_5_5={c=17,w=26},

    al_5_4={c=8,w=11},

    al_5_3={c=3,w=4},

    al_5_2={c=1,w=1},

    al_5_1={c=0,w=0},

    al_6_9={c=33,w=100},

    al_6_8={c=29,w=89},

    al_6_7={c=23,w=69},

    al_6_6={c=15,w=46},

    al_6_5={c=8,w=26},

    al_6_4={c=4,w=11},

    al_6_3={c=1,w=4},

    al_6_2={c=0,w=1},

    al_6_1={c=0,w=0},

    al_7_9={c=0,w=100},

    al_7_8={c=0,w=89},

    al_7_7={c=0,w=69},

    al_7_6={c=0,w=46},

    al_7_5={c=0,w=26},

    al_7_4={c=0,w=11},

    al_7_3={c=0,w=4},

    al_7_2={c=0,w=1},

    al_7_1={c=0,w=0},

      

    --single lights used for ambience scenes

     

    sl_9={sl=100},

    sl_8={sl=90},

    sl_7={sl=80},

    sl_6={sl=70},

    sl_5={sl=60},

    sl_4={sl=50},

    sl_3={sl=40},

    sl_2={sl=30},

    sl_1={sl=10},

      

      }

    -- STEP2 

    --encodes the table above as a json table

    print("before encode")

     

      jTable = json.encode(light_settings)

    print("after encode")

    --STEP 3

    --Saves the encoded file as a global variable called "g_light_set"

    fibaro.setGlobalVariable("g_light_set", jTable)

    --STEP4

    --This is a test to ensure that the table decodes wthout an error

    print("before decode")

    local decoded_light_settings = json.decode(fibaro.getGlobalVariable("g_light_set"))

     

    print("after decode")

     

    print("test a few")

     

    fibaro.debug("test",decoded_light_settings.al_1.c)

    fibaro.debug("test", decoded_light_settings.rgbw_3.r)

    print(decoded_light_settings.rgbw_7.r)

    local test=(decoded_light_settings.blue.r)

    print (test)

    local test=(decoded_light_settings.rgb_3.g)

    print (test)

    local test=(decoded_light_settings.light_grey.g)

    print (test)

    --[[

    Version 1.0

     Set up and tested basic functions

    version 1.1

    removed settings for 15 volt

    version 1.2

    added settings for RGB

    version 1.3

    added white to rgb as the fibaro hardware needs a setting for white even though it does not use it for rgb

    added colour pallet for scenes. Added 140 colours for rgbw. Added single light settings which just adjusts 

    brightness of a single LED or round pin plug lamp

    Version 1.4 

    removed all zero value from light settings to remove the problem of light poling on / off when using both scenes and wall light switches

    Version 2.0

    Updated syntax for HC3

    --]]

     

    2. I use scenes which are triggered at different times of day which get data from the above table, so typically in the morning when I want the lights to be warm, I would search the table for numbers 5, 6 or 7 which tend to be warmer. NOTE that you will need to set up variables on the variables table (eg, g_al_cold, g_al_warm, g_rgbw_red, etc) before you run the scene or you will get an error

     

    Trigger

     

    {

      isTrigger = true,

      operator = "==",

      property = "sunrise",

      type = "date",

      value = -60

    }

     

    Scene

     

    --[[

    This scene decodes  JSON table g_light_set and sets glabal light setting variables  which are then call on by movement sensor scenes so that light ambience changes during the day

     

    The scene requires user input to set the correct light ambience set from the 

    light settings table

    ]]

     

    local decoded_light_settings = json.decode(fibaro.getGlobalVariable("g_light_set"))

    print("after decode")

    local num = 7 -- set this number from 1 to 7 where 1 is coldest white & 7 is warmest white

    local ref={

    decoded_light_settings["al_"..num].c, 

    decoded_light_settings["al_"..num].w, decoded_light_settings["rgbw_"..num].r, decoded_light_settings["rgbw_"..num].g, decoded_light_settings["rgbw_"..num].b, decoded_light_settings["rgbw_"..num].w, decoded_light_settings["rgb_"..num].r, decoded_light_settings["rgb_"..num].g, decoded_light_settings["rgb_"..num].b, decoded_light_settings["rgb_"..num].w, decoded_light_settings["sl_"..num].sl,}

    local g= {"g_al_cold", "g_al_warm", "g_rgbw_red", "g_rgbw_green", "g_rgbw_blue", "g_rgbw_white", "g_rgb_red", "g_rgb_green", "g_rgb_blue", "g_rgb_white","g_sl"}

    print("after table set")

    if#g>0 then

    for i = 1,#g do

    --fibaro.call(g[i])

    fibaro.setGlobalVariable(g[i], tostring(ref[i]))

    print("after global varoables set")


     

    end

    end

     

    --[[

    V1.0

    Moved from HC2 to HC3 and adapted to use data tables

    v2.0

    added local variable so that the reference number to look up on table only needs to be put in once :)

     

    ]]

     

     

    3. I'm just working on a scene which is triggered by a movement sensor which gets the required global variables and turns the lights on. It allows for all lights to be set to the same "ambience" but also allows for each lights to be set to different brightnesses, so that you set the brightness exactly for different spaces in a room. SO far I have only done it for ambient and single colour lights and I should have it working with RGBW in a few days. NOTE this is very BETA based on work I've done this evening but needs improving and it's probably buggy

     

    Trigger

     

    {

      conditions = { {

          id = 48,

          isTrigger = true,

          operator = "==",

          property = "value",

          type = "device",

          value = true

        } },

      operator = "any"

    }

     

     

    Scene

    local motion = 48

    local l={112,114,115} -- set the cold, warm and single light ID's

    local mult = {1,1,1} -- set multiplier for each light

    local maxTime = 10  -- max time the sensor should be safe before turning off

    local sleepTime = 2   -- time in seconds between each check of the sensor

     

    --function for sleep delay

     

    os = { time = function() return api.get("/settings/info").timestamp end} 

    function fibaro.sleep(t) t=t/1000+os.time(); while t >= os.time() do end end

     

    -- for ambiant lights

    local cw= tonumber(fibaro.getGlobalVariable("g_al_cold"))

    local ww= tonumber(fibaro.getGlobalVariable("g_al_warm"))

    local sl= tonumber(fibaro.getGlobalVariable("g_sl"))

     

    print(tostring("cw="..cw))

    print(tostring("cw="..ww))

    print(tostring("cw="..sl))

    fibaro.debug("TestTag","setting value")

     

    local amb={cw,ww,sl}

    if#l>0 then

    for i = 1,#l do

     

    fibaro.debug("TestTag","Turning on")

    fibaro.call(l[i], "setValue",tonumber(string.format("%.0f", ((amb[i])*(mult[i])))))

     

    end

     

    fibaro.debug("test"," cw ="..(fibaro.getValue(112,"value")))

    fibaro.debug("test"," ww ="..(fibaro.getValue(114,"value")))

    fibaro.debug("test"," sl ="..(fibaro.getValue(115,"value")))

    end

     

    local safeTime = 0

    while safeTime < maxTime do                    

      fibaro.sleep(sleepTime*1000)                 

      safeTime=safeTime+sleepTime                   -- count up safeTime

      fibaro.debug("TestTag","Counting up safeTime ",safeTime,maxTime)

      if fibaro.getValue(motion,'value') == true then -- motion breached

         safeTime=0                                 -- reset safeTime

       fibaro.debug("TestTag", "reset")

      end

    end 

      

    fibaro.debug("TestTag","Turning off")   

    fibaro.call(l,'turnOff')   


     

    --[[

    v2.1

    Added get global light setting for ambient light

    Added database lookup to set correct light setting for ambient light 

    Added new simplified rounding format becasue fibaro RGBW doesn't  work with decimals   

    ]]

     

     

    I hope this works for you. Let me know how you get on :)

     

    Hi, @Rosavision

    I'll be moving into the new house shortly and starting the tests and code you've sent me.
    I'm sure I will have many doubts.
    Thank you very much for your attention and for sharing all your work.

    • 0
    Posted
    On 11/17/2021 at 9:54 AM, Rosavision said:

    I'm sure that there is plenty more improvement opportunities and @Sankotronic I continue to work (and struggle) with tables, but as you said, they are great fun to work with and almost limitless potential

     

    Table structured data is great power of LUA. In UHAS that I'm about to finally finish most of the data is stored in tables. It is pity that Fibaro does not support tables as it should. LUA can store any type of data in tables and even program functions, but Fibaro disabled that feature. It would be much easier to make advanced home automation with this features enabled. It is tiresome to copy/paste same functions all around the VD's, scenes and QA's and not to mention maintain such code.

     

    If I remember correctly @jgab did some workaround with that, but as usual workarounds are just not good as native abilities of LUA. Just as an example, HC3 does not allow anymore to store table structured data in predefined global variables as HC2 do. When on the other hand big table is stored in normal global variable then it is tiresome to scroll through global variables since it shows in browser complete content of the variable ? 

     

    As long as Fibaro policy is that home automation is replacing wall switches with mobile phones I do not expect any progress in a proper way. Unfortunately Fibaro is not the only HA company that thinks that way. There are many other companies that think making their products having mobile application is home automation. Just to be on the safe side they make them compatible with HomeKit and "smart" speakers. But when you ask them for some API integration then they are full of security limitations, not seeing that being compatible with "smart" speakers is lowest security of them all. I have Alexa that was numerous times activated by simple radio commercial!!! Luckily they didn't say anything that compromised my home, but they could. That is why Paul Hibbert always say "she that should not be named" ;-)

     

    Anyway, if you will need any more assistance with tables or anything else regarding automating safely your home let me know! :-)

     

    • 0
    Posted

    You can store anything in a Lua table on both the HC2 and the HC3.

    fibaro.* is a table

    fibaro = {

        getValue = function(id, prop) ... end,   

        call = function(id, method, ...) ... end,

        :

    }

     

    The problem is fibaro's global variables only accept strings as values and therefore we need to json.encode the table to a string.

    json was ment to encode data and not functions - and functions are highly language/machine dependent anyway.

    So functions are not accepted when encoding a table (it will throw an error)

     

    The way to share functions on the HC3 is to develop libraries and use them in QAs by adding them as extra files. A HC3 QA can consist of several 'files' so it works pretty well.

    If you also have a development environment that makes it easy to include libraries and automate the deployment of them to the HC3 it's even better (like my

    Please login or register to see this link.

    - and I often use '

    Please login or register to see this link.

    ' as my library of "good to have functions")

     

    All in all I would say that the HC3 is a much better developer experience then the HC2 was - but it's far from perfect and unfortunately that experience doesn't seem to be the highest priority from Fibaro.

     

     

     

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