Sometimes for convenience or troubleshooting it’s useful to be able to access the emonPi / emonBase remotely e.g from outside the local network.
Port Forwarding / Dynamic DNS
Not recommended, see below for a better option.
Network devices such as an emonPi connected to a local network are secured behind a firewall, often integrated into a router.
The conventional way for obtaining access remotely is to open a port in the firewall and ‘port-forward’ requests to this port to the local emonPi. This method works but is cumbersome and insecure. It’s cumbersome because most users connect to the internet via their ISP using a non-static IP. Therefore the WAN IP address often changes, a dynamic DNS service such as Duck DNS, or noIP can be used to link a dynamic IP to a static domain name, however this is cumbersome to set up and often requires purchasing a domain name, dynamic DNS Subscription and handling the dynamic DNS IP address updates.
The port forwarding method of remote access is also insecure since by default the emonPi uses an insecure http connections, this is not a problem on a secure local network but not recommend for use over the internet.
This is the easiest and most secure method of obtaining remote access (SSH/HTTP) to the emonPi
Dataplicity offers a easy to setup web-service service to enable secure remote access to RaspberryPi devices. The free tier allows free access to a single RaspberryPi device.
Follow these steps to setup Dataplicity on an emonPi
Once logged in put the emonPi into read-write mode using:
2. Create an account with dataplicity.
Copy the Dataplicity installation command.
3. Paste and run the installation command on the emonPi:
Once setup is complete (it will take several minutes) the emonPi will appear in the Dataplicity dashboard:
4. Log in to your account and access your device remotely:
Put the emonPi back into read-only mode using
5. Dataplicity ‘wormhole’ feature can be enabled to enable https access to Emoncms running on the emonPi:
Wormhole create a secure tunnel to the emonPi port 80 http over a https connection.
Tested on emonSD-26Oct17 on 26th Jan 2018
If you encounter any issues using Dataplicity please post on the Community Forum using the