Android app doesn't work anymore...

Moderator: leecollings

Post Reply
Johndomo
Posts: 30
Joined: Sunday 10 January 2016 17:16
Target OS: Windows
Domoticz version:
Contact:

Android app doesn't work anymore...

Post by Johndomo »

Hi,

I need some help here. My Android phones doesn't work anymore via 4G.
I just noticed this a few days ago (it used to work fine), and after that I updated to the latest stable version of Domoticz (2020.2) and OS Buster.
But without success. Domoticz on itself is working fine when operated locally.
Another thing that has been replaced a few weeks ago, is my (Ziggo) router. I think I set it up correctly..

This is what I did:
In domoticz, Setup>Settings>Remote Shared Port set to port xxxx.
In my router, I forwarded this port xxxx to the internal IP address of my Raspberry, on which Domoticz runs.
I did a port check on xxxx and it is reported as "open"
So, do I forget something?

Any suggestions are welcome!
Thanks
John
User avatar
FireWizard
Posts: 1765
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Android app doesn't work anymore...

Post by FireWizard »

Hi,

@Johndomo
This is what I did:
In domoticz, Setup>Settings>Remote Shared Port set to port xxxx.
In my router, I forwarded this port xxxx to the internal IP address of my Raspberry, on which Domoticz runs.
I did a port check on xxxx and it is reported as "open"
So, do I forget something?
Remote Shared Port is intended to use with Domoticz Master/Slave. So in this case you have two devices, on which Domoticz has been installed and the Slave and Master devices communicate with each other. Particular "hardware" connected to the Slave is reported on the "Master"as well.

Screenshot_RemoteSharedPort.png
Screenshot_RemoteSharedPort.png (50.36 KiB) Viewed 2882 times

You should leave the port to 6144, unless you are sure that you want to change it.

If you want to access your Domoticz device, you have to forward port 8080 (for http) in the router to port 8080 of your Domoticz device.
If you want to use https, you have to forward port 443 to port 443 of the Domoticz device.
This assumes, that you use the default ports. (8080 and 443). Of course you can also forward port 80 to 8080 of the Domoticz device.

If you are not sure, log-in into your Domoticz device and issue the command:

Code: Select all

cat /etc/init.d/domoticz.sh|grep www
WARNING: Secure your Domoticz with a hard to guess password.

Regards
Johndomo
Posts: 30
Joined: Sunday 10 January 2016 17:16
Target OS: Windows
Domoticz version:
Contact:

Re: Android app doesn't work anymore...

Post by Johndomo »

Hi FireWizard,

Many thanks for your information. So my assumption about the Remote Shared Port was wrong.
But now I have a new problem. The cat command makes clear that port 443 is set as https variant, but that port is already forwarded to my Synology NAS. So, should I enter another port number in Domoticz.sh and forward that port to the IP of the raspberry?

Thx, John
HvdW
Posts: 528
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Android app doesn't work anymore...

Post by HvdW »

May I give you some unsolicited advice.
- Set domoticz to passwordless access from within your local network
- do not forward any port directly to your domoticz
- install PiVPN which runs very very reliable with WireGuard
- portforward pivpn's port 51820 to your RPI
- when you connect to your RPI through PiVPN you will have a secure tunnel and it is as if your inside your network.
- you will have a secure safe connection to domoticz by going to 192.168.1.1:443 or 192.168.1.1:8080 or whatever your settings are.
Bugs bug me.
User avatar
FireWizard
Posts: 1765
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Android app doesn't work anymore...

Post by FireWizard »

Hello John (@Johndomo),
But now I have a new problem.
No, you have another challenge :) .

No, it is not necessary to change the https port of your Domoticz. You can leave that port to 443.

Suppose you want to use port 8443 as your new port number.
The only thing, you have to do in your router is to forward port 8443 to the IP address of your Domoticz Raspberry Pi, port 443.
All routers can do that.

If you want to have external access to your NAS, you have to call https:// <EXT.IP.ADD.RES> and if you want to access your Domoticz from outside your LAN, you have to call https:// <EXT.IP.ADD.RES>:8443.

Example:

Screenshot_port forwarding.png
Screenshot_port forwarding.png (29.89 KiB) Viewed 2846 times

In your case you fill in at "Lokaal" and "IP-adres", your IP address of the Domoticz Raspberry Pi and at "Poortreeks", you fill in 443
At "Extern", "Poortreeks", you fill in 8443. Protocol "Both".

And of course you have also port (External) 443 to your NAS (also port 443).

Regards
Johndomo
Posts: 30
Joined: Sunday 10 January 2016 17:16
Target OS: Windows
Domoticz version:
Contact:

Re: Android app doesn't work anymore...

Post by Johndomo »

Hi FireWizard,

Many thanks! My challenge has been solved. :D
Looks like you have the same router...

So, one challenge less, still a few to go.
My end goal is to use my voice via Google Assistant to open the garage door when I drive home in the car.
For this, I am trying to get Controlicz operational. Just started, but it isn't working yet.

But that is another challenge...:-)

John
Johndomo
Posts: 30
Joined: Sunday 10 January 2016 17:16
Target OS: Windows
Domoticz version:
Contact:

Re: Android app doesn't work anymore...

Post by Johndomo »

Hi HvdW,

Thanks for your advice. This is certaintly something that I want to test later on, I know that is the safer way to go.
Not sure though If I would like to run the VPN server on the Raspberry or on the NAS.
And I am not sure yet how this would work in combination with Google Assistant?

Thx again,
John
User avatar
FireWizard
Posts: 1765
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Android app doesn't work anymore...

Post by FireWizard »

Hi,

@Johndomo
Looks like you have the same router...
No, I have a different one, I took the picture from Internet and it was the first Ziggo router.
But the principle is for all routers the same.

My end goal is to use my voice via Google Assistant to open the garage door when I drive home in the car.
Is that secure? I own a Google Nest Hub (the small one with display) and sometimes this one reacts out of the blue and tells me she cannot help me. If the result is e.g. that a lamp is switched on, ok, not nice, but it does not much harm, but if she opens the garage, if you are not at home????
To be secure you need more. (Presence detection or something else)

I use Nora (for Node Red) for switching Lights, Thermostats, etc and it works fine.
See: https://www.domoticz.com/forum/viewtopi ... hilit=nora

I fully support @HvdW, as I use OpenVPN as well, to access Domoticz and other device on my internal network.
PiVPN can easely live on the same Raspberry Pi as Domoticz. Highly recommended!

Regards
Johndomo
Posts: 30
Joined: Sunday 10 January 2016 17:16
Target OS: Windows
Domoticz version:
Contact:

Re: Android app doesn't work anymore...

Post by Johndomo »

Maybe not ideally secure, but my garage is not attached to my house, so the risk is limited.

I first tried to use geofencing and combined that with a dummy (activation, safety) switch that I have to set when I start driving home. With one car, this works pretty much ok (>90%), but with the other car it doesn't work at all (< 5%). Not really sure why.

If you use VPN, would you have to connect to that manually, or is your phone always connected to the VPN?

I will have a look at Nora too. See if I understand that...
User avatar
FireWizard
Posts: 1765
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Android app doesn't work anymore...

Post by FireWizard »

@Johndomo

You wrote:
If you use VPN, would you have to connect to that manually, or is your phone always connected to the VPN?
No, when I'm at home my Phone/Tablet/Laptop is connected to my Wifi and so the Local Lan.
Therefore it is recommended to follow @HvdW recommendation to
Set domoticz to passwordless access from within your local network
If I'm away from home and so connected to 3G/4G, I have to activate my VPN client on the device manually.
I have red, somewhere, some time ago, that the app Tasker should be able to automate this process, but I never tried it.
I will have a look at Nora too. See if I understand that...
There are more solutions.
See: https://www.domoticz.com/forum/viewtopi ... ra#p247797

Regards
Last edited by FireWizard on Wednesday 26 August 2020 23:03, edited 1 time in total.
Johndomo
Posts: 30
Joined: Sunday 10 January 2016 17:16
Target OS: Windows
Domoticz version:
Contact:

Re: Android app doesn't work anymore...

Post by Johndomo »

Thanks for your help and explanation!

About
There are more solutions.
See: https://www.domoticz.com/forum/viewtopi ... ra#p247797
Let me start with Controlicz, this is difficult enough... :D
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests