Giter Club home page Giter Club logo

go-vitotrol's Introduction

Package go-vitotrol provides access to the Viessmann™ Vitotrol™ cloud API for controlling/monitoring boilers.

Build Status Coverage Status Go Report Card GoDoc

See https://www.viessmann.com/app_vitodata/VIIWebService-1.16.0.0/iPhoneWebService.asmx

Only requests I really need are currently implemented:

  • Login
  • GetDevices
  • RequestRefreshStatus
  • RequestWriteStatus
  • GetData
  • WriteData
  • RefreshData
  • GetErrorHistory
  • GetTimesheet
  • WriteTimesheetData
  • GetTypeInfo

Any pull-request is welcome.

Install

The vitotrol command

To obtain a vitotrol executable in $GOPATH/bin/ directory if GOPATH environment variable exists or in $HOME/go/bin otherwise:

starting go 1.18

go install github.com/maxatome/go-vitotrol/cmd/vitotrol@master

before go 1.18

go get -u github.com/maxatome/go-vitotrol/cmd/vitotrol

The library

go get -u github.com/maxatome/go-vitotrol

-u became useless since go 1.18.

Example

See cmd/vitotrol/*.go for an example of use.

Executable vitotrol usage follows:

usage: vitotrol [OPTIONS] ACTION [PARAMS]
  -config string
        login+password config file
  -debug
        print debug information
  -device string
        DeviceID, index, DeviceName, DeviceId@LocationID, DeviceName@LocationName (see `devices' action) (default "0")
  -json
        used by `timesheet' action to display timesheets using JSON format
  -login string
        login on vitotrol API
  -password string
        password on vitotrol API
  -verbose
        print verbose information

ACTION & PARAMS can be:
- devices              list all available devices
- list [attrs|timesheets]  list attribute (default) or timesheet names
- get ATTR_NAME ...    get the value of attributes ATTR_NAME, ... on vitodata
                         server
- get all              get all known attributes on vitodata server
- rget ATTR_NAME ...   refresh then get the value of attributes ATTR_NAME, ...
                         on vitodata server
- rget all             refresh than get all known attributes on vitodata server
- bget ATTR_IDX ...    get the value of attributes ATTR_IDX, ... on vitodata
                         server without checking their validity before (for
                         developing purpose)
- rbget ATTR_IDX ...   refresh then get the value of attributes ATTR_IDX, ...
                         on vitodata server without checking their validity
                         before (for developing purpose)
- set ATTR_NAME VALUE  set the value of attribute ATTR_NAME to VALUE
- timesheet TIMESHEET ...
                       get the timesheet TIMESHEET data
- set_timesheet TIMESHEET '{"wday":[{"from":630,"to":2200},...],...}'
                       replace the whole timesheet TIMESHEET
                       wday is either a day (eg. mon) or a range of days
                       (eg. mon-wed or sat-mon)
                       The JSON content can be in a file with the syntax @file
- errors               get the error history
- remote_attrs         list server available attributes
                         (for developing purpose)

The config file is a two lines file containing the LOGIN on the first line and the PASSWORD on the second, and is named $HOME/.vitotrol-api by default (when all --config, --login and --password options are missing or empty):

LOGIN
PASSWORD

License

go-vitotrol is released under the MIT License.

Miscellaneous

Want to automatically feed an Influx database with attribute values? See vitotrol2influx.

go-vitotrol's People

Contributors

dmpolukhin avatar ludoo avatar maxatome avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-vitotrol's Issues

not an issue, merely a request :-)

Hello, nice project here !
I have however a question: in the web interface (https://vitodata100.viessmann.com/VD100/Service/Overview.aspx), I succeed to get the fuel consumption for my heating device, with which I make a graph - but currently, I need to manually go to the web portal-. Your application seems to work with my system (for instance, I can retrieve temperature data, etc.) but some other parameters seem to be absent from the API. How comes ? Is the web portal using a different API ? Is it then possible to adapt your tool ?
Here is the parameters I get (sorry, in French, but quite readable). I put before "=>" the parameters I identified as recognised by your tool. It also seems that only one circuit is taken into account (I have 2 heating circuits on the same heater, A1 and M2):
-Chaudière-
OutdoorTemp => Température extérieure 10 °C
BoilerTemp => Temp. chaudière 41 °C
Consigne de temp. chaudière 37,2 °C
InternalPumpStatus => POMPE INTERNE Marche
BurnerState => BRULEUR allure 1 Arrêt
Brûleur allure 2 Arrêt
BurnerHoursRun => Heures fonctionnement brûleur all.1 6385,21 Heures
Heures fonctionnement brûleur all.2 791,48 Heures
BurnerStarts => Démarrages du brûleur 40074
Conso. combustible (litres ou m³) 8896,449 Liter
-Circuit de chauffage A1-
Mode de fonct. actuel A1M1 Mode normal
Inversion externe du mode de fonct. A1M1 Arrêt
HeatNormalTemp => Consigne de temp. amb. marche normale A1M1 19 °C
Température de départ A1M1 41 °C
HeatingPumpStatus => Pompe de circuit de chauffage A1M1 Marche
PartyMode => Régime réceptions A1M1 Arrêt
Régime éco. A1M1 Arrêt
IndoorTemp => Température ambiante A1M1 21,1 °C
FrostProtectionStatus => Risque de gel du circuit de chauffage A1M1 Inactif
HolidaysStatus => Programme vacances A1M1 Inactif
HolidaysStart => Jour départ en vacances A1M1 01/01/1970
HolidaysEnd => Jour retour de vacances A1M1 01/01/1970
Pente courbe de chauffe A1 1,2
Parallèle courbe de chauffe A1 0 K
-Circuit de chauffage M2-
Mode de fonct. actuel M2 Mode normal
Inversion externe mode de fonct. M2 Arrêt
Consigne de temp. amb. marche normale M2 21 °C
Température de départ M2 29,5 °C
POMPE CC M2 Marche
Régime réceptions M2 Arrêt
Régime éco. M2 Arrêt
Température ambiante M2 21,1 °C
Risque de gel du circuit de chauffage M2 Inactif
Programme vacances M2 Inactif
Jour départ en vacances M2 01/01/1970
Jour retour de vacances M2 01/01/1970
Pente courbe de chauffe M2 0,6
Parallèle courbe de chauffe M2 0 K
-Eau chaude-
Production d’ECS Charge inactive
HotWaterTemp => Température ECS sonde de charge sonde confort 47,6 °C
Pompe charge ECS Arrêt
Flow-switch Arrêt
Pompe de bouclage Marche

Do you think it is possible to access the missing parameters ?

Thank you beforehand,
Michel

Bug with "Unbloat cmd/vitotrol/main.go by introducing actions"

Hi,

I'm using your amazing tool in order to push temperature into my influxdb/grafana stack. But, in your last release, I can't run actions.go
/usr/local/go/bin/go run /home/maitrey0da/dev/go-workdir/actions.go -login foo -password bar rget IndoorTemp OutdoorTemp command-line-arguments ./actions.go:36: undefined: Options ./actions.go:52: undefined: Options

Can you help me or review the readme ?

Thanks

No devices

Hi,
When I run the following command, I have a "no devices" response.

Executing the --debug show me that the Name can be retreived but no devices. What I have done wrong ?

Thanks

$ ./vitotrol --debug devices

2018/08/23 11:41:25 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">soap:Body0Kein Fehler2.5.7.01MynameMyname</soap:Body></soap:Envelope>
2018/08/23 11:41:26 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">soap:Body0Kein Fehler</soap:Body></soap:Envelope>

Cannot set DateTime

Probably a stupid format error on my side, but I can't seem to set DateTime:

vitotrol -verbose set DateTime "2019-05-11 07:22:00"
Working with device VT 200 (HO1A / HO1B)@[id]
*** WriteData failed: Unexpected status 9

Cannot fetch data anymore

Two days ago go-vitotrol stopped working for me. It just hangs on any get command like vitotrol -debug -verbose get BoilerTemp. In web interface and the App everything is fine so it seems like some issue with data access via APIs.

Any ideas how to fix it?

Influxdb database

Hi,

I wrote a (bash) glue to push go-vitotrol data in a influxDB database. InfluxDB share a golang client to write data.

I would like to know if this feature could be integrate go-vitotrol.

Thanks

can't set konf_neigung to non-integer value

I try to set the konf_neigung_rw-0x0b35 to 1.3 but it finally rounds the value (seen by rget) although it prints that the wanted value was successfully set. At the Vitodens-300W I see 1,0 instead of 1,3

pi@rp4b:~ $ /home/pi/go/bin/vitotrol -verbose set konf_neigung_rw-0x0b35 1.3
Working with device VT 200 (HO1C)@75014............
konf_neigung_rw-0x0b35 attribute successfully set to `1.3'
pi@rp4b:~ $ /home/pi/go/bin/vitotrol rget konf_neigung_rw-0x0b35
konf_neigung_rw-0x0b35: 1@2022-10-19 11:21:28 (konf_neigung_rw)

pi@rp4b:~ $ /home/pi/go/bin/vitotrol -verbose set konf_neigung_rw-0x0b35 2
Working with device VT 200 (HO1C)@75014............
konf_neigung_rw-0x0b35 attribute successfully set to `2'
pi@rp4b:~ $ /home/pi/go/bin/vitotrol rget konf_neigung_rw-0x0b35
konf_neigung_rw-0x0b35: 2@2022-10-19 11:22:20 (konf_neigung_rw)

pi@rp4b:~ $ /home/pi/go/bin/vitotrol -verbose set konf_neigung_rw-0x0b35 1
Working with device VT 200 (HO1C)@75014............
konf_neigung_rw-0x0b35 attribute successfully set to `1'
pi@rp4b:~ $ /home/pi/go/bin/vitotrol rget konf_neigung_rw-0x0b35
konf_neigung_rw-0x0b35: 1@2022-10-19 11:23:03 (konf_neigung_rw)

Nice

I am about to buy a boiler from this company.
Did you try talking to the controller they sale so you don't have to use their web service ?

Install fail

There seems to be a new install process. The documented
go get -u github.com/maxatome/go-vitotrol
does not work under windows 10:

> go get -u github.com/maxatome/go-vitotrol
go: go.mod file not found in current directory or any parent directory.
        'go get' is no longer supported outside a module.
        To build and install a command, use 'go install' with a version,
        like 'go install example.com/cmd@latest'
        For more information, see https://golang.org/doc/go-get-install-deprecation
        or run 'go help get' or 'go help install'.```

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.