SmartPi Use

Connect the SmartPi following scheme in order to transform your Raspberry Pi into a full functional smart meter:

smartpi_schemata

Please note: The arrow on the current sensor shows the current flow in production direction. If the sensor is applied conversely, consumption appears negative. Turn the sensor or change the value of change_current_direction in the configuration file from 0 to 1.

2016-09-30-beschriftung_smartpi_seite_klein

Connection for split core current sensors

2016-09-30-beschriftung_smartpi_vorne_klein

Connection for voltage measurement

Danger. Please note that only persons with the appropriate training and expertise are allowed to connect the voltage measurement. Work on mains voltage is very dangerous.

All other can change the value of measure_voltage to 0 and set the value voltage manually.

After installation type http://<ipaddress:1080> in your web browser.
You see the startpage with actual values and a linechart of power distribution.

Screenshot of SmartPi webpage

 

Configuration file:

The configuration of the SmartPi is stored in the file /etc/smartpi and looks like the following:

Description:

serial Serial number of SmartPi (will be send in JSON-File)
name Name of SmartPi (will be send in JSON-File)
lat, lng Location (will be send in JSON-File)
[database]
dir, file
Path and location of the integrated rrd database
i2c_device Device of the I2C
shared_dir, shared_file Location of the file for sharing actual values to other processes
power_frequency Frequency of the grid (important for right values)
measure_voltage If it is 1 the voltage will be measured. If it is 0 the SmartPi uses the listed voltage in [voltage]
change_current_direction If the value is 1 the power measurement will be inverted
 ftp_upload If value is 1 ftp upload of csv-file is enabled. If value is 0 the program will do nothing.
ftp_server, ftp_user, ftp_pass Login details from the ftp-server. (for later use)
ftp_path Directory path for the SmartPi csv files. The last directory is the serial number.
[csv]
decimalpoint, timeformat 
Set the decimal separator and timeformat for the csv file.
 port Port of the integrated webserver
 docroot Document root of the integrated webserver
[umts] Huawei E3131 supported
umts 1=active
umts_apn APN 
umts_pin Your PIN
umts_username APN username 
umts_password APN password