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


Recommended Posts

Posted

Hi, what is wrong with this?

Mine Ical link is exactly the same but gives an error.

line 39 is the example google link

Please login or register to see this image.

/monthly_2019_05/image.png.4f6d96c8babfa39bfa0959419c5ce647.png" alt="image.png.4f6d96c8babfa39bfa0959419c5ce647.png" />

 

  • Topic Author
  • Posted
    1 hour ago, Sjakie said:

    Hi, what is wrong with this?

    Mine Ical link is exactly the same but gives an error.

    line 39 is the example google link

    Please login or register to see this link.

     

     

    Your'e not supposed to change anything in iCal.lua. You should do a 'subscribe' from another ER scene for the calendar you want.

    See again at

     

  • Topic Author
  • Posted (edited)

    New version of iCal.lua (B4)

     

    -It will autocreate a VD to see the entries (combined from all subscribed calendars)

    -New API

    Please login or register to see this code.

    days is number of days into the future the calendar should fetch, defaults to 30

    tz is timezone offset in hours, defaults to 0

    interval is the interval which the calendar should be fetched, defaults to "+/00:30", i.e. every 30min

     

    Whenever a calendar event starts or stops the scene will get a callback of type. 

    Please login or register to see this code.

    An entry is a table of type

    Please login or register to see this code.

    This means that your sene doesn't have to remember anything, it just gets a call whenever a calendar event starts or ends. And you can match the event title or description to trigger further actions.

     

    If you have the sceneID of the iCal scene you can send commands to it.

    Please login or register to see this code.

     

    Ex. Running commands stored in calendar description field:

    Please login or register to see this code.

    It checks a calendar entry description for a line of type "S:..." and then executes everything after 'S:' as a ER rule at start of event and  "E:.." for end events.

    Ex.

    description= "

    S:kitchen.lamp:on

    E:kitchen.lamp:off

    "

    will turn on the lamp at start of calendar event and turn off the lamp at end of calendar event.

    Edited by jgab
    • Like 1
    Posted

    Will test tonight, first some shopping in Gekås :roll:

    Posted

    Some error when i try

    ical.lua

    Please login or register to see this image.

    /monthly_2019_06/1710551448_Skrmavbild2019-06-01kl_17_54_21.png.fd4ac4a21d5a6c0db5549eaeb635cba9.png" alt="1710551448_Skrmavbild2019-06-01kl_17_54_21.png.fd4ac4a21d5a6c0db5549eaeb635cba9.png" />

     

    in other scene i have this

    Please login or register to see this code.

    i have setup an iCal calendar with name Test

    Posted

    Got it now :D

    125420877_Skrmavbild2019-06-01kl_19_21_50.png.f02aa081bb8d6631bc513db727a2d7d4.png516450840_Skrmavbild2019-06-01kl_19_22_00.png.b98d1a7135d7524c87acdf1af77f81b6.png

  • Topic Author
  • Posted
    3 hours ago, jompa68 said:

    Got it now :D

     

    So, how can we improve it? Better formatting of entries? New functionality?

    Posted
    9 hours ago, jgab said:

     

    So, how can we improve it? Better formatting of entries? New functionality?

    I will test some setups tomorrow when back home again.

     

  • Topic Author
  • Posted
    52 minutes ago, jompa68 said:

    I will test some setups tomorrow when back home again.

     

    New version of iCal.lua (B6)

    Added an update button to VD.

    More compact date format in VD.

    Previous example with ER commands in description is updated (fixed parsing of new lines and description field containing ':')

     

    Posted
    On 6/2/2019 at 9:35 AM, jgab said:

    New version of iCal.lua (B6)

    Added an update button to VD.

    More compact date format in VD.

    Previous example with ER commands in description is updated (fixed parsing of new lines and description field containing ':')

     

    I would be nice to have option to decide date format for VD

    for now i have change line 344 

    Please login or register to see this code.

     

    Posted
    On 4/24/2019 at 8:52 PM, jgab said:

    That happens if the scene is not started yet (EventRunner scenes starts with %%autostart or manual start). I would recommend that your EventRunner scenes have %%autostart - EventRunner scens are expected to run continuously. 

    If you have device or globals triggers in the header of the scene (%%properties etc), the HC2 will try to start the scene even if it has not started. EventRunner detects that and logs a warning.

    In your example, the scene receives triggers between 20:15:15 and 20:23:56 while it is not started yet. Then at 20:24:25 you start the scene, and it will start to process triggers...

     

    In theory I could make ER scenes "autostart" when they get their first trigger but I like to have better control when to start them. Maybe an configurable option in the future.

    So, in practice you can ignore the warnings - it's just that the scene is receiving triggers but has not been started up yet.

     

    Hi Jan, is it possible to select auto start yes?no

    I have 6 scenes to guard, control and light the house, in all kind of variants such as home, away, holiday >>>> I would like those on auto start, it happens a scene stops and then my system does not do what it should do.

    Other scenes is not so important to discover they stopped.

    Thanks for concideration

  • Topic Author
  • Posted
    5 hours ago, jompa68 said:

    I would be nice to have option to decide date format for VD

    for now i have change line 344 

    Please login or register to see this code.

     

    Ok, now you can provide a format when you subscribe (pushed B7)

    Please login or register to see this code.

    It's not perfect as I try to collapse the day/month part if startDate and endDate is on the same day. It means that the day/date has to be in the beginning of the string. Have to think about something more flexible.

     

  • Topic Author
  • Posted
    2 hours ago, Sjakie said:

    Hi Jan, is it possible to select auto start yes?no

    I have 6 scenes to guard, control and light the house, in all kind of variants such as home, away, holiday >>>> I would like those on auto start, it happens a scene stops and then my system does not do what it should do.

    Other scenes is not so important to discover they stopped.

    Thanks for concideration

     

    Ok, you want to autostart if the scene has stopped but receives a trigger?

    My thinking was that Supervisor would restart scenes that stopped working.

    In general, if a scene stops/crashes, there is a problem that needs to be fixed... just restarting is seldom a good solution.

    Anyway, there is variable '_STARTONTRIGGER' that you can set to true in the beginning of the scene

    Please login or register to see this code.

    and it will restart to scene instead of giving the message "Aborting: Server not started yet"... It is a bit experimental as I'm not using it myself and haven't tested it extensively.

     

    Posted

    @jgab 

    you see any errors in this rule? Dont give me any log back when an event starts.

    Please login or register to see this code.

     

    Posted

    Jan I fully agree with your statement solve the error

    If scene has stops no indication?? Where to look?

    Supervisor only tells me that there is no answer from scene ....

    Any push in the right direction?

    I will not auto start now but it should be nice to solve or do if we go on holiday.

    Thanks for the support

     

    Posted

    Hello Jan,

    If I use

                 rule("dwSensorsHouse={hal.tussendeur, eetkamer.deur, serre.deur}")  
    should all of these components be mentioned in header as value??

    Please advice

    Posted
    1 hour ago, jompa68 said:

    @jgab 

    you see any errors in this rule? Dont give me any log back when an event starts.

    Please login or register to see this code.

     

    Solved, was wrong setup of subscribe rule. Below is the right code to use.

    Please login or register to see this code.

     

  • Topic Author
  • Posted
    1 hour ago, Sjakie said:

    Hello Jan,

    If I use

                 rule("dwSensorsHouse={hal.tussendeur, eetkamer.deur, serre.deur}")  
    should all of these components be mentioned in header as value??

    Please advice

     

    Yes, they need to be declared in the header  to trigger the rule

    Posted
    On 6/1/2019 at 11:19 PM, jgab said:

     

    So, how can we improve it? Better formatting of entries? New functionality?

    Can i use wildcards to have 1 line instead of 2?

    Please login or register to see this code.

     

  • Topic Author
  • Posted (edited)
    1 hour ago, jompa68 said:

    Can i use wildcards to have 1 line instead of 2?

    Please login or register to see this code.

     

     

    entry is always a Lua table {name=<string name>, startDate=<epoch>, endDate=<epoch>, description=<string descriptions>}

    What you can do is

    Please login or register to see this code.

    I pushed a new version of ER (B56) where 'match' is a builtin ER command. Note that arguments are 'match(<pattern>,<string>)'

    Please login or register to see this code.

    or, more generally?

    Please login or register to see this code.

     

    Edited by jgab

    Join the conversation

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

    Guest
    Reply to this topic...

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