I got a Razberry setup with one door sensor that when is triggered start a custom Java code using the App "Load custom JavaScript code".
Everything was working fine until a couple of days ago , now it's not and I have not touched the configuration at all ( not in the OS not in the wave software I have 2.0.1).
Long story short: the sensor is working and communicating , the web interface dashboard is working and I can see the sensor activating but the Java code is not even launched.
If I go in the smart home web guy -> App -> Load custom JavaScript code and save my code again without even touching it everything seems to work again but...if i restart the raspberry everything is "NOT" working again...
It seems that the module ID 7 cannot be loaded...sometimes ( but not always) I see this error messages, in this case I have just rebooted the raspberry :
Code: Select all
[2015-08-29 11:47:48.419] [I] [core] Loading module HTTPDevice from modules/HTTPDevice
[2015-08-29 11:47:48.423] [I] [core] Executing script: /*** HTTPDevice Z-Way HA module *********************************
********** ...
[2015-08-29 11:47:48.424] [I] [core] Loading module CustomUserCode from modules/CustomUserCode
[2015-08-29 11:47:48.426] [I] [core] Executing script: /*** CustomUserCode ZAutomation module ************************
**************** ...
[2015-08-29 11:47:48.429] [I] [core] Instantiating module 7 from class CustomUserCode
[2015-08-29 11:47:48.430] [I] [core] --- Starting module Load custom JavaScript code
[2015-08-29 11:47:48.434] [I] [core] Executing script: zway.devices[3].instances[0].commandClasses[48].data[1].level.bind(function() { ...
[2015-08-29 11:47:48.466] [E] [core] result: Error: ReferenceError: zway is not defined
at <anonymous>:1:1
at CustomUserCode.init (automation/modules/CustomUserCode/index.js:36:30)
at AutomationController.instantiateModule (automation/classes/AutomationController.js:300:22)
at AutomationController.<anonymous> (automation/classes/AutomationController.js:392:18)
at Array.forEach (native)
at AutomationController.loadModule (automation/classes/AutomationController.js:391:8)
at AutomationController.<anonymous> (automation/classes/AutomationController.js:409:14)
at Array.forEach (native)
at AutomationController.instantiateModules (automation/classes/AutomationController.js:408:46)
at AutomationController.start (automation/classes/AutomationController.js:147:10)
[2015-08-29 11:47:48.480] [I] [core] Notification: error (core): Cannot instantiate module: CustomUserCode: Error: Uncaught ReferenceError: zway is not defined
[2015-08-29 11:47:48.489] [I] [core] Error: Uncaught ReferenceError: zway is not defined
at Error (native)
at CustomUserCode.init (automation/modules/CustomUserCode/index.js:36:30)
at AutomationController.instantiateModule (automation/classes/AutomationController.js:300:22)
at AutomationController.<anonymous> (automation/classes/AutomationController.js:392:18)
at Array.forEach (native)
at AutomationController.loadModule (automation/classes/AutomationController.js:391:8)
at AutomationController.<anonymous> (automation/classes/AutomationController.js:409:14)
at Array.forEach (native)
at AutomationController.instantiateModules (automation/classes/AutomationController.js:408:46)
at AutomationController.start (automation/classes/AutomationController.js:147:10)
Can I restart the App Custom Java Code from the cli?
hope sameone helps!
EDIT: Looking at the logs, I don't know if there is a connection between the "zway is not defined error" and the custom code not working anymore, but I forgot to tell you that in the zway log, from the day when Customcode execution was not working there were no more messages, everything was silent...