nikkow / node-red-contrib-tahoma

Node-RED module to control a Somfy Tahoma box (Roller shutters...). Used for home automation flows.
Apache License 2.0
19 stars 11 forks source link

Device list empty #25

Open tpazderka opened 4 years ago

tpazderka commented 4 years ago

Hi! I am using the new version of this plugin (updated from previous version) and I have managed to configure the API properly. But after the upgrade all nodes lost their values and I cannot edit them correctly.

The Site and/or Device is sometimes empty and even if I manage to select a correct device, it doesn't seem to retain the configurations for very long.

The log is full of errors like the one attached.

TypeError: Cannot read property 'context' of null
    at /home/pi/.node-red/node_modules/node-red-contrib-tahoma/dist/nodes/tahoma-config.js:33:71
    at Layer.handle [as handle_request] (/usr/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
    at next (/usr/lib/node_modules/node-red/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/usr/lib/node_modules/node-red/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/usr/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
    at /usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:281:22
    at param (/usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:354:14)
    at param (/usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:365:14)
    at param (/usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:365:14)
    at Function.process_params (/usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:410:3)
(node:29147) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'finished' of undefined
    at /home/pi/.node-red/node_modules/node-red-contrib-tahoma/dist/nodes/tahoma.js:105:42
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:229:7)
(node:29147) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 558)
(node:29147) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:29147) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'finished' of undefined
    at /home/pi/.node-red/node_modules/node-red-contrib-tahoma/dist/nodes/tahoma.js:105:42
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:229:7)
(node:29147) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 559)
jemmail commented 4 years ago

Yesterday (30.03.2020) was the Somfy API totally or partially down.. https://twitter.com/Somfyfr/status/1244733524512575489

maybe just retry today

nikkow commented 4 years ago

Indeed, yesterday the entire Somfy ecosystem was unavailable (even the official app was down). Today, everything seems to be back to normal. Can you please confirm that everything is back to normal on your side, too?

tpazderka commented 4 years ago

OK, thanks for the update. The device list is populated now and the nodes seem to remmember their setting. Will see in the evening when the schedulers are supposed to trigger :)

Will update this tomorrow.

tpazderka commented 4 years ago

OK, had to redo some of the nodes since I probably messed them up during the outage but it now works reliably.

One thing I have noticed is that there is probably no caching? As when I open the node for editing, both lists (site and device) take some time to populate.

nikkow commented 4 years ago

You are right, there is actually no caching. It might be a good improvement for a future release.