I have been struggling a lot to determine the correct values for the connection settings in the app. For instance it took me several hours to discover that Domoticz on the Raspberry Pi has to be restarted after changing the username/password combination. Horryfing but true! (@Gizmocus: are you listening?)
Ok, let's start. Please note that the first setting is for gsm (4G), the next for your local (wifi) network.
When launching the app for the first time it will ask you to grant access to location data. I consider this not neccessary since I don't use geofencing and I don't like the app to go scanning for wifi networks.
Gsm settings:
- 'Server address': enter the external ip address of your internet router.
- Select HTTPS. Do not enter the default port number 443. This introduces possible serious security issues. Instead pick a port outside the well-known ports and registered ports. There are plenty! See also note 1.
- Enter the username/password you have defined in the Domoticz webgui (Setup > Settings > Website Protection).
- 'Directory': leave this empty.
- Mark 'Different server address'
- 'Local wifi SSID's': click 'Add' and enter your own wifi SSID. (Note: this seems to be absolutely neccessary in this app version.)
- 'Local server address': enter the (private) ip address of your Raspberry Pi.
- Select HTTPS and use port 443.
- Enter the same username/password as above unless you have defined on the same page in the Domoticz webgui a private ip address range from where no username/password is needed.
- 'Local directory': leave this empty.
- You have to set in your router the port forwarding rules related to the HTTPS port you have chosen.
- Domoticz on RPi - a change in the Domoticz settings must be confirmed by clicking 'Apply Settings'. See also note 3.
- Domoticz on RPi - weird but true: after changing in the Domoticz webgui the username/password combination and clicking 'Apply Settings' you must restart the Domoticz application on your Raspberry Pi. Otherwise nothing will be changed.
At the same page set 'Authentication' on Basic-Auth. - Domoticz Lite app - I strongly recommend to use a really unique password (not used for any account) as it can easily be read by clicking 'Show password'.
- Domoticz Lite app - after making a change in 'Server connection settings' select always right below 'Fetch server configuration'. Apparently the app will log in anew. If you don't the same error will appear: 'Failed to fetch server config' or 'Oops! Something went wrong Check your settings'.
- Domoticz Lite app - be smart and clear always the cache prior to changing anything in 'Server connection settings'. On Android > Settings > Apps > Domoticz Lite > Storage > Clear cache.
Android: Domoticz Lite V 0.2.202 (7072)
Raspberry Pi: Domoticz 2020.1