API calls not working on fresh install 2023 .1

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
groenestijnm
Posts: 3
Joined: Monday 20 March 2023 15:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

API calls not working on fresh install 2023 .1

Post by groenestijnm »

I did a fresh RPI install of the latest Raspbian (Kernel 5. 15 Debian 11) and Domoticz version 2023 .1
After restoring the database i noticed that some custom scripts weren't updating my dummy sensors.

I tried running the API call from my browser:
http://192. 168. 30. 10: 500/json. htm?type=command&param=udevice&idx=125&nvalue=0&svalue=0 .10 but the browser responded with a ERR_CONNECTION_RESET.

So i tried a telnet session towards domoticz on port 500 and the port was open.
also confirmed this on the RPI with ss -tulwn | grep LISTEN wich shows port 500 to be open as well.

In Domoticz security i have set Trusted Networks to 192. 168. 30 .* to whitelist the whole subnet.

Has anyone more idea's to try ?
User avatar
waltervl
Posts: 5908
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: API calls not working on fresh install 2023 .1

Post by waltervl »

Did you set trusted networks and Allow Basic Authentication over plain HTTP (has to be switched on) settings in menu setup-settings, tab security.
See also wiki https://www.domoticz.com/wiki/Security
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
groenestijnm
Posts: 3
Joined: Monday 20 March 2023 15:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: API calls not working on fresh install 2023 .1

Post by groenestijnm »

yes, i have trusted network set and enabled basic-auth over http
User avatar
waltervl
Posts: 5908
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: API calls not working on fresh install 2023 .1

Post by waltervl »

Is browser access working on http://192. 168. 30. 10: 500 ? You see a working Domoticz environment?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
groenestijnm
Posts: 3
Joined: Monday 20 March 2023 15:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: API calls not working on fresh install 2023 .1

Post by groenestijnm »

ok, i think i know what happend now..

Browser access wasn't possible to port 500. In the new setup under security "remote shared port" i saw it was set to 500 so i assumed that was the port that Domoticz was listing on for the API calls. But it was listening on 8080 (same as the Domoticz environment itself) after i changed my calls (and my scripts) to use port 8080 it is all working again.

i guess i added port 500 manually to my old domoticz setup to listen on, forgot about it and now made a wrong assumption.
User avatar
waltervl
Posts: 5908
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: API calls not working on fresh install 2023 .1

Post by waltervl »

Great, problem solved! :)
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