401 basics

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
bartemannekes
Posts: 1
Joined: Sunday 22 December 2024 12:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

401 basics

Post by bartemannekes »

Hi forum,

I am pretty new to domoticz, after quite a few searches on the forum, I remain stuck...

I have an ssh connection to the pi, and i type

Code: Select all

"curl http://192.168.0.212:8080/json.htm?type=command&param=udevice&idx=19&nvalue=0&svalue=33;0"
which keeps on giving "401 Unauthorized"

(when going to

Code: Select all

http://192.168.0.212:8080/json.htm?type=command&param=udevice&idx=19&nvalue=0&svalue=33;0
from safari from another machine, this works, at least when there is a session to domoticz where i am logged in)

in settings, trusted networks, I have "127.0.0.*, 192.168.0.212" and API protection is set to allow basic auth
I have raspberry pi 5, domoticz 2024.7, ip of the pi is 192.168.0.212

Am I doing something very basic wrong in the curl command?
What can I actually do in terms of debugging to understand why I get 401, as far as I understand, it should be allowed as I have the ip in trusted networks?

Thanks a lot for the help

Bart
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: 401 basics

Post by waltervl »

Change the trusted network IP to "127.0.0.*,192.168.0.*"
Also no spaces in this setting, there is now a space afte the comma (could be typing error).
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest