Error after update domoticz 2023.1

same here

if i use local, all the camera works

@igor What Api call do you use to get the snapshot? We can mention this in the topic https://www.domoticz.com/forum/viewtopic.php?t=39964 if you feel the issue is really on the Domoticz side.

@waltervl There is no documented API to get camera snapshots, so I’m using /camsnapshot.jpg endpoint, which is the same that Domoticz UI uses. Previously that endpoint was accessible with Basic Auth, but that was changed recently, and now Basic Auth only works for JSON API endpoint (/json.htm).
I believe that was the intention based on changes and comments in Domoticz source code, so the previous behavior could have been just an oversight. Ideally there just should be a specific JSON endpoint to retrieve camera snapshot.

The workaround is to use the same auth flow Domoticz UI uses. That one is cookie-based, which not great for any API usage, but it works. Domoticz Android app is using the same, so should be fine for now.

That should also avoid needing to enable “Allow Basic Authentication over plain HTTP” for some setups as I mentioned above - an extra benefit.

There is now other possibilities to authorize for applications, see https://www.domoticz.com/wiki/Security and more detailed https://github.com/domoticz/domoticz/blob/development/SECURITY_SETUP.md

Please contact User Kiddigital if you need extra information.

did anyone manage to connect a camera after the update to 2023.1?
Thx

@waltervl Yeah, I consulted that document. The app previously used only the 3rd method (from Advanced Security section list), so now it also uses the 1st, just like Domotic UI.
It looks like there is an intention to migrate Domoticz UI to 2nd method (JWT token) in the future, so the app would do the same eventually. It is a bigger change, so it couldn’t have been as quickly for this immediate fix.

@Florin_Trica Please wait till 38.6 patch release for the camera fix.

Update - There is a delay in Play Store review process for 38.6 release, so it might take a few more days for it to become available.

Thx !!!

38.6 release is finally through the Play Store review and should be rolling out now

1 Like

Hello
38.6 version solve the problème with caméra and api in domoticz 2023.1
ThankS for the job

1 Like

There still might be an issue if you are using non-stable/beta Domoticz builds. The fix for that is in progress.

I am now on app version 38.7.1 (updated yesterday) and now the app cannot login into Domoticz anymore (authentication error) . With browser or the Domoticz app I can enter Domoticz without problems so it seems home habit specific.

I do not need user accounts as I have the tablet IP in my trusted network on Domoticz settings.
Edit: I am on 2023.1

@waltervl Are you on stable 2023.1 or beta build?

I am on 2023.1 stable

@waltervl Can you restart the app and upload debug logs?

I uploaded them a minute ago.

Can you try this URL in your browser with replaced [IP] and incognito window to avoid any existing session. Do you get successful response?

http://[IP]:8080/json.htm?type=devices&filter=all&used=true

Yes, I get a valid response, a small snippet:

"ActTime" : 1678354674,
"AstrTwilightEnd" : "20:24",
"AstrTwilightStart" : "05:15",
"CivTwilightEnd" : "19:05",
"CivTwilightStart" : "06:34",
"DayLength" : "11:26",
"NautTwilightEnd" : "19:44",
"NautTwilightStart" : "05:55",
"ServerTime" : "2023-03-09 10:37:54",
"SunAtSouth" : "12:49",
"Sunrise" : "07:07",
"Sunset" : "18:32",
"app_version" : "2023.1",
"result" : 
[
	{
		"Data" : "Off",
		"Description" : "",
		"Favorite" : 1,
		"Image" : "Push",