andig / pimatic-fritz

Pimatic plugin for Fritz!Box SmartHome and FritzDect!200 Node
GNU General Public License v2.0
8 stars 6 forks source link

error [pimatic]: rule heizung-aus error executing an action: Cannot call method 'then' of undefined #18

Closed cm86 closed 8 years ago

cm86 commented 8 years ago

If I want to set the temperature in control on a certain level, I get an error message. The Message Log can be seen, however, that it sets the temperature. Here then by: debug [pimatic-fritz]: setTempTarget http://fritz.box, xxxxxxx, xxxxxxx

The error message via the Message Log

error [pimatic]: rule heizung-an error executing an action: Cannot call method 'then' of undefined

debug [pimatic]: TypeError: Cannot call method 'then' of undefined at HeatingThermostatSetpointActionHandler._doExecuteAction (/home/pi/pimatic-app/node_modules/pimatic/lib/actions.coffee:1007:46) at HeatingThermostatSetpointActionHandler._doExecuteAction (/home/pi/pimatic-app/node_modules/pimatic/lib/actions.coffee:1:1) at /home/pi/pimatic-app/node_modules/pimatic/lib/actions.coffee:1017:17 at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/util.js:26:23) at Promise._settlePromiseFromHandler (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/promise.js:507:31) at Promise._settlePromiseAt (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/promise.js:581:18) at Promise._settlePromises (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/promise.js:697:14) at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/async.js:123:16) at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/async.js:133:10) at Async.drainQueues (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/async.js:15:14) at process._tickCallback (node.js:415:13)

error [pimatic]: Error on evaluation of rule condition of rule heizung-an: Cannot call method 'then' of undefined

debug [pimatic]: TypeError: Cannot call method 'then' of undefined at HeatingThermostatSetpointActionHandler._doExecuteAction (/home/pi/pimatic-app/node_modules/pimatic/lib/actions.coffee:1007:46) at HeatingThermostatSetpointActionHandler._doExecuteAction (/home/pi/pimatic-app/node_modules/pimatic/lib/actions.coffee:1:1) at /home/pi/pimatic-app/node_modules/pimatic/lib/actions.coffee:1017:17 at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/util.js:26:23) at Promise._settlePromiseFromHandler (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/promise.js:507:31) at Promise._settlePromiseAt (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/promise.js:581:18) at Promise._settlePromises (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/promise.js:697:14) at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/async.js:123:16) at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/async.js:133:10) at Async.drainQueues (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/async.js:15:14) at process._tickCallback (node.js:415:13)

and by:

debug [pimatic-fritz]: getSwitchState http://fritz.box, xxxxxxx, xxxxxxx

it sets the temperature returns to the preset value.

andig commented 8 years ago

Should be fixed: https://github.com/andig/pimatic-fritz/commit/1a804db97f177437a67d3e6c673a9096e6155800