Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
191 lines (117 sloc) 8.44 KB
layout title description date sidebar comments sharing footer published
page
1. Connect
Connect to network & create account
2015-03-08 21:36
true
false
true
true
true

« Previous step: Required Hardware

Next step: Install »


{% linkable_title First Boot %}

This guide assumes you are using an emonPi / emonBase pre-built SD card.

This SD card can be purchased from the shop or downloaded:

The emonPi runs the Emoncms data logging web-app locally from emonPi's internal web server. Using Emoncms data can be logged locally to the emonPi's SD card and (optionally) posted remotely to the Emoncms.org cloud server.

Emoncms local: Emoncms instance running locally on the emonPi.
Emoncms remote: Emoncms.org cloud server.

emonPi can be connected to the internet via Ethernet or WiFi, or operate in stand-alone WiFi access point mode.

{% linkable_title 1a. Connect to WiFi %}

emonPi / emonBase purchased before July 2017 do not have the ability to broadcast a setup WiFi access point. For older units please follow '1b' instructions to connect temporary via Ethernet then connect to local WiFi if required.

emonPi WiFi

Note: Please be patient, it can take a number of minutes to start broadcasting an a WiFi AP at startup. The LCD will display WiFi: YES 0% 192.168.42.1 once the WiFi AP is active.

emonpi wiki connect

emonpi-network-wizard1

  • Follow setup wizard to connect to local WiFi network:

Note: If required emonPi can operate in Wifi AP mode without any network connection. If operating in AP mode use of a RTC (real-time-clock) is highly recommended to keep system time.

emonpi-network-wizard2

Please be patient, scanning for networks can take a while

emonpi-network-wizard3

  • After selecting local WiFi network and entering password the emonPi will turn off its own WiFi AP then reboot and try and connect to local WiFi network.

Note: if connection fails e.g. incorrect password, follow instructions 1b to connect temporary via Ethernet and use the Emoncms WiFi setup as detailed in step 4

emonpi-network-wizard4

{% linkable_title 1b. Connect to Ethernet %}

emonPi First Boot Ethernet

  • 1.2A USB power adapter recommended

  • Take care to connect the Ethernet to the socket on the same side as the USB sockets, not the RJ45 connector on the opposite side.

  • The emonPi LCD display will display firmware version then scan for connected sensors. Once the Raspberry Pi has booted up, the LCD will display the IP address of the emonPi on the local network.

  • Ethernet Connected

{% linkable_title 2. Connect to emonPi via local network %}

  • Browsing the hostname will work on some networks: http://emonpi or http://emonpi.local
  • If hostname does not work on your network, enter the IP address shown on the emonPi LCD into your browsers address bar
  • If using an emonBase and hostname does not work, look up its IP address from your router or use the Fing Network Discovery tool on Android and iOS.

{% linkable_title 3. Create local Emoncms user account %}

{% img /images/setup/Emoncms_reg.png 250 %}

  • By default only a single (admin) account can be created on the local emonPi Emoncms. To enable multiple accounts edit Emoncms settings in /var/www/emoncms/settings.php

{% linkable_title 4. Connect to WiFi (optional) %}

**Note: if emonPi has been already connect to local Wifi using network setup wizard (see above) then skip this section.

Connect to Wifi

  1. Wifi config in local Emoncms : Setup > Wi-Fi
  • Network scan should happen automatically.
  1. Check the box to select the network(s) you want to connect to

  2. Enter PSK password

  3. Hit Save and Connect

After a few seconds information should refresh automatically to report Status: Connected and after a few more seconds the IP address should appear.

{% linkable_title Assign static IP (Optional & Advanced) %}

View

If local static IP address is required the easiest way is to allow IP address to be given via DHCP then fix the IP address on the router. Not all routers support this.

<p>Alternatively to set a static IP address on the emonPi itself connect via SSH and edit /etc/network/interfaces. E.g the following commands will SSH into emonPi, create backup of the interfaces file then setup a static IP on Ethernet. For WiFi change eth0 to wlan0.</p>
<pre>
$ ssh pi@192.168.X.X
User: "pi" | Password: "emonpi2016"
$ rpi-rw
$ sudo cp /etc/dhcpcd.conf /etc/backup_dhcpcd.conf
$ sudo nano /etc/dhcpcd.conf
<br>
> Append to the end of dhcpcd.conf (change to suit your network and interface reqiuired static IP): <br>

interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

interface wlan0
static ip_address=192.168.0.200/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
<br>
[CTRL + X] then Y to save and exit nano
$ sudo reboot
</pre>
<a href="http://www.modmypi.com/blog/tutorial-how-to-give-your-raspberry-pi-a-static-ip-address">For more info see Tutorial - How to give your Raspberry Pi a Static IP Address</a>
<p> If required the changes above to dhcpcd.conf can be made by inserting the SD card into a Linux computer and editing the file directly if working offline.</p>

{% linkable_title 5. Connect via 3G GSM (optional) %}

Huawei HiLink 3G USB GSM/3G dongle modems are supported. Connection should be automatic and LCD will display connection status. (Tested with Huawei E3231 and E3131).

{% img /images/setup/3g.jpg 200 %}

GSM Documentation | WiFi Access -point setup (dev)

{% linkable_title 6. Update %}

UPDATE HIGHLY RECOMMENDED: Now your emonPi is connected to a network this would be a good time to pull in any new updates: Setup > Admin > Update

{% linkable_title 6. Shutdown %}

Shut down the emonPi by holding down the shutdown button for 5 seconds, then wait 30 seconds for unit to fully shut down.

{% img /images/setup/emonPi_shutdown.png 200 %}

Unplugging power from the emonPi without following the correct shutdown procedure can result in a corrupted SD card.

The emonPi is now ready to be physically installed and the sensors connected.


Video Guide

<iframe width="560" height="315" src="https://www.youtube.com/embed/77WEj9Q6JEE" frameborder="0" allowfullscreen></iframe>

Next step: Install »