Connecting the SmartPi to a network

The SmartPi exposes all the RPi connectors, including the Ethernet connector. After cabling the SmartPi to my router it showed up in its DHCP client list; point a browser to port 1080 at this address and the SmartPi user interface appears.

 
The SmartPi sees 230 V on all its inputs even though nothing is connected?

Unfortunately my router is located far away from the electrical switchboard, so Wi-Fi would be handy. How to do this or even if this is possible is not mentioned anywhere. The RPi 3 ships with Wi-Fi, so I decided to configure it over SSH (username and password are mentioned in the manual) and see if it would work.

SmartPi & Wi-Fi

Connect to the SmartPi over SSH with PuTTY (or some other SSH client) and edit the file ‘wpa_supplicant.conf’ using the command
 
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Add the following at the end of the file (replacing mySSID & myPassPhrase by your SSID & your pass phrase):
 
network={
    ssid="mySSID"
    psk="myPassPhrase"
    key_mgmt=WPA-PSK
}
 
Press Ctrl-O followed by the Enter key to save the file, press Ctrl-X to quit the editor. Disconnect the Ethernet cable and reboot the SmartPi. Now it is accessible over Wi-Fi. (Why on earth didn’t they document this?)

Change the SmartPi password

Now that we are busy setting up the RPi, we might as well change the password. To do so is highly recommended by the SmartPi people, but, again, how to do this is not explained. Here is the secret. Launch the SSH client (again) and connect to the SmartPi, then launch the Raspberry Pi configuration tool with:
 
sudo raspi-config

Select ‘Change User Password’ and enter a new password.

Connecting the mains to the SmartPi

Once more, the documentation is not very helpful. How the SmartPi’s inputs correspond to the phases and neutral is neither printed on the SmartPi nor in the manual, but luckily the website has photographs with labelled inputs.

 
If only they had printed these labels on the case...

The evaluation SmartPi came with three current sensors. My home has a single-phase mains network. The switchbox has two groups, and so I put a current sensor on each group. The third sensor was clamped on the wire going to the water heater (in the second group). I connected the three voltage inputs together and wired them to a fuse.