Home solar infrastructure (with Peimar Inverter) monitoring based on Raspberry Pi 3 B+ using Grafana, InfluxDB, Custom Python Collector and Shelly EM.

Overview

raspberry-solar-mon

Home solar infrastructure (with Peimar Inverter) monitoring based on Raspberry Pi 3 B+ using Grafana, InfluxDB, Custom Python Collector and Shelly EM.

My solar infrastructure:

My monitoring system:

  • Shelly EM + 120A Clamp to measure the electrical consumption of my house
  • Raspberry Pi 3 B+ with Raspbian OS
  • Grafana 7.5.5
  • InfluxDB 1.8.5
  • Telegraf 1.18.2
  • Custom python multithread collector for get metrics from Peimar Inverter and Shelly EM (compliant with Python 3)

Inverter Peimar, Shelly EM and Raspberry are connected to wifi network of my house.

EMDev1 EMDev2 Inverter1 Inverter2 EM Analysis1 Analysis2 Analysis3 Analysis4 Trend

Environment installation

  • Install Raspbian OS on your Raspberry Pi 3 B+
  • Install Grafana, InfluxDB and Telegraf on your Raspbian and enable services to starting automatically at system boot.
  • Install Python 3.7 if it's missing on your system.

InfluxDB configuration

  • Login via SSH with username pi.

  • Add to .bashrc of the user pi the following alias: alias influx='influx -precision rfc3339'

  • Reload .bashrc with the following command: source .bashrc

  • Copy configuration file influxdb.conf from repository folder influxdb to /etc/influxdb/ path of your installation.

  • Edit file influxdb.conf and disable authetication in [http] section: auth-enabled = false

  • Restart service and launch influxdb client with following command: influx

  • Create databases and users with grants:

    CREATE DATABASE peimar
    CREATE DATABASE telegraf

    CREATE USER admin WITH PASSWORD p4ssw0rd WITH ALL PRIVILEGES
    CREATE USER peimar WITH PASSWORD p31m4r
    CREATE USER telegraf WITH PASSWORD t3l3gr4f

    GRANT ALL ON peimar TO peimar
    GRANT ALL ON telegraf TO telegraf

    CREATE RETENTION POLICY "one_month" ON "telegraf" DURATION 4w REPLICATION 1
    CREATE RETENTION POLICY "ten_years" ON "peimar" DURATION 520w REPLICATION 1

    ALTER RETENTION POLICY "one_month" ON "telegraf" DURATION 4w REPLICATION 1 DEFAULT
    ALTER RETENTION POLICY "ten_years" ON "peimar" DURATION 520w REPLICATION 1 DEFAULT

  • Edit file influxdb.conf and enable authetication in [http] section: auth-enabled = true

  • Restart InfluxDB service: sudo systemctl restart influxdb.service

The database peimar contains the metrics of the Inverter and Shelly EM.
The database telegraf contains the metrics of Raspberry Pi and weather forecast from OpenWeather.

Telegraf configuration

  • Copy configuration file telegraf.conf from repository folder telegraf to /etc/telegraf/ path of your installation.
  • Copy configuration file openweather.conf from repository folder telegraf/telegraf.d to /etc/telegraf/telegraf.d path of your installation.
  • Register your account on OpenWeather, then insert infrastructure location and your id in openweather.conf.
  • Restart Telegraf service: sudo systemctl restart telegraf.service

Python collector configuration

  • Copy folder peimar from repository folder python_collector to /usr/lib/python3.7 path in your installation.

  • Copy folder shelly from repository folder python_collector to /usr/lib/python3.7 path in your installation.

  • Install python module for connection to Influx databases: sudo pip install influxdb

  • Copy all files from repository folder init.d to /etc/init.d path in your installation.

  • Make the script peimar-inverter in the init.d directory executable by changing its permission: sudo chmod +x peimar-inverter

  • Make the script shelly-em in the init.d directory executable by changing its permission: sudo chmod +x shelly-em

  • Create folder peimar in /var/log path of your installation (owner: pi, group: pi).

  • Create folder shellyem in /var/log path of your installation (owner: pi, group: pi).

  • Enable all daemons at boot system:

    sudo update-rc.d peimar-inverter defaults
    sudo update-rc.d shelly-em defaults

  • Change the IPs of the Inverter and Shelly EM to those of your network in the config.py files:

    /usr/lib/python3.7/peimar/inverter/config.py
    /usr/lib/python3.7/shelly/emeter/config.py

  • Change timezone of your infrastructure in config.py file of peimar daemon:

    timezone = pytz.timezone("Europe/Rome")

  • Reboot system.

For the management of daemons:
/etc/init.d/peimar-inverter {start|stop|forcekill|status|restart|reload}
/etc/init.d/shelly-em {start|stop|forcekill|status|restart|reload}

Grafana configuration

  • Copy configuration file grafana.ini from repository folder grafana to /etc/grafana/ path of your installation.

  • Copy image file how_solar_power_works.png from repository folder grafana/images to /usr/share/grafana/public/img path of your installation.

  • Install Grafana plugins grafana-clock-panel and larona-epict-panel with following command:

    sudo grafana-cli plugins install grafana-clock-panel
    sudo grafana-cli plugins install larona-epict-panel
    cd /var/lib/grafana/plugins/
    sudo chown -R grafana:grafana grafana-clock-panel
    sudo chown -R grafana:grafana larona-epict-panel

  • Restart Grafana service: sudo systemctl restart grafana-server.service

  • Import all dashboards from repository folder grafana/dashboards.

Owner
cislow
cislow
Simples Keylogger para Windows com um autoboot implementado no sistema

MKW Keylogger Keylogger simples para Windos com um autoboot implementado no sistema, o malware irá capturar pressionamentos de tecla e armazená-lo em

3 Jul 03, 2021
Python information display framework aimed at e-ink devices

My display, using a Raspberry Pi Zero W and Waveshare 6" e-paper hat infodisplay Modular information display framework aimed at e-ink devices. Built u

Niek Blankers 3 Apr 08, 2022
Simple Microservice to control 433Mhz wireless sockets over HTTP, e.g. on a RaspberryPi

REST-light is a simple microservice to control 433Mhz wireless sockets over HTTP, e.g. on a RaspberryPi. The main usage is an easy integration of 433M

Pascal Höhnel 1 Jan 09, 2022
Mini Pupper - Open-Source,ROS Robot Dog Kit

Mini Pupper - Open-Source,ROS Robot Dog Kit

MangDang 747 Dec 28, 2022
Software framework to enable agile robotic assembly applications.

ConnTact Software framework to enable agile robotic assembly applications. (Connect + Tactile) Overview Installation Development of framework was done

Southwest Research Institute Robotics 29 Dec 01, 2022
Various programs in Atari BASIC for #FujiNet for Atari 8-bit

FujiNet Various programs in Atari BASIC for #FujiNet for Atari 8-bit FujiNet-3D Tic Tac Toe In 1978, Scott Adams wrote a 3-D Tic Tac Toe game, for pla

Kay Savetz 2 Jan 01, 2022
CPU benchmark by calculating Pi, powered by Python3

cpu-benchmark Info: CPU benchmark by calculating Pi, powered by Python 3. Algorithm The program calculates pi with an accuracy of 10,000 decimal place

Alex Dedyura 20 Jan 03, 2023
♟️ QR Code display for P4wnP1 (SSH, VNC, any text / URL)

♟️ Display QR Codes on P4wnP1 (p4wnsolo-qr) 🟢 QR Code display for P4wnP1 w/OLED (SSH, VNC, P4wnP1 WebGUI, any text / URL / exfiltrated data) Note: Th

PawnSolo 4 Dec 19, 2022
Final-project-robokeeper created by GitHub Classroom

RoboKeeper! Jonny Bosnich, Joshua Cho, Lio Liang, Marco Morales, Cody Nichoson Demonstration Videos Grabbing the paddle: https://youtu.be/N0HPvFNHrTw

Cody Nichoson 1 Dec 12, 2021
Modeling and Simulation of Satellite Servicing Manipulators

Modeling and Simulation of Satellite Servicing Manipulators Final Project for the course ENPM662: Introduction to Robot Modeling (Fall 2021). This pro

Adarsh M 1 Jan 24, 2022
An arduino/ESP project that can play back G-Force data previously recorded

An arduino/ESP project that can play back G-Force data previously recorded

7 Apr 12, 2022
Home solar infrastructure (with Peimar Inverter) monitoring based on Raspberry Pi 3 B+ using Grafana, InfluxDB, Custom Python Collector and Shelly EM.

raspberry-solar-mon Home solar infrastructure (with Peimar Inverter) monitoring based on Raspberry Pi 3 B+ using Grafana, InfluxDB, Custom Python Coll

cislow 10 Dec 23, 2022
Python library to manipulate Ingenico mobile payment device like iCT220 or iWL220 equipped with Telium Manager. RS232/USB.

Python library to manipulate Ingenico mobile payment device like iCT220 or iWL220 equipped with Telium Manager. RS232/USB.

TAHRI Ahmed R. 72 Dec 24, 2022
Classes and functions for animated text and graphics on an LED display

LEDarcade A collection of classes and functions for animated text and graphics on an Adafruit LED Matrix.

datagod 31 Jan 04, 2023
Example code and projects for FeatherS2 and FeatherS2 Neo

FeatherS2 & FeatherS2 Neo This repo is a collection of code, firmware, and files

Unexpected Maker 5 Jan 01, 2023
Control the lights of Alienware computers under GNU/Linux systems.

Before requesting support please consider that this software is not actively developed. I created it in 2014 for managing my Alienware M14X-R1 (where

rsm 111 Dec 05, 2022
Intel Realsense t265 into Unreal Engine

t265_UE Intel Realsense t265 into Unreal Engine. Windows only, and Livelink plugin is 4.26.2 only at the moment. Might recompile it for different vers

Bjarke Aagaard 30 Jan 02, 2023
Designed and coded a password manager in Python with Arduino integration

Designed and coded a password manager in Python with Arduino integration. The Program uses a master user to login, and stores account data such as usernames and passwords to the master user. While lo

Noah Colbourne 1 Jan 16, 2022
Automatically draw a KiCad schematic for a circuit prototyped on a breadboard.

Schematic-o-matic Schematic-o-matic automatically draws a KiCad schematic for a circuit prototyped on a breadboard. How It Works The first step in the

Nick Bild 22 Oct 11, 2022
ROS2 nodes for Waveshare Alphabot2-Pi mobile robot.

ROS2 for Waveshare Alphabot2-Pi This repo contains ROS2 packages for the Waveshare Alphabot2-Pi mobile robot: alphabot2: it contains the nodes used to

Michele Rizzo 2 Oct 11, 2022