Alerts
From MiOS
(Difference between revisions)
Andreimios (Talk | contribs) (Created page with "= Introduction = 3rd party developers can now use the alert system in plugins. They can generate different alert types with or without user notification. Alert messages gener...") |
Andreimios (Talk | contribs) |
||
(2 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | = Introduction = | + | == Introduction == |
3rd party developers can now use the alert system in plugins. They can generate different alert types with or without user notification. Alert messages generated by a device can be seen in '''"Logs"''' tab for that device. | 3rd party developers can now use the alert system in plugins. They can generate different alert types with or without user notification. Alert messages generated by a device can be seen in '''"Logs"''' tab for that device. | ||
Line 9: | Line 9: | ||
[[File:homecare_notification.png|image|none|caption]] | [[File:homecare_notification.png|image|none|caption]] | ||
− | And here is the | + | |
+ | As you can see the '''source''' of this notification is our HomeCare plugin, '''type''' for it is "user created trigger" and '''desctiption''' is the one we added in plugin. | ||
+ | |||
+ | And here is the detailed message for this notification: | ||
[[File:homecare_notification_alert.png|image|none|caption]] | [[File:homecare_notification_alert.png|image|none|caption]] | ||
+ | |||
+ | == Alert HTTP Request == | ||
+ | |||
+ | http://IP:3480/data_request?id=add_alert&device=DEVICE_ID&type=3&source=3&description=ALERT_DESCRIPTION&users=USERS_LIST | ||
+ | |||
+ | * DEVICE_ID - device # that generates the alert; | ||
+ | * ALERT_TYPE - should be 3, DO NOT CHANGE; | ||
+ | * ALERT_SOURCE - should be 3, DO NOT CHANGE; | ||
+ | * ALERT_DESCRIPTION - URL encoded message used as description for the alert; | ||
+ | * USERS_LIST - a list with user ID separated by commas that should be notify[left blank if no user notification is required]. |
Latest revision as of 14:13, 2 October 2014
[edit] Introduction
3rd party developers can now use the alert system in plugins. They can generate different alert types with or without user notification. Alert messages generated by a device can be seen in "Logs" tab for that device.
Let's take as example the HomeCare plugin. Users should be notify when a sensor has not been tripped for a specified amount of time. Here is how "Alerts" page for HomeCare plugin looks like:
As you can see the source of this notification is our HomeCare plugin, type for it is "user created trigger" and desctiption is the one we added in plugin.
And here is the detailed message for this notification:
[edit] Alert HTTP Request
- DEVICE_ID - device # that generates the alert;
- ALERT_TYPE - should be 3, DO NOT CHANGE;
- ALERT_SOURCE - should be 3, DO NOT CHANGE;
- ALERT_DESCRIPTION - URL encoded message used as description for the alert;
- USERS_LIST - a list with user ID separated by commas that should be notify[left blank if no user notification is required].