@harry-van-der-wolf said in pimatic@0.9.47:
So again: it would be nice if pimatic could display such an error message and then ignore the value.
Thanks for the clarification on the absence of an error message as you said.
EDIT: Well, actually it does provide error messages!
15:50:03.883 [pimatic] Invalid config of device "sysinfo": Property "#/attributes/10/name" Should have enum cpu,usedMemory,usedMemoryPercent,freeMemory,freeMemoryPercent,processes,temperature,temperatureF,dbSize,diskUsagePercent,systemUptime,wifiSignalLevel,nwThroughputReceived,nwThroughputSent,pimaticRss,pimaticHeapUsed,pimaticHeapTotal,pimaticUptime, was: uptimeDHM in /attributes/10/name
15:50:03.913 [pimatic] Error loading device "sysinfo": name in [
The second message “Error loading device “sysinfo”: name in [”, however, is misleading and it causes the abortion. It is a runtime assertion in the code which I will replace with something more user-friendly and robust Btw, the assertion has been part of plugin code since the early beginnings.
EDIT 2: I also get a runtime exception at the end. I am wondering why this is not shown if the debug mode is disabled. The runtime exception is also misleading as following error in the exception hander chain
Fatal TypeError: Cannot read property 'pimaticUptime' of undefined
at SystemSensor.Device.logAttributeError (C:\Users\marcus\Documents\Devel\PIDEV\node_modules\pimatic\lib\devices.coffee:246:36)
at C:\Users\marcus\Documents\Devel\PIDEV\node_modules\pimatic\lib\devices.coffee:238:14
at tryCatcher (C:\Users\marcus\Documents\Devel\PIDEV\node_modules\pimatic\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\marcus\Documents\Devel\PIDEV\node_modules\pimatic\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (C:\Users\marcus\Documents\Devel\PIDEV\node_modules\pimatic\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (C:\Users\marcus\Documents\Devel\PIDEV\node_modules\pimatic\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (C:\Users\marcus\Documents\Devel\PIDEV\node_modules\pimatic\node_modules\bluebird\js\release\promise.js:689:18)
at Async._drainQueue (C:\Users\marcus\Documents\Devel\PIDEV\node_modules\pimatic\node_modules\bluebird\js\release\async.js:133:16)
at Async._drainQueues (C:\Users\marcus\Documents\Devel\PIDEV\node_modules\pimatic\node_modules\bluebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\marcus\Documents\Devel\PIDEV\node_modules\pimatic\node_modules\bluebird\js\release\async.js:17:14)
at processImmediate [as _immediateCallback] (timers.js:396:17)
Process finished with exit code 2
EDIT 3: https://github.com/pimatic/pimatic-sysinfo/commit/fb3621d48e9cc19c672c38136af6ab71f9f42b0c