mydomoticz alternative??

On various Hardware and OS systems: pi / windows / routers / nas, etc
Post Reply
beounet
Posts: 8
Joined: Wednesday 16 November 2016 20:58
Target OS: Raspberry Pi
Domoticz version:
Contact:

mydomoticz alternative??

Post by beounet » Thursday 18 January 2018 17:26

Hi guys!!
I was wonder if it might be possible to use (or make) an alternative proxy application like mydomoticz!

Thanks in advance and sorry for my possible ignorance about proxy staff

blauwebuis
Posts: 310
Joined: Wednesday 21 December 2016 10:11
Target OS: Raspberry Pi
Domoticz version: current
Contact:

Re: mydomoticz alternative??

Post by blauwebuis » Friday 19 January 2018 12:40

I've never used myDomoticz. But I plan to create this:

- Send a codeword SMS to Domoticz (via MySensors)
- Domoticz enables the internet connection between the private network and the wider internet
- Domoticz calls the script below on my public server, telling me what it's IP address is.
- I log into domoticz/my network from outside.
- After an X amount of time the internet is disconnected again.

The simple PHP script:
- call yourdomain/folder/save.php from Domoticz to reveal the IP address.
- visit yourdomain/folder/index.html to see what the IP address is.

<html>
<head>
<title>what is my ip</title>
</head>
<body>
This page should only be called by Domoticz, so that it will store its IP address.
Just visit index.html in this folder to see the IP address of Domoticz.

<?PHP

function getUserIP()
{
$client = @$_SERVER['HTTP_CLIENT_IP'];
$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$remote = $_SERVER['REMOTE_ADDR'];

if(filter_var($client, FILTER_VALIDATE_IP))
{
$ip = $client;
}
elseif(filter_var($forward, FILTER_VALIDATE_IP))
{
$ip = $forward;
}
else
{
$ip = $remote;
}

return $ip;
}


$user_ip = "Domoticz is at" . getUserIP();

echo $user_ip; // Output IP address [Ex: 177.87.193.134]
//file_put_contents("index.html",$user_ip,FILE_APPEND);
file_put_contents("index.html",$user_ip);

?>

</body>
</html>

gerardosamara
Posts: 46
Joined: Sunday 23 October 2016 19:49
Target OS: Raspberry Pi
Domoticz version: 3.8153
Contact:

Re: mydomoticz alternative??

Post by gerardosamara » Sunday 21 January 2018 10:37

Another possible solution would be to create a remote login portal , if you have a paid web hosting service like hostinger.com or a free web hosting service like 000webhost.com for example.
The login portal will call domoticz
Last edited by gerardosamara on Sunday 21 January 2018 11:00, edited 1 time in total.
Domoticz RPi3 V3.8153 + App Android Domoticz Lite V0.1.408 & Imperihome Pro V2.8.4
Zwave+ Z Stick Z90 USB dongle + USB300 Ocean GW dongle + Arduino Serial GW
Smart witch Aeotec DSC24 Gen2

zicht
Posts: 200
Joined: Sunday 11 May 2014 11:09
Target OS: Windows
Domoticz version: 3.8xxx
Location: NL
Contact:

Re: mydomoticz alternative??

Post by zicht » Sunday 21 January 2018 10:57

thinking out loud :
And what about security ?
Online systems are vulnerable and from high value in some circuits.
So any central system is to be expected to get interest from people that are not automation oriented.
A simple redirect based on a detected ip will never be clever in my opinion.
Rpi & Win x64. Using : cam's,Nest,RFXCom,Kaku,LaCrosse,RFY,IsAlive,Dummy,Wether Underground, standard Lua, Curl on windows,Domoticz Android App & Tasker,

"The only source of knowledge is experience (A.Einstein)"

User avatar
EdddieN
Posts: 241
Joined: Wednesday 16 November 2016 12:31
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Scotland
Contact:

Re: mydomoticz alternative??

Post by EdddieN » Tuesday 20 February 2018 19:58

I do not know much about this but what about a MQTT on a server and a remote request for a r-ssh?

Cloud <-> MQTT <-> Domoticz

Request from the cloud to Domoticz to open a r-ssh

I agree an open port to the external world is not nice... but sometimes is the only way.
11101101

Hobbybob
Posts: 113
Joined: Monday 01 May 2017 19:03
Target OS: Raspberry Pi
Domoticz version: Stable
Contact:

Re: mydomoticz alternative??

Post by Hobbybob » Tuesday 20 February 2018 20:03

I installed pivpn and connect to my network through that.

User avatar
EdddieN
Posts: 241
Joined: Wednesday 16 November 2016 12:31
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Scotland
Contact:

Re: mydomoticz alternative??

Post by EdddieN » Tuesday 20 February 2018 20:06

Interesting, so you connect to the Pi from outside by logging into the VPN?
11101101

Hobbybob
Posts: 113
Joined: Monday 01 May 2017 19:03
Target OS: Raspberry Pi
Domoticz version: Stable
Contact:

Re: mydomoticz alternative??

Post by Hobbybob » Tuesday 20 February 2018 20:09

Yes, you can use the official openVPN app on your smartphone.

You have to install it (see www.pivpn.io), and forward one port in your router to the pi. Then you can connect to it, and your internettraffic gets router through your home-network, which means you can control domoticz as if you were at home (webbased interface, domoticz-app, whatever).

User avatar
EdddieN
Posts: 241
Joined: Wednesday 16 November 2016 12:31
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Scotland
Contact:

Re: mydomoticz alternative??

Post by EdddieN » Wednesday 28 February 2018 18:41

11101101

SweetPants
Posts: 1952
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.9476
Location: The Netherlands
Contact:

Re: mydomoticz alternative??

Post by SweetPants » Wednesday 28 February 2018 19:09

Hobbybob wrote:
Tuesday 20 February 2018 20:09
Yes, you can use the official openVPN app on your smartphone.

You have to install it (see www.pivpn.io), and forward one port in your router to the pi. Then you can connect to it, and your internettraffic gets router through your home-network, which means you can control domoticz as if you were at home (webbased interface, domoticz-app, whatever).
I use OpenVPN too with some certificates and it works great both From my laptop and Android Phone (using Domoticz App). Only need to open one port on my firewall (and that is not the default 1194)
Ubuntu 16.04.3 LTS on Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.1.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (from source)

User avatar
EdddieN
Posts: 241
Joined: Wednesday 16 November 2016 12:31
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Scotland
Contact:

Re: mydomoticz alternative??

Post by EdddieN » Wednesday 28 February 2018 19:19

Out of curiosity, does anyone know the architecture of myDomoticz? Is it a reverse proxy as well?
11101101

User avatar
EdwinK
Posts: 1151
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: mydomoticz alternative??

Post by EdwinK » Wednesday 28 February 2018 20:33

Hobbybob wrote:
Tuesday 20 February 2018 20:09
Yes, you can use the official openVPN app on your smartphone.

You have to install it (see www.pivpn.io), and forward one port in your router to the pi. Then you can connect to it, and your internettraffic gets router through your home-network, which means you can control domoticz as if you were at home (webbased interface, domoticz-app, whatever).

n ever got that to work :(
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

SweetPants
Posts: 1952
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.9476
Location: The Netherlands
Contact:

Re: mydomoticz alternative??

Post by SweetPants » Wednesday 28 February 2018 21:10

EdwinK wrote:
Wednesday 28 February 2018 20:33
n ever got that to work :(
There are several tutorials on the internet you can use. I terminate the tunnel on a Raspberry PI3 used as an Internet router with iptables firewall. My GUI firewall frontend is FW Builder.
Ubuntu 16.04.3 LTS on Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.1.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (from source)

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests