Giter VIP home page Giter VIP logo

viessmann-mqtt's Introduction

viessmann-mqtt

this application is an MQTT gateway for Viessmann heaters mainly writen in Ruby language :

  • that is connected to heater with an USB-TTL adaptator
  • vitalk daemon handle serial IO to Viessman heater, based on P300 protocol
  • we use a modified version of vitalk daemon supporting raw read and write commands
  • an MQTT server is used to handle IO from vitalk and Internet dashboard
  • an sqlite database is used to store heating power, in percent, every minutes

Work-in-progress

  • description of adresses in an .YAML file
  • extend API to support those files.

Dashboards

Android MQTT Dashboard application

Android Dashboard

Cayenne dashboard

Cayenne Dashboard

install

sudo apt-get install ruby ruby-sqlite3 mosquitto mosquitto-clients
sudo gem install mqtt

# add user to dialout group
sudo usermod -aG dialout $(whoami)

sudo mosquitto_passwd -c /etc/mosquitto/passwd user

cat >> /etc/mosquitto/mosquitto.conf << EOF
allow_anonymous false
password_file /etc/mosquitto/passwd

EOF
service mosquitto restart

cd $HOME
git clone https://github.com/mqu/viessmann-mqtt/
cd viessmann-mqtt

usage

all operations are done with viessmann-mqtt bash script wrapper :

# install packages : ruby, sqlite, gems
./viessmann-mqtt sys-install

# download and install vitalk (not mandatory if running on raspbian : vitalk binary is given in package)
./viessmann-mqtt install

# create mandatory directories and database
./viessmann-mqtt init

# start, stop, restart and status
viessmann-mqtt start
viessmann-mqtt status
viessmann-mqtt stop
viessmann-mqtt restart

configuration

  • all parameters are centralised in etc/viessmann-mqtt.yaml ;
  • if you plan to commit some change, you may copy this file to $HOME/.config to avoid publish your private passords.
  • this application can be installed in your HOME directory or any place under your drive : it will try to work and locate scripts and libraries.

software architecture

Android Dashboard

  • 1 : viessmann-mqtt-gateway.rb handle IO from vitalk and publish data to MQTT software bus
  • 2 : viessmann-mqtt-sub.rb handle publish to MQTT server and send commands to vitalk and heater
  • 3 : viessmann-power-sqlite.rb store power heater every minutes in sqlite database
  • 4 : viessmann-mqtt-sub-cayenne-gw.rb receive publish commands
  • 5 : requests from Internet clients (Cayenne, Mqtt-Dashboard or any)

misc :

  • some time, USB device get disconnected from linux kernel : monitor-usb-device.rb will monitor thoses disconnections and restart every tasks with viessmann-mqtt bash script wrapper.

TODO

  • complete raw-read wrapper (src/extra/viessmann-tcpclient-raw.rb)
  • experiment Wireless interface based on ESP8266
  • grafana + influxdb monitoring

links

viessmann-mqtt's People

Contributors

leifnel avatar mqu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

viessmann-mqtt's Issues

Cannot start the viessmann-mqtt

Hello there

I installed viessmann-mqtt home folder.
Everything seems to be fine until the point I try to start or see the status of Viessmann Mqtt.

Command is not found?
Is there anything I am missing?

Also, I am not sure, if the init command actually did anything at all.

What I am trying is, I would like to publish temperatures to another already existing mosquitto broker and subscribe to This broker for getting commands to the heater.

Any tips appreciated!

Regards

Scripts viessmann-mqtt-gateway and viessmann-mqtt-sub crash after some hours of utilization

Hello,

Thanks for your piece of software, but I've noticed that after some hour of utilization, I got the following error in viessmann-mqtt-gateway.log

13:35:21 publishing new value : /data/temp/gaz=40
/var/lib/gems/2.3.0/gems/mqtt-0.5.0/lib/mqtt/packet.rb:283:in read_byte': Failed to read byte from socket (MQTT::ProtocolException) from /var/lib/gems/2.3.0/gems/mqtt-0.5.0/lib/mqtt/packet.rb:31:in read'
from /var/lib/gems/2.3.0/gems/mqtt-0.5.0/lib/mqtt/client.rb:481:in receive_packet' from /var/lib/gems/2.3.0/gems/mqtt-0.5.0/lib/mqtt/client.rb:302:in block in connect'

And this one in viessmann-mqtt-sub.log
topic=v1/home/objects/viessman/data/settings/power/mode/1
received v1/home/objects/viessman/data/settings/power/mode=1
on
script exiting ... ; time: 29/05/2018 13:35

Thanks for your help

Regards

Thomas

Addresses for WO1C

You have the pdf with addresses for HO1A
Do you have, or know where to find addresses for WO1C (Air-to-water heatpump)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.