Skip to content

Python Script to read RESOL VBUS Data over LAN and store in MySQL database

License

Notifications You must be signed in to change notification settings

EdwinGH/resol-vbus-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

resol-vbus-python-mysql

Python Script to read RESOL VBUS Data over LAN and write to MySQL database

Based on the resol-vbus-python script from rellit (https://github.com/rellit/resol-vbus-python) Added MySQL writing, changed for Python3

Usage (use: resol_mysql.py --help)

resol_mysql.py [-h] [-l LOG] [-f LOGFILE] [-i INTERVAL] [-o [OUTPUT ...]] [-systime {Y,N}] [-s SERVER] [-d DATABASE] [-u USER] [-p PASSWORD]
  -h, --help            show this help message and exit
  -l LOG, --log LOG     Logging level, can be 'none', 'info', 'warning', 'debug', default='none'
  -f LOGFILE, --logfile LOGFILE
                        Logging output, can be 'stdout', or filename with path, default='stdout'
  -i INTERVAL, --interval INTERVAL
                        Output frequency in seconds, default=30
  -o [OUTPUT ...], --output [OUTPUT ...]
                        Output mode(s), can be 'screen', 'mysql', or multiple. Default='screen'
  -systime {Y,N}, --systemtime {Y,N}
                        Use system-time instead of ReSol controller-time, default='N'
  -s SERVER, --server SERVER
                        MySQL server or socket path, default='localhost'
  -d DATABASE, --database DATABASE
                        MySQL database name, default='solar'
  -u USER, --user USER  MySQL user, default='root'
  -p PASSWORD, --password PASSWORD
                        MySQL user password, default='password'

Settings

Some config is needed in order to run this script:

  1. IP and port of DataLogger/VBUS_to_LAN Adapter in config.py

  2. Number of unique messages to wait for in config.py we need this, cause VBUS sends data in an not predictable way. To receive a full output, it is neccessary to know, how many different messages are expected. Don't choose a too high number, this will cause the script to run forever. Just find out by try'n'error

  3. The spec File to use in config.py
    Spec files are the dictionary to parse VBUS Messages. They are provided in XML by RESOL as part of the RSC (Resol Service Center) download. Just download, install (on linux use wine, it will work) and get the required file for your installation from: {Install_dir}/eclipse/plugins/de.resol.servicecenter.vbus.resol_2.0.0/

    Provided specs are in XML format. to convert you can use http://www.utilities-online.info/xmltojson Also, if the "mask" entry (json files in spec dir) should be missing, you need to set that for your system. The correct mask setting can be found here: https://danielwippermann.github.io/resol-vbus/vbus-packets.html

Debug

You can enable extensive debugging on the command line.

About

Python Script to read RESOL VBUS Data over LAN and store in MySQL database

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%