Dzevent issue after updating docker image

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
hemant5400z
Posts: 101
Joined: Monday 05 November 2018 17:41
Target OS: Linux
Domoticz version:
Contact:

Dzevent issue after updating docker image

Post 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
User avatar
waltervl
Posts: 5851
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Dzevent issue after updating docker image

Post by waltervl »

For docker environments you have to add the internal IP of the docker container to the Domoticz trusted sites in security settings.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
hemant5400z
Posts: 101
Joined: Monday 05 November 2018 17:41
Target OS: Linux
Domoticz version:
Contact:

Re: Dzevent issue after updating docker image

Post 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
User avatar
waltervl
Posts: 5851
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Dzevent issue after updating docker image

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
hemant5400z
Posts: 101
Joined: Monday 05 November 2018 17:41
Target OS: Linux
Domoticz version:
Contact:

Re: Dzevent issue after updating docker image

Post by hemant5400z »

Hi,

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

Hemant
User avatar
waltervl
Posts: 5851
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Dzevent issue after updating docker image

Post by waltervl »

New for 2023 version see wiki https://wiki.domoticz.com/Security
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
hemant5400z
Posts: 101
Joined: Monday 05 November 2018 17:41
Target OS: Linux
Domoticz version:
Contact:

Re: Dzevent issue after updating docker image

Post 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
User avatar
waltervl
Posts: 5851
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Dzevent issue after updating docker image

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest