Page 1 of 1

Dzevent issue after updating docker image

Posted: Thursday 20 March 2025 18:39
by hemant5400z
Hi all,

I have been using my Dzevents for a while not, recently I updated my docker as i had to move to a new machine.
In mt script i always used:

http://xxxxxxxxxxx:8080/json.htm?type=g ... ange=month to get my P1 data for the month.
I just discovered that it is not working anymore trying to figure out so help appreciated:

page can’t be found
No webpage was found for the web address: http://xxxxxxxxxxxx:8080/json.htm?type= ... ange=month
HTTP ERROR 404

Thanks,
Hemant

Re: Dzevent issue after updating docker image

Posted: Thursday 20 March 2025 22:37
by waltervl
For docker environments you have to add the internal IP of the docker container to the Domoticz trusted sites in security settings.

Re: Dzevent issue after updating docker image

Posted: Thursday 20 March 2025 23:55
by hemant5400z
Hi,

My docker is hosted and my subnet is added as trusted. I can access the http port 80 but the jason api does not work.

Thanks

Re: Dzevent issue after updating docker image

Posted: Friday 21 March 2025 0:25
by waltervl
You have to login into the docker. Ontainer and find out the internal IP in that container as dzvents is calling the API from within the container. Also switch on Allow basic auth on http.

In the Domoticz log you probably also see a session from that IP being denied.

Re: Dzevent issue after updating docker image

Posted: Friday 21 March 2025 1:23
by hemant5400z
Hi,

Thanks will try, is this something new, as i dis not change any settings just pulled new stable image.

Hemant

Re: Dzevent issue after updating docker image

Posted: Friday 21 March 2025 7:58
by waltervl
New for 2023 version see wiki https://wiki.domoticz.com/Security

Re: Dzevent issue after updating docker image

Posted: Friday 21 March 2025 11:47
by hemant5400z
Hi,

Double checked, Allow basic Auth over plain was already green (enabled)
in trusted network I have my whole subnet

so accessing plain http://domoticz-ip:8080 is no issues i can control and do everything

problem comes when i try

Code: Select all

http://domoticz-ip:8080/json.htm?type=graph&sensor=counter&idx=64&range=month
I get page not found error 404.

My docker is hosted that mean IP of host is same as in docker i check using:

docker inspect \
--format '{{ .NetworkSettings.IPAddress }}' domoticz

No IP is rerturned as it's hosted.

this is what i use in my script:

Code: Select all

local function triggerJSON(id, period, delay)
            local delay = delay or 0
            local  URLString   = "http://domoticz-ip:8080/json.htm?type=graph&sensor=counter&range=" .. 
                                    period .. "&idx=" .. id 
            dz.openURL({    url = URLString,
                            method = "GET",
                            callback = httpResponses .. "_" .. period}).afterSec(delay)                      
        end

Cheers,
Hemant

Re: Dzevent issue after updating docker image

Posted: Friday 21 March 2025 12:56
by waltervl
OK
So in 2023.2 these API calls have changed:

Code: Select all

/json.htm?type=graph will be /json.htm?type=command&param=graph
See also wiki https://wiki.domoticz.com/Domoticz_API/ ... Gas,_Water