Domoticz authorization error

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

ressof
Posts: 60
Joined: Thursday 20 April 2017 7:20
Target OS: Linux
Domoticz version: Latest
Contact:

Domoticz authorization error

Post 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
User avatar
kiddigital
Posts: 435
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz authorization error

Post 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).
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
ressof
Posts: 60
Joined: Thursday 20 April 2017 7:20
Target OS: Linux
Domoticz version: Latest
Contact:

Re: Domoticz authorization error

Post 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?
azonneveld
Posts: 153
Joined: Wednesday 02 October 2019 7:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: Domoticz authorization error

Post by azonneveld »

Use base64 to encode your username & password instead of sending it as plain text.

"dashticz:hellohello" ===base64===> "ZGFzaHRpY3o6aGVsbG9oZWxsbw=="
rpi4 - zigbee2mqtt - roborock - espeasy - rfxcom - homewizard p1 - otgw - homebridge - surveillance station - egardia - goodwe - open weather map - wol - BBQ detection - rsync backup
ressof
Posts: 60
Joined: Thursday 20 April 2017 7:20
Target OS: Linux
Domoticz version: Latest
Contact:

Re: Domoticz authorization error

Post by ressof »

Where in dashticz do I put my base64 converted username and password?
marcoon66
Posts: 5
Joined: Tuesday 21 December 2021 20:34
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz authorization error

Post 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
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz authorization error

Post by Lokonli »

just use the latest Dashticz beta version, and fill in username and password in CONFIG.js. No need to encode this information.
sailmich
Posts: 232
Joined: Wednesday 17 February 2016 22:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Germany
Contact:

Re: Domoticz authorization error

Post 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?
User avatar
MrMarcie69
Posts: 1
Joined: Sunday 31 December 2017 10:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Contact:

Re: Domoticz authorization error

Post 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???
Arguing that you don't care about the right to privacy because you have nothing to hide is no different than saying you don't care about free speech because you have nothing to say. E. Snowden
sailmich
Posts: 232
Joined: Wednesday 17 February 2016 22:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Germany
Contact:

Re: Domoticz authorization error

Post 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.
willemd
Posts: 621
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: Domoticz authorization error

Post 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.
mgugu
Posts: 208
Joined: Friday 04 November 2016 12:33
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: France
Contact:

Re: Domoticz authorization error

Post 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.
User avatar
kiddigital
Posts: 435
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz authorization error

Post 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).
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Domoticz authorization error

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

Re: Domoticz authorization error

Post 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?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
janportinga
Posts: 3
Joined: Friday 30 December 2022 12:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023-2
Contact:

Re: Domoticz authorization error

Post by janportinga »

Have the same problem

Resolved bij setting domoticz port in https

And set dashticz conf-file also to https
User avatar
bayensf
Posts: 15
Joined: Friday 30 October 2015 17:25
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Domoticz authorization error

Post 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.
User avatar
McMelloW
Posts: 427
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: Domoticz authorization error

Post 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?
Greetings McMelloW
janportinga
Posts: 3
Joined: Friday 30 December 2022 12:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023-2
Contact:

Re: Domoticz authorization error

Post by janportinga »

swilting
Posts: 9
Joined: Wednesday 13 June 2018 10:33
Target OS: Raspberry Pi / ODroid
Domoticz version: Last Sta
Location: Netherlands
Contact:

Re: Domoticz authorization error

Post 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?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest