Fix Domoticz DB

The FIX::

You need to have sqlite3 installed on your Pi

CODE: SELECT ALL

If you have it you can do the following commands:

CODE: SELECT ALL

Remove first line of dumped database:
tail dump.sql -n +2 > dump1.sql
# Make back-up of original just in case:
mv domoticz.db domoticz.bak.db
# Import into fresh database:
sqlite3 domoticz.db < dump1.sql
# Clean-up the temporary files:
rm dump*.sql

https://www.domoticz.com/forum/viewtopic.php?t=10984

AD Send mail on password reset

This is based on Security Event ID 4724. When this is logged on the domain controller, Task Scheduler kicks this script. And send a mail to Admin and user. And also creates a local log file who reset the password.