Page 1 of 1

Unauthorized 401 - homebridge

Posted: Friday 03 March 2023 19:47
by dvdbosch
Hi,

After the most recent 2023 update I'm facing difficulties on authorization between homebride/edomoticz and domoticz.

The following error is shared:

Code: Select all

[3-3-2023 19:40:27] Homebridge v1.6.0 (HAP v0.11.0) (Homebridge 602A) is running on port 51402.
[3-3-2023 19:40:27] [Domoticz] There was a problem connecting to Domoticz. (HTTP Status code 401)

<html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>
[3-3-2023 19:40:27] [Domoticz] There was an error while getting the MQTT Hardware Device from Domoticz.
Please verify that you have added the MQTT Hardware Device and that the hardware device is enabled.
Any suggestions?

Using the following config in Domoticz
Image

And the following Homebridge config:

Code: Select all

            "name": "Domoticz",
            "server": "username:[email protected]",
            "username": "admin",
            "password": "domoticz",
            "port": "8082",
            "roomid": 1,
            "mqtt": true,
            "ssl": false,
            "dimFix": 0,
            "legacyBlinds": 0,
            "platform": "eDomoticz"


Domoticz version

Code: Select all

About Domoticz
Version: 2023.1
Build Hash: f9b9ac774
Compile Date: 2023-02-14 15:06:40
dzVents Version: 3.1.8
Python Version: 3.7.3 (default, Oct 31 2022, 14:04:00) [GCC 8.3.0]
Active User:

Uptime: 1 Hours, 14 Minutes, 45 Seconds
Thanks for the help! My wife is getting angry by the minute :-)

Re: Unauthorized 401 - homebridge

Posted: Saturday 04 March 2023 0:49
by solarboy
It works for me with the new update so there is hope. You might want to look at your edomoticz config and check the login details and also your "trusted networks" in Domoticz>Settings>Security.

It might sound stupid but I presume you have restarted Domoticz. I had the same error with a python script which resolved after a restart (or 2).

Re: Unauthorized 401 - homebridge

Posted: Saturday 04 March 2023 17:50
by dvdbosch
Thanks for the suggestions. Will give it a try.

Re: Unauthorized 401 - homebridge

Posted: Sunday 12 March 2023 14:21
by Filnet
Hello,

I have same problem. Have you solved it?

Re: Unauthorized 401 - homebridge

Posted: Wednesday 15 March 2023 22:22
by dvdbosch
Nope, not yet. Suggestions are welcome!

Re: Unauthorized 401 - homebridge

Posted: Wednesday 22 March 2023 17:34
by georgesorwell
Hi,

I had the same problem.
The solution is indeed to fill in the trusted network field in Domoticz (security tab)

Georges

Re: Unauthorized 401 - homebridge

Posted: Thursday 23 March 2023 23:00
by dvdbosch
georgesorwell wrote: Wednesday 22 March 2023 17:34 Hi,

I had the same problem.
The solution is indeed to fill in the trusted network field in Domoticz (security tab)

Georges
Can you post your security settings and homebridge config file? Still not working when setting the trusted network.

Re: Unauthorized 401 - homebridge

Posted: Thursday 23 March 2023 23:23
by georgesorwell
3.jpg
3.jpg (89.45 KiB) Viewed 4973 times
4.jpg
4.jpg (45.81 KiB) Viewed 4973 times
Georges

Re: Unauthorized 401 - homebridge

Posted: Saturday 25 March 2023 11:51
by dvdbosch
Thanks! Will give it a try tomorrow.

Re: Unauthorized 401 - homebridge

Posted: Wednesday 14 June 2023 3:38
by daniellejorge
Please help guys!! I am having the same issue!!! I just added a new router (now i have the isp router and mine with a new ip address (wifi) so, showing 3 wifi names (not sure thats the problem!!)

I updated my domoticz, etc to run in the new ip address but don't remember if i did setup a static ip or something like that!! Thru the app of domoticz it's working my blinds and lights, but not thru the homebridge (voice commands) I am getting error [Domoticz] There was a problem connecting to Domoticz. (HTTP Status code 401). TRied to setup the trusted networks but getting error "Invalid location settings".

Anyone can help????

Re: Unauthorized 401 - homebridge

Posted: Friday 26 April 2024 23:08
by dvdbosch
Well! Completely forgotten to post the solution. After ive changed the homebridge/edomoticz setting setting to 'user:pass@ipadress it worked again.

Stumbled into this because a recent update removed this one.