[SOLVED] "Error handling data from server" after upgrade

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
holzemile
Posts: 36
Joined: 27 Mar 2013 13:37

[SOLVED] "Error handling data from server" after upgrade

Post by holzemile »

I hate it! Everytime I upgrade, something doesn't work...

I just updated to the newest version (2.0.0 I think), and now the expert UI says

Code: Select all

Error handling data from server
Looking through the AJAX requests in Firebug, I found this:

Code: Select all

POST http://192.168.100.181:8083/ZWaveAPI/Data/0 - 404 Not Found
[/color]
So my Script which uses the JSON API doesn't work anymore either, because
"http://192.168.100.181:8083/ZWaveAPI/" just returns 404 Not Found


My z-way-server.log:

Code: Select all

[2015-04-07 15:00:59.489] [I] [core] Executing script: /*** Z-Way Home Automation Engine main executable ***************************** ...
[2015-04-07 15:00:59.637] [I] [core] Executing script: // This script transforms old formats to new ...
[2015-04-07 15:00:59.783] [I] [core] Executing script: ;!function(exports, undefined) { ...
[2015-04-07 15:01:00.003] [I] [core] Executing script: //     Underscore.js 1.6.0 ...
[2015-04-07 15:01:00.216] [I] [core] Executing script: /*** Z-Way HA Virtual Device base class *************************************** ...
[2015-04-07 15:01:00.253] [I] [core] Executing script: /*** Z-Way DevicesCollection class ************************************ ...
[2015-04-07 15:01:00.508] [I] [core] Executing script: /*** Z-Way HA Controller class module ***************************************** ...
[2015-04-07 15:01:00.561] [I] [core] Executing script: /*** Z-Way HA Automation module base class ************************************ ...
[2015-04-07 15:01:00.583] [I] [core] Executing script: /*** Main Automation storage module ***************************************** ...
[2015-04-07 15:01:00.828] [I] [core] Executing script: /*** Main Automation webserver module ***************************************** ...
[2015-04-07 15:01:00.845] [I] [core] Executing script: // Make this testable by pulling in underscore from the parent module ...
[2015-04-07 15:01:00.865] [I] [core] Executing script: /*** Main Automation storage module ***************************************** ...
[2015-04-07 15:01:00.992] [I] [core] --- Loading ZAutomation classes
[2015-04-07 15:01:01.396] [I] [core] Starting ZWay Automation webserver
[2015-04-07 15:01:01.403] [I] [core] Loading modules...
[2015-04-07 15:01:01.440] [I] [core] Loading module YandexProbki from modules/YandexProbki
[2015-04-07 15:01:01.456] [I] [core] Executing script: /*** YandexProbki Z-Way HA module ******************************************* ...
[2015-04-07 15:01:01.492] [I] [core] Loading module LightScene from modules/LightScene
[2015-04-07 15:01:01.497] [I] [core] Executing script: /*** LightScene Z-Way HA module ******************************************* ...
[2015-04-07 15:01:01.515] [I] [core] Loading module OpenRemoteHelpers from modules/OpenRemoteHelpers
[2015-04-07 15:01:01.527] [I] [core] Executing script: /* RaZOR ...
[2015-04-07 15:01:01.530] [I] [core] Loading module CustomUserCode from modules/CustomUserCode
[2015-04-07 15:01:01.539] [I] [core] Executing script:   /*** CustomUserCode ZAutomation module **************************************** ...
[2015-04-07 15:01:01.548] [I] [core] Loading module Cron from modules/Cron
[2015-04-07 15:01:01.560] [I] [core] Executing script: /*** Cron ZAutomation module ************************************************** ...
[2015-04-07 15:01:01.708] [I] [core] Notification: error (core): Failed to load module SensorsPolling because Cron was not instanciated
[2015-04-07 15:01:01.709] [I] [core] Loading module SecurityMode from modules/SecurityMode
[2015-04-07 15:01:01.728] [I] [core] Executing script: /*** SecurityMode Z-Way HA module ******************************************* ...
[2015-04-07 15:01:01.730] [I] [core] Loading module Notification from modules/Notification
[2015-04-07 15:01:01.744] [I] [core] Executing script: /*** Notification Z-Way HA module ******************************************* ...
[2015-04-07 15:01:01.746] [I] [core] Loading module TagOnOff from modules/TagOnOff
[2015-04-07 15:01:01.754] [I] [core] Executing script: /*** TagOnOff Z-Way HA module ******************************************* ...
[2015-04-07 15:01:01.756] [I] [core] Loading module RGB from modules/RGB
[2015-04-07 15:01:01.766] [I] [core] Executing script: /*** RGB Z-Way HA module ******************************************* ...
[2015-04-07 15:01:01.768] [I] [core] Loading module RoundRobinScenes from modules/RoundRobinScenes
[2015-04-07 15:01:01.781] [I] [core] Executing script: /*** RoundRobinScenes Z-Way HA module ******************************************* ...
[2015-04-07 15:01:01.793] [I] [core] Loading module AutoOff from modules/AutoOff
[2015-04-07 15:01:01.798] [I] [core] Executing script: /*** AutoOff Z-Way Home Automation module ************************************* ...
[2015-04-07 15:01:01.800] [I] [core] Loading module HomeKitGate from modules/HomeKitGate
[2015-04-07 15:01:01.817] [I] [core] Executing script: /* ...
[2015-04-07 15:01:01.819] [I] [core] Loading module DelayedScene from modules/DelayedScene
[2015-04-07 15:01:01.834] [I] [core] Executing script: /*** DelayedScene Z-Way HA module ******************************************* ...
[2015-04-07 15:01:01.838] [I] [core] Loading module SensorsPollingLogging from modules/SensorsPollingLogging
[2015-04-07 15:01:01.845] [I] [core] Executing script: /*** SensorsPollingLogging Z-Way HA module ******************************************* ...
[2015-04-07 15:01:01.847] [I] [core] Loading module SensorValueLogging from modules/SensorValueLogging
[2015-04-07 15:01:01.863] [I] [core] Executing script: /*** SensorValueLogging Z-Way Home Automation module ************************************* ...
[2015-04-07 15:01:01.865] [I] [core] Loading module SwitchControlGenerator from modules/SwitchControlGenerator
[2015-04-07 15:01:01.878] [I] [core] Executing script: /*** SwitchControlGenerator Z-Way HA module ******************************************* ...
[2015-04-07 15:01:01.881] [I] [core] Loading module LogicalRules from modules/LogicalRules
[2015-04-07 15:01:01.904] [I] [core] Executing script: /*** LogicalRules Z-Way HA module ******************************************* ...
[2015-04-07 15:01:01.906] [I] [core] Loading module ScheduledScene from modules/ScheduledScene
[2015-04-07 15:01:01.914] [I] [core] Executing script: /*** ScheduledScene Z-Way HA module ******************************************* ...
[2015-04-07 15:01:01.917] [I] [core] Loading module HTTPDevice from modules/HTTPDevice
[2015-04-07 15:01:01.937] [I] [core] Executing script: /*** HTTPDevice Z-Way HA module ******************************************* ...
[2015-04-07 15:01:01.940] [I] [core] Loading module AutoLock from modules/AutoLock
[2015-04-07 15:01:01.952] [I] [core] Executing script: /*** AutoLock Z-Way Home Automation module ************************************* ...
[2015-04-07 15:01:01.954] [I] [core] Loading module SmartLight from modules/SmartLight
[2015-04-07 15:01:01.966] [I] [core] Executing script: /*** SmartLight Z-Way Home Automation module ************************************* ...
[2015-04-07 15:01:01.968] [I] [core] Loading module NotificationSMSru from modules/NotificationSMSru
[2015-04-07 15:01:01.984] [I] [core] Executing script: /*** NotificationSMSru Z-Way HA module ******************************************* ...
[2015-04-07 15:01:01.986] [I] [core] Loading module GroupDevices from modules/GroupDevices
[2015-04-07 15:01:02.001] [I] [core] Executing script: /*** GroupDevices Z-Way HA module ******************************************* ...
[2015-04-07 15:01:02.004] [I] [core] Loading module ImportRemoteHA from modules/ImportRemoteHA
[2015-04-07 15:01:02.020] [I] [core] Executing script: /*** ImportRemoteHA Z-Way HA module ******************************************* ...
[2015-04-07 15:01:02.023] [I] [core] Loading module ZWave from modules/ZWave
[2015-04-07 15:01:02.085] [I] [core] Executing script: /*** Z-Wave Binding module ******************************************************** ...
[2015-04-07 15:01:02.100] [I] [core] Loading module CodeDevice from modules/CodeDevice
[2015-04-07 15:01:02.107] [I] [core] Executing script: /*** CodeDevice Z-Way HA module ******************************************* ...
[2015-04-07 15:01:02.110] [I] [core] Loading module Cron from modules/Cron
[2015-04-07 15:01:02.122] [I] [core] Executing script: /*** Cron ZAutomation module ************************************************** ...
[2015-04-07 15:01:02.125] [I] [core] Loading module ThermostatDevice from modules/ThermostatDevice
[2015-04-07 15:01:02.130] [I] [core] Executing script: /*** ThermostatDevice Z-Way HA module ******************************************* ...
[2015-04-07 15:01:02.143] [I] [core] Loading module Camera from modules/Camera
[2015-04-07 15:01:02.149] [I] [core] Executing script: /*** Camera Z-Way HA module ******************************************* ...
[2015-04-07 15:01:02.192] [I] [core] Loading module OpenWeather from modules/OpenWeather
[2015-04-07 15:01:02.203] [I] [core] Executing script: /*** OpenWeather Z-Way HA module ******************************************* ...
[2015-04-07 15:01:02.213] [I] [core] Loading module BindDevices from modules/BindDevices
[2015-04-07 15:01:02.218] [I] [core] Executing script: /*** BindDevices Z-Way HA module ******************************************* ...
[2015-04-07 15:01:02.220] [I] [core] Loading module Cron from modules/Cron
[2015-04-07 15:01:02.232] [I] [core] Executing script: /*** Cron ZAutomation module ************************************************** ...
[2015-04-07 15:01:02.282] [I] [core] Notification: error (core): Failed to load module BatteryPolling because Cron was not instanciated
[2015-04-07 15:01:02.283] [I] [core] Loading module CustomUserCodeLoader from modules/CustomUserCodeLoader
[2015-04-07 15:01:02.287] [I] [core] Executing script:   /*** CustomUserCodeLoader ZAutomation module **************************************** ...
[2015-04-07 15:01:02.289] [I] [core] Loading module DummyDevice from modules/DummyDevice
[2015-04-07 15:01:02.294] [I] [core] Executing script: /*** DummyDevice Z-Way HA module ******************************************* ...
[2015-04-07 15:01:02.296] [I] [core] Starting automation...
[2015-04-07 15:01:02.400] [I] [core] Starting storage...
[2015-04-07 15:01:02.404] [I] [core] ZWay Automation started
Last edited by holzemile on 07 Apr 2015 20:53, edited 2 times in total.
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: "Error handling data from server" after upgrade

Post by pofs »

Looks like you have lost Z-Wave Binding (configured in HA) for some reason.
Just re-create it, and it will work again.
holzemile
Posts: 36
Joined: 27 Mar 2013 13:37

Re: "Error handling data from server" after upgrade

Post by holzemile »

pofs wrote:Looks like you have lost Z-Wave Binding (configured in HA) for some reason.
Just re-create it, and it will work again.
What's that?
I've never used the HomeAutomation stuff, and in the 'z-way-ha' interface I didn't find a "Z-Wave Binding".

Can you explain what you mean?

EDIT:
I also tried downgrading to v1.7.2, but after doing that (via :8084), I still have the new UI, and the error is still there...
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: [UNSOLVED] "Error handling data from server" after upgra

Post by pofs »

Even if you don't use Home Automation stuff, Z-Wave Binding is created and configured there since version 2.0.

Go to Preferences -> Automation and look for "Z-Wave binding" there. If it is present there, check it is not disabled, and has name "zway" and port "/dev/ttyAMA0" configured.
If it is not there, go to Preferences -> Modules, search for "zwave" and add new "Z-Wave binding" instance there (with settings above).
holzemile
Posts: 36
Joined: 27 Mar 2013 13:37

Re: [UNSOLVED] "Error handling data from server" after upgra

Post by holzemile »

pofs wrote:Even if you don't use Home Automation stuff, Z-Wave Binding is created and configured there since version 2.0.

Go to Preferences -> Automation and look for "Z-Wave binding" there. If it is present there, check it is not disabled, and has name "zway" and port "/dev/ttyAMA0" configured.
If it is not there, go to Preferences -> Modules, search for "zwave" and add new "Z-Wave binding" instance there (with settings above).
Okay, first, my UI looked like this:
http://i.gyazo.com/6bf49928fed79d7c97cfc5a3f679e84d.png
http://i.gyazo.com/5ca444670e2a3c43e3110f34c3106d8b.png

Then I removed the 2 bindings and created a new one:
http://i.gyazo.com/b45ac9c53d5825401c50a6c0a3cfa8c6.png

Now there are some new warnings, and the error is still existent:
http://i.gyazo.com/c2bbf4c9743dc89d6fcedcca303f37a5.png

Code: Select all

Type: z-wave
Timestamp: 7/04/15-15:45
Message:
Can not start Z-Wave binding: Error: Bad data - communication failed
and

Code: Select all

Type: z-wave
Timestamp: 7/04/15-17:41
Message:
Can not start Z-Wave binding: Error: Binding with name 'zway' already exists

I sucessfully downgraded my other 2 pi's by copying the backup folder contents to /opt/z-way-server.
For this one it doesn't work somehow. (Maybe you can help me get v2.0 to work, that would be nice of course)
holzemile
Posts: 36
Joined: 27 Mar 2013 13:37

Re: [UNSOLVED] "Error handling data from server" after upgra

Post by holzemile »

Maybe this helps:

Code: Select all

pi@alarmsys /opt/z-way-server $ ps -ef | grep z-way
root     13546     1  4 17:41 ?        00:00:15 z-way-server
pi@alarmsys /opt/z-way-server $ sudo ls -l /proc/13546/fd
total 0
lr-x------ 1 root root 64 Apr  7 17:46 0 -> /dev/null
l-wx------ 1 root root 64 Apr  7 17:46 1 -> /dev/null
l-wx------ 1 root root 64 Apr  7 17:46 2 -> /dev/null
l-wx------ 1 root root 64 Apr  7 17:46 3 -> /var/log/z-way-server.log
lrwx------ 1 root root 64 Apr  7 17:46 4 -> socket:[34144]
lrwx------ 1 root root 64 Apr  7 17:46 5 -> socket:[32063]
lrwx------ 1 root root 64 Apr  7 17:46 6 -> socket:[34145]
l-wx------ 1 root root 64 Apr  7 17:46 7 -> pipe:[32064]
lr-x------ 1 root root 64 Apr  7 17:46 8 -> pipe:[32065]
lrwx------ 1 root root 64 Apr  7 17:46 9 -> socket:[34146]
it should contain ttyAMA0, right?
this one from version v1.7.2 does:

Code: Select all

pi@alarmsys3 ~ $ sudo ls -l /proc/2145/fd
total 0
lrwx------ 1 root root 64 Apr  7 17:49 0 -> /dev/console
l-wx------ 1 root root 64 Apr  7 17:49 1 -> /dev/null
l-wx------ 1 root root 64 Apr  7 17:49 2 -> /dev/null
l-wx------ 1 root root 64 Apr  7 17:49 3 -> /var/log/Z-Way.log
l-wx------ 1 root root 64 Apr  7 17:49 4 -> /var/log/Z-Way.log
lrwx------ 1 root root 64 Apr  7 17:49 5 -> /dev/ttyAMA0
lrwx------ 1 root root 64 Apr  7 17:49 6 -> socket:[6155]
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: [UNSOLVED] "Error handling data from server" after upgra

Post by pofs »

I suggest you to restart z-way-server service after you re-configured the binding:

Code: Select all

service z-way-server stop
service z-way-server start
holzemile
Posts: 36
Joined: 27 Mar 2013 13:37

Re: [UNSOLVED] "Error handling data from server" after upgra

Post by holzemile »

pofs wrote:I suggest you to restart z-way-server service after you re-configured the binding:

Code: Select all

service z-way-server stop
service z-way-server start
I even rebooted a hundred times...

But your answer here:
viewtopic.php?f=3422&t=21451#p55975
solved the issue ;)
Post Reply