-
Notifications
You must be signed in to change notification settings - Fork 4
/
restful.yaml
132 lines (128 loc) · 4.73 KB
/
restful.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
rest:
- resource: http://192.168.0.105:5333/pontos-base/get/all
scan_interval: 60
sensor:
- name: "Total consumption in liters"
value_template: '{{ value_json.getVOL | replace("Vol[L]", "") }}'
device_class: water
unit_of_measurement: "L"
state_class: total_increasing
- name: "Water pressure"
value_template: '{{ value_json.getBAR | replace(" mbar","") }}'
device_class: pressure
unit_of_measurement: "mbar"
- name: "Water temperature"
value_template: '{{ value_json.getCEL | float / 10 }}'
device_class: temperature
unit_of_measurement: "°C"
- name: "Time in seconds since turbine received no pulse"
value_template: "{{ value_json.getNPS }}"
unit_of_measurement: "s"
- name: "Volume of current water consumption in ml"
value_template: '{{ value_json.getAVO | replace("mL","") }}'
device_class: water
unit_of_measurement: "mL"
- name: "Configured Micro Leakage-Test, pressure drop in bar"
value_template: "{{ value_json.getDBD }}"
device_class: pressure
unit_of_measurement: "bar"
- name: "Wifi connection state"
value_template: "{{ value_json.getWFS }}"
- name: "Wifi signal strength (RSSI)"
value_template: "{{ value_json.getWFR }}"
device_class: signal_strength
unit_of_measurement: "dB"
- name: "Battery voltage"
value_template: '{{ value_json.getBAT | replace(",",".") | float }}'
device_class: voltage
unit_of_measurement: "V"
- name: "Mains voltage"
value_template: '{{ value_json.getNET | replace(",",".") | float }}'
device_class: voltage
unit_of_measurement: "V"
- name: "Serial number"
value_template: "{{ value_json.getSRN }}"
- name: "Firmware version"
value_template: "{{ value_json.getVER }}"
- name: "Type"
value_template: "{{ value_json.getTYP }}"
- name: "Code number"
value_template: "{{ value_json.getCNO }}"
- name: "MAC Address"
value_template: "{{ value_json.getMAC }}"
- name: "Alarm"
value_template: >
{% set codes =
{ "FF": "no alarm",
"A1": "ALARM END SWITCH",
"A2": "ALARM: Turbine blocked!",
"A3": "ALARM: Leakage volume reached!",
"A4": "ALARM: Leakage time reached!",
"A5": "ALARM: Maximum flow rate reached!",
"A6": "ALARM: Microleakage detected!",
"A7": "ALARM EXT. SENSOR LEAKAGE RADIO",
"A8": "ALARM EXT. SENSOR LEAKAGE CABLE",
"A9": "ALARM: Pressure sensor faulty!",
"AA": "ALARM: Temperature sensor faulty!",
"AB": "ALARM: Weak battery!",
"AE": "Error: no information available"
} %}
{{ codes.get(value_json['getALA'], 'unknown') }}
- name: "Active profile"
value_template: >
{% set codes =
{ "1": "Present",
"2": "Absent",
"3": "Vacation",
"4": "Increased consumption",
"5": "Maximum consumption",
"6": "not defined",
"7": "not defined",
"8": "not defined"
} %}
{{ codes.get(value_json['getPRF'], 'unknown') }}
- name: "Valve status"
value_template: >
{% set codes =
{ "10": "Closed",
"11": "Closing",
"20": "Open",
"21": "Opening"
} %}
{{ codes.get(value_json['getVLV'], 'unknown') }}
- resource: http://192.168.0.105:5333/pontos-base/get/cnd
scan_interval: 60
sensor:
- name: "Water conductivity"
value_template: "{{ value_json.getCND }}"
unit_of_measurement: "µS/cm"
- name: "Water hardness"
value_template: "{{ value_json.getCND | float / 30 }}"
unit_of_measurement: "dH"
rest_command:
pontos_valve_close:
url: http://192.168.0.105:5333/pontos-base/set/ab/2
pontos_valve_open:
url: http://192.168.0.105:5333/pontos-base/set/ab/1
pontos_clear_alarm:
url: http://192.168.0.105:5333/pontos-base/clr/ala
pontos_admin_enter:
url: http://192.168.0.105:5333/pontos-base/set/ADM/(2)f
pontos_admin_leave:
url: http://192.168.0.105:5333/pontos-base/clr/ADM
pontos_profile_1:
url: http://192.168.0.105:5333/pontos-base/set/prf/1
pontos_profile_2:
url: http://192.168.0.105:5333/pontos-base/set/prf/2
pontos_profile_3:
url: http://192.168.0.105:5333/pontos-base/set/prf/3
pontos_profile_4:
url: http://192.168.0.105:5333/pontos-base/set/prf/4
pontos_profile_5:
url: http://192.168.0.105:5333/pontos-base/set/prf/5
pontos_profile_6:
url: http://192.168.0.105:5333/pontos-base/set/prf/6
pontos_profile_7:
url: http://192.168.0.105:5333/pontos-base/set/prf/7
pontos_profile_8:
url: http://192.168.0.105:5333/pontos-base/set/prf/8