Closed borpin closed 8 years ago
Ok so I have solved it; I think. Line 54 ('function repeating') should be before line 41 so it reads a new status every time.
Not sure that does fix it.
I've made that change on both a node.js v5 based Windows system and a node v0.12 based system on a Raspberry Pi. It works on the Windows install but not on the Pi.
Please ignore that last post. As suggested in the forum, moving the require into the "repeating" function fixes the issue and moving the function to after node.indexes = [];
and before if (n.deviceinfo){
makes it all work.
Making the require dependent on the version of node using process.version
would fix the Promise dependency for everyone. Not sure when Promises were introduced though, was it v4?
Problem was that the promises where resolved and the functions are not called again. Promises are now newly created for every call. Can you check with the new version?
Checked and now working thanks.
I have the node running (by adding in var Promise = require("bluebird"); at the top and installing bluebird) but the status does not change as the plug is switched on and off (either manually or by the app). If I redeploy the flows it updates to the latest status but then does not change again if the plug is switched.