How to send notifications only on the toggle

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
shkaff
Posts: 16
Joined: Friday 11 December 2015 10:29
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Contact:

How to send notifications only on the toggle

Post by shkaff »

Hello

My custom handmade script acts as a sensor and scans Playstation devices at home as well as the status of PSN (Playstation Network).
The objective is to notify my when the stations are on or when PSN is broken.
The script works good more or less and it uses JSON API to update a dummy devices every hour...

However I face a situation when I receive the same notification every hour even if nothing changed!
If happens because notifications are sent on every call of JSON API and in my case it happens every hour.
Meanwhile the changes I am trying to monitor happens not so frequently so I would prefer to have notifications only then the state is changed.

I am asking to advice what is virtual switch type or maybe secret parameter I need to use in order to have notifications happen on the toggle but not just update.

Any help on this would be much appreciated
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest