Skip to content

Commit

Permalink
Fix write support #6; set version to 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sebilm committed Dec 31, 2021
1 parent ee37a71 commit 4c375ce
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,23 @@ This ioBroker adapter receives data from a Nibe heat pump from Nibe Uplink.

If you (later) get a "400 bad request" error in the log, you must get a new Auth Code - so do numbers 13 until 15 and 18.

## Manage/Write Support

It seems you can only change the parameters listet on the following web page:

https://api.nibeuplink.com/docs/v1/Parameters (Settings section)

The parameter "hot_water_boost" is parameter ID 48132.

You can read other values but I think you can't write other values. Other values are here listed:

https://github.com/sebilm/ioBroker.nibeuplink/blob/master/nibe-fetcher.js#L41

## Changelog

### 1.0.1 - 2021-12-31
* Fix write support #6

### 1.0.0 - 2021-12-30
* Support to manage Nibe heat pump (write support #6)
- You need to run the new version 30 minutes and then get a new AuthCode in the settings to use it!
Expand Down
5 changes: 4 additions & 1 deletion io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"common": {
"name": "nibeuplink",
"version": "1.0.0",
"version": "1.0.1",
"news": {
"1.0.1": {
"en": "Fix write support #6"
},
"1.0.0": {
"en": "Support to manage Nibe heat pump (write support #6)"
},
Expand Down
3 changes: 1 addition & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,8 @@ class NibeUplink extends utils.Adapter {
this.log.debug(`state ${id} changed: ${state.val} (ack = ${state.ack})`);
let obj = await this.getObjectAsync(id);
if (obj && obj.native && obj.native.parameterId && obj.native.deviceUnit) {
const val = obj.native.divideBy ? state.val * obj.native.divideBy : state.val;
let params = {};
params[obj.native.parameterId] = val.toString();
params[obj.native.parameterId] = state.val.toString();
try {
await this.fetcher.setParams(obj.native.deviceUnit, params);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iobroker.nibeuplink",
"version": "1.0.0",
"version": "1.0.1",
"description": "nibeuplink",
"author": {
"name": "Sebastian Haesselbarth",
Expand Down

0 comments on commit 4c375ce

Please sign in to comment.