This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Remote service without basic auth
#1
I am trying to use Remote services with an LM with 20240426 firmware but since there is no more basic auth, it does not work and always asks to login (if I use get request through browser). Is there a solution? Do I need to add some body to the request maybe?
Reply
#2
Working example using Fetch API:

Code:
async function send() {
  var url = 'http://192.168.0.9/scada-remote?m=json&r=grp&fn=write&alias=0/0/1&value=1'
  var user = 'remote'
  var pass = 'Remote123'
  var headers = new Headers()

  headers.append('Authorization', 'Basic ' + btoa(`${user}:${pass}`))

  var res = await fetch(url, { method: 'GET', headers: headers })

  console.log(res)
}
Reply
#3
Ok, that could be a problem since I am trying to exchange info with Yealink phones, which can not make requests with headers. Is there a way I can make API calls without a header?
Reply
#4
You can create a .lp script instead: https://kb.logicmachine.net/misc/apps/#lp-scripts
It does not require authentication if placed in the public directory.
Reply
#5
(29.07.2024, 06:25)admin Wrote: You can create a .lp script instead: https://kb.logicmachine.net/misc/apps/#lp-scripts
It does not require authentication if placed in the public directory.

Interesting, could you give me an example of a script like this?
Reply
#6
Check this: https://forum.logicmachine.net/showthrea...7#pid20407
The example above can be placed in user directory so only authorized users can access it.
Reply
#7
I'm using the remote service from different devices and one stopped working. Is it possible that it's due to basic authentication that this one stopped working?

I'm using the same url for both systems: http://user:pass@192.168.0.10/scada-remo...value=true
Reply
#8
Which firmware do you use and what posting the command
------------------------------
Ctrl+F5
Reply
#9
(28.02.2025, 09:52)Daniel Wrote: Which firmware do you use and what posting the command

Hi Daniel i'm using a Wiser for KNX with firmware 2.8.3
I use the remote service from a Yealink phone and that works. And i use it from Doorbird but that doesn't work anymore.
I just copy / paste the url so the url is 100% working.
Reply
#10
If you use 2.8.3 then this is Doorbird issue, you should contact them for help. From 3.0.0 things might work differently due to session based authentication.
------------------------------
Ctrl+F5
Reply
#11
(28.02.2025, 10:02)Daniel Wrote: If you use 2.8.3 then this is Doorbird issue, you should contact them for help.  From 3.0.0 things might work differently due to session based authentication.

Ok Daniel thanks a lot for your quick response and help. I will contact Doorbird.
Reply
#12
Doorbird is telling me that this should work fine so no problems from their side.

When i try to call the remote service url from script i got this info back. So it seems to be an authentication issue? Is basic authentication also no longer allowed by the Wiser and how can i solve this? In other words how can i use the Remote Service any longer or is their a better option?

Remote service test 05.03.2025 16:35:43
* arg: 1
  * string: statusText
* arg: 2
  * string: HTTP/1.1 401 Unauthorized


Remote service test 05.03.2025 16:35:43
* string: headers:


Remote service test 05.03.2025 16:35:43
* arg: 1
  * string:
* arg: 2
  * string: location
* arg: 3
  * string: https://192.168.0.10/scada-remote?m=json...value=true


Remote service test 05.03.2025 16:35:43
* arg: 1
  * string:
* arg: 2
  * string: transfer-encoding
* arg: 3
  * string: chunked


Remote service test 05.03.2025 16:35:43
* arg: 1
  * string:
* arg: 2
  * string: connection
* arg: 3
  * string: close


Remote service test 05.03.2025 16:35:43
* arg: 1
  * string:
* arg: 2
  * string: date
* arg: 3
  * string: Wed, 05 Mar 2025 15:35:43 GMT


Remote service test 05.03.2025 16:35:43
* arg: 1
  * string:
* arg: 2
  * string: www-authenticate
* arg: 3
  * string: Basic realm="pand"


Remote service test 05.03.2025 16:35:43
* arg: 1
  * string:
* arg: 2
  * string: set-cookie
* arg: 3
  * string: x-login=0; Path=/; SameSite=Strict, x-auth=; Path=/; SameSite=Strict


Remote service test 05.03.2025 16:35:43
* arg: 1
  * string:
* arg: 2
  * string: content-type
* arg: 3
  * string: text/plain; charset=utf-8


Remote service test 05.03.2025 16:35:43
* arg: 1
  * string: data
* arg: 2
  * string: Invalid login and/or password. Your access will be blocked after 5 consecutive unsuccessful login attempts.
Reply
#13
Again, we didn't change anything in 2.8.3. The thread is related to latest firmware with session based authentication. It seems that you are not using correct credentials. Your other device works correctly.
You can still use the solution admin proposed above.
------------------------------
Ctrl+F5
Reply
#14
UPDATE: The issue was related to Doorbird. They now installed another firmware on my device and it is working again with basic authentication. So i hope this info can help others too.
Reply


Forum Jump: