Raspberry freezes on main.js execution

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
Pawel Stavros
Posts: 3
Joined: 15 Jun 2018 16:43

Raspberry freezes on main.js execution

Post by Pawel Stavros »

Hi everyone,

I have a Raspberry Pi Model B+, with Raspbian stretch image on it (18-04-2018 version).
On it, I have installed a RaZberry device and I remember that I had several issues with the z-way installation (v2.3.7) that were resolved and everything is OK. I found that there is a relevant topic that contains info about the installation but I didn't follow these guides (https://forum.z-wave.me/viewtopic.php?f=3419&t=28787).
I have installed the same image in 5 different raspberry devices connected to the same number and type of sensors. The only issue that I found is that every 2-3 days (sometimes even hours) the Raspberry freezes. I cannot connect to it through SSH and even if I connect a screen and a keyboard a cannot do anything. The only solution is to unplug-plug the Raspberry in order to reboot it. I noticed in the z-way-server log file that every time the Raspberry freezes the following logs appear. According to my understanding, the main.js file is executed and somehow this leads to the Raspberry freezing. I thought that this file is executed whenever the z-way server starts. Does the z-way server try to somehow restart? Does anyone else have a similar issue? I will try the patch that is mentioned in the link above, but I wanted to check if anyone else had similar issues


[2018-06-15 09:34:13.106] [core] Executing script: /*** Z-Way Home Automation Engine main executable ***************************** ...
[2018-06-15 09:34:13.116] [core] Executing script: // Comon utilities and functions ...
[2018-06-15 09:34:13.134] [core] Executing script: // This script transforms old formats to new ...
[2018-06-15 09:34:17.400] [core] Executing script: /*! EventEmitter2 https://github.com/hij1nx/EventEmitter2 Copyright (c) 2013 hij1nx Licensed under the MIT license.*/ ...
[2018-06-15 09:34:17.458] [core] Executing script: // Underscore.js 1.8.3 ...
[2018-06-15 09:34:17.516] [core] Executing script: /*! Papa Parse v4.1.2 https://github.com/mholt/PapaParse */ ...
[2018-06-15 09:34:17.559] [core] Executing script: /* @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ ...
[2018-06-15 09:34:17.588] [core] Executing script: // BAOS_API_2011_01_29_001 ...
[2018-06-15 09:34:17.595] [core] Executing script: // Converts IntelHex into binary 128 kB file ...
[2018-06-15 09:34:17.603] [core] Executing script: // Public domain version of Base64 encoder/decoder found somewhere in the Internet ...
[2018-06-15 09:34:17.619] [I] [core] Executing script: //--------------------------------------------------------------------- ...
[2018-06-15 09:34:17.646] [I] [core] Executing script: /* ...
[2018-06-15 09:34:17.658] [I] [core] Executing script: /*** Z-Way HA Virtual Device base class *************************************** ...
[2018-06-15 09:34:17.668] [I] [core] Executing script: /*** Z-Way DevicesCollection class ************************************ ...
[2018-06-15 09:34:17.701] [I] [core] Executing script: /*** Z-Way HA Controller class module ***************************************** ...
[2018-06-15 09:34:17.717] [I] [core] Executing script: /*** Automation Webserver Auth Controller ************************************* ...
[2018-06-15 09:34:17.721] [I] [core] Executing script: /*** Z-Way HA Automation module base class ************************************ ...
[2018-06-15 09:34:17.724] [I] [core] Executing script: /*** Initialize Webserver and Handlers ***************************************** ...
[2018-06-15 09:34:17.734] [I] [core] Executing script: /*** ZAutomationAPI Web Request Handler ***************************************** ...
[2018-06-15 09:34:17.756] [I] [core] Executing script: /*** ZAutomationAPI Provider ************************************************** ...
[2018-06-15 09:34:17.762] [I] [core] Executing script: // Make this testable by pulling in underscore from the parent module ...
[2018-06-15 09:34:17.778] [I] [core] Executing script: /*** Main Automation storage module ***************************************** ...
[2018-06-15 09:34:17.795] [I] [core] --- Loading ZAutomation classes
[2018-06-15 09:34:18.890] [I] [core] Starting ZWay Automation webserver
[2018-06-15 09:34:18.939] [I] [core] Loading modules...
[2018-06-15 09:34:18.947] [I] [core] Loading module Cron from modules/Cron
[2018-06-15 09:34:18.958] [I] [core] Executing script: /*** Cron ZAutomation module ************************************************** ...
[2018-06-15 09:34:18.972] [I] [core] Instantiating module 2 from class Cron
[2018-06-15 09:34:18.974] [I] [core] --- Starting module System Clock (CRON)
[2018-06-15 09:34:19.189] [I] [core] Loading module ZWave from modules/ZWave
[2018-06-15 09:34:20.476] [I] [core] Executing script: /*** Z-Wave Binding module ******************************************************** ...
[2018-06-15 09:34:20.502] [I] [core] Instantiating module 1 from class ZWave
[2018-06-15 09:34:20.506] [I] [core] --- Starting module Z-Wave Network Access
[2018-06-15 09:34:25.454] [D] [zway] SETDATA controller.data = Empty
.............
.............
...........
Pawel Stavros
Posts: 3
Joined: 15 Jun 2018 16:43

Re: Raspberry freezes on main.js execution

Post by Pawel Stavros »

After digging more into the problem I found that somehow the z-way-server has issues after several hours and tries to reboot. While rebooting (don't know still why) the rpi hangs and stops responding.
Is this z-way server rebooting happens to everyone, or there is something at my setup that creates the issue? I have implemented another application
that uses z-way api and makes http requests to the z-way-server quite regularly. Maybe this is the cause of the z-way reboot? I have tried the same setup on v2.3.6 and it was quite stable
apica
Posts: 15
Joined: 19 Oct 2017 12:46

Re: Raspberry freezes on main.js execution

Post by apica »

Hi Pawel. I also have different installations with v2.3.6 and v2.3.7 working for few days-weeks, and I observed a similar problem in both scenarios even thought I couldn't dig into it. I can't assure they are the same cases. I first want to delay ZWay execution until NTP service updates the time at boot, to ensure correct dates.
Post Reply