Page 1 of 1

domoticz api/json url

Posted: Wednesday 17 February 2021 14:01
by pvklink
I have a test device which receives a lot of content.

when i do a http://ip:port/#/Devices/1472/Log/

I get the new and older content.
I can manually delete the history by clicking manually on delete/clean on the domoticz interface
Is there a way to clean this automatic by calling a json url. ( i can make a timer for it)
I search the documentation but i cant find an extention to the below command to delete the content incl history
when i do a http://ip:port/#/Devices/1472/Log/

Re: domoticz api/json url

Posted: Wednesday 17 February 2021 14:09
by waaren
pvklink wrote: Wednesday 17 February 2021 14:01 I have a test device which receives a lot of content.
What is the deviceType / devicesubType ?

Re: domoticz api/json url

Posted: Wednesday 17 February 2021 14:37
by pvklink
text
Naamloos.jpg
Naamloos.jpg (158.29 KiB) Viewed 899 times

Re: domoticz api/json url

Posted: Wednesday 17 February 2021 14:58
by waltervl
What are your logging settings (Menu Setup - Settings - tab logging)? Perhaps they are set too high...?
https://www.domoticz.com/wiki/Applicati ... og_History

Re: domoticz api/json url

Posted: Wednesday 17 February 2021 15:02
by waaren
pvklink wrote: Wednesday 17 February 2021 14:37 text
As found on the API / JSON wiki page It should work with

http://<IP:PORT>/json.htm?idx=<IDX>&type=command&param=clearlightlog

Re: domoticz api/json url

Posted: Wednesday 17 February 2021 15:03
by waaren
waltervl wrote: Wednesday 17 February 2021 14:58 What are your logging settings (Menu Setup - Settings - tab logging)? Perhaps they are set too high...?
https://www.domoticz.com/wiki/Applicati ... og_History
The setting you refer to is system wide. The question the OP asked is for a specific device.

Re: domoticz api/json url

Posted: Wednesday 17 February 2021 15:15
by pvklink
yessss, it works!

Re: domoticz api/json url

Posted: Wednesday 17 February 2021 15:19
by waltervl
waaren wrote: Wednesday 17 February 2021 15:03
waltervl wrote: Wednesday 17 February 2021 14:58 What are your logging settings (Menu Setup - Settings - tab logging)? Perhaps they are set too high...?
https://www.domoticz.com/wiki/Applicati ... og_History
The setting you refer to is system wide. The question the OP asked is for a specific device.
I know, but sometimes it is better to solve the root cause (setting to high) then the symptom (extra delete log of a sensor with a lot of data) as that also will need a maintenance (script)... ;-)