Skip to content

Tools for monitoring an SDM630 3 phase meter and reporting output to PVoutput

License

Notifications You must be signed in to change notification settings

ruddj/sdm630-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sdm630-report

Tools for monitoring an SDM630 3 phase meter and reporting output to PVoutput

Main C code is from Mario Stuetz in thread 123solar Eastron SDM630 DC

Current Features

  • Reads current values over MODBUS from a Eastron SDM630 digital meter and exports to an ini file
  • Uploads data to PVOutput for analyses and graphing
  • Can download weather data to include in upload

Requirements

  • Eastron SDM630 DC installed in main switchboard
  • USB to RS485 adaptor.
    • I used a USB to RS485 TTL Serial Converter Adapter FTDI interface FT232RL 75176 Module S
  • Or a TCP-RS485 e.g. Q14870 USR-TCP232-304 or Q00194 USR-TCP232-24
  • sdm630-usb requires ModBus Libraries
  • Scripts are written in Python3
  • Python3 script for PVOutput requires requests

Installation

  1. If installing on Raspberry Pi, I suggest using a ram disk for storage to prevent wear on SD card. The downside to a ram disk is you will lose data if power is lost or Pi is rebooted before upload occurs.

    1. Create a tmp directory mount point for RAM disk

      sudo mkdir /var/tmp
    2. Add the following to bottom of /etc/fstab

      tmpfs /var/tmp tmpfs nodev,nosuid,size=1M 0 0
      
    3. Mount the RAM disk to create it

      sudo mount /var/tmp
  2. Install libraries for modbus

    sudo aptitude install libmodbus-dev libmodbus5

    Compile with

    gcc sdm630-usb.c -o sdm630 `pkg-config --cflags --libs libmodbus`
  3. Copy files

    sudo mkdir /opt/sdm630
    sudo cp config/sdm630.conf /etc/
    sudo cp import/* /opt/sdm630/
    sudo cp output/* /opt/sdm630/
  4. Edit /etc/sdm630.conf config file

    • Add your PVOutput API Key and System ID.
    • If you are not a PVOutput donor make sure you set PVextend to false.
    • Enter Weather Underground API and Station ID.

Crontab entries

Edit cron files using crontab -e

*/5 *   *   *   *    /opt/sdm630/sdm630-poll.sh
3-59/5 *   *   *   *    /opt/sdm630/pvoutput.py
2-59/5 *   *   *   *    /opt/sdm630/downloadWeather.sh

TODO

  • SNMP extension to allow data collection by Cacti or other SNMP tools

About

Tools for monitoring an SDM630 3 phase meter and reporting output to PVoutput

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published