AdapterRequests
AdapterRequests copied to clipboard
Monitor Statechanges and send notifies on missing updates
I use several "watchdog" javascript scripts that all do the same: Monitor certail states that/if they are updated to detect if devices maybe offline or disconnected to react on it. This also could be handled by an adapter where it is possible to select the states and an awaited update/change frequency to notify when no update has happened. It could also be an idea to have the adapter notify on certain state values or changes (>0, =0, true/false such things). Each notify could have an own notify text with option to include the current value as placeholder
i was looking into that for some of my installations so i will take care if it, main idea :
- adapter monitors states
- adjustable treshhold time
- no updates within that time frame creates an alert
- notify mechanisme to be handled by loggin, pusover, telegram etc.
Threashold time per State then please :-) Ideally also custom messages for "missing" and "restore". (so please also add restore info).
I have something like this as small javascript ... I can send you for inspiration :-)
Would be great and safes time for research
@DutchmanNL after 4 years planning... do you have an idea? ;-)
Possible ducplicate of #616 and subset of #524
I've got some further ideas on this and like to give it a try. Also, since this feature is running in my scripts as well. I wrote down some ideas. Not all of them will probably be realized in the first version, though. In the end the adapter should be able to do everything that was requested, also in #616 or #524.
Triggers
A way to signal to the outside world iobroker/adapter is still running by periodically updating states:
- Set value
- Toggle value (boolean)
- Increment value (mod x)
- Descrement value (mod x) Config per triggern: Enable/disable, target state, interval, operation, values depending on operation. Config could be attached to the state configuration?
Events
Events to base watchdog reaction on, coupled to states (later: state patterns). Event always has a target watchdog: Checks performed on state:
- State written
- State changed
- State changed to value (==, !=, >, <, <=, >=)
- Incremented
- Decremented
Operations possible on a match:
- Enable watchdog
- Disable watchdog - restart counting at 0
- Reset watchdog (feed, service, .. whatever you want to call it) - restart counting at 0
- Force trigger immediately
Events should probably be kept and edited as a list inside the respective watchdog since patterns could later be used.
Watchdogs
Watchdog encapsulates the real function of this module. Watchdog consists of a min/max trigger time (window) and events which are performed under certain conditions (e.g. missing feed operation, too early feed, late feed, ..). Each event can perform an action (send message, activate trigger (see chapter 1), enable/disable/feed other watchdog).
Any additions/suggestions are welcome :-)
Thanks for planning this adapter.
Please note that I too have planned (primary adapted to my personal needs) such an adapter. But I did not yet have time to really aquire these issues and guarantee some flexible solution in time.
I'll assign the issues to you.
@HSE83 I've named my (currently only local study version) of the adapter WATCHDOG (ioBroker.watchdog). So if you could select another useful (!) name, I would not need to rename my local repo. If this does not seem appropiate to you, please let my know so that we do not have a collision at npm later. You aquired this issue(s) first - so you have priority of course.
And a organizational note too: I cannot assign #524 and #616 to you in difference to this issue. Could you please post any reply at #524 and #616. I assume this could be the reason for the different behavior. Is do not want to close the other issues for now as they contain additional requirements which should not get lost,
@mcm1957 based in existing developments, is there anything we missed or should take into consideration or can this be closed?
Do not know which existing deve,opment you refer to. I do not know an adapter which satiesfies the request:
adapter monitors states
adjustable treshhold time
no updates within that time frame creates an alert
notify mechanisme to be handled by loggin, pusover, telegram etc.
Should be kept open in my opinnion
Do not know which existing deve,opment you refer to. I do not know an adapter which satiesfies the request:
adapter monitors states adjustable treshhold time no updates within that time frame creates an alert notify mechanisme to be handled by loggin, pusover, telegram etc.
Should be kept open in my opinnion
Device-Watcher adapter for ioBroker
This is a watchdog for devices/services and adapter/instances. The adapter looks for the different information about the datapoints and create JSON & HTML lists of them:
Devices/Services:
devices with battery, devices with low battery, devices with link quality, updates for devices, devices offline and all devices Adapter/Instances:
all instances deactivated instances ==> no updates within that time frame creates an alert instances with error ==> no updates within that time frame creates an alert available adapter updates
The adapter has different possibilities to send notifications: ==> notify mechanisme to be handled by loggin, pusover, telegram etc.
A device is no longer reachable or reachable again A device has reached the low battery level or the low bat state is true When an update is available for a device (shelly and unifi) Time based a list of offline devices Time based a list of low batterie devices Time based a list of devices which can be updated