-
Notifications
You must be signed in to change notification settings - Fork 59
/
examples-manifest.json
288 lines (288 loc) · 16.5 KB
/
examples-manifest.json
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
[
{
"fname": "hue-lights-control.js",
"title": "Controlling hue lights with Shelly BLU Button or virtual buttons",
"description": "This script allows you to control your hue lights with a Shelly BLU Button or virtual buttons. You can turn on/off lights, change brightness and color temperature. (Requires firmware version: 1.3 or newer)"
},
{
"fname": "control-ha-light-entity-with-boolean.js",
"title": "Control Light entity from HA via virtual boolean component",
"description": "This script will control a light entity in Home Assistant via a virtual boolean component in Shelly. The script will listen for changes in the boolean component and will turn on or off the light entity in Home Assistant accordingly."
},
{
"fname": "load-shedding.js",
"title": "Load shedding with Shelly Pro4PM and Pro3EM",
"description": "Keeps measured usage between a low (min_before_re_adding) and high (max_before_shedding) total power (watts), by controlling power to other devices"
},
{
"fname": "advanced-load-shedding.js",
"title": "Advanced Load shedding with schedules and notifications",
"description": "Adds schedule, device, and notification templates and functionality to the original load shedding script."
},
{
"fname": "monitor-production.js",
"title": "Add Additional Meter to the Advanced Load Shedding script",
"description": "Use this script paired with advanced-load-shedding.js to add a second source - example, grid, PV, generator, etc."
},
{
"fname": "ntc-conversion.js",
"title": "Converts NTC thermal resistor output to temperature and execute actions",
"description": "Reads voltage data from the Shelly Plus Add-on, calculate the corresponding temperature using the Steinhart-Hart equation, and take action based on the temperature reading"
},
{
"fname": "ble-shelly-motion.js",
"title": "BLE in Scripting - Shelly BLU Motion script actions",
"description": "Example how to use a Shelly BLU Motion, read advertising data, decode and turn on switch. (Requires firmware version\n0.12.0-beta1 or newer)"
},
{
"fname": "telegram-interaction.js",
"title": "Telegram interaction with Shelly script",
"description": "This script allows the creation of personalized commands for a Telegram bot, providing the ability to define handlers for each command and support for advanced parameter validation. \n(Requires firmware version: 1.0.0-beta or newer)",
"doc": "TELEGRAM-BOT.md"
},
{
"fname": "ble-shelly-blu.js",
"title": "Shelly BLU devices event handler for scripts",
"description": "Script that handles and parses events from all Shelly BLU devices and emits event with the received data. Made to be used with \"ble-events-handler.js\" script that handles the events \n(Requires firmware version: 1.0.0-beta or newer)"
},
{
"fname": "ble-events-handler.js",
"title": "Handles event from the device (at the moment tested only with BLU events from \"ble-shelly-blu.js\" example",
"description": "Do automations based on events and easy conditioning. This script must be used with another script that emits events for example \"ble-shelly-blu.js\" script. \n(Requires firmware version: 1.0.0-beta or newer)"
},
{
"fname": "ble-aranet4.js",
"title": "Aranet4 example with BLE scripting",
"description": "Example how to use a 3rd party BLE sensor and execute actions based on conditions. (Requires firmware version\n0.12.0-beta1 or newer)"
},
{
"fname": "ble-aranet2.js",
"title": "Aranet2 example with BLE scripting",
"description": "Example how to use a 3rd party BLE sensor and execute actions based on conditions. (Requires firmware version\n0.12.0-beta1 or newer)"
},
{
"fname": "ble-shelly-btn-gateway-for-other-devices.js",
"title": "Gateway between Shelly BLU button1 and other devices",
"description": "Use your Gen2 device as a gateway between Shelly Blu button1 and other Shelly devices (no matter Gen1 or Gen2) by sending local requests by their local IP APIs."
},
{
"fname": "activation-switch.js",
"title": "Activation switch",
"description": "Replicate activation_switch profile from Gen1 devices."
},
{
"fname": "ble-pasv-mqtt-gw.js",
"title": "BLE Thermometer passive data collector for MQTT Autodiscovery",
"description": "BLE passive mode scanner for non-battery operated Gen2 devices.\nDecoding protocols Mijia/ATC/pvvx/BTHome2, forwards data to the MQTT broker with Autodiscovery objects. (Requires firmware version\n0.12.0-beta1 or newer)"
},
{
"fname": "ble-shelly-btn.js",
"title": "BLE in Scripting - Shelly BLU Button script actions",
"description": "Example how to use a Shelly BLU Button, read advertising data, decode and turn on switch. (Requires firmware version\n0.12.0-beta1 or newer)"
},
{
"fname": "ble-shelly-dw.js",
"title": "BLE in Scripting - Shelly BLU DoorWindow script actions",
"description": "Example how to use a Shelly BLU DoorWindow, read advertising data, decode and turn on switch. (Requires firmware version\n0.12.0-beta1 or newer)"
},
{
"fname": "ble-shelly-scanner.js",
"title": "BLE in Scripting - Shelly BLU Scanner",
"description": "This script will scan aired advertisement data, select Shelly BLU devices and will print their name and address (Requires firmware version\n0.12.0-beta1 or newer)"
},
{
"fname": "ble-ruuvi.js",
"title": "BLE in Scripting - Ruuvi example",
"description": "Example how to use a 3rd party BLE sensor, read data and turn on switch based on the data. (Requires firmware version\n0.12.0-beta1 or newer)"
},
{
"fname": "ble-bparasite.js",
"title": "BLE in Scripting - b-parasite example",
"description": "Example how to use a 3rd party BLE sensor, read environment data. (Requires firmware version\n0.12.0-beta1 or newer)"
},
{
"fname": "cycle-switch.js",
"title": "Configurable Cycle switch",
"description": "Replicate Cycle switch feature from Gen1 devices. Allows for custom list of operations to cycle through."
},
{
"fname": "http-notify-on-power-threshold.js",
"title": "Shelly XPM - Send HTTP notification if power goes above threshold",
"description": "This script subscribes for notifications, monitors the instanteneous power of the output switch and if that\ngoes above a threshold value and if current time is within the active time window will send an HTTP notification"
},
{
"fname": "http-handlers.js",
"title": "Shelly HTTP script handling GET requests, query strings",
"description": "This script registers a HTTP handler endpoint and implements simple logic for requests and handlers for\nthose requests. Reconfiguration of a Switch component as an example is included"
},
{
"fname": "prometheus.js",
"title": "Prometheus HTTP Endpoint for a single switch",
"description": "This script exposes a /status endpoint that returns Prometheus metrics that can be scraped."
},
{
"fname": "consume-limited-power.js",
"title": "Shelly Plus 1PM - Stop the output after consuming certain amount of power",
"description": "This script listens for the event when the output is turned on, and starts counting the power reported in NotifyStatus\nevery minute.\nIt is accumulated in a counter and if the combined consumption is over a threshold the output is turned off."
},
{
"fname": "cover-control-weather.js",
"title": "Control a Shelly 2.5 (Gen1) depending on current cloud conditions",
"description": "The script, when run, will fetch via REST api from a weather service the current conditions for a location check if\ncloud coverage is above or below certain percentage and respectively open or close window shades by calling a Shelly\n2.5 (Gen1) endpoint."
},
{
"fname": "cover-scheduled-event-handlers.js",
"title": "Control a Shelly Plus 2PM (Gen2) by handling events",
"description": "The script, when run, will subscribe to events and handle \"cover_open_to\" and \"cover_close_to\" events to open or close a cover to a certain position. \"cover_open_to\" also supports a \"not_before\" configuration to prevent opening the cover before a certain time."
},
{
"fname": "precipitation-irrigation.js",
"title": "Turn on/off watering based on precipitation in last 24 hours (based on AccuWeather data)",
"description": "If there was precipitation in the past period (24h) skip an irrigation cycle. Data is retrieved from a public wather API service for the location.\nYou can use any Shelly Plus 1/Pro 1 ot Pro 2 to control your irrigation system.\nDon't forger to add AutoOFF for max Irrigation time and set a Schedule which start irrigation in device webUI.\nNote: Configure your Accuweather APIKEY and end points in the script once you add it."
},
{
"fname": "failure-monitor.js",
"title": "Load monitoring and alerting in Shelly Gen2",
"description": "This script listens for events when power changes to 0 and if the switch is still on then it alerts that something\nmight have happened to the load."
},
{
"fname": "idle-alert.js",
"title": "Alert on inactivity",
"description": "Script that will monitor the inputs of a Shelly and if there was no user interaction with the input(s) It will call an\nURL with a predefined message"
},
{
"fname": "mqtt-announce.js",
"title": "Backward compatibility with Gen1 MQTT format (announce only)",
"description": "Use MQTT in scripting to provide backwards compatibility with Gen1 MQTT topics shellies/announce and shellies/command"
},
{
"fname": "mqtt-announce-control.js",
"title": "Backward compatibility with Gen1 MQTT format (extended)",
"description": "Use MQTT in scripting to provide backwards compatibility with Gen1 MQTT topics shellies/announce, shellies/command, <device-id>/command,\n/command/switch:0/output.\n\nPublish device status, input and switch status"
},
{
"fname": "mqtt-discovery.js",
"title": "MQTT Auto Discovery in Home Assistant",
"description": "This script is registering a virtual switch device in HA.\n\nThe implementation is banal and directly reports switch state and controls a switch, but you can have a totally different virtual device: valve, light, scene.\n\nNote: Requires configuration.yaml change in HA, please refer to the comments in the code of this file."
},
{
"fname": "mqtt-discovery-sensors.js",
"title": "MQTT Auto Discovery in Home Assistant - Sensors",
"description": "This script is registering a virtual switch device in HA.\n\nSwitch sensors are also registered as entities.\n\nNote: Requires configuration.yaml change in HA, please refer to the comments in the code of this file."
},
{
"fname": "mqtt-switch-status.js",
"title": "Send Switch status to a custom MQTT topic",
"description": "Use MQTT in scripting to provide switch status updates on a custom topic"
},
{
"fname": "n-way-dimmer.js",
"title": "n-way-dimmer.js",
"description": "Setup an N-Way dimmer group using Gen3, Pro, or Plus dimmer products. One dimmer is connected to the light while the other dimmer products can be useed to remotely control the light and will reflect the current state of the light. This setup only requires wifi connectivity, the swiches communicate directly with each other. You will need to update the CONFIG GROUP with the IP addresses of all the switches in the group."
},
{
"fname": "objects.js",
"title": "mJS example of how to create custom Objects that interact with components (Switch in this case)",
"description": "Example of how to create wrappers around RPC calls and using Object.create."
},
{
"fname": "push-pushed.js",
"title": "Push notifications using Pushed service",
"description": "Use a script to notify directly on your mobile phone via a push notification service."
},
{
"fname": "remoterpc.js",
"title": "Example of remote calling a Shelly Gen2",
"description": "A remote Shelly abstraction Call an RPC method on the remote Shelly"
},
{
"fname": "register-scheduled-script.js",
"title": "Schedule script function for execution into the system schedule",
"description": "When the script is run it will check if it is registered in the schedule and if not will register itself"
},
{
"fname": "restore-schedule.js",
"title": "After boot scan schedules and run active one",
"description": "When device boots and there is a schedule that has to be active at the moment it won't be executed. This script\nwalks through the configured schedules and runs the one that should be active at that moment of time."
},
{
"fname": "router-watchdog.js",
"title": "Router Watchdog",
"description": "This script tries to execute HTTP GET requests within a set time, against a set of endpoints.\n\nAfter certain number of failures the script sets the Switch off and after some time turns it back on."
},
{
"fname": "power-outages.js",
"title": "Monitor Power Outages or Crashed Services",
"description": "Monitors any device or service that returns data from HTTP/HTTPS requests. Executes webhooks and/or updates MQTT topics."
},
{
"fname": "scene.js",
"title": "Scene playing in Shelly Gen2",
"description": "Simple scene abstraction A scene is an array of actions or conditions that\nare played squentially.\n\nAn action can have a delay property, which means after executing the action function wait until proceeding to the next one.\n\nA condition is an element of a scene that has property type:\"cond\".\nIf the result is true, the scene continues with the next item, if it is false it\nstops."
},
{
"fname": "shelly2p-domo-coverfix.js",
"title": "Shelly Plus 2PM cover fix for Domoticz MQTTAD v1",
"description": "Simple fix for outgoing Domoticz MQTTAD command 'GoToPosition'.\n Shelly firmware 0.x supported. Developed for ShellyTeacher4Domo."
},
{
"fname": "shelly2p-domo-coverfix-v2.js",
"title": "Shelly Plus 2PM cover fix for Domoticz MQTTAD v2",
"description": "Simple fix for outgoing Domoticz MQTTAD command 'GoToPosition'.\n Only Shelly firmware >= 1.x supported. Developed for ShellyTeacher4Domo."
},
{
"fname": "test-scene.js",
"title": "Scene Test with multiple Shellies",
"description": "Playing a scene with four Shellies with that have a lamp as a load.\n\nDemonstration of a \"Remote Shelly\" wrapper object. object prototyping, and simple scene player."
},
{
"fname": "turn-on-weather.js",
"title": "turn-on-weather.js",
"description": "Turn on when temperature is below CONFIG.tempBelowTurnOn.\n\nTurn off when temperature is above CONFIG.tempAboveTurnOff.\n\nFor getting an API-KEY from Accuweather follow the instructions on their site for registering a new application, copy\nthe key and paste it here."
},
{
"fname": "wifi-provision.js",
"title": "Provisioning of new Shelly Plus gen 2 devices",
"description": "This scripts periodically scans for access points with SSID matching the template for Shelly Plus device APs and if\nfound, will connect to that AP and provision WiFi credentials."
},
{
"fname": "mqtt-switch-status-announce.js",
"title": "Periodically send Switch status to MQTT topic",
"description": "Use MQTT in scripting to periodically provide switch status updates on the mentioned topic \"<topic_prefix>/status/switch:0\""
},
{
"fname": "howto/input-event.js",
"title": "Example - Input events",
"description": "Example showing how to work with Input component's events."
},
{
"fname": "howto/input-read.js",
"title": "Example - Reading Input status",
"description": "Example showing how to read Input component's status."
},
{
"fname": "howto/switch-event.js",
"title": "Example - Switch events",
"description": "Example showing how to work with Switch component's events."
},
{
"fname": "howto/switch-notifications.js",
"title": "Example - Switch notifications - reading consumption active power",
"description": "Example how to read Switch notifications and listen for when active power is more than 4W."
},
{
"fname": "howto/switch-read.js",
"title": "Example - Reading Switch status",
"description": "Example of reading Switch component's status."
},
{
"fname": "ip-assignment-watchdog.js",
"title": "Reboot on DHCP IP assignment issues",
"description": "Monitor for valid IP assignment from DHCP server and reboot if not received within a certain time period."
},
{
"fname": "universal-blu-to-mqtt.js",
"title": "Example - Universal BLU to MQTT Script",
"description": "This script is about shares any BLU product's complete payload to MQTT.."
}
]