About This File
Just another battery and device check script
The initial version and many updates were first uploaded to the german siio-forum.
After one year of use and many user hints, I would like to share my script with you.
What are the features of the script?
At first it reads the battery status of the devices from the HC2.
Over time, some useful features have been added.
For example, the status of non-battery devices is also being checked.
In addition,on some battery devices, the "last breached" status can be read.
This for example can be useful ifa battery died between 2 wake-up cycles. So please note if the last breached status changed or not.
There are a lot of variables for control and output, the meaning of each variable is explained in the attached PDF. Please play with it to see how it works.
How does the script work?
The script is triggered by the autostart function and every day at a specific time.
Depending on which days are entered in the variable "maildays" an email will be sent.
In addition to emails, the script can also send push or telegram messages.
At the end of the script a summary of the dead devices and a summary of the last breached status is displayed.
Have fun with the script and if you have any questions: I am happy to help.
Version history:
v 0.1 2017-03-12 : first published version
v 0.2 2017-05-10 : minor improvements
v 0.3 2017-05.14 : Introduced a few control variables
v 0.4 2017-06-10 : Added possibility to split the emails.
v 0.5 2017-06-16 : Corrected typing error in variable name, immediate push messages for dead devices
v 0.6.2 2017-06-22 : Just a few cosmetic changes
v 0.8.1 2017-06-24 : Major change in code, new functions
v 0.8.3 2017-06-26 : Introduced mail numbers.
v 0.8.4 2017-07-04 : Check for "last breached" status introduced.
v 0.9.1 2017-08-23 : Introduced new array for sending email
v 0.9.2 2017-10-16 : Optimized ouput line lenght
v 0.9.3 2017-12-11 : Minor code changes
v 1.1.3 2018-02-09 : Added section names
v 1.1.5 2018-02-18 : Minor code changes, optimized output
v 1.2.0 2018-03-18 : Output sorted by sections
v 1.2.1 2018-03-25 : Only english translation.
What's New in Version 1.3.5 See changelog
Released
Changelog for Version 1.3.5
- a few visual improvements to the output
- smaller code optimizations
- summing up the 'not breached' devices to detect anomalies faster
BatterieCheckV1.3.5-en.lua.txt is the English version.
BatterieCheckV1.3.5-DE.lua.txt is the German version.
Because the encoding ( UTF-8) often gets confused when uploading, I have now provided the LUA files as a txt file. Use UTF-8 encoding when saving as a lua file.