How to use 'clearlightlog' in lua script
Posted: Wednesday 04 October 2023 0:46
I have some scripts in use that use a textdevice to show some values every 20 seconds on the dashboard.
The problem this gives is that many thousands of entry's in the logs are created to remove these i mannualy have to clear the log every view days.
i have tried to atomate the removal but couldn't get it to work; in the end I got some reply from someone from the board that this could'nt be done and i had to just live with it..
So here i try, try again...
I found that what i want to happen i could do via:
and it works!!
It's a start, but its not automated yet..
Now my question:
I have a LUA script that runs every day at 23:58; I would like add the clearlightlog function too it. (because my Domoticz runs from a Dockercontainer the ip used in the script wil be 127.17.0.2)
Can this be done in just LUA? (without curl)
The problem this gives is that many thousands of entry's in the logs are created to remove these i mannualy have to clear the log every view days.
i have tried to atomate the removal but couldn't get it to work; in the end I got some reply from someone from the board that this could'nt be done and i had to just live with it..

So here i try, try again...
I found that what i want to happen i could do via:
Code: Select all
http://192.168.178.2:7080/json.htm?type=command¶m=clearlightlog&idx=223
Code: Select all
{
"status" : "OK",
"title" : "ClearLightLog"
}
Now my question:
I have a LUA script that runs every day at 23:58; I would like add the clearlightlog function too it. (because my Domoticz runs from a Dockercontainer the ip used in the script wil be 127.17.0.2)
Can this be done in just LUA? (without curl)