项目作者: danielbayerlein

项目描述 :
📚 API for Vallox ventilation units
高级语言: JavaScript
项目地址: git://github.com/danielbayerlein/vallox-api.git
创建时间: 2018-12-31T19:46:24Z
项目社区:https://github.com/danielbayerlein/vallox-api

开源协议:MIT License

下载


vallox-api

npm version
Actions Status
JavaScript Style Guide
Dependabot Status

API for Vallox ventilation units

Installation

  1. # npm
  2. npm install @danielbayerlein/vallox-api --save
  3. # Yarn
  4. yarn add @danielbayerlein/vallox-api

Usage

new Vallox(object{ip: string, port: int})

Returns the client instance.

  1. import Vallox from '@danielbayerlein/vallox-api'
  2. const client = new Vallox({ ip: '192.168.178.33', port: 80 })

Example

.PROFILES

Returns an object with the profile mapping.

  1. client.PROFILES

Example

.getProfile()

Returns the current profile id.

  1. await client.getProfile()

Example

.fetchMetric(string)

Returns the value of the metric key.

  1. await client.fetchMetric('A_CYC_FAN_SPEED')

Example

.fetchMetrics(array[string])

Returns an array with the values if the metric keys.

  1. await client.fetchMetrics([
  2. 'A_CYC_TEMP_EXHAUST_AIR',
  3. 'A_CYC_TEMP_OUTDOOR_AIR'
  4. ])

Example

.setProfile(int, int)

Sets the profile.

  1. // Permanently AWAY profile
  2. await client.setProfile(client.PROFILES.AWAY)
  3. // FIREPLACE mode for configured timeout
  4. await client.setProfile(client.PROFILES.FIREPLACE)
  5. // FIREPLACE mode for 30 min
  6. await client.setProfile(client.PROFILES.FIREPLACE, 30)

Example

.setValues(object{string: int})

Sets the value for the metric key.

  1. await client.setValues({
  2. 'A_CYC_HOME_SPEED_SETTING': 60
  3. })

Example

Supported units

  • ValloPlus 350 MV
  • ValloPlus 240-E MV
  • Please add your tested unit

Credits

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright (c) 2019-present Daniel Bayerlein. See LICENSE for details.