eModul API Version 1.0 1. Authentication token: POST https://emodul.eu/api/v1/authentication POST data example: {"username": "test", "password": "test"} Response data example: {"authenticated": true, "user_id": 240471648, "token": "eyJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJ1c2VyX2lkIjoyNDA0NzE2NDgsImlhdCI6MTUyNjk5ODQxOX0.opQW1yTczP7vuiIkI1Skuy8yJ8eGhYrlYUKmll9P88M"} ------------------------------------------------------------------------------------------------------------------------ 2. Authenticating requests: GET https://emodul.eu/api/v1/authentication Each request must contain HTTP Authorization header with token: Authorization: Bearer + token Example: Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJ1c2VyX2lkIjoyNDA0NzE2NDgsImlhdCI6MTUyNjk5ODQxOX0.opQW1yTczP7vuiIkI1Skuy8yJ8eGhYrlYUKmll9P88M { "authenticated": true } ------------------------------------------------------------------------------------------------------------------------ 3. List of account modules: GET https://emodul.eu/api/v1/users/{user_id}/modules ------------------------------------------------------------------------------------------------------------------------ 4. Module data: GET https://emodul.eu/api/v1/users/{user_id}/modules/{module_udid} ------------------------------------------------------------------------------------------------------------------------ 5. Change zone parameters (L-7, L-8, WiFi 8S, ST-8S WiFi): POST https://emodul.eu/api/v1/users/{user_id}/modules/{module_udid}/zones 5.1 Set constant temperature: POST data example: { "mode": { "id": 210, "parentId": 101, "mode": "constantTemp", "constTempTime": 0, "setTemperature": 220, "scheduleIndex": 0 } } 5.2 Set constant temperature with time limitation: POST data example: { "mode": { "id": 210, "parentId": 101, "mode": "timeLimit", "constTempTime": 60, "setTemperature": 220, "scheduleIndex": 0 } } 5.4 Turn on zone: POST data example: { "zone": { "id": 101, "zoneState": "zoneOn" } } 5.5 Turn off zone: POST data example: { "zone": { "id": 101, "zoneState": "zoneOff" } } ------------------------------------------------------------------------------------------------------------------------ 6. Setting schedules: 6.1 Local zone schedules: POST https://emodul.eu/api/v1/users/{user_id}/modules/{module_udid}/zones/{zone_id}/local_schedule POST data example: { modeId = 100 schedule = { id: 150, index: -1, p0Days: ["1", "1", "1", "1", "1", "0", "0"], p0Intervals: [{start:0, stop: 480, temp: 180}, {start: 480, stop: 960, temp: 240}], p0SetbackTemp: 200, p1Days: ["0", "0", "0", "0", "0", "1", "1"], p1Intervals: [{start:480, stop: 1320, temp: 260}], p1SetbackTemp: 210 } } modeId(integer): id of the mode object (nakładka) connected to the zone schedule(object) id(integer): id of the global schedule connected to specified module index(integer): index of the global schedule (0 to 4) p0Days(array of strings): array of days turned on/off for program 1(1 - on, 0 - off). Values must be opposites of p1Days. p0Intervals(array of objects): group of intervals for program 1. Maximum 3 intervals (can be empty) - each interval requires 3 properties: start, stop and temp - start/stop define the starting/stopping times for the interval - start/stop represent time in minutes. Min 0, Max 1440 - temp defines the temperature for the interval (x10). Min 50 max 350. eg. {start: 480, stop: 960, temp 200} from 8:00 - 16:00 temperature will be 20 degrees celsius p0SetbackTemp(integer): temperature for anytime not covered by p0Intervals. Min 50 max 350. p1Days(array of strings): array of days turned on/off for program 2(1 - on, 0 - off). Values must be opposites of p0Days. p1Intervals(array of objects): group of intervals for program 2. Maximum 3 intervals (can be empty) - each interval requires 3 properties: start, stop and temp - start/stop define the starting/stopping times for the interval - start/stop represent time in minutes. Min 0, Max 1440 - temp defines the temperature for the interval (x10). Min 50 max 350. eg. {start: 480, stop: 960, temp 200} from 8:00 - 16:00 temperature will be 20 degrees celsius p1SetbackTemp(integer): temperature for any time not covered by p1Intervals. Min 50 max 350. Response data example: {"message": "Data has been sent correctly"} Error response Each error response returns data in the following format: {"error": "code_for_received_error", "error_description": "Some text describing the error"} invalid_json General error regarding incorrectly sent data. Schedule property errors: missing_schedule_property The request is missing the required 'schedule' property. invalid_schedule_property The request is missing required properties on the schedule property. 'schedule' must have the following properties: id, index, p0Days, p0Intervals, p0SetbackTemp, p1Days, p1Intervals, p1SetbackTemp. Interval errors: invalid_number_of_interval_elements Invalid amount of elements in 'p0Intervals' or 'p1Intervals'. The maximum allowed amount is 3. missing_interval_property Element(s) of 'p0Intervals' or 'p1Intervals' are missing interval properties. Each interval must have the following properties: start, stop, temp. invalid_interval_start_out_of_range invalid_interval_stop_out_of_range Element(s) of 'p0Intervals' or 'p1Intervals' have an invalid 'start' or 'stop' property. 'start' and 'stop' must be between 0 and 1440. invalid_interval_start_time_not_increment_of_15 invalid_interval_stop_time_not_increment_of_15 Element(s) of 'p0Intervals' or 'p1Intervals' have an invalid 'start' or 'stop' property. 'start' and 'stop' must be an increment of 15. invalid_interval_stop_greater_than_or_equal_to_start Element(s) of 'p0Intervals' or 'p1Intervals' start property must be less than (and not equal) to the stop property. invalid_interval_temp Element(s) of 'p0Intervals' or 'p1Intervals' have and invalid temp property. Temp must be between 50 and 350 inclusive. invalid_interval_overlap Element(s) of 'p0Intervals' or 'p1Intervals' start/stop times overlap each other. An element's 'start' must be greater than or equal to the previous element's 'stop'. Day errors: invalid_p0days_length invalid_p1days_length The request has an invalid 'p0Days' or 'p1Days' property. Its length must always be 7 (the amount of days in a week). invalid_p0day_element invalid_p1day_element The request has an invalid 'p0Days' or 'p1Days' property. Each element must be either "0" or "1". invalid_pday_equal An element at 'n' in 'p0Days' has the same value as 'p1Days' at index 'n'. Elements at the same index must not have the same value. invalid_p0setback_temp invalid_p1setback_temp The request has an invalid 'p0SetbackTemp' or 'p1SetbackTemp' property. It's value must be between 50 and 350 inclusive. invalid_local_schedule_index Invalid 'index' property on 'schedule' property. The index must be between -40 and -1 inclusive. invalid_local_schedule_property The request is missing the required 'modeId' property. invalid_local_schedule_zone_not_in_module The 'zoneId' parameter has an id that does not belong to the specified module. invalid_local_schedule_doesnt_belong_to_zone The request's schedule has an id that does not belong to the zone. invalid_local_schedule_index_mismatch The request's schedule has an index which doesn't match it's id. invalid_local_schedule_mode_not_in_zone The request's modeId does not belong to it's zone. Type errors: invalid_schedule_type Wrong type for schedule property. Schedule must be an object. invalid_pinterval_type Wrong type for p0Interval or p1Interval property. p0Interval and p1Interval must be arrays of objects. invalid_interval_type Wrong type for interval property. Interval must be a object. invalid_interval_start_type Wrong type for interval start property. Start must be an integer. invalid_interval_stop_type Wrong type for interval stop property. Stop must be an integer. invalid_interval_temp_type Wrong type for interval temp property. Temp must be an integer. invalid_p0days_type Wrong type for p0Days. p0Days must be an array of strings. invalid_p1days_type Wrong type for p1Days. p1Days must be an array of strings. invalid_p0day_element_type Wrong type for p0Day element. p0Day elements must be strings. invalid_p1day_element_type Wrong type for p1Day element. p1Day elements must be strings. invalid_p0setback_temp_type Wrong type for p0SetbackType. p0SetbackType must be an integer. invalid_p1setback_temp_type Wrong type for p1SetbackType. p1SetbackType must be an integer. invalid_local_schedule_index_type Wrong type for index. Index must be an integer. invalid_local_schedule_mode_id_type Wrong type for modeId. modeId must be an integer. 6.2 Global schedules: POST https://emodul.eu/api/v1/users/{user_id}/modules/{module_udid}/global_schedule POST data example: { setInZones: [{zoneId: 120, modeId: 121}, {zoneId: 140, modeId: 150}], scheduleName: "Global schedule", schedule = { id: 140, index: 1, p0Days: ["1", "1", "1", "1", "1", "0", "0"], p0Intervals: [{start:0, stop: 480, temp: 180}, {start: 480, stop: 960, temp: 240}], p0SetbackTemp: 200, p1Days: ["0", "0", "0", "0", "0", "1", "1"], p1Intervals: [{start:480, stop: 1320, temp: 260}], p1SetbackTemp: 210 } } setInZones(array of objects): array of zoneIds to be set with their corresponding modeIds. This cannot be empty. Zone(s) must belong to the module specified by {module_udid} scheduleName(string): new name for the global schedule. Only required if changing the name. Max length 40. schedule(object) id(integer): id of the global schedule connected to specified module index(integer): index of the global schedule (0 to 4) p0Days(array of strings): array of days turned on/off for program 1(1 - on, 0 - off). Values must be opposites of p1Days. p0Intervals(array of objects): group of intervals for program 1. Maximum 3 intervals (can be empty) - each interval requires 3 properties: start, stop and temp - start/stop define the starting/stopping times for the interval - start/stop represent time in minutes. Min 0, Max 1440 - temp defines the temperature for the interval (x10). Min 50 max 350. eg. {start: 480, stop: 960, temp 200} from 8:00 - 16:00 temperature will be 20 degrees celsius p0SetbackTemp(integer): temperature for anytime not covered by p0Intervals. Min 50 max 350. p1Days(array of strings): array of days turned on/off for program 2(1 - on, 0 - off). Values must be opposites of p0Days. p1Intervals(array of objects): group of intervals for program 2. Maximum 3 intervals (can be empty) - each interval requires 3 properties: start, stop and temp - start/stop define the starting/stopping times for the interval - start/stop represent time in minutes. Min 0, Max 1440 - temp defines the temperature for the interval (x10). Min 50 max 350. eg. {start: 480, stop: 960, temp 200} from 8:00 - 16:00 temperature will be 20 degrees celsius p1SetbackTemp(integer): temperature for any time not covered by p1Intervals. Min 50 max 350. Response data example: {"message": "Data has been sent correctly"} Error response Each error response returns data in the following format: {"error": "code_for_received_error", "error_description": "Some text describing the error"} invalid_json General error regarding incorrectly sent data. Schedule property errors: missing_schedule_property The request is missing the required 'schedule' property. invalid_schedule_property The request is missing required properties on the schedule property. 'schedule' must have the following properties: id, index, p0Days, p0Intervals, p0SetbackTemp, p1Days, p1Intervals, p1SetbackTemp. Interval errors: invalid_number_of_interval_elements Invalid amount of elements in 'p0Intervals' or 'p1Intervals'. The maximum allowed amount is 4. missing_interval_property Element(s) of 'p0Intervals' or 'p1Intervals' are missing interval properties. Each interval must have the following properties: start, stop, temp. invalid_interval_start_out_of_range invalid_interval_stop_out_of_range Element(s) of 'p0Intervals' or 'p1Intervals' have an invalid 'start' or 'stop' property. 'start' and 'stop' must be between 0 and 1440. invalid_interval_start_time_not_increment_of_15 invalid_interval_stop_time_not_increment_of_15 Element(s) of 'p0Intervals' or 'p1Intervals' have an invalid 'start' or 'stop' property. 'start' and 'stop' must be an increment of 15. invalid_interval_stop_greater_than_or_equal_to_start Element(s) of 'p0Intervals' or 'p1Intervals' start property must be less than (and not equal) to the stop property. invalid_interval_temp Element(s) of 'p0Intervals' or 'p1Intervals' have and invalid temp property. Temp must be between 50 and 350 inclusive. invalid_interval_overlap Element(s) of 'p0Intervals' or 'p1Intervals' start/stop times overlap each other. An element's 'start' must be greater than or equal to the previous element's 'stop'. Day errors: invalid_p0days_length invalid_p1days_length The request has an invalid 'p0Days' or 'p1Days' property. Its length must always be 7 (the amount of days in a week). invalid_p0day_element invalid_p1day_element The request has an invalid 'p0Days' or 'p1Days' property. Each element must be either "0" or "1". invalid_pday_equal An element at 'n' in 'p0Days' has the same value as 'p1Days' at index 'n'. Elements at the same index must not have the same value. invalid_p0setback_temp invalid_p1setback_temp The request has an invalid 'p0SetbackTemp' or 'p1SetbackTemp' property. It's value must be between 50 and 350 inclusive. invalid_global_schedule_index Invalid 'index' property on 'schedule' property. The index must be between 0 and 4 inclusive. invalid_global_schedule_property The request is missing required properties. In addition to 'schedule', it must have 'setInZones' and 'scheduleName' properties. invalid_global_schedule_not_in_module The 'schedule' property has an id that does not belong to the specified module. invalid_global_schedule_invalid_set_in_zones_length The request's 'setInZones' property has an invalid length. 'setInZones' must not be empty. invalid_global_schedule_invalid_set_in_zones_properties The request's 'setInZones' property has invalid element(s). Each element must have the required properties 'zoneId' and 'modeId'. invalid_global_schedule_invalid_set_in_zones_not_in_module The request's 'setInZones' property has invalid element(s). One or more of the elements have a zoneId that does not belong to the specified module. invalid_global_schedule_index_mismatch The request's schedule has an index which doesn't match it's id. invalid_global_schedule_invalid_schedule_name_length The request's scheduleName has an invalid length. It's length must not be more than 40. invalid_global_schedule_invalid_set_in_zones_mode_not_in_zone The request's 'setInZones' property has a modeId which doesn't belong to the zone. Type errors: invalid_schedule_type Wrong type for schedule property. Schedule must be an object. invalid_pinterval_type Wrong type for p0Interval or p1Interval property. p0Interval and p1Interval must be arrays of objects. invalid_interval_type Wrong type for interval property. Interval must be a object. invalid_interval_start_type Wrong type for interval start property. Start must be an integer. invalid_interval_stop_type Wrong type for interval stop property. Stop must be an integer. invalid_interval_temp_type Wrong type for interval temp property. Temp must be an integer. invalid_p0days_type Wrong type for p0Days. p0Days must be an array of strings. invalid_p1days_type Wrong type for p1Days. p1Days must be an array of strings. invalid_p0day_element_type Wrong type for p0Day element. p0Day elements must be strings. invalid_p1day_element_type Wrong type for p1Day element. p1Day elements must be strings. invalid_p0setback_temp_type Wrong type for p0SetbackType. p0SetbackType must be an integer. invalid_p1setback_temp_type Wrong type for p1SetbackType. p1SetbackType must be an integer. invalid_global_schedule_index_type Wrong type for index. Index must be an integer. invalid_global_schedule_invalid_schedule_name_type Wrong type for scheduleName. scheduleName must be a string. invalid_global_schedule_invalid_set_in_zones_type Wrong type for setInZones. setInZones must be an array of objects. invalid_global_schedule_invalid_set_in_zones_element_type Wrong type for setInZones element. setInZones elements must be objects. invalid_global_schedule_invalid_set_in_zones_zone_type Wrong type for setInZones element zoneId. setInZones elements zoneIds must be integers. invalid_global_schedule_invalid_set_in_zones_mode_type Wrong type for setInZones element modeId. setInZones elements modeIds must be integers. ------------------------------------------------------------------------------------------------------------------------ 7. Get menu parameters GET https://emodul.eu/api/v1/users/{user_id}/modules/{module_udid}/menu/{menu_type}' Parameter Type Required Description menu_type String yes Options: 'MU', 'MI', 'MS', 'MP' Valid values: (type 1) { "menuType": "MU", "type": 1, "id": 2063, "parentId": 30002, "access": true, "txtId": 296, "wikiTxtId": 0, "iconId": 87, "params": { "format": 1, "value": 10, "min": 1, "max": 25, "default": 0, "txtId": 1035, "description": "Number value control" }, "duringChange": null { (type 1..5) Value edits Control variants: "format" = parameter_type = 1: Normal value parameter_type = 2: value 1/10 parameter_type = 3: min: sec parameter_type = 4: hour: min parameter_type = 5: h: min during the day "value": current_value "min": minimum_value "max": max_value "default": default_value "description": unit_script_id: from the subtitle database Feedback in the format: [parameter_id, changed_value] (type 6) { "menuType": "MS", "type": 6, "id": 30111, "parentId": 0, "access": true, "txtId": 4109, "wikiTxtId": 0, "iconId": 0, "params": { state: params, code: params, stateTxtId: params }, "duringChange": "f" }, (type 6) Entering code (input) state: light state (0, 1, 2) code: key on the basis of which the code sent to the controller is generated (-1 key will not be displayed) stateTxtId: string id for the current state state 0 - default state 1 after entering a valid value state 2 after entering an incorrect value Feedback in the format: [parameter_id, given_code] (type 7) { "menuType": "MS", "type": 7, "id": 30111, "parentId": 0, "access": true, "txtId": 4109, "wikiTxtId": 0, "iconId": 0, "params": { format: type, remoteReset: params, value: params min: params max: params, default: params, type: params, timeValue: params, timeMin: params, timeMax: params, timeMax: params, }, "duringChange": "f" }, (type 7) Time mode (temperature + time) format: possibility to delete from the Internet (0 - no, 1 - yes) - a button will be displayed, which will be used to send feedback to the controller filled in -1 remoteReset:temperature_current_value min:minimum_temperature_value max: temperature_maximum_value default: temperature_default_value type: type-format values table data format timeValue: current_value timeMin: time_minimum_value timeMax: time_maximum_value timeMax: time_default_value Feedback in the format: [parameter_id, temperature_changed_value, time_changed_value] (type 10) { "menuType": "MI", "type": 10, "id": 3682, "parentId": 30105, "access": true, "txtId": 953, "wikiTxtId": 0, "iconId": 95, "params": { "value": 0, "default": 0, "description": "On/Off control" }, "duringChange": null }, (type 10) ON / OFF "value": actual_value: 0 or 1 "default": default_value: 0 or 1 Feedback in the format: [parameter_id, changed_value] (type 11) { "menuType": "MU", "type": 11, "id": 3350, "parentId": 30040, "access": true, "txtId": 806, "wikiTxtId": 18, "iconId": 13, "params": { "value": 0, "default": 0, "options": [ { "txtId": 922, "value": 0, }, { "txtId": 818, "value": 1 }, { "txtId": 819, "value": 2 } ], "description": "Radio button control" }, "duringChange": null }, (type 11) Choice 1 out of many "value": current_value "default": default_value "options": "txtId": text_id "value": value Feedback in the format: [parameter_id, changed_value] (type 111) { "menuType": "MI", "type": 111, "id": 1000, "parentId": 0, "access": true, "txtId": 814, "wikiTxtId": 0, "iconId": 95, "params": { "value": 0, "default": 0, "options": [ { "txtId": 3109, "value": 0 }, { "txtId": 1401, "value": 1 }, { "txtId": 4324, "value": 2 }, { "txtId": 4325, "value": 3 } ], "description": "Zones controller - mode selection" }, "duringChange": null }, (type 111) Selection of strip mode (or other zone controller) "value": current_value "default": default_value "options": Then the check boxes are sent successively in the following format: "txtId": text_id "value": value Feedback in the format: [parameter_id, changed_value] (type 112) { { "menuType": "MI", "type": 112, "id": 1000, "parentId": 0, "access": true, "txtId": 814, "wikiTxtId": 0, "iconId": 95, "params": { value: @params[0], default: @params, options: @params { txtId: x, value: x, wikiTxtId: x, messageTxtId: x } }, description: 'Radio button control expanded' }, "duringChange": null }, (type 112) Selection 1 of many + wiki, message default: current_value options: default_value Then the check boxes are sent successively in the following format: text_id value wiki sub-id (displayed after hovering the cursor over the given option) in the absence of -1 message_id (displayed after confirming the selection) in the absence of -1 Feedback in the format: [parameter_id, changed_value] (type 12) { "menuType": "MU", "type": 12, "id": 3002, "parentId": 30056, "access": true, "txtId": 589, "wikiTxtId": 0, "iconId": 13, "params": { "dayId": 1, "prevObjId": 3001, "nextObjId": 3003, "valueObjId": 2060, "min": -10, "max": 10, "values": [], "description": "Weekly control - temperature correction" }, "duringChange": null }, (type 12) Weekly + - "dayId": day_id: 0-Sunday, 1-Monday, .., 6-Saturday, 7-Mon-Fri, 8-Sat-Sun, 9-Mon-Sun "prevObjId": previous_day_check_id "nextObjId": next_day_check_id "valueObjId": corrected_variable_control_ID "min": minimum_value "max": max_value Then corrections for 24 hours are sent. The values are increased by the minimum (unsigned) value. Feedback in the format: [parameter_id, new_correction_values ...] (type 13) { "menuType": "MU", "type": 13, "id": 3377, "parentId": 30070, "access": true, "txtId": 0, "wikiTxtId": 0, "iconId": 13, "params": { "dayId": 1, "prevObjId": 3376, "nextObjId": 3378, "value": 0, "default": 0, "noZones": 48, "daySubtitles": 0, "description": "Weekly control - on/off" }, "duringChange": null }, (type 13) Weekly on / off "dayId": day_id: 0-Sunday, 1-Monday, .., 6-Saturday, 7-Mon-Fri, 8-Sat-Sun, 9-Mon-Sun "prevObjId": previous_day_check_id "nextObjId": next_day_check_id "value": number. The youngest bit describes the first zone "default": default value (written as above) "noZones": number of zones (usually 24 or 48) "daySubtitles": "only own descriptions" - 0 / none: no, 1: yes = we do not add the day strings from the machine (there will be only the one from field [4]) Feedback in the format: [parameter_id, changed_value (also in the form of a number)] (type 15) { "menuType": "MI", "type": 15, "id": 30856, "parentId": 30751, "access": true, "txtId": 642, "wikiTxtId": 0, "iconId": 98, "params": { "value": 0, "default": 0, "options": [ 645, 646, 1333, 1177 ], "description": "Checkbox control" }, "duringChange": null } (type 15) Many-of-many selection (ON / OFF set of lamps) "value": current_value as a number (the youngest bit specifies the first field, etc.) "default": default_value (as above) Then the data of individual fields is sent in the form of: "options": text_id Feedback in the format: [parameter_id, changed_value (also in the form of a number)] (type 20) { "menuType": "MU", "type": 20, "id": 8333, "parentId": 30068, "access": true, "txtId": 839, "wikiTxtId": 0, "iconId": 14, "params": { "txtId": 838, "type": 1, "value": -1, "blockHide": 0, "description": "Dialogue control - Yes/No" }, "duringChange": null }, (type 20) Dialog (Firing up, disinfecting etc.) "txtId": notification string id "type": dialogue type: 0 dialog with OK button + control closing button, 1 YES / NO dialogue + light closing button, 2 info with cancel button "value":selected value (when the parameter was changed from the controller) "blockHide": turning off the hiding of the indicator after sending the parameter 1 - YES, 0 / none - NO Feedback in the format: parameter_id, return value: for type 0: (2 after confirmation of the dialogue for type 1: (1 means YES, (0 means NO for type 2: (Cancellation 3 after (type 29) { { "menuType": "MI", "type": 29, "id": 1000, "parentId": 0, "access": true, "txtId": 814, "wikiTxtId": 0, "iconId": 95, "params": { slope: param slopeMin: param slopeMax: param shift: param shiftMin: param shiftMax: param setTemp: param externalTemp: param resultingTemperatureMin: param resultingTemperatureMax: param constant1: params constant2: params constant3: params constant4: params constant5: params patternId: params xMin: params xMax: params yMin: params yMax: params }, "duringChange": null }, (type 29) Heating curve offset / slope - Viessmann slope: slope * 10 slopeMin: min slope * 10 slopeMax: maximum slope * 10 shift: shift shiftMin: min. Change shiftMax: maximum change setTemp: set room temperature * 10 resultingTemperatureMin: outdoor temperature * 10 resultingTemperatureMax: min of the set of results constant1: max of the result set constant2: the constant 1 * 100 constant3: the constant 2 * 100 constant4: the constant 3 * 100 constant5: constant 4 * 100 patternId: the constant 5 * 100 xMin: pattern id (in the absence of -1, default pattern id 0) xMax: point X min (in the absence of -1) yMin: point X max (in the absence of -1) yMax: point Y min (in the absence of -1) "duringChange": point Y max (in the absence of -1) Patterns: (0) result = (Constant_1 * curve_lope) * (set_room_temperature ^ (outdoor_temperature / (Constant_2 - (outdoor_temperature * Constant_3)))) * ((Constant_4 - outdoor_temperature) * Constant_5) + set_temperature_offset; Feedback in the format: [parameter_id, slope, offset] (type 30) { "menuType": "MI", "type": 30, "id": 2217, "parentId": 30144, "access": true, "txtId": 342, "wikiTxtId": 0, "iconId": 0, "params": { "min": 20, "max": 70, "points": [ { "value": 60, "default": 60, "position": -20 }, { "value": 55, "default": 55, "position": -10 }, { "value": 50, "default": 50, "position": 0 }, { "value": 45, "default": 45, "position": 10 } ], "description": "Heating Curve with points" }, "duringChange": null }, (type 30) Heat curve "min": minimum_value "max": max_value "points": Then the data of individual points on the curve are sent in the form of: "value": edited_value (Y) "default": default_value (Y) "position": location_in_osi_X Feedback in the format: [parameter_id, edited values ...] (type 31) { "menuType": "MI", "type": 31, "id": 1000, "parentId": 0, "access": true, "txtId": 814, "wikiTxtId": 0, "iconId": 95, "params": { slope: @params minSlope: params maxSlope: params defaultSlope: params shift: params minShift: params maxShift: params defaultShift: params maxValue: params description: 'Heating Curve Shift/Slope' }, (type 31) Heating curve slope / offset slope: slope * 10 minSlope:min slope * 10 maxSlope: maximum slope * 10 defaultSlope: default slope * 10 shift: offset * 10 minShift: min. Change * 10 maxShift: maximum offset * 10 defaultShift: default offset * 10 maxValue: set max * 10: the curve is limited to this value (above it will be "broken" at this level) Feedback in the format: [parameter_id, slope, offset] z = n * (((20 + p) - ts) + (20 + p)) where: z - set temperature n - the slope of the curve ts - average outside temperature p - shift (par) (type 32) { "menuType": "MS", "type": 32, "id": 30111, "parentId": 0, "access": true, "txtId": 4109, "wikiTxtId": 0, "iconId": 0, "params": { "groupCode": null }, "duringChange": "f" }, (type 32) Administration / Statistics group "groupCode": Control - trigger to enter the identifier / name / code of the group for collective statistics of many controllers (eg Preview of energy yields for the entire commune). Basically an option only available on the Internet. Needed for unambiguous identification that the controller supports statistics in the form of statuses + release of the form for adding modules to the account with redundant options. We assume that it should be in the INSTALLER MENU (type 35) { "menuType": "MI", "type": 35, "id": 30090, "parentId": 0, "access": true, "txtId": 2459, "wikiTxtId": 0, "iconId": 95, "params": { "password": [ "1410" ], "description": "Menu password" }, "duringChange": "f" }, (type 35) Password "password": password to access the submenu (type 36) { "menuType": "MI", "type": 36, "id": 30090, "parentId": 0, "access": true, "txtId": 2459, "wikiTxtId": 0, "iconId": 95, "params": { txt: params, value: params, type: params, unit: params, activity: params }, "duringChange": "f" }, (type 36) Display service parameters (not used) txt: Parameter string 1 identifier value: value of 1 parameter type: parameter value type 1 unit: Parameter unit 1 ID activity: the activity of the 1st parameter (should it be e.g. bold) "duringChange": parameter string identifier 2 [13] ... value type = 0: Normal value. value type = 1: value in seconds. value type = 2: minute value. value type = 3: hourly value. value type = 4: decimal value. value type = 5: hundredth value. (type 40) { "menuType": "MI", "type": 40, "id": 30090, "parentId": 0, "access": true, "txtId": 2459, "wikiTxtId": 0, "iconId": 95, "params": { txt: params, value: params, type: params, unit: params, activity: params }, "duringChange": "f" }, :description => 'Text information', :statusId => @params[0], :headerId => @params[1], :iconId => @params[2], options: @params[3..-1] (type 40) Duplicate menu item: :description parameter_id (unique) :statusId Parent_ID :headerIdparameter_type :iconId visibility options: identifier of the copied item (type 45) { "menuType": "MU", "type": 45, "id": 20008, "parentId": 30011, "access": true, "txtId": 2447, "wikiTxtId": 0, "iconId": 149, "params": { "noCols": 4, "noRows": 0, "colsDef": [ { "idSubtitle": 1106, "type": 24 }, { "idSubtitle": 1352, "type": 16 }, { "idSubtitle": 2437, "type": 6 }, { "idSubtitle": 2438, "type": 6 } ], "rowsData": [], "description": "Data table" }, "duringChange": "f" }, (type 45) Data table "noCols": number of columns "noRows": number of significant lines (more can be sent, but only the first ... will be displayed) "colsDef": column_identifier_scription "type": column_type k (type 46) { "menuType": "MU", "type": 46, "id": 20007, "parentId": 30011, "access": true, "txtId": 2446, "wikiTxtId": 0, "iconId": 147, "params": { "noCols": 2, "noRows": 6, "colsDef": [ 2718, 2719 ], "rowsData": [ [ { "value": 2983, "type": 18 }, { "value": 102, "type": 29 } ], [ { "value": 1236, "type": 18 }, { "value": 99, "type": 19 } ], [ { "value": 1237, "type": 18 }, { "value": 100, "type": 11 } ], [ { "value": 1739, "type": 18 }, { "value": 100, "type": 11 } ], [ { "value": 1740, "type": 18 }, { "value": 0, "type": 11 } ], [ { "value": 2982, "type": 18 }, { "value": 110, "type": 11 } ] ], "description": "Data table with different rows" }, "duringChange": "f" }, (type 46) Data table - non-uniform rows "noCols": number of columns "noRows": number of significant lines (more can be sent, but only the first will be shown) "colsDef": column headings (subtitle identifier) "rowsData": pairs: value, id value type (type 50) { "menuType": "MU", "type": 50, "id": 501, "parentId": 0, "access": true, "txtId": 265, "wikiTxtId": 0, "iconId": 0, "params": { "manufacturerParentId": 500, "description": "Manufacturers screen" }, "duringChange": "f" }, (type 50) Manufacturer's screen After the "^" character, the identifier of the parent element of the manufacturer's screen parameters group is connected; "manufacturerParentId": id text "description": description It collects various data / parameters in one common "view". Refresh every 3 seconds. The menu option is just a display trigger, the data itself comes in a separate package: EP (type 100) { "menuType": "MU", "type": 100, "id": 17, "parentId": 30023, "access": true, "txtId": 444, "wikiTxtId": 0, "iconId": 74, "params": { "dayId": 0, "prevObjId": 23, "nextObjId": 18, "type": 0, "step": 1, "numRows": 5, "numCols": 1, "cols": [ { "txtId": 1163, "min": 0, "max": 1, "interval": 1, "type": 29 } ], "rows": [ { "startTime": 0, "defaultStartTime": 0, "endTime": 0, "defaultEndTime": 0, "valueFirstColumn": 0, "defaultFirstColumn": 0, "valueSecondColumn": 0, "defaultSecondColumn": 0 }, { "startTime": 0, "defaultStartTime": 0, "endTime": 0, "defaultEndTime": 0, "valueFirstColumn": 0, "defaultFirstColumn": 0, "valueSecondColumn": 0, "defaultSecondColumn": 0 }, { "startTime": 0, "defaultStartTime": 0, "endTime": 0, "defaultEndTime": 0, "valueFirstColumn": 0, "defaultFirstColumn": 0, "valueSecondColumn": 0, "defaultSecondColumn": 0 }, { "startTime": 0, "defaultStartTime": 0, "endTime": 0, "defaultEndTime": 0, "valueFirstColumn": 0, "defaultFirstColumn": 0, "valueSecondColumn": 0, "defaultSecondColumn": 0 }, { "startTime": 0, "defaultStartTime": 0, "endTime": 0, "defaultEndTime": 0, "valueFirstColumn": 0, "defaultFirstColumn": 0, "valueSecondColumn": null, "defaultSecondColumn": null } ], "description": "Weekly control -recuperator" }, "duringChange": "f" }, (type 100) Universal schedule "dayId" day_id: 0-Sunday, 1-Monday, .., 6-Saturday, 7-Mon-Fri, 8-Sat-Sun, 9-Mon-Sun "prevObjId": previous_day_check_id "nextObjId": next_day_check_id "type": schedule type "step": scheduling step in minutes "numRows": number of lines numCols": number of additional columns Then general information about the additional columns is sent. Each column is described by 5 values: "cols": "txtId": text ID "min": minimum value "max": maximum value "interval": jump value "type": value type (Invisible value (-1) hides the column) Then detailed information about the values of each row is sent. Each field is described by (2 + number of additional columns) value: "rows": "startTime": start time in minutes "defaultStartTime": default start time in minutes "endTime": end time in minutes "defaultEndTime": default end time in minutes "valueSecondColumn": value for the first column ... "defaultSecondColumn": default value for the first column ... (type 106) { "menuType": "MI", "type": 106, "id": 2325, "parentId": 30127, "access": true, "txtId": 6518, "wikiTxtId": 0, "iconId": 209, "params": { "value": 0, "min": -1000, "max": 0, "default": -100, "txtId": 0, "format": 0, "jump": 1, "description": "Universal value control" }, "duringChange": "f" }, (type 106) Universal value editing it will be able to replace 1..5 and handle several (dozen) others "value": current_value "min": minimum_value max":max_value "default": default_value "txtId": unit_script_id: from the subtitle database (in some cases it may not be applicable) "format": type-format values table data format "jump": step in value change (in the absence of = 1) Feedback in the format: [parameter_id, changed_value] (type 107) { "menuType": "MU", "type": 107, "id": 1004, "parentId": 0, "access": true, "txtId": 1106, "wikiTxtId": 0, "iconId": 77, "params": { "day": 20, "month": 4, "year": 2021, "description": "Date control" }, "duringChange": "f" }, (type 107) Date edit "day": current_value days "month"current_value_months "year": current_value_year Feedback in the format: [parameter_id, changed_value_days, changed_value_months, changed_value_years] (type 108) { "menuType": "MU", "type": 108, "id": 3021, "parentId": 0, "access": true, "txtId": 4363, "wikiTxtId": 0, "iconId": 6, "params": { "remoteReset": true, "startDay": -1, "startMonth": -1, "startYear": -1, "endDay": -1, "endMonth": -1, "endYear": -1, "description": "Date control" }, "duringChange": null }, (type 108) Edition of the range (date from - date to) "remoteReset": possibility to delete from the Internet (0 - no, 1 - yes) - a button will be displayed, which will be used to send feedback to the controller filled in -1 "startDay": value_days_beginning "startMonth": value_month_start "startYear": value_year_beginning "endDay": value_days_end "endMonth": value_month_end "description": value_year_end Feedback in the format: ] (type 120) Viessmann schedule¶ { "menuType": "MU", "type": 120, "id": 3001, "parentId": 0, "access": true, "txtId": 4362, "wikiTxtId": 0, "iconId": 13, "params": { "type": "0", "days": [ [ { "start": 360, "end": 1320 }, { "start": -1, "end": -1 }, { "start": -1, "end": -1 }, { "start": -1, "end": -1 } ], [ { "start": 360, "end": 1320 }, { "start": -1, "end": -1 }, { "start": -1, "end": -1 }, { "start": -1, "end": -1 } ], [ { "start": 360, "end": 1320 }, { "start": -1, "end": -1 }, { "start": -1, "end": -1 }, { "start": -1, "end": -1 } ], [ { "start": 360, "end": 1320 }, { "start": -1, "end": -1 }, { "start": -1, "end": -1 }, { "start": -1, "end": -1 } ], [ { "start": 360, "end": 1320 }, { "start": -1, "end": -1 }, { "start": -1, "end": -1 }, { "start": -1, "end": -1 } ], [ { "start": 360, "end": 1320 }, { "start": -1, "end": -1 }, { "start": -1, "end": -1 }, { "start": -1, "end": -1 } ], [ { "start": 360, "end": 1320 }, { "start": -1, "end": -1 }, { "start": -1, "end": -1 }, { "start": -1, "end": -1 } ] ] }, "duringChange": null }, "type": "0", type of schedule "start": regular schedule, "end": DHW schedule Then schedule 7 days separated by # on each day 8 parameters (4 pairs start and end in minutes) where the higher temperature will be applied. # Mon # Tue # ... #Sun. - individual days separated by "#" # [0] .. [7] # - 4 pairs of ranges in the absence of -1 e.g. # 240,600,720,860, -1, -1, -1, -1 # ------------------------------------------------------------------------------------------------------------------------ 8. Update parameter POST https://emodul.eu/api/v1/users/{user_id}/modules/{module_udid}/menu/{menu_type}/ido/{ido} Parameter Type Required Description menu_type String yes Options: 'MU', 'MI', 'MS', 'MP' ido Number yes Parameter ido type 1 - Valid values POST data example: { "value": 25 } "value": current value Response data example: { "status": "success" } error example: { error: 'Value out of range' } type 2 - Valid values POST data example: { "value": 100 } "value": value 1/10 Response data example: { "status": "success" } error example: { error: 'Value out of range' } type 3 - Valid values POST data example: { "value": 30 } "value": value min: sec Response data example: { "status": "success" } error example: { error: 'Value out of range' } type 4 - Valid values POST data example: { "value": 60 } "value": value hour: min Response data example: { "status": "success" } error example: { error: 'Value out of range' } type 5 - Valid values POST data example: { "value": 15 } "value": value h: min during the day Response data example: { "status": "success" } error example: { error: 'Value out of range' } type 6 - Entering code (input) POST data example: { "code": 1234 } "code":access code Response data example: { "status": "success" } error example: { error: 'the code is not a number' } type 7 - Time mode (temperature + time) POST data example: { "temp":50, "time":100 } "temp": temperature transfer value "time": time transfer value Response data example: { "status": "success" } error example: { error: 'Value out of range' } type 10 - ON / OFF POST data example: { "value": 1 } "value": enable(1) or disable(0) the value Response data example: { "status": "success" } error example: { error: 'Invalid value for turn on-off' } type 11 - Choice 1 out of many POST data example: { "value": 1 } "value": Choice 1 of many Response data example: { "status": "success" } error example: { error: 'Value out of range' } type 111 - Selection of strip mode (or other zone controller) POST data example: { "value": 1 } "value":Choice 1 of many Response data example: { "status": "success" } error example: { error: 'wrong number of parameters' } type 112 - Selection 1 of many + wiki, message POST data example: { "value": 1 } "value":Choice 1 of many Response data example: { "status": "success" } error example: { error: 'Value out of range' } type 12 - Weekly + - POST data example: { "weekly_plus_minus":{ "values":[0,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,15,15,15,15,15,15] } } "values": [new adjustment values...] Response data example: { "status": "success" } error example: { error: 'wrong number of hours' } type 13 - Weekly on / off POST data example: { "weekly_on_off":{ "values":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1] } } "values": [values on off...] 1 - on 0 - off Response data example: { "status": "success" } error example: { error: 'wrong number of parameters' } type 15 - Many-of-many selection (ON / OFF set of lamps) POST data example: { "many_of_many":[ { "id":0, "value":1 }, { "id":1, "value":1 } ] } "id" - item id "value" - selected value 1 - checked 0 - unchecked Response data example: { "status": "success" } error example: { error: 'too many elements' } type 29 - Heating curve offset / slope - Viessmann POST data example: { "slope":4, "shift":4 } "slope": value slope "shift": value shift Response data example: { "status": "success" } error example: { error: 'Value out of range' } type 30 - Heat curve POST data example: { "heating_curve":[ { "id":0, "value":33 }, { "id":1, "value":33 },{ "id":2, "value":33 }, { "id":3, "value":33 } ] } "id":element id "value":values after editing Response data example: { "status": "success" } error example: { error: 'number of items out of range' } { error: 'Value out of range' } type 31 - Heating curve slope / offset POST data example: { "slope":4, "shift":4 } "slope": value slope "shift": value shift error example: { error: 'Value out of range' } type 100 - Universal schedule POST data example: { "universal_schedule":[ { "start":0, "end":15, "interval":1, "temp": 20 }, { "start":15, "end":30, "interval":1, "temp": 20 }, { "start":30, "end":45, "interval":1, "temp": 20 }, { "start":45, "end":60, "interval":1, "temp": 20 }, { "start":60, "end":1439, "interval":1, "temp": 20 } ] } "start":start time expressed in seconds , "end":end time in seconds "interval":fan power, "temp": set temperature Response data example: { "status": "success" } error example: { error: 'the time of the first object is not equal to 0' } { error: 'the time of the last object is not equal to 1439' } { error: 'the times are intertwined' } { error: 'time is not quarterly' } { error: 'the number of items is incorrect' } type 106 - Universal value editing POST data example: {"value": 10} "value": current value Response data example: { "status": "success" } error example: { error: 'Value out of range' } type 107 - Date edit POST data example: { "year":2020, "month":3, "day": 21 } "year":year, "month":month, "day": day Response data example: { "status": "success" } error example: { error: 'wrong day data' } { error: 'wrong month data' } type 108 - Edition of the range (date from - date to) POST data example: { "date_start":{ "year":2019, "month":12, "day":1 }, "date_end":{ "year":2019, "month":12, "day":2 } } "year":year, "month":month, "day": day Response data example: { "status": "success" } error example: { error: 'the dates overlap' } { error: 'wrong day data' } { error: 'wrong month data' } type 109 - Date (various formats and edits supported) POST data example: { "years":2000, "month":4, "day":3 } "year":year, "month":month, "day": day Response data example: { "status": "success" } error example: { error: 'month is out of range' } { error: 'too many elements' } type 120 - Viessmann schedule POST data example: { "schedule":[ { "day": 0, "time":[{"start":300,"end":400},{"start":400,"end":500},{"start":600,"end":700}] }, { "day": 1, "time":[{"start":300,"end":400},{"start":400,"end":500},{"start":600,"end":700}] } ] } day: days of the week 0 - Monday 1 - Tuesday 2 - Wednesday 3 - Thursday 4 - Friday 5 - Saturday 6 - Sunday time: schedule work time "start":the stated start time "end": end time Response data example: { "status": "success" } error example: { error: 'wrong number of time' } { error: 'the times are coming' } { error: 'wrong number of days' } ------------------------------------------------------------------------------------------------------------------------ 9. get translations GET https://emodul.eu/api/v1/i18n/{language}/{tag} Parameter Type Required Description language String yes Options: 'en', 'fr', 'it', 'es', 'nl', 'pl', 'de', 'cs', 'sk', 'hu', 'ro', 'lt', 'et', 'ru', 'si', 'hr' tag String no ------------------------------------------------------------------------------------------------------------------------ 10. Data format: value type = -1: Value invisible. value type = 0: Ordinary value. value type = 1: Seconds. value type = 2: Minutes. value type = 3: Hours. value type = 4: Decimal value. value type = 5: hundredth value. value type = 6: Degrees Celsius. value type = 7: Tenth degrees Celsius. value type = 8: Percentages. value type = 9: Promile. value type = 10: kW. value type = 11: kWh. value type = 12: Volts. value type = 13: Time written as hours * 60 + min, shown as 00:00 - 23:59 value type = 14: Days value type = 15: Run value type = 16: Time in seconds shown as XXmin XXsec value type = 17: Time in minutes shown as XXhrs XXmin value type = 18: Inscription from CN Description Base, or flame brightness in status history [0-8000] value type = 19: kWh value with a decimal point value type = 20: MWh value value type = 21: MWh value with a decimal point value type = 22: L / min value with decimals value type = 23: pressure in bar with decimals value type = 24: time point = ux epoch (integer) value type = 25: Time in seconds shown as XX days, XX hours. XX min. XX sec. value type = 26: kW with a decimal point value type = 27: RPM value type = 28: Enabled / Disabled - [1/0] value type = 29: Watt value type = 30: L / hr value with decimals value type = 31: Time in hours shown as XX days, XX hrs. value type = 32: K (Kelvin) value type = 33: Percentage with decimals value type = 34: Wh value type = 35: Value converted to HEX (0-F) value type = 36: kWh value with hundredth value type = 37: XX Years XX days (sent as years * 365 + days) value type = 38: COP value with decimal places Value type = 39: Value l / m value type = 40: kWh value with thousandths ------------------------------------------------------------------------------------------------------------------------ 11. Create account: POST https://emodul.eu/api/v1/create_account field Type require username String yes password String yes email String yes language String yes Options: 'en', 'fr', 'it', 'es', 'nl', 'pl', 'de', 'cs', 'sk', 'hu', 'ro', 'lt', 'et', 'ru', 'si', 'hr' factory String no POST data example: { username: 'test', password: 'yourpassword', email: 'foo@tbar.com', language: 'en' } Response example: { status: 'success', code: 1, message: "Account registration successful. A message with an activation link to your account was sent to the e-mail address you entered. " } Possible responses: code status message 1 "success" "Account registration successful. A message with an activation link to your account was sent to the e-mail address you entered. " 2 "success" "Account registration successful." -1 "failed" "The account with this name already exist - propose a different name." -2 "failed" "There is already an account associated with the specified e-mail address." -3 "failed" "Sorry, something went wrong. Try again." -4 "failed" "Error in validation email" ------------------------------------------------------------------------------------------------------------------------ 12. Account activation POST https://emodul.eu/api/v1/account_activation/:uuid Possible responses: code status message 0 "fail" "Error" 1 "success" "Account activation successful." ------------------------------------------------------------------------------------------------------------------------ 13. Register Module / Controller POST '/api/v1/users/:user_id/module/registration' Field Type require module_name String true registration_code Integer true notification_email String false additional_information String false accept_post_policy Bool false "I agree to the processing of additional data (country, postcode)" country String false zip_code String false POST data example: { "module_name": "test", "registration_code": 52312, "notification_email": "foo@bar.com", "additional_information": "Fitter name / Fitter phone etc.", "accept_post_policy": true, "country": "England", "zip_code": "LE14" } Response example: { code: 1, status: 'success', message: "registration successful" } Possible responses: code status message 1 'success' 'registration successful' -1 'fail' 'invalid register code' -2 'fail' 'register code error' ------------------------------------------------------------------------------------------------------------------------ 14. Statistics GET '/api/v1/modules/:module_uuid/statistics/linear/range/:range' GET '/api/v1/modules/:module_uuid/statistics/linear/range/:range/month/:month' GET '/api/v1/modules/:module_uuid/statistics/linear/range/:range/month/:month/year/:year' Field Type require Options module_uuid String true range String true 'day' - last day, 'week' - last week, 'month' - last month or selected month month Integer no 1,2,3,4,5,6,7,8,9,10,11,12 year Integer no 2020,2021 Example requests: GET '/api/v1/modules/:module_uuid/statistics/linear/range/day' GET '/api/v1/modules/:module_uuid/statistics/linear/range/week' GET '/api/v1/modules/:module_uuid/statistics/linear/range/month' GET '/api/v1/modules/:module_uuid/statistics/linear/range/month/7' GET '/api/v1/modules/:module_uuid/statistics/linear/range/month/8/year/2020' Example responses: 1.{ "status":"success", "data": { "history": { "|&^4fdkl|Kitchen":[{"x":"202110280025","y":21.0},{"x":"202110280028","y":21.0}...]}, "descriptions": ["|&^4fdkl|Kitchen", "1234", "1686:2"] } } 2.{ "status":"success", "data":{ "history":{"1686:2":[{"x":"202110280000","y":20.0,{"x":"202110280100","y":20.0}...}]}, "descriptions": ["|&^4fdkl|Kitchen", "1234", "1686:2"]} } 3.{ "status":"success", "data":{"history":{"795":[{"x":"202110280000","y":20.0,{"x":"202110280100","y":20.0}...}]}, "descriptions": ["|&^4fdkl|Kitchen", "1234", "1686:2"] } } Possible descriptions: 1. Description with the string "|&^4fdkl|" shows that the description was entered by the user. Example: "|&^4fdkl|Kitchen" is just "Kitchen". 2. Description with "1682:" shows that it is index in translations and next to ":" is just number. Example: "1686:2" is "Zone 2" 3. Description with only a number is a index in translations (look at point 9). Example 795 is "External temperature" ------------------------------------------------------------------------------------------------------------------------ 15. Change module information PUT '/api/v1/users/:user_id/modules/:module_udid/info/data' Field Type require Options module_name String no phone_number Integer no additional_information String no ------------------------------------------------------------------------------------------------------------------------ 16. Change module location PUT '/api/v1/users/:user_id/modules/:module_udid/info/location' Field Type require Options Descryption post_policy_accepted Boolean yes true/false I agree to the processing of additional data (country, postcode) zip_code String no country_name String no GET /JSON/countries_list.json ------------------------------------------------------------------------------------------------------------------------ 17. Change module time zone PUT '/api/v1/users/:user_id/modules/:module_udid/info/time_zone' Field Type require Options gmt_id Integer yes GET /JSON/time_zones.json ------------------------------------------------------------------------------------------------------------------------ 20. Change zone name/icon PUT '/api/v1/users/:user_id/modules/:module_udid/zones/:zones_id' Field Type require Options zones_id Integer yes description_id Integer yes name String yes max length: 12 characters icons_id Integer yes 0-7 (living_room: 0, bathroom: 1, kitchen: 2, children: 3, bedroom: 4, wardrobe: 5, corridor: 6, garage: 7) 21. Description of zone parameters "zone": { "id": 121, "parentId": 1500, "time": "2023-02-06T11:21:02.846309", "duringChange": false, "index": 1, "currentTemperature": 223, "setTemperature": 215, "flags": { "relayState": "off", "minOneWindowOpen": false, "algorithm": "heating", "floorSensor": 0, "humidityAlgorytm": 0, "zoneExcluded": 0 }, "zoneState": "noAlarm", "signalStrength": 66, "batteryLevel": 73, "actuatorsOpen": 0, "humidity": 50 , "visibility": true } description: id: // item id, parentId: // the id of the element's parent, time: // date of the last data packet sent, duringChange: // zone change status capabilities: true - zone during shift false - there is no change in the zone index: // zone ordinal list currentTemperature: // current temperature expressed in hundredths setTemperature: // set temperature expressed in hundredths flags: { relayState: // relay status capabilities: on - means the relay is turned on off - means the relay is turned off minOneWindowOpen: // window opening state capabilities: false - false status means window closed or no window registered true - true means that the window is open algorithm: // regulator work algorithm capabilities: cooling - means turning on the cooling algorithm heating - means the activation of the heating algorithm floorSensor: // floor sensor capabilities: 0 - means no registered floor sensor 1 - means registering the floor sensor humidityAlgorytm: // humidity capabilities: 0 - means no registered humidity sensor 1 - means registering the humidity sensor }, zoneState: // zoneState is the state of the zone. Possible zoneState values: capabilities: zoneOff // zone off noAlarm // zone enabled zoneUnregistered // unregistered zone noCommunication // temperature sensor out of range sensorDamaged // sensor damaged signalStrength: // range of signal strength from controller to sensor, scale from 0 to 100 batteryLevel: // battery charge range scale from 0 to 100 actuatorsOpen: // head opening range, scale from 0 to 100 humidity: // humidity range scale from 0 to 100 capabilities: -2 - humidity sensor not registered 50 - humidity state 50% visibility: // visibility of the tile in the emodule capabilities: true - tile visible false - hidden tile 21.1 description of the executive module parameters "additionalContacts": [ { "id": 2290, "parentId": 129, "index": 1, "state": "noAlarm", "signalStrength": 26, "relayState": "on", "textNumber": 0 } ] id: item id, parentId: the id of the element's parent, index: // zone ordinal list state: // state means the state of the relay. Possible values: capabilities: noAlarm // zone enabled unregistered // unregistered zone noCommunication // temperature sensor out of range waiting // pending status signalStrength: // battery charge range scale from 0 to 100 relayState: // relay status capabilities: off - relay off on - relay on textNumber: // the id of the text element ------------------------------------------------------------------------------------------------------------------------ 22. get alarm history GET https://emodul.eu/api/v1/users/:user_id/modules/:module_udid/alarm_history/from/:from/to/:to/type/:type Parameter Type Required Description from String yes start date e.g. 2023-02-01 to String yes end date e.g. 2023-02-11 type String yes Options: 'all', 'alarm', 'warning', 'notification' GET data example [ { "alarmType": "alarm", "id": 30002, "parentId": 0, "txtId": 1916, "iconId": 25, "value": 8, "unit": 0, "remoteCancel": 0, "menuId": 0, "startAlarm": "2023-05-13 10:12:36", "clearAlarm": "2023-05-13 10:24:05" } ] alarmType - alarm type possible occurrences 'all', 'alarm', 'warning', 'notification' id - Identifier of the occurring alarm parentId - Parent element identifier txtId - subtitle identifier from the database iconId - icon identifier from the database value - value passed to the alarm unit - unit passed to the alarm remoteCancel - Ability to remotely cancel: 0 - alarm cannot be canceled, 1 - you can cancel the alarm menuId - Alarm menu identifier startAlarm - the time the alarm occurred clearAlarm - alarm acknowledgment time ------------------------------------------------------------------------------------------------------------------------ 23. Force Data Synchronization Manual synchronization of all data between the device and the server POST https://emodul.eu/api/v1/users/:user_id/modules/:module_udid/force_data_sync ------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------ GET https://emodul.eu/api/v1/users/:user_id/user_account_info GET data example { "accountEmail": "test@emodul.pl", "accountName": "test", "regulamin_serwis24": "t" } POST https://emodul.eu/api/v1/users/:user_id/change_email Parameter Type Required Description newEmail string yes the newEmail parameter should contain an email address POST data example { "newEmail": "test@gmail.com" } PUT https://emodul.eu/api/v1/users/:user_id/confirm_email_update Parameter Type Required Description oldPassword string yes old password in the system newPassword string yes new password in the system, minimum 8 characters PUT data example { "oldPassword": "test123", "newPassword": "password123" } PUT https://emodul.eu/api/v1/users/:user_id/update_password Parameter Type Required Description oldPassword string yes old password in the system newPassword string yes new password in the system, minimum 8 characters PUT data example { "oldPassword": "test123", "newPassword": "password123" } PUT https://emodul.eu/api/v1/users/:user_id/update_service24_policy Parameter Type Required Description acceptService24Policy boolean yes acceptance of the regulations true or false PUT data example { acceptService24Policy : true } GET https://emodul.eu/api/v1/users/:user_id/contact_form_info GET data example { "city": "111", "street": "11", "houseNumber": "111", "phone": "6", "installerInformation": "asd" } PUT https://emodul.eu/api/v1/users/update_contact_data Parameter Type Required Description city string no City Name street string no Street Name houseNumber string no houseNumber number phone number no phone number installerInformation string no installer Information PUT data example { "city": "111", "street": "11", "houseNumber": "111", "phone": "6", "installerInformation": "asd" } POST https://emodul.eu/api/v1/users/:user_id/create_contact_account Parameter Type Required Description city string yes City Name street string yes Street Name houseNumber string yes houseNumber number phone number yes phone number installerInformation string yes installer Information POST data example { "city": "111", "street": "11", "houseNumber": "111", "phone": "6", "installerInformation": "asd" } PUT https://emodul.eu/api/v1/users/:user_id/confirm_policy PUT data example { status: "The policy has been confirmed" } { status: "The policy error has not been acknowledged" }