Page 1 of 1

API calls not working on fresh install 2023 .1

Posted: Monday 20 March 2023 15:44
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 ?

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

Posted: Monday 20 March 2023 15:49
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

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

Posted: Monday 20 March 2023 15:55
by groenestijnm
yes, i have trusted network set and enabled basic-auth over http

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

Posted: Monday 20 March 2023 16:07
by waltervl
Is browser access working on http://192. 168. 30. 10: 500 ? You see a working Domoticz environment?

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

Posted: Monday 20 March 2023 16:36
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.

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

Posted: Monday 20 March 2023 16:37
by waltervl
Great, problem solved! :)