Hallo,
danke an Bluefox für diesen Adapter. Nun kann ich auch ohne Cloud-gedöns meine Heizungsthermostate steuern.
Ich habe MAX! Heizungsthermostate Basic mit Fensterkontakten über Scripte gekoppelt. Kein Cube. Kein Wandthermostat.
Verbindung über einem Selbstbau CUL.
Beim Experimentieren mit dem Adapter ist mir aufgefallen, dass das Senden der 'config' und der 'valveConfig' zum Thermostat in einem Absturz des Adapters endet.
Hab daraufhin mal ein bischen am Code gefrickelt. Funktioniert nun einwandfrei.
Hier die diffs der geänderten Dateien. Vielleicht fließt das in einer der nächsten Versionen mit ein.
iobroker.maxcul Version 0.2.3
main.js:
! ````
238c238
< adapter.getForeignState(channel + '.comfortTemperature', function (err, state) {
adapter.getForeignState(channel + '.config.comfortTemperature', function (err, state) {
249c249
< adapter.getForeignState(channel + '.ecoTemperature', function (err, state) {
adapter.getForeignState(channel + '.config.ecoTemperature', function (err, state) {
252c252
< state.val = 21;
state.val = 17;
260c260
< adapter.getForeignState(channel + '.minimumTemperature', function (err, state) {
adapter.getForeignState(channel + '.config.minimumTemperature', function (err, state) {
271c271
< adapter.getForeignState(channel + '.maximumTemperature', function (err, state) {
adapter.getForeignState(channel + '.config.maximumTemperature', function (err, state) {
282c282
< adapter.getForeignState(channel + '.offset', function (err, state) {
adapter.getForeignState(channel + '.config.offset', function (err, state) {
293c293
< adapter.getForeignState(channel + '.windowOpenTime', function (err, state) {
adapter.getForeignState(channel + '.config.windowOpenTime', function (err, state) {
296c296
< state.val = 0;
state.val = 10;
304c304
< adapter.getForeignState(channel + '.windowOpenTemperature', function (err, state) {
adapter.getForeignState(channel + '.config.windowOpenTemperature', function (err, state) {
316,323c316,323
< // comfortTemperature, ecoTemperature, minimumTemperature, maximumTemperature, offset, windowOpenTime, windowOpenTemperature
< if (timers[channel].comfortTemperature !== undefined ||
< timers[channel].ecoTemperature !== undefined ||
< timers[channel].minimumTemperature !== undefined ||
< timers[channel].maximumTemperature !== undefined ||
< timers[channel].offset !== undefined ||
< timers[channel].windowOpenTime !== undefined ||
< timers[channel].windowOpenTemperature !== undefined) {
// boostDuration, boostValvePosition, decalcificationDay, decalcificationHour, maxValveSetting, valveOffset
if (timers[channel].boostDuration !== undefined ||
timers[channel].boostValvePosition !== undefined ||
timers[channel].decalcificationDay !== undefined ||
timers[channel].decalcificationHour !== undefined ||
timers[channel].maxValveSetting !== undefined ||
timers[channel].valveOffset !== undefined) {
327c327
< adapter.getForeignState(channel + '.boostDuration', function (err, state) {
adapter.getForeignState(channel + '.valveConfig.boostDuration', function (err, state) {
330c330
< state.val = 21;
state.val = 5;
338c338
< adapter.getForeignState(channel + '.boostValvePosition', function (err, state) {
adapter.getForeignState(channel + '.valveConfig.boostValvePosition', function (err, state) {
341c341
< state.val = 21;
state.val = 100;
349c349
< adapter.getForeignState(channel + '.decalcificationDay', function (err, state) {
adapter.getForeignState(channel + '.valveConfig.decalcificationDay', function (err, state) {
352c352
< state.val = 4.5;
state.val = 0;
360c360
< adapter.getForeignState(channel + '.decalcificationHour', function (err, state) {
adapter.getForeignState(channel + '.valveConfig.decalcificationHour', function (err, state) {
363c363
< state.val = 30.5;
state.val = 12;
371c371
< adapter.getForeignState(channel + '.maxValveSetting', function (err, state) {
adapter.getForeignState(channel + '.valveConfig.maxValveSetting', function (err, state) {
374c374
< state.val = 0;
state.val = 100;
382c382
< adapter.getForeignState(channel + '.valveOffset', function (err, state) {
adapter.getForeignState(channel + '.valveConfig.valveOffset', function (err, state) {
1231c1231
< adapter.logger.debug("Updating time information for deviceId");
adapter.log.debug("Updating time information for deviceId");
maxcul.js:
>! ````
347c347
< if (boostDuration >= i) {
---
> if (boostDuration <= i) {
373c373
< boost = boost.toString('hex');
---
> boost = boost.toString(16);
376c376
< maxValveSetting = maxValveSetting.toString('hex');
---
> maxValveSetting = maxValveSetting.toString(16);
379c379
< valveOffset = valveOffset.toString('hex');
---
> valveOffset = valveOffset.toString(16);
382c382
< decalc = decalc.toString('hex');
---
> decalc = decalc.toString(16);
384a385,386
> groupId = groupId.toString(16);
> if (groupId.length < 2) groupId = '0' + groupId;
Danke bis denn.
bowao