hansworst24 / Ticz

Ticz - Domoticz UWP app
GNU General Public License v2.0
7 stars 5 forks source link

Can't go to connection settings again #9

Closed danreg closed 8 years ago

danreg commented 8 years ago

Hi,

when starting Ticz the first time, a connection view appears. Once you have configured (right or wrong makes no difference) you can't go back to configuration view. A entry in the bottom menu would be nice.

Maybe I will start to contribute to this app soon (Could do german translation, or smaller bugfixes)

hansworst24 commented 8 years ago

@danreg,

I just tested with v1.6 (Store version) as well as latest non-store build on Phone and Desktop. For both scenarios I was succesfully able to use the Back button (hardware back for Phone, Top-left corner back button for Desktop) to go back one setting in the menu.

which platform did you test it on ?

danreg commented 8 years ago

I'm using Windows Mobile 10 on a Lumia 950. I can't get a working connection with ticz. When I try to connect to my domoticz server it only says: Hmm..doesn't work: Unauthorized. Using 192.168.1.31 and Port 8080 with my credentials

Using another domoticz app on windows mobile, with same connection data is working.

Anyway on the next start of the app, I can't get back to the connection dialog. It is only showing an empty screen with no devices/rooms. I can't do anything.

Pressing back button, closes the app

hansworst24 commented 8 years ago

@danreg Are you sure you're using Basic-Auth on Domoticz ? Also please double check that when you type in the username, it doesn't start with a Capital (WinPhone does that automatically)

you can also try (last resort) to add the 192.168.1.* range to the "Local Networks (no username/password)" section in Domoticz, this way it will not require any credentials when you use it on local network

ps : I'll work on the menu thing, in case you had wrong/no IP settings. Indeed you should be able to go back to the server settings :)

hansworst24 commented 8 years ago

@danreg also : could you send me a screenshot of your Lumia 950 once you started the app and nothing happens ? Maybe for some reason a part of the screen has fallen off, there should be a menu button visible ! :)

danreg commented 8 years ago

I'm using th same credentials and ip+port than in the other domoticz windows mobile app, where it is working. So I think the issue must in ticz

Here are the screenshots, after no connection were possible and restarting the app.

wp_ss_20160314_0003 wp_ss_20160314_0001

hansworst24 commented 8 years ago

thanks @danreg , and when you click the hamburger menu (the three stripes), it doesn't open at all ? or remains empty ?

out of curiousity ; which domoticz app are you using that works ? Because I found only 1, and that one didn't allow ME to connect in any way :) Maybe it's an issue related to on what OS Domoticz is running.. ? On what OS is your Domoticz server running ?

hansworst24 commented 8 years ago

I think the issue is two-fold ;

I'll check the second point with an emulator, to see if I can replicate the issue

danreg commented 8 years ago

First Screenshot shows the Hamburger menu after pressing the three stripes Button.

I'm running domoticz on a rpi with raspbian. Currently I'm using this domoticz app https://www.microsoft.com/de-de/store/apps/domoticz/9nblggh16879

U need the enter ip adress starting with http://

hansworst24 commented 8 years ago

@danreg what exact version of Windows runs on your phone ? I test against 10.0.586.0 emulators, and all show the additional menu buttons (the ones you don't see) properly.

Can you test the app on a Windows 10 desktop/laptop, to see if the behaviour is the same ?

ps : got the other app working. Works, but mine is way better (if it works :) :) :)

danreg commented 8 years ago

Could you post a Screenshot of the additional button?

hansworst24 commented 8 years ago

you should see the 4 buttons below in the menu, this is from a unconfigured Ticz on a emulator. The first button brings you back to Settings, the second button reloads everything, the 3rd is the security panel and the 4th is "About". It shouldn't matter if you are connected to Domoticz or not... they should be there :(

buttons

hansworst24 commented 8 years ago

@danreg I assume the screen doesn't help you much further. Were you able to test on a Windows 10 PC ?

danreg commented 8 years ago

Yes I tried it today on my Windows 10 PC, and the 4 symbols are visible. Anyway I get the same error message connecting to domoticz. When I find some time, I could try to debug it, to find the issue

hansworst24 commented 8 years ago

worst case scenario : I can run the debug version out of visual studio against your setup if it's accessible from outside, and you provide a temporary user/password... It's an intruiging issue which I don't understand at all..

danreg commented 8 years ago

wp_ss_20160317_0001

After latest update it looks like this

hansworst24 commented 8 years ago

Good ! Well, bad :) But I now see the small dark line just above the hamburger menu, which indicates that the icons are underneath the hamburger menu bar.... I will need to find a way to detect if the phone has soft-keys or not, and adjust the margin for the main screen accordingly... I also need to be able to reproduce it..... :)

hansworst24 commented 8 years ago

ok... I think I solved the margin thing, at least on a emulator with soft-keys it appears fine now.

Regarding the unautorized message : Any chance that there are funny characters in either the username or password you are using ? ç, or other funny stuff ? If so, maybe you can give me a test user/pass containing those characters, just to see if that causes the problem and I can replicate it here

hansworst24 commented 8 years ago

@danreg

the issue still persists or has it been solved ?

danreg commented 8 years ago

Nope still not working. I had not the time yet to debug it with visual studio. Something has changed in the app. When I press "test connection" it says "Hurray" but on the main screen there is still an error message : "Error loading Domoticz settings (Unauthorized)"

hansworst24 commented 8 years ago

If you want I can debug your setup from here this evening, With a temp user/password you can set. It should be a quick fix....

danreg commented 8 years ago

Sorry for the late answer. I think because of my ISP you can't connect to me from remote. I finally got the visual studio debugging working. Maybe this screenshot could help?

screen This breakpoint is reached when clicking on "test connection"

danreg commented 8 years ago

Oh man! Guess what... I found the reason why it is not working! I hadn't set Website Protection to "Basic auth". After selecting basic auth, ticz is working. https://www.domoticz.com/wiki/Application_Settings#Website_Protection

Do you have any idea why it is not wirking with the other option? (don't know the english option, have it in german, should be something with login page)

hansworst24 commented 8 years ago

grrreat :smile: Happy to hear it is working for you now ! In the latest Ticz releases I mentioned in the Server Settings page that basic-auth should be turned on, as some people overlooked it :smile:

I actualy have never tried to let the Login Page work, as most other tools I've seen that require a login, only work with basic-auth. I therefore presumed that trying to use a Login Page is too troublesome to insert in an App, or maybe not possible at all.

If you connect from remote (WAN), probably it's recommended to use SSL as that adds a level of encryption to it.

I'll close the issue now !