Dashticz External Access

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
tarmacalastair
Posts: 95
Joined: Wednesday 30 October 2019 14:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Great Britain
Contact:

Dashticz External Access

Post by tarmacalastair »

I've got my Dashticz set up nicely now and decided that I wanted to allow access from outside the home network so I followed the instructions at https://dashticz.readthedocs.io/en/beta ... z-security to password protect Dashticz. I tested access from inside and all seemed fine with Dashticz prompting for a username and password.

I've configured port forwarding on my router as usual but when I tried to access from outside via a mobile phone the browser displays Dashticz v3 is loading... and then the screen goes black and nothing else happens.

Since this, I have reverted my apache2.conf back to how it was so there is no longer any security for Dashticz but still get a black screen when trying to access from outside. I have cleared the browser cache but still nothing.

I wondered if this might be a mobile issue but I get the same result from a relative's house.

For info, my Domoticz has a username and password and I have tried with both Basic-Auth and Login page and get the same result. I have also tried the Dashticz config with and without the user_name and pass_word settings.

Does anyone have any bright ideas please?

Thanks.
Running Domoticz and Dashticz beta on Raspberry Pi OS 32 bit - has anyone had success with 64 bit?

Desktop access from Ubuntu Linux
tarmacalastair
Posts: 95
Joined: Wednesday 30 October 2019 14:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Great Britain
Contact:

Re: Dashticz External Access

Post by tarmacalastair »

Update:
I've removed the authentication for both Domoticz and Dashticz just for testing and still I get the black screen (Dashticz v3 is loading...) when I try to connect to Dashticz from outside.
I have since then changed the IP in CONFIG.js from the internal IP to the external DNS name and external access now works:

Code: Select all

//config['domoticz_ip'] = 'http://192.168.0.15:8082';
config['domoticz_ip'] = 'http://ho*******ly.co.uk:8082';
This seems rather odd to me. I would have expected that once external traffic hits the Dashticz address, the communication between Dashticz and Domoticz would then all be internal but using the internal IP address does not work from outside.

I can cope with using the external address for external use but it does seem rather inefficient, especially as most of my use of Dashticz is internal. I notice that all the example IP addresses in the docs are internal ones (eg. https://dashticz.readthedocs.io/en/beta ... parameters) so I'm wondering if I might be doing something wrong.

Has anyone else seen this issue?

Thanks.
Running Domoticz and Dashticz beta on Raspberry Pi OS 32 bit - has anyone had success with 64 bit?

Desktop access from Ubuntu Linux
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz External Access

Post by Lokonli »

tarmacalastair wrote: Friday 29 November 2019 10:55 Update:
I've removed the authentication for both Domoticz and Dashticz just for testing and still I get the black screen (Dashticz v3 is loading...) when I try to connect to Dashticz from outside.
I have since then changed the IP in CONFIG.js from the internal IP to the external DNS name and external access now works:

Code: Select all

//config['domoticz_ip'] = 'http://192.168.0.15:8082';
config['domoticz_ip'] = 'http://ho*******ly.co.uk:8082';
This seems rather odd to me. I would have expected that once external traffic hits the Dashticz address, the communication between Dashticz and Domoticz would then all be internal but using the internal IP address does not work from outside.

I can cope with using the external address for external use but it does seem rather inefficient, especially as most of my use of Dashticz is internal. I notice that all the example IP addresses in the docs are internal ones (eg. https://dashticz.readthedocs.io/en/beta ... parameters) so I'm wondering if I might be doing something wrong.

Has anyone else seen this issue?

Thanks.
Dashticz runs in your browser. The domoticz connection will go from the browser to the domoticz server. Only for some specific (PHP) functionality the server that runs Dashticz is used.

So that indeed means that if you access Dashticz from an external network you also have to use a Domoticz address in CONFIG.js that is accessible externally.

Until now most users use Dashticz only from their internal network.

However, it should not be too difficult to proxy the requests to Domoticz via the Dashticz server.
Would that have advantages?
Are more people interested in this?
tarmacalastair
Posts: 95
Joined: Wednesday 30 October 2019 14:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Great Britain
Contact:

Re: Dashticz External Access

Post by tarmacalastair »

Aha, thanks for explaining. At least it now makes sense.

I'm sure I can live with using the external address for now at least. Like most, I've been using Dashticz at home but as it's now winter it's useful to be able to switch the heating on or off from outside as well as check news feeds, calendars, etc.

Just a quick question, can I use the config['domoticz_ip'] line twice in CONFIG.js? Will Dashticz use whichever one is available or does it not work like that?

If not, then I'll probably try using the custom directory for internal access and the custom_2 for external.

Thanks again.
Running Domoticz and Dashticz beta on Raspberry Pi OS 32 bit - has anyone had success with 64 bit?

Desktop access from Ubuntu Linux
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz External Access

Post by Lokonli »

tarmacalastair wrote: Friday 29 November 2019 13:48 Aha, thanks for explaining. At least it now makes sense.

I'm sure I can live with using the external address for now at least. Like most, I've been using Dashticz at home but as it's now winter it's useful to be able to switch the heating on or off from outside as well as check news feeds, calendars, etc.

Just a quick question, can I use the config['domoticz_ip'] line twice in CONFIG.js? Will Dashticz use whichever one is available or does it not work like that?

If not, then I'll probably try using the custom directory for internal access and the custom_2 for external.

Thanks again.
Dashticz will use the last one.
lzwfkv
Posts: 37
Joined: Sunday 11 August 2019 16:54
Target OS: -
Domoticz version:
Contact:

Re: Dashticz External Access

Post by lzwfkv »

Lokonli wrote: Friday 29 November 2019 13:29
tarmacalastair wrote: Friday 29 November 2019 10:55 ...
...
However, it should not be too difficult to proxy the requests to Domoticz via the Dashticz server.
Would that have advantages?
Are more people interested in this?
Hi Lokonli, yes i am interested in that proxy Domoticz via Dashticz. It would be great if you coud look into it.
Thank you.
tarmacalastair
Posts: 95
Joined: Wednesday 30 October 2019 14:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Great Britain
Contact:

Re: Dashticz External Access

Post by tarmacalastair »

If you do decide to implement a proxy from Dashticz to Domoticz, for me at least, it would be useful to have any requests proxied from Dashticz. For example, I also have links in Dashticz to other internal servers, eg Logitech LMS, Pi-Hole and other web interfaces that do not work at the moment in Dashticz from outside.

I don't have one myself but I would imagine that people who have web/security cameras on their internal network (and don't want them connected to the internet) would also like to be able to view them from outside via Dashticz.

Thanks.
Running Domoticz and Dashticz beta on Raspberry Pi OS 32 bit - has anyone had success with 64 bit?

Desktop access from Ubuntu Linux
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz External Access

Post by clinkadink »

+1 for this. I too would welcome it. Like Alastair has mentioned, very handy for IP cams. Currently, I have had to open a port, restrict them with credentials and only then can I access them externally.

I don't want to have to open ports for each of my devices I want to access via WAN. Instead, I would much prefer to have a single gateway (Dashticz) with reverse proxies everything else inside it. Not only do I currently have to open my IP cams to the WWW, but also Domoticz (and anything else i've connected). Understandably, my current setup is not as secure as it could be. That said, I am playing with 2FA and Dashticz right now 8-)

Ideally, it would perfect to open one port for accessing Dashticz remotely, and then everything else can be proxied over LAN ... and very securely too ;)

Something like this is ...

Image
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Janco
Posts: 17
Joined: Monday 25 April 2016 10:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz External Access

Post by Janco »

I would also appreciate it if a solution would be found for external access.
Configuring the external Domoticz server address in CONFIG.js is not a very elegant solution and (in my case anyway) and for some reason prevents the graphs from being displayed, both internally and externally (they seem to keep loading eternally).
fargle
Posts: 67
Joined: Tuesday 27 March 2018 17:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz External Access

Post by fargle »

I used an OpenVPN 'tap' connection to do that with self-signed certificates. No port forwarding or firewall rules were needed to transparently bridge the LAN. Everything worked at the remote end, even devices like SIP phones, cameras, samba shares, and Domoticz!. I used pfsense appliances at either end for around a month of of continuous testing, but stopped early after 400 GBytes of traffic from 8 cameras worth of video had gone through, in case our ISP complained.
adeibiza
Posts: 27
Joined: Friday 19 October 2018 18:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz External Access

Post by adeibiza »

hi fargie - could you explain how you installed openvpn to be able to see dashticz externally (i'm currently using remote.it to be able to see domoticz on 8080 remotely but when i try and add dashticz 8082 i get an error screen when the browser loads it (it runs the loading screen but then dashticz barfs trying to connect to domoticz)
fargle
Posts: 67
Joined: Tuesday 27 March 2018 17:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz External Access

Post by fargle »

adeibiza wrote: Monday 26 October 2020 14:19 hi fargie - could you explain how you installed openvpn to be able to see dashticz externally (i'm currently using remote.it to be able to see domoticz on 8080 remotely but when i try and add dashticz 8082 i get an error screen when the browser loads it (it runs the loading screen but then dashticz barfs trying to connect to domoticz)
Hi. Guess you probably want to connect directly using a mobile so this info probably isn't too helpful. :(
It may be possible to set up a tap, (not the normal tun connection) with the OpenVPN client to do this as I suspect that it's the backward and forward routing that's causing your problem.

I actually had a site-to site OpenVPN tunneling various services eg cameras, phones, using a tap, (not a tun) connection.
There's no routing involved in this mode.
Basically the whole Lan is extended to the remote site. I used small pfsense routers at each end. So nothing needed to be done to the clients, they worked transparently as if connected to the local LAN once the VPN was established.

More info here.
https://www.virtualtothecore.com/create ... g-pfsense/
greyser83
Posts: 3
Joined: Thursday 29 October 2020 9:25
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz External Access

Post by greyser83 »

Hallo!
I want to get access to Dashticz from internet. I have static IP and my external address of Domoticz is XX:7777, of Dashticz XX:2222. Having this problem with the web interface. Any ideas to make it work?

Access to XMLHttpRequest at 'http://ХХ:7777/json.htm?type=command&param=getuservariables&plan=0' from origin 'http://ХХ:2222' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
js/domoticz-api.js:89 Domoticz error code: 0 error!
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz External Access

Post by Lokonli »

Are both xx:2222 and xx:7777 accessible from the internet?

I would recommend to setup a VPN connection first.
greyser83
Posts: 3
Joined: Thursday 29 October 2020 9:25
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz External Access

Post by greyser83 »

Lokonli wrote: Thursday 29 October 2020 12:19 Are both xx:2222 and xx:7777 accessible from the internet?

I would recommend to setup a VPN connection first.
Yes, accessible.

VPN is ok, but is there any chance to make it work without VPN?
adeibiza
Posts: 27
Joined: Friday 19 October 2018 18:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz External Access

Post by adeibiza »

if anyone manages to get a system working without opening ports on a router could they do a little simple tutorial on this as i imagine more & more ppl will be needing this :)
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz External Access

Post by Lokonli »

greyser83 wrote:
Lokonli wrote: Thursday 29 October 2020 12:19 Are both xx:2222 and xx:7777 accessible from the internet?

I would recommend to setup a VPN connection first.
Yes, accessible.

VPN is ok, but is there any chance to make it work without VPN?
Yes, it works without VPN as well.
You have to configure domoticz to use basic-auth as authentication method. In CONFIG.js you have to set the correct Domoticz user name and password, and the external Domoticz IP.

Then it will work.

Dashticz itself is not secure. So secure Dashticz as described in the user manual or use VPN.


Sent from my SM-A320FL using Tapatalk

greyser83
Posts: 3
Joined: Thursday 29 October 2020 9:25
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz External Access

Post by greyser83 »

Lokonli wrote: Thursday 29 October 2020 19:18
greyser83 wrote:
Lokonli wrote: Thursday 29 October 2020 12:19 Are both xx:2222 and xx:7777 accessible from the internet?

I would recommend to setup a VPN connection first.
Yes, accessible.

VPN is ok, but is there any chance to make it work without VPN?
Yes, it works without VPN as well.
You have to configure domoticz to use basic-auth as authentication method. In CONFIG.js you have to set the correct Domoticz user name and password, and the external Domoticz IP.

Then it will work.

Dashticz itself is not secure. So secure Dashticz as described in the user manual or use VPN.


Sent from my SM-A320FL using Tapatalk
Thank you. I added my Domoticz login and pass in the web interface and in worked
henrybcn
Posts: 31
Joined: Wednesday 31 August 2016 11:17
Target OS: OS X
Domoticz version:
Contact:

Re: Dashticz External Access

Post by henrybcn »

Hi, what exactly do I have to do it? Just add another confi line on CONFIG.js? I did and get an error when trying to connect :(
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest