Skip to content
StefCoene edited this page Mar 8, 2017 · 25 revisions

Features and other stuff

How it works

  • written in perl
  • daemon that monitors the messages on the bus:
    • all messages are logged in mysql
    • changes are forwarded to openHAB (temperature, buttons, dimmers, relays, counters, ...)
  • basic web interface and command utility line to:
    • scan the bus
    • get status of the connected modules
    • generate openHAB items file
    • put current date and time on the bus
  • web service
    • used by openHAB to poll for the status
    • used by openHAB to put updates on the bus

What works / features:

  • trigger a scan on the bus via commands.pl
  • discover the modules on the bus caused by a scan
  • get a status of the modules and channels, get the name of the channels
  • get status of relays, temperature sensors, dimmers, shutters, counters
  • put date & time on the bus (handy to sync the clock in case of a power failure or daylight saving time)
  • process all messages on the bus and push the changes to openHAB via REST API
    • TODO: make list of what's pushed to openHAB
  • control relays, dimmers shutters
  • control heater mode and/or desired temperature
  • webservice for integration with openHAB or other software
  • generate velbus items file for openHAB
  • auto process the velbus protocol files and extract the needed information

TODO:

  • auto Counter / Button selection for VMB7IN
  • document openHAB graphs and other 'nice to know'
  • document config files
  • list velbus modules + what's working
  • XML output (currently only json)
  • list needed perl modules
  • mysql database export
  • installation script (needed for library include path)
  • openHAB sitemap examples
  • merge information from http://www.docum.org/drupal/content/velbus-software
  • install instructions
  • better logging
  • example command for starting logger.pl

DONE

Bugs

I found some bugs in the code of velbus.

  • The third part of the name of the second blind channel is not correct, it returns the third part of the name of the first channel. There is new firmware for this issue.
  • Channel names are truncated to 15 characters

Documentation

logger.pl

This is the basic daemon that should be running all the time. I run it from screen so it runs in the background, but I can reconnect to the screen session to see what's happening. It monitors the bus and uses the REST API of openHAB to push updates to openHAB.

commands.pl

This is can be used to send commands to the bus. I use it for testing, but it can also used to trigger a scan or send the current date and time to the modules on the bus. Use option -o to see a list of available options.

pdf2txt.pl

This script reads the velbus protocol pdf files and extract all the information regarding the available commands. The result is used by logger.pl to process the velbus messages.

Requirements: what do I need?

  • linux server
  • working velbus setup
  • velserv running: source can be found here or an other server like jvelbusd
  • mysql database
  • apache with perl module
  • openHAB with at least http binding

Install path

The scripts are developed with /data/velserver as install directory. If you want to place the scripts somewhere else, you need to update these files and change all occurrences of /data/velserver:

  • bin/commands.pl
  • bin/logger.pl
  • www/index.pl
  • www/service.pl

Apache config file

The config file etc/apache-velserver.conf must be included in apache so http:///velserver is server from the www directory. If you change the sub directory /velserver, you also have to update the config file etc/openHAB.cfg

Clone this wiki locally