Is it possible to trigger event based on result of the log.
I want to have a trigger when "Toon" provides the following error in the log: "Error: ToonThermostat: Error login!"
Can somebody push me in the right direction?
Use log as trigger
Moderator: leecollings
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Use log as trigger
Maybe a huge thing, but I guess fail2ban should do it.
fail2ban can monitor logfiles in realtime and do actions if a string is found.
Normally used to block IP adresses in firewall but the action can be anything you want.
fail2ban can monitor logfiles in realtime and do actions if a string is found.
Normally used to block IP adresses in firewall but the action can be anything you want.
- jvdz
- Posts: 2335
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: Use log as trigger
What I have done for my ICY thermostat is to check for the lastupdate of the TempDevice being older than 5 minutes triggering an Telegram message that there is an error.
Guess you could also use fail2ban to scan the log for this and create an action based on it, but is more difficult to do if you want to warned of loosing the connection to your thermostat.
Jos
Guess you could also use fail2ban to scan the log for this and create an action based on it, but is more difficult to do if you want to warned of loosing the connection to your thermostat.
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Use log as trigger
If the timestamp gets updated regularly that would absolutely be an easier solution.
Who is online
Users browsing this forum: No registered users and 1 guest