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


Sankotronic Lab - Universal Home Automation System (UHAS™)


Sankotronic

Recommended Posts

On 5/10/2017 at 0:46 PM, Sankotronic said:

Any opinions or suggestions on this from more experienced users

 

@Sankotronic

How many backup copies do you have ?

Link to comment
Share on other sites

  • Topic Author
  • 54 minutes ago, AutoFrank said:

     

    @Sankotronic

    How many backup copies do you have ?

     

    Hi @AutoFrank,

     

    Before I read your experience with backups I had 33 of them and 32% free space on Recovery disk. After I read your post I delete most of them and now I have only 7 backups left and 69% free space on Recovery disk. 

     

    There is another interesting information to share.

     

    I have reached limit for storing table value in global variable! After restarting HC2 table is destroyed and attempt to json.decode it results in error that stops running code. This is very unfortunate since I need to implement changes to my new system :-( I try to find out how to detect what is in the global variable after restarting HC but no success for now. It seems empty but it is not nil nor empty string. Also if I use docs to get this variable settings then value is not shown in either case, when it is still ok or when it is destroyed after restart. Anyway, there is limit to the size of global variables. I still don't know exact limit but it is definitely there. According to some counting I have 286,634 characters stored in that table and that is over the limit.

     

    I have also reached maximum size for code in virtual devices :-( It seems that it is restricted to amount of characters and not amount of program lines. My code has 95,025 characters and that is still bellow limit but limit may be at around 100,000.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 5 minutes ago, AutoFrank said:

    @Sankotronic

     

    Looks like you pushing the limits on the hc2

     

    Did deleting the backups help any bit with the cpu/mem resource consumption? 

     

    It is still too early to say for sure that it is better after deleting backups, but first feeling is that it is slightly better than before. Since I'm busy with coding and my system is changing constantly at the moment it is really difficult to follow what influences the changes.

     

    BTW

    I tested watchdog scene from French forum and restarting scenes is not working. Also after some time it makes mistakes in checking messages printed to debug info by the scene. I try to restart scene by using api.get and api.put and manage to freeze services on my HC2 so I had to restart it :-P Is there any better way to restart scene to continue run in loop using autostart? Or I will have to change code so it can be restarted also manually?

     

    For restarting VD main loop I already have solution :-) 

     

     

    Link to comment
    Share on other sites

    8 hours ago, Sankotronic said:

    t is still too early to say for sure that it is better after deleting backups, but first feeling is that it is slightly better than before

     

    @Sankotronic, hopefully it'll get better...

     

    8 hours ago, Sankotronic said:

     Is there any better way to restart scene to continue run in loop using autostart?

     

    Sorry, I haven't used this at all.. you're way ahead of me here...

    Edited by AutoFrank
    Link to comment
    Share on other sites

  • Topic Author
  • Well, Angelina is working ok and she never missed any event except if I did something wrong :-) 

     

    I will made backup before adding new devices to the system and will see if it will go ok. I always restart system before making backups just to be sure that all junk is forgotten and only useful stuff is backed up.

     

    Link to comment
    Share on other sites

    • 2 weeks later...
  • Topic Author
  • UPDATE (30.05.2017)

     

    • Weather State VD and Weather Forecast VD cleaned bugs and for last twenty days didn't have any more problems, so this can be considered finished.
    • Netatmo weather station scene also cleaned some bugs and for last few weeks works flawlessly so it is ready for publishing.
    • Translation scene and Select language VD - I had to do major changes due to HC2 limitations. Translation scene is now responsible only for translating predefined global variables. Translations for VD and scenes is now transferred to each VD. This makes updates more difficult to manage, but I have to reconcile with that for a moment. I have tested over the past few weeks and changing language is working fine with all scenes and VD's that I build in support. So, except needing some more translations to be done this two are also ready for publishing. I also added Norwegian language so now there is support for 25 different languages.
    • Main scene FTBE with Sunrise & Sunset VD, Home Status VD and Home Timers VD is also tested and working fine. But I still have to check some special cases when sunset is after midnight since I get recently information from some users that it is then not setting time of day properly. When I correct that part I believe it is ready for publishing.
    • HC Icon preview is now renamed to VD Icon Preview & Setup. It will be must have tool for setting up icons on all of my VD's. Feature like copy/paste VD icons is working fine so it can be used to setup icons quickly and easily for multiple VD's like Philips HUE VD. I removed scenes and rooms icons because they will get their own version in time and to make VD Icon Preview & Setup more compact and easy to use.
    • Philips HUE Setup VD is new one and it takes care for translation base for all Philips HUE VD's, plus it will scan Philips HUE bridge and get information for all HUE bulbs connected to it. That will allow you to see ID numbers of all of them and also their type and status. You can also use this VD to test bulbs. My original intention was to use this VD to make all other VD's with one click which is theoretically possible but as i hit some limitations that will have to wait for better days.
    • Philips HUE Color, White, dimmable VD - Updated to use this new multi language system, optimized code and added some more stability. Will come in few different versions to choose from. I'm testing it and looks ready for publishing.
    • Very Smart Light™ scene is completely rewritten and optimized. I added possibility to setup lights to dim down before turning off or dimming low, also added checking if any of the light was turned on manually (before motion sensor triggered) and then choice to keep lights on until turned off manually or to extend timer. At the moment I'm testing new code and thinking how to make setting more easy and straight forward. I have VD that is capable of finding all lights in one room controlled by old and new dimmers, relay modules, smart plugs, Philips HUE VD and RGBW modules and that is not problem. Problem is versatility of setup that is difficult to cover with stiffness of VD as input device.

     

    I just have to do some preparations and most of the above mentioned code can be finally published. I was hoping to prepare also documents with translations but that can be done also later. I will mark part of the code which will have to be replaced to get translations or where you can do it yourself. If you do translations directly in code I will really appreciate if you can send me copy to include .

     

    So see you soon! :-) 

     

    Link to comment
    Share on other sites

    Just wow :)

     

    great work, I hope you enjoyed building this even with the setbacks.

     

    Jim

    Link to comment
    Share on other sites

  • Topic Author
  • 1 minute ago, Bodyart said:

    Congrats @Sankotronic!

     

    Hi @Bodyart,

     

    Wait with congrats until after I publish! :-)

     

    Hi @jimicr,

     

    I definitely enjoyed building this despite some setbacks and will continue to do so! :-) 

     

    And thank you for all support and help!

    Link to comment
    Share on other sites

    1 hour ago, Sankotronic said:

    Weather State VD and Weather Forecast V

     

    1 hour ago, Sankotronic said:

    Very Smart Light™ scene is

     

    1 hour ago, Sankotronic said:

    Main scene FTBE with Sunrise & Sunset VD, Home Status VD and Home Timers VD is a

     

    Plenty in the sack for me, its going to be christmas in June.

    Thankyou

    Edited by Jamie mccrostie
    Link to comment
    Share on other sites

  • Topic Author
  • UPDATE (01.06.2017)

     

    • VSL™ scene - just implemented new feature. You will be able to setup different color for time of day for each day of the week separately for each HUE light when turned on by motion. But that is not all! When there is no motion detected and dimOff is set to true then each HUE and RGBW light can dim low to different color and that can be also setup differently for time of day for each day of the week! YAY! LUA is great! Here is setting for one HUE light for whole week and for all times in day:

    Please login or register to see this code.

    If you don't need different settings for whole week but only for time of day then you can setup only one set like this:

    Please login or register to see this code.

    And scene will use above settings through all days of the week. Both above settings are for one HUE light. If you want to set for more than one then you just copy/paste setting for first light and then change values if you want it to have different colors. Setting for two HUE lights and only for time of day same for whole week then looks like this:

    Please login or register to see this code.

    Same settings can be done for dim low HUE lights (when they don't turn off but they dim low when there is no motion detected) and that color can be set differently so they can shine in bright yellow when there is motion, but dim low to green when there is no motion.

     

    This is implemented and tested! Next is to implement same feature for RGBW lights. When I do this VSL™ scene will be ready for publishing :-) 

     

    Thank you for your patience and support!

     

    Cheers!

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • UPDATE (02.06.2017)

     

    • VSL™ scene - Setting colors for different time of day in whole week is now implemented for RGBW lights! Following requests from ToDo are now implemented in new version:
    1. Changing HUE colors according to time of day, but also added for 7 days of the week, and can dim low to different color. Same also added for RGBW lights!
    2. Dimming low lights before turning off for HUE, DIMMER and GRBW lights.
    3. Turn off lights when motion detected and special states are active (cinemaState, cookingState, etc.) -- This one is implemented. If checkLightsOff is set then if any light is turned off manually scene will turn of all other lights and stop running as soon as there is no motion detected regardless of timer. Also, even there is motion detected but measured light level is greater than maxLux scene will turn off lights and stop running.
    4. Keep some lights dim low when sleeping is set to yes. That is possible to setup even with current version of VSL scene.
    5. Keep lights on or extend timer if one of the lights is turned on manually. This is now implemented in new version but there are some limitations. First if dimOff is turned on then this feature doesn't work since lights are not turned off anyway just dimmed low. If all lights are off then only if one of the lights are turned on manually before motion is detected then this feature will work and you can setup to keep lights on until manually turned off or just extend timer for some defined time.
    • There is one feature that will still not be available in this new version of VSL scene and that is:
    1. different time outs for lights.
    • But that doesn't mean that it is not achievable! VSL scene is very versatile and configurable piece of code! So if you really need that some lights go off or dim low before other, then you can achieve that by using two or more scenes for same room but selected lights and different durations! There are so many combinations of settings that it is even for me impossible to test them all. I'm testing VSL scene for last several days almost whole day long with 3 HUE lights, one DIMMER, one RGBW and one wall plug light and I didn't still test all possibilities! I hope that I will clean most of the bugs in code, but due to many combinations it is still possible that few remain. With above mentioned I have closed for now ToDo list and since no one left here any more requests I will prepare it for publishing. Any further request will be put in ToDo list for some future version.

     

    Cheers!

    Link to comment
    Share on other sites

    I'm already, as many others, looking forward to it :-)

     

    Link to comment
    Share on other sites

    Will/does the new VSL still use countdown timers or breached values? Relates to our previous discussions where I edited your VSL to cater for doors as triggers but get left open by the user...

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, shaunfrost said:

    Will/does the new VSL still use countdown timers or breached values? Relates to our previous discussions where I edited your VSL to cater for doors as triggers but get left open by the user...

     

    Hi @shaunfrost,

     

    Thanks for reminding me! Ufff, I admit that I forget on our conversation from January, apologies. I found our conversation and please just confirm if I understand it right:

     

    If door sensors are used for triggering scene to turn on lights, then they should be disabled after set time 'duration' so that lights still turn off after defined duration even they are left open?

     

     

    Link to comment
    Share on other sites

    3 minutes ago, Sankotronic said:

     

    Hi @shaunfrost,

     

    Thanks for reminding me! Ufff, I admit that I forget on our conversation from January, apologies. I found our conversation and please just confirm if I understand it right:

     

    If door sensors are used for triggering scene to turn on lights, then they should be disabled after set time 'duration' so that lights still turn off after defined duration even they are left open?

     

     

     

    Yeah, so I use doors AND Motion Sensors to trigger the VSL, but sometimes the door is left open, so it needs to timeout otherwise it would keep the lights on forever.. I use the breach value of the sensor.. so, if the door is left open, the lights will still go off after the timeout, and when someone walks into the room, the motion sensor will trigger the lights back on..

     

    It helps me in some rooms where I can get half way across the room before the sensor gets me, and I have already fallen over the wife shoes! this way the door triggers before I get into the room! :)

    Link to comment
    Share on other sites

  • Topic Author
  • 3 minutes ago, shaunfrost said:

     

    Yeah, so I use doors AND Motion Sensors to trigger the VSL, but sometimes the door is left open, so it needs to timeout otherwise it would keep the lights on forever.. I use the breach value of the sensor.. so, if the door is left open, the lights will still go off after the timeout, and when someone walks into the room, the motion sensor will trigger the lights back on..

     

    It helps me in some rooms where I can get half way across the room before the sensor gets me, and I have already fallen over the wife shoes! this way the door triggers before I get into the room! :)

     

    @shaunfrost,

     

    Thank you for quick replay! Consider it then as implemented since I'm already adding this feature to the VSL scene! There will be only one local setting to turn this feature on or off the rest will be taken care by scene. Also, this check will only apply to door/window sensors!

    Link to comment
    Share on other sites

    44 minutes ago, Sankotronic said:

     

    @shaunfrost,

     

    Thank you for quick replay! Consider it then as implemented since I'm already adding this feature to the VSL scene! There will be only one local setting to turn this feature on or off the rest will be taken care by scene. Also, this check will only apply to door/window sensors!

    So will this be able to be used in a bathroom when the door is closed and no motion, cause someones having a bath, the lights dont turn off untill door opened again..

    Thanks ed

     

    Link to comment
    Share on other sites

  • Topic Author
  • 52 minutes ago, Edb said:

    So will this be able to be used in a bathroom when the door is closed and no motion, cause someones having a bath, the lights dont turn off untill door opened again..

    Thanks ed

     

     

    Hi @Edb,

     

    Above feature is for door sensors when used as triggering device to turn lights on. New version will have possibility to still turn off lights if door remain opened after predefined time, but motion sensor will still work same as before. @shaunfrost idea to use doors to turn on lights is great because lights can then turn on even before you enter the room and motion sensor see you, but problem with that solution is if door stay opened for long time because then lights will also stay on even no one is in the room anymore. 

     

    Feature that you ask for is already implemented! All you have to do is configure bathroom door sensor when closed to keep lights On like this:

    Please login or register to see this code.

    jT.bathroom.door is from HomeTable and it holds bathroom door sensor ID. extraDeviceValue is set for door to 0 because that is value of sensor when door is closed. If extraDeviceSleep is set to true then it will keep lights on even when SleepState is set to Sleep, otherwise if it is set to false then door sensor will not have any influence on lights after SleepState is set to Sleep. :-) 

     

    It is also possible to keep lights on with for example wall plug if power is above defined value like this:

    Please login or register to see this code.

    jT.study.table_plug is from HomeTable and it holds study room table wall plug ID. If table light is turned On and/or computer then measured power on the plug will be above 20W and it will keep on other lights in the study room. Possibilities are endless!

     

     

    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.

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