more G-Labs products

Author Topic: Annual calendar and Hours schedule tables  (Read 10368 times)

December 30, 2014, 03:58:55 PM
Read 10368 times

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
You can find here new widgets.
Calendrier allows to program a calendar wich define the kind of the day :
- W : Week-end
- O : Working day (French:Ouvré)
- F : Free day (French:Férié)
- S : Special day  as hollidays or other

Tables horaires allows to program different Hours schedule tables by step of 15 mns.
There are 10 tables for thermostats use, 6 tables for lights and switchs, 6 tables for shutters or dimmers.
4 states for thermostat : A (Stop) - H (No frost) - E (Eco) - C (Comfort)
2 states for light and switch : F (ofF) - O (On)
6 states for shutter and dimmer : 0 (0%) - 1 (20%) - 2 (40%)- 3 (60%)- 4 (60%)- 5 (100%)

The parameters generated are copied in general settings parameters by the hgx actually only at the starting of the scenario.

The parameters for the calendar are ;
Settings.Parameter("Calend.Year.0 ).Value for January
Settings.Parameter("Calend.Year.1 ).Value for Februaryy
.
.
Settings.Parameter("Calend.Year.11 ).Value for December

The parameters for Hours schedule are :
Settings.Parameter("Table.Therm.0").Value
Settings.Parameter("Table.Therm.1").Value.
.
Settings.Parameter("Table.Therm.9").Value
Settings.Parameter("Table.Light.0").Value
Settings.Parameter("Table.Light.1").Value.
.
Settings.Parameter("Table.Light.6").Value
Settings.Parameter("Table.Shutter.0").Value
Settings.Parameter("Table.Shutter.1").Value.
.
Settings.Parameter("Table.Shutter.6").Value

The .html and .json have to be in the folder html/pages/control/widgets/DaniMail/generic of HG UI.

I will provide some samples later on how to use those tables.
And I will see later for include local language in this contributions, but I am new in JS environment

Cheers
Dani
« Last Edit: December 30, 2014, 06:06:59 PM by dani »

December 30, 2014, 06:16:01 PM
Reply #1

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Here have some screenshots

Cheers

January 05, 2015, 09:02:39 AM
Reply #2

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
You can find here :

Calendrier Widget and Module with some adjustements
Tables horaires Widget and Module with some adjustments
And new Thermostat Widget and Module which implement a multi Virtual DevicesThermostat that use the Calendar and Hours Tables.

Only one thing, you have to adjust the Module number of Tables Horaires in thermostats.json Line 48, just replace 1009 by your module number, insteadof the tables are not display in the control popup in program mode.
48 : var moduleTH = HG.WebApp.Utility.GetModuleByDomainAddress('HomeAutomation.HomeGenie.Automation', '1009');

The files *.json, *.html and the folder locales have to be in html/pages/control/widgets/DaniMail/generic.
Let's me now if you have some requests
Cheers
Dani
« Last Edit: January 05, 2015, 10:38:56 AM by dani »

January 05, 2015, 05:37:14 PM
Reply #3

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi dani,

this is really a good work. We can include it as a System Application, so users won't have to change the program address in the source code.
Let me know when you feel it's ready to be included in default hg programs.

Cheers,
g.

January 05, 2015, 06:04:40 PM
Reply #4

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Gene,

I am Ok to include as a system application. I actually make some little modifications.
As to prevent the module that table as changed then the system parameter are updated without start and stop the module.
I think it will be ready tomorrow after some improve.

Cheers
Dani

January 07, 2015, 11:10:30 AM
Reply #5

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Gene,

Here you can find my first official version to join in your master
Only you have to modify :
At the line 60 of thermostats.json :
Replace 1018 with the new module number of Calendrier
At the line 63 of thermostats.json :
Replace 1009 with the new module number of Tables horaires

Let's me now if you have some requests or issues.

Cheers
Dani
« Last Edit: January 07, 2015, 11:14:25 AM by dani »

January 07, 2015, 04:16:36 PM
Reply #6

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Gene,

I corrected a small issue when leave the group of  a virtual Thermostat and come back.
If you use the ControlPopup and click severals Mode buttons without close the popup then we get after the first change mode more and more Events for one button press. It's increased all change mode from 1 events to 3, 9, 36 at the 4th change. Here you find the release.
The cause is that I don't include the events click'on' off all items the test if( !controlpopup ) perhaps you know the reason. I need to change only the room of end parenthesis in json code.

I have an other small issue in the Hour Tables in the same order when recall the control group of Tables Horaires.
The 2 selected hours box are not show. If I print in a log item the edit value of that two items are corrects after the initialisation by calling analyseclick : function().

Here You find the first patch.
« Last Edit: January 07, 2015, 04:18:57 PM by dani »

January 15, 2015, 07:57:35 PM
Reply #7

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Here you can find the release of the Contribution.
It comes with some corrections of little issues and some addons same if's now possible to change the number of Hour tables from the option popup of each thermostat ...
I am now working on some Virtual Lights and Shutter in accordance with the calendar and Hour tables.
Now for change the Number of Modules in Thermostats.json, it's in the lines 13 and 14 :
Replace 1000 your Number of Calendrier Module.
Replace 1001 your Number of Tables horaires Module.

January 19, 2015, 10:25:34 AM
Reply #8

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
You can find here :

Calendrier Widget and Module with some adjustements and small design changes
Tables horaires Widget and Module with some adjustments
Thermostat Widget and Module which implement a multi Virtual DevicesThermostat that use the calendar and Hours Tables.
   Each Thermostat can controle 3 Areas (Switchs) like 3 independant elctric heaters
And new Eclairage Widget and Module which implement a multi Light Devices that use the calendar and Hours Tables.
   Each Light Device can controle 4 Areas (Lights or Switchs)

Only something todo :
1 - you have to adjust the Module number of Calendrier in thermostats.js Line 13 and eclairages.js Line 11, just replace 1000 by your module number, instead of the tables are not display in the control popups in program mode.
2 - you have to adjust the Module number of Tables Horaires in thermostats.js Line 14 and eclairages.js Line 12, just replace 1001 by your module number, instead of the tables are not display in the control popups in program mode.

Carreful since the rev 458 of HG, the .json files are replace by .js

Let's me now if you have some requests.
Cheers
Dani
« Last Edit: January 19, 2015, 10:33:47 AM by dani »

January 19, 2015, 03:49:31 PM
Reply #9

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Gene,
How does we do to merge xxxx-Program.hgx to the git project. And small notice too.
My calendar and Hours tables work fine.
I join also two Virtual projects in accordance with those parameters : A multiple Thermostats and multi lights that care of the calendar and hours tables.
We can include that in the general project when you agree
After that I hope some helps to add the other languages.

Cheers
Dani

January 19, 2015, 04:18:55 PM
Reply #10

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi dani,

what do you mean with "small notice"? Can the description field of the program a good place for it?
To add a program to default HG programs proceed as follow:

- run HomeGenie from the IDE
- import/compile the program in the "Weather and Enviroment" automation group
- quit homegenie
- copy the HomeGenie/HomeGenie/bin/Debug/programs.xml over the BaseFiles/Common/programs.xml
- edit the BaseFiles programs.xml and change your program's address with an address > 500 with the next available number (let's say 510)
- copy the HomeGenie/HomeGenie/bin/Debug/programs/1000.dll (or whatever it was the dll) as BaseFiles/Common/programs/500.dll
- add the 500.dll to the HG Common project as well with the "copy to output directory" flag active as other programs dlls
- copy the new programs.xml and the new dll in the BaseFiles/Common/homegenie_factory_config.zip archive

I can add italian translation to your app.

Cheers,
g.

January 19, 2015, 04:59:42 PM
Reply #11

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Thank's Gene,
 I will follow your instructions.
 See you
Dani

January 19, 2015, 11:49:43 PM
Reply #12

AutoBob

  • *
  • Information
  • Newbie
  • Posts: 5
Hi,

here the english locale.

Best Regards,

AutoBob.
AutoBob.

January 20, 2015, 10:52:01 AM
Reply #13

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi AutoBob,

You can find following your module JeeNode with some modifications.

Cheers
Dani

January 20, 2015, 11:06:15 AM
Reply #14

AutoBob

  • *
  • Information
  • Newbie
  • Posts: 5
Hi,

Thank you Dani.

Once I have all working, I will publish the code for HG, JeeLink & JeeNodes + Hardware Schema.

Best Regards,

AutoBob

AutoBob.