I have an app… myIO… It works perfectly on the Sphere Homey Pro… less than 1% CPU usage, with more than 120 device…
But with the new Homey Pro it crashes with the following error if I use more than 2 device:
The app has crashed.
CPU Warning Limit Reached
I can’t do anything… I tried to run in dev mode (homey app run), but I can’t…(the same is working with the old (sphere) homey pro). I got the message:
✖ Error: No Discovery Strategies Available
at HomeyAPIV3Local.discoverBaseUrl (/usr/local/lib/node_modules/homey/node_modules/homey-api/lib/HomeyAPI/HomeyAPIV3.js:215:13)
at /usr/local/lib/node_modules/homey/node_modules/homey-api/lib/HomeyAPI/HomeyAPIV3.js:120:38
at get baseUrl [as baseUrl] (/usr/local/lib/node_modules/homey/node_modules/homey-api/lib/HomeyAPI/HomeyAPIV3.js:125:7)
at HomeyAPIV3Local.call (/usr/local/lib/node_modules/homey/node_modules/homey-api/lib/HomeyAPI/HomeyAPIV3.js:398:32)
at ManagerUsers.__request (/usr/local/lib/node_modules/homey/node_modules/homey-api/lib/HomeyAPI/HomeyAPIV3/Manager.js:306:33)
at ManagerUsers.value (/usr/local/lib/node_modules/homey/node_modules/homey-api/lib/HomeyAPI/HomeyAPIV3/Manager.js:207:38)
at /usr/local/lib/node_modules/homey/node_modules/homey-api/lib/HomeyAPI/HomeyAPIV3.js:514:42
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
How can I make this app work on the new Homey Pro? Why don’t work it?
Did you tried the test version of the app?
Or send a message to the developer of the app?
Take a look at there website if there is something wrong with the app.
All that information is at the bottom of the app page.
on the new homey pro, I add 2 devices, and it uses 10% CPU, and 81,8MB Memory…
on the old (sphere) Homey Pro, I add 125 devices, and the CPU usage is 0.00%, Memory usage is 35,7 MB… with the same app… everything is the same, except the HomePro…
I don’t have any myIO devices so cannot comment on that.
But generally speaking, it looks like for each device you’re creating a 100ms interval to update its capabilities (while the main update loop in app.js only updates every 8 seconds, so I don’t understand the need for 100ms intervals).
Also, you’re “sharing” information between app.js and the individual devices using the Settings manager, which isn’t meant for that. So all the reading and writing to the settings database might be causing issues. Instead, it would be much better to use a standard EventEmitter to pass data around between different parts of your app.
100ms is for fast reacting if the main JSON is changing… It should be anything, but it worked many years ago in this form… The new homey pro has faster CPU, so I don’t think it couse the problem… But I check it… no the problem is not that…
But I found the solution…
var parameters = {
uri: "http://" + address + ":" + http_port + "/empty",
setTimeout: 1000,
json: true,
headers: {
'Authorization': 'Basic ' + Buffer.from(username + ":" + password).toString('base64')
},
insecureHTTPParser: true //I had to add this line, to make work the app with the new Homey Pro
};