Home Automation System - Migrazione OpenHAB 3 - Controllo aggiornamento items / Last update items check ITA ENG

avatar

immagine_2021_11_21_163045.jpg

Thirty-fifth chapter related to my migration from OpenHAB 2.5 to OpenHAB 3

In this video we are going to see how to check last update timestamp of the data sent by the items.

Using the concept of OpenHAB profiles, in fact, in my configuration I automatically store the last update timestamp of the various items in order to verify when each item has sent the last valid value.

Today we are going to see how to write a rule to be able to check which items didn't send data for more than a predetermined and configurable time interval.

The rule will be written in Javascript and will use functions to dynamically manage the belonging of an item to a certain group. In this way my rule will be able to add / remove expired items in a particular group and be able to identify and see them all together through the sitemap in a very simple way.

As in the case of the other rules related to alarms, everything will be manageable and configurable via sitemap, without having to deal with the rule code anymore.

This video does not presume to be a tutorial, but simply a step by step of what has been done to achieve the goal. I hope that it will help someone.

Enjoy your viewing

***********************************

Trentacinquesimo capitolo relativo alla mia migrazione da OpenHAB 2.5 ad OpenHAB 3

In questo video andiamo a vedere come poter tenere sotto controllo l'aggiornamento dei dati inviati dagli items.

Sfruttando il concetto dei profili di OpenHAB, infatti, nella mia configurazione memorizzo, in maniera automatica, la data di aggiornamento dei vari items in modo tale da poter verificare quando ogni item ha mandato l'ultimo valore valido.

Oggi andiamo a vedere come scrivere una rule per poter controllare quali item non mandano dati da più di un intervallo di tempo prestabilito e configurabile.

La regola verrà scritta in Javascript e utilizzerà delle funzioni per poter gestire in maniera dinamica l'appartenenza di un item ad un determinato gruppo. In questo modo la mia regola potrà aggiungere/rimuovere gli items scaduti in un particolare gruppo e poterli identificare e vedere tutti insieme attraverso la sitemap in maniera molto semplice.

Come nel caso delle altre regole legate ad allarmi, il tutto sarà gestibile e configurabile tramite sitemap, senza dover più mettere mano al codice della regola.

Questo video non ha la presunzione di essere un tutorial, ma semplicemente uno step by step di quanto fatto per raggiungere l'obiettivo. La speranza è che possa essere d'aiuto a qualcuno.

Buona visione

Video e foto di mia proprietà

My own video and photo



0
0
0.000
2 comments