Unauthorized 401 - homebridge

Client tools or tools that can connect with Domoticz. Tools for Windows, iOS, Android, Linux etc.

Moderator: leecollings

Post Reply
dvdbosch
Posts: 11
Joined: Saturday 12 January 2019 21:09
Target OS: -
Domoticz version:
Contact:

Unauthorized 401 - homebridge

Post 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 :-)
solarboy
Posts: 320
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Unauthorized 401 - homebridge

Post 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).
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
dvdbosch
Posts: 11
Joined: Saturday 12 January 2019 21:09
Target OS: -
Domoticz version:
Contact:

Re: Unauthorized 401 - homebridge

Post by dvdbosch »

Thanks for the suggestions. Will give it a try.
Filnet
Posts: 23
Joined: Tuesday 06 March 2018 13:55
Target OS: -
Domoticz version:
Contact:

Re: Unauthorized 401 - homebridge

Post by Filnet »

Hello,

I have same problem. Have you solved it?
dvdbosch
Posts: 11
Joined: Saturday 12 January 2019 21:09
Target OS: -
Domoticz version:
Contact:

Re: Unauthorized 401 - homebridge

Post by dvdbosch »

Nope, not yet. Suggestions are welcome!
georgesorwell
Posts: 2
Joined: Tuesday 12 May 2015 17:46
Target OS: Windows
Domoticz version:
Contact:

Re: Unauthorized 401 - homebridge

Post by georgesorwell »

Hi,

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

Georges
dvdbosch
Posts: 11
Joined: Saturday 12 January 2019 21:09
Target OS: -
Domoticz version:
Contact:

Re: Unauthorized 401 - homebridge

Post 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.
georgesorwell
Posts: 2
Joined: Tuesday 12 May 2015 17:46
Target OS: Windows
Domoticz version:
Contact:

Re: Unauthorized 401 - homebridge

Post by georgesorwell »

3.jpg
3.jpg (89.45 KiB) Viewed 3663 times
4.jpg
4.jpg (45.81 KiB) Viewed 3663 times
Georges
dvdbosch
Posts: 11
Joined: Saturday 12 January 2019 21:09
Target OS: -
Domoticz version:
Contact:

Re: Unauthorized 401 - homebridge

Post by dvdbosch »

Thanks! Will give it a try tomorrow.
daniellejorge
Posts: 11
Joined: Wednesday 12 June 2019 20:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Unauthorized 401 - homebridge

Post 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????
dvdbosch
Posts: 11
Joined: Saturday 12 January 2019 21:09
Target OS: -
Domoticz version:
Contact:

Re: Unauthorized 401 - homebridge

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

Who is online

Users browsing this forum: No registered users and 0 guests