en:hems:universe:api
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:hems:universe:api [2020/07/01 09:42] – amra.begic | en:hems:universe:api [2020/07/23 07:03] (current) – removed ivan.ilicic | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Application Programming Interface (API) ===== | ||
- | |||
- | ==== Direct loads control ==== | ||
- | |||
- | | '' | ||
- | | '' | ||
- | |||
- | ==== Timetable loads control ==== | ||
- | Writes ' | ||
- | |||
- | | '' | ||
- | | '' | ||
- | |||
- | ===== Cloud Optimization (Consumers timetable) ===== | ||
- | **Cloud optimization** allows writes from Cloud/Edge to consumer timetables, changing consumer' | ||
- | Following table and use cases below explain the usage of variables in different scenarios. | ||
- | |||
- | ^ Variables ^ Description ^ | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | |||
- | |||
- | Variable '' | ||
- | |||
- | ==== Use cases ==== | ||
- | <wrap hi> | ||
- | Consumer [3] has to be switched off on Wednesday at 16:45 and be in this state for 1 hour. | ||
- | < | ||
- | if ( timetable_cloud_once[3] ) { // 4. consumer (idx=3) | ||
- | optimization_index[0] = 4; // 4. consumer (idx=3) | ||
- | optimization_start[0] = 16453; | ||
- | optimization_time[0] = 60; // 1 hour | ||
- | optimization_value[0] = 0; // set off | ||
- | optimization_command[0] = 1; // set once action | ||
- | }; | ||
- | |||
- | // Result: | ||
- | // ^xxx | ||
- | // |---|---|---|---|---| | ||
- | // ... 14 15 16 17 18 19 ... | ||
- | </ | ||
- | |||
- | <wrap hi> | ||
- | Consumer [7] has to be switched on every Monday@08: | ||
- | < | ||
- | if ( timetable_cloud_once[7] ) { // 8. consumer (idx=7) | ||
- | // action on | ||
- | optimization_index[0] = 8; // 8. consumer (idx=7) | ||
- | optimization_start[0] = 8001; // hh=08, mm=00, w=1 | ||
- | optimization_time[0] = 15; // only one action | ||
- | optimization_value[0] = 1; // set on | ||
- | optimization_command[0] = 2; // set recurring action | ||
- | // action off | ||
- | optimization_index[1] = 8; // 8. consumer (idx=7) | ||
- | optimization_start[1] = 21001; | ||
- | optimization_time[1] = 15; // only one action | ||
- | optimization_value[1] = 2; // set off | ||
- | optimization_command[1] = 2; // set recurring action | ||
- | }; | ||
- | |||
- | // Result: | ||
- | // ^ ˇ | ||
- | // |---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| | ||
- | // ... 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ... | ||
- | </ | ||
- | |||
- | <wrap hi> | ||
- | Consumer [0] has to be switched on/off following this pattern: | ||
- | Saturday\\ | ||
- | @11:15 on\\ | ||
- | @11:45 off\\ | ||
- | @12:00 on\\ | ||
- | @13:30 off\\ | ||
- | @13:45 on\\ | ||
- | @14:00 off\\ | ||
- | |||
- | < | ||
- | if ( timetable_cloud_once[0] ) { // 1. consumer (idx=0) | ||
- | optimization_index[0] = 1; // 1. consumer (idx=0) | ||
- | optimization_start[0] = 11156; | ||
- | optimization_time[0] = 180; // from 11:15 to 14:00 + 15min = 180 minutes | ||
- | optimization_value[0] = 1531; // mask: 2# | ||
- | optimization_command[0] = 4; // set mask | ||
- | }; | ||
- | |||
- | // Result: | ||
- | // lsb < | ||
- | // 110111111010 | ||
- | // | ||
- | // ^xˇ^xxxxxˇ^ˇ | ||
- | // | ||
- | // | ||
- | </ | ||
- | |||
- | <wrap hi> | ||
- | Consumer [0] is the only consumer with analog output. Analog value range is 0..100%.\\ | ||
- | From Tuesday@14: | ||
- | |||
- | < | ||
- | if ( timetable_cloud_analog[0] ) { // 1. consumer (idx=0) | ||
- | optimization_index[0] = 1; // 1. consumer (idx=0) | ||
- | optimization_start[0] = 14002; | ||
- | optimization_time[0] = 60; // 60 minutes | ||
- | optimization_value[0] = 75; // 75% | ||
- | optimization_command[0] = 5; // set analog | ||
- | }; | ||
- | |||
- | // Result: | ||
- | // | ||
- | // | ||
- | // | ||
- | // | ||
- | </ | ||
- | |||
- | <wrap hi> | ||
- | Set high tariff (HT) from 06:00 until 22:00, for Friday. | ||
- | < | ||
- | optimization_start[0] = 6005; // hh=06, mm=00, w=5 | ||
- | optimization_time[0] = 960; // only one action | ||
- | optimization_value[0] = 1; // hight tariff | ||
- | optimization_command[0] = 3; // set tariff | ||
- | |||
- | // Result: | ||
- | // | ||
- | // | ||
- | // | ||
- | // | ||
- | </ | ||
- | |||
- | <wrap hi> | ||
- | Clear actions made in SCE01. | ||
- | < | ||
- | if ( timetable_cloud_once[3] ) { // 4. consumer (idx=3) | ||
- | optimization_index[0] = 4; // 4. consumer (idx=3) | ||
- | optimization_start[0] = 16453; | ||
- | optimization_time[0] = 60; // 1 hour | ||
- | optimization_value[0] = -1; // clear | ||
- | optimization_command[0] = 1; // set once action | ||
- | }; | ||
- | |||
- | // Result: | ||
- | // | ||
- | // |---|---|---|---|---| | ||
- | // ... 14 15 16 17 18 19 ... | ||
- | </ | ||
- | |||
en/hems/universe/api.1593596539.txt.gz · Last modified: 2020/07/01 09:42 by amra.begic