Page 1 of 2
Domoticz authorization error
Posted: Tuesday 24 January 2023 10:04
by ressof
Hi
I get "Domoticz authorization error" when I try to connect to dashticz. I have dashticz on an alpine machine with nginx and php8.
I have the latest beta version of both domoticz and dashticz.
This is my CONFIG.js file
config['domoticz_ip'] = '
http://192.168.0.10:8080';
config['app_title'] = 'Dashticz V3';
config['user_name'] = 'dashticz';
config['pass_word'] = 'hellohello';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';
config['enable_websocket'] = 'true';
I get 401 unauthorized in network inspector in chrome and this address
http://192.168.0.10:8080/json.htm?usern ... rvariables
When I set trusted networks in domoticz to 192.168.0.* it works but then i dont need to enter credentials for external access.
I have tried with enable basic auth and disabled
Re: Domoticz authorization error
Posted: Tuesday 24 January 2023 22:10
by kiddigital
I assume you are running a recent Beta as many security changes have been done there.
Are you accessing Domoticz through a Proxy? Or has Dashticz direct access?
Username/password as URL parameters is not supported anymore. They need to be sent using a Basic-auth header (‘Authorization: Basic <base64(username:password)>’.
The Basic-Auth API over HTTP setting is to allow this header to be accepted over non-SSL encrypted connections (for example when SSL offloading is done by the Proxy).
Re: Domoticz authorization error
Posted: Wednesday 25 January 2023 9:18
by ressof
Hi
Im running the latest beta of both domoticz and dashticz
Dashticz has direct access to
http://192.168.0.10:8080
I have installed dashticz with this command "git clone
https://github.com/Dashticz/dashticz --branch beta"
and put CONFIG.js in dashticz/custom/
Is there a setting in dashticz to use Basic-auth?
Re: Domoticz authorization error
Posted: Wednesday 25 January 2023 11:35
by azonneveld
Use
base64 to encode your username & password instead of sending it as plain text.
"dashticz:hellohello" ===base64===> "ZGFzaHRpY3o6aGVsbG9oZWxsbw=="
Re: Domoticz authorization error
Posted: Wednesday 25 January 2023 12:35
by ressof
Where in dashticz do I put my base64 converted username and password?
Re: Domoticz authorization error
Posted: Tuesday 07 February 2023 22:09
by marcoon66
ressof wrote: ↑Wednesday 25 January 2023 12:35
Where in dashticz do I put my base64 converted username and password?
Hi, I have the same problems after updating to the newest build (Version: 2022.2 (build 15050))
Where and how (base64) to store username and password in CONFIG.js?
Thanks for your help,
Marco
Re: Domoticz authorization error
Posted: Wednesday 08 February 2023 18:24
by Lokonli
just use the latest Dashticz beta version, and fill in username and password in CONFIG.js. No need to encode this information.
Re: Domoticz authorization error
Posted: Tuesday 14 February 2023 20:22
by sailmich
Just updated to new domoticz stable 2023.1 and got also "Domoticz authorization error". Dashticz is already newest beta. I came from 2022.2, domoticz running in docker.
User and password is and was already inside Config.js.
config['user_name'] = 'xxxxxx';
config['pass_word'] = 'xxxxxxx'
I cleared cache I tried chromium still same issue.
Any idea how I can fix that?
Re: Domoticz authorization error
Posted: Tuesday 14 February 2023 23:05
by MrMarcie69
sailmich wrote: ↑Tuesday 14 February 2023 20:22
Just updated to new domoticz stable 2023.1 and got also "Domoticz authorization error". Dashticz is already newest beta. I came from 2022.2, domoticz running in docker.
User and password is and was already inside Config.js.
config['user_name'] = 'xxxxxx';
config['pass_word'] = 'xxxxxxx'
I cleared cache I tried chromium still same issue.
Any idea how I can fix that?
Same here, just updated and need to login in now. How???
Re: Domoticz authorization error
Posted: Wednesday 15 February 2023 16:29
by sailmich
Find a solution! In browser on your Domoticz home page go to Setup > Settings > Security > Trusted Networks. Enter your Network and dashticz can connect
again.
Re: Domoticz authorization error
Posted: Wednesday 15 February 2023 17:07
by willemd
I added username and password to CONFIG.js as explained above (was not there before at all)
I added dashticz as a viewer/user/admin in domoticz (I tried all three).
I cleared the cache (several times)
I updated trusted networks (although was already there before)
I tried 127.0.0.1 in CONFIG.js instead of normal IP
but still I get authorization error when trying to run dashticz against domoticz version 2023.1
Final resort I update trusted network and replaced last 3 digits with *. Now dashticz has access again.
Re: Domoticz authorization error
Posted: Wednesday 15 February 2023 17:39
by mgugu
In one of my deployments, I needed to add ipv6 localhost explicitely, ::1, in the trusted networks. I do not really understand the reason since it was not needed before.
Re: Domoticz authorization error
Posted: Wednesday 15 February 2023 20:51
by kiddigital
mgugu wrote:In one of my deployments, I needed to add ipv6 localhost explicitely, ::1, in the trusted networks. I do not really understand the reason since it was not needed before.
I thinks it is somewhere in the changelog, but since 2023.1 you have to specify the Trusted network explicitly. Before the IP of the interface was implicitly added to the ‘local network’ (old name).
Re: Domoticz authorization error
Posted: Wednesday 29 March 2023 23:20
by robgeerts
Dashticz is running on: 192.168.1.150:8082
Domoticz is running on: 192.168.1.150:8084
192.168.1.* is in my trusted networks.
I still get an authorization error.
I also tried adding 127.0.0.* etc..
What could be wrong?
Also tried setting user_name and pass_word in config of Dashticz.
No positive result...
EDIT: It works when i set basic auth for API calls in combination with the user_name/pass_word
Re: Domoticz authorization error
Posted: Wednesday 29 March 2023 23:46
by waltervl
Only set basic auth for HTTP api call should be enough (with trusted networks) . No need for user/password.
What IP do you see in the Domoticz log when dashticz tries to connect?
Re: Domoticz authorization error
Posted: Monday 24 July 2023 15:18
by janportinga
Have the same problem
Resolved bij setting domoticz port in https
And set dashticz conf-file also to https
Re: Domoticz authorization error
Posted: Thursday 27 July 2023 13:54
by bayensf
Solved by "Allow Basic-Auth authentication over plain HTTP (API only)" to "On" in Domoticz Security setup in the "Settings" tab.
I got thsi error when I run the latest Domoticz update.
Re: Domoticz authorization error
Posted: Friday 28 July 2023 13:43
by McMelloW
janportinga wrote: ↑Monday 24 July 2023 15:18
Have the same problem
Resolved bij setting domoticz port in https
And set dashticz conf-file also to https
Having the same problem after installing Domoticz 2023.2
Where do you set the domoticz port to https?
Re: Domoticz authorization error
Posted: Sunday 30 July 2023 11:10
by janportinga
Re: Domoticz authorization error
Posted: Thursday 03 August 2023 12:58
by swilting
I also have this error after I updated to the last version of Domoticz,
Is there one simple solution for the issue
*) updated to the Beta version of Dashticz
*) have my IP range in the "trusted network settings" (was already there) (10.0.0.*)
*) try'd the username / password option in the config.js
In my opinion it just shoud work
I can't see any login attempts in the logging of Domoticz, do i have to switch this on somewhere?