Page 102 of 120
Re: Domoticz app 2.0
Posted: Thursday 07 May 2020 16:20
by videodrome
jvdz wrote: ↑Thursday 07 May 2020 14:28
Darsh wrote: ↑Thursday 07 May 2020 14:17
jvdz wrote: ↑Thursday 07 May 2020 14:01I simply created a empty file
logincheck in directory
\home\pi\domoticz\www which fixed that.
Tried that - still doesn't work, but this changes the error message in the app to "Invalid credentialstials. IMPORTANT: Please check if your Domoticz system uses Login Page as the authentication method. Basic Auth is going to be removed from Domoticz from the next update!"
Prerequisites for this workaround:
1. Make sure the LAN IP range is defined in the LocalNetwork in the Domoticz setup: Something like: 127.0.0.1;192.168.0.*
2. In the APP setup you simply use the Local IP with the HTTP port (8080) and leave the Userid and password fields empty.
3. Create the aforementioned file in your domoticz setup
..... and you should be back in business.
Jos
I'm a dummy but, what kind of extension to the logincheck file?
Re: Domoticz app 2.0
Posted: Thursday 07 May 2020 16:27
by Darsh
videodrome wrote: ↑Thursday 07 May 2020 16:20I'm a dummy but, what kind of extension to the logincheck file?
No extension, just a plain file name
logincheck.
Darsh
Re: Domoticz app 2.0
Posted: Thursday 07 May 2020 16:57
by videodrome
jvdz wrote: ↑Thursday 07 May 2020 14:28
Darsh wrote: ↑Thursday 07 May 2020 14:17
jvdz wrote: ↑Thursday 07 May 2020 14:01I simply created a empty file
logincheck in directory
\home\pi\domoticz\www which fixed that.
Tried that - still doesn't work, but this changes the error message in the app to "Invalid credentialstials. IMPORTANT: Please check if your Domoticz system uses Login Page as the authentication method. Basic Auth is going to be removed from Domoticz from the next update!"
Prerequisites for this workaround:
1. Make sure the LAN IP range is defined in the LocalNetwork in the Domoticz setup: Something like: 127.0.0.1;192.168.0.*
2. In the APP setup you simply use the Local IP with the HTTP port (8080) and leave the Userid and password fields empty.
3. Create the aforementioned file in your domoticz setup
..... and you should be back in business.
Jos
i did as suggested Darsh but now with logincheck in the www directory it says" invalid credentials"
userid and pass blank in the app but i can't connect.....
Re: Domoticz app 2.0
Posted: Thursday 07 May 2020 16:57
by videodrome
jvdz wrote: ↑Thursday 07 May 2020 14:28
Darsh wrote: ↑Thursday 07 May 2020 14:17
Tried that - still doesn't work, but this changes the error message in the app to "Invalid credentialstials. IMPORTANT: Please check if your Domoticz system uses Login Page as the authentication method. Basic Auth is going to be removed from Domoticz from the next update!"
Prerequisites for this workaround:
1. Make sure the LAN IP range is defined in the LocalNetwork in the Domoticz setup: Something like: 127.0.0.1;192.168.0.*
2. In the APP setup you simply use the Local IP with the HTTP port (8080) and leave the Userid and password fields empty.
3. Create the aforementioned file in your domoticz setup
..... and you should be back in business.
Jos
i did as suggested by Darsh but now with logincheck in the www directory it says" invalid credentials"
userid and pass blank in the app but i can't connect.....
Re: Domoticz app 2.0
Posted: Thursday 07 May 2020 17:06
by videodrome
videodrome wrote: ↑Thursday 07 May 2020 16:57
jvdz wrote: ↑Thursday 07 May 2020 14:28
Darsh wrote: ↑Thursday 07 May 2020 14:17
Tried that - still doesn't work, but this changes the error message in the app to "Invalid credentialstials. IMPORTANT: Please check if your Domoticz system uses Login Page as the authentication method. Basic Auth is going to be removed from Domoticz from the next update!"
Prerequisites for this workaround:
1. Make sure the LAN IP range is defined in the LocalNetwork in the Domoticz setup: Something like: 127.0.0.1;192.168.0.*
2. In the APP setup you simply use the Local IP with the HTTP port (8080) and leave the Userid and password fields empty.
3. Create the aforementioned file in your domoticz setup
..... and you should be back in business.
Jos
i did as suggested by Darsh but now with logincheck in the www directory it says" invalid credentials"
userid and pass blank in the app but i can't connect.....
Now it works: there 's another passage; go back to the domoticz server and cancel login and pass in settings
Re: Domoticz app 2.0
Posted: Thursday 07 May 2020 17:16
by jvdz
videodrome wrote: ↑Thursday 07 May 2020 17:06
Now it works: there 's another passage; go back to the domoticz server and cancel login and pass in settings
What do you mean with this setting? Did you do the first step I described, adding then LAN ip subnet to the local networks field in Domoticz settings? This should already take care of not requiring a userid & password when connecting with http.
.. or did you mean in the APP, as described in step 2 ?
Prerequisites for this workaround:
1. Make sure the LAN IP range is defined in the LocalNetwork in the Domoticz setup: Something like: 127.0.0.1;192.168.0.*
2. In the APP setup you simply use the Local IP with the HTTP port (8080) and leave the Userid and password fields empty.
3. Create the aforementioned file in your domoticz setup
..... and you should be back in business.
Jos
Re: Domoticz app 2.0
Posted: Thursday 07 May 2020 19:10
by glsf91
jvdz wrote: ↑Thursday 07 May 2020 14:01
It didn't work at first as it seems it is still trying to open
/logincheck first, and since that call fails in my ancient setup, it still failed, so I simply created a empty file
logincheck in directory
\home\pi\domoticz\www which fixed that.
Tested this work-around on v3.8793 and v4.1062.
Jos
Can confirm this works indeed. I'am using V4.10717 without authentication.
Thanks
Re: Domoticz app 2.0
Posted: Thursday 07 May 2020 20:10
by galadril
It looks like 0.2.215 is available in the app store.. that should solve the issue with older systems that still have Login page enabled.
It also fixes issues that people have when you switch users on the same device
I've also pushed another fix (0.2.216) that fixes issues where people can enable/disable devices (due to the empty authorization)
Im taking a little break now..
has been a rollercoaster.. Think i got most topics covered in the 0.2.216 release now
Re: Domoticz app 2.0
Posted: Thursday 07 May 2020 21:36
by Darsh
galadril wrote: ↑Thursday 07 May 2020 16:09I've created a new version after testing with Darsh > 0.2.215
Thanks, the new version fixes the issue, the app is now successfully connecting.
Thanks for fixing it!
Darsh
Re: Domoticz app 2.0
Posted: Friday 08 May 2020 2:05
by Alain
I have installed 0.2.215 and everything works. I don't know, however, if it's the updated version or the workaround that was mentioned above, by placing an empty file named "logincheck" in the www-directory. Afetr doing that it worked again and now I'm not game to remove it.
Thanks for your quick response today/yesterday though. As a developer, it's highly commendable.
Re: Domoticz app 2.0
Posted: Friday 08 May 2020 7:57
by galadril
If there is any issue after v0.2.216, and your sure that you've set Login Page as the authorization method with a username and password, and you still have issues.
Please create a user for me with rights to toggle one switch on your system and send the details to
[email protected]?
Ill try to debug the issue then asap...
The only authorization that isnt working anymore should be Basic Auth, as gizmo is going to remove that from Domoticz.
Re: Domoticz app 2.0
Posted: Friday 08 May 2020 9:19
by galadril
By the help of Marcel, I found out that there were multiple implementation of the logincheck (Login page security) in the past:
The latest (2020):
POST /logincheck (credentials in the body, not in the url)
Previous versions around 4.1***
GET /logincheck (credentials in the body, not in the url)
I've made both versions work with the mobile app in the last v0.2.216 version of the app.
BUT really old versions (around v3.8730) do a different call
Get on /json.htm?type=command¶m=logincheck&username=%username%&password=%password%
As you can see the endpoint is different and the username/password are in the query parameters instead of the call body.
Im not going to rewrite this, sorry. Its less secure then in the body, but its also way different then the first 2 calls.
So its going to make the app code way more dirty for all those old versions.
So i hope that this clears my struggle with all the different versions and different versions of the logincheck api.
I also hope that all the persons that gave my apps a 1-star rating because of this see that Im willing to help and assist as good as possible.. and would change their rating/review on the app.
Im also not going to distribute old apks because of the old Domoticz system. It's a hassle for me to find out who can have premium build, who have lite builds, send all the apks.. and ofcourse they could just host a premium apk somewhere. I don't think that any app developer walks that way of apk distribution!
So overall, I'm really getting a nasty feeling on this update.. I've tried to make the app as good as possible ui/auth/backend wise and added new premium features.... I'm already building this apps for 4 years now, and I keep them always uptodate with the latest Android versions.
But this issue with all the old servers / 1000 emails, most nice emails, but some really rude ... / I received like 60 1-star on rating because of this update..
Re: Domoticz app 2.0
Posted: Friday 08 May 2020 10:08
by sammyke007
Damn galadril... Please don't let this demotivate you. It's a very nice looking app with great (!) features. Maybe in the future add this info (older versions probably not supported anymore) in the changelog. I guess however that you didn't see this coming. But the 1-star people will never stop being that short of sight. Searching for this forum on Google and getting to this post is very easy. You helped a LOT of people out the last days and I don't think that there are a lot of people who didn't get it fixed again. Domoticz is all about try and error. Why be mad about bugs? Isn't this why we are all into Domoticz / scripting / ...? If you don't like this, you should buy the very expensive home controllers and even then you will sometimes walk into bugs...
Keep up the good work and thanks a lot for all of your effort!
EDIT: maybe a sticky / first post edit with the latest possible options / solutions in bold?
Re: Domoticz app 2.0
Posted: Friday 08 May 2020 10:11
by galadril
sammyke007 wrote: ↑Friday 08 May 2020 10:08
Keep up the good work and thanks a lot for all of your effort!
Thanks
sammyke007 wrote: ↑Friday 08 May 2020 10:08
EDIT: maybe a sticky / first post edit with the latest possible options / solutions in bold?
I allready made your issue on the github page sticky, and ill also look at this forum topic indeed
Re: Domoticz app 2.0
Posted: Friday 08 May 2020 11:31
by jvdz
galadril wrote: ↑Friday 08 May 2020 9:19
So overall, I'm really getting a nasty feeling on this update.. I've tried to make the app as good as possible ui/auth/backend wise and added new premium features.... I'm already building this apps for 4 years now, and I keep them always uptodate with the latest Android versions.
But this issue with all the old servers / 1000 emails, most nice emails, but some really rude ... / I received like 60 1-star on rating because of this update..
Yea, that is the internet for you.... people feel often the need to simply demand shit instead of getting into a normal dialog.
As a suggestion: You could totally skip the security calls in the app when the userid and passwords fields are empty to avoid the needs for an empty file as I did. Either way it works fine for me as I simply use a VPN when being offside for security and don't care too much about security when connected to the LAN.
Thanks again for you efforts and am still happy user of your app!
Jos
Re: Domoticz app 2.0
Posted: Friday 08 May 2020 11:52
by galadril
New version is coming with a fix on the use of session cookies:
0.2.218 (7420)
This should fix also some connection issues that some user encountered
Re: Domoticz app 2.0
Posted: Friday 08 May 2020 12:29
by jvdz
I was a little premature in stating all is fine.
The APP connects fine to both systems and does display the status for the switches and updates to them, but it doesn't send an On or Off command at all to the Domoticz system when I press the switch buttons.
I've check this with a packet capture of the traffic from my mobile to/from the Domoticz RPI.
Any idea what to look for?
sideloaded v2.202 lite does work fine.... and will try to test the 0.2.213 & 0.2.214 now
Jos
Re: Domoticz app 2.0
Posted: Friday 08 May 2020 12:34
by galadril
jvdz wrote: ↑Friday 08 May 2020 12:29
I was a little premature in stating all is fine.
The APP connects fine to both systems and does display the status for the switches and updates to them, but it doesn't send an On or Off command at all
Its probably because the app couldn't find your rights level (default 0).
But are you using the latest mobile app without the logincheck file?
maybe the new coming version is also the fix for you 0.2.218
Re: Domoticz app 2.0
Posted: Friday 08 May 2020 12:43
by jvdz
galadril wrote: ↑Friday 08 May 2020 12:34
Its probably because the app couldn't find your rights level (default 0).
But are you using the latest mobile app without the logincheck file?
Yes ... removed both empty logincheck files, but I do not see a call to it anyways, only this format:
Request, GET /json.htm, Query:type=command¶m=logincheck&username=&password=d41d8cd98f00b204e9800998ecf8427e
while the APP settings are http/8080 and userid & password fields empty.
galadril wrote: ↑Friday 08 May 2020 12:34
maybe the new coming version is also the fix for you 0.2.218
Just updated and that does indeed fix it!
I see the call to logoncheck is now totally skipped with my settings... sweet.
(that is still there)
Thanks man!
Jos
Re: Domoticz app 2.0
Posted: Friday 08 May 2020 12:52
by galadril
jvdz wrote: ↑Friday 08 May 2020 12:43
Just updated and that does indeed fix it!
I see the call to logoncheck is now totally skipped with my settings... sweet.
Thanks man!
Great you can remove the logincheck file then as well