UI Bug: ZDDX compatibility

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
graycrow
Posts: 18
Joined: 09 Jan 2013 00:08

UI Bug: ZDDX compatibility

Post by graycrow »

I have a few Fibaro devices in my setup: double relay switches FGS-221 and universal dimmer FGD-211. By exploring Z-way source code I found that it uses pepper1.net Z-wave database. I checked it and found that DB contains updated xml files (newer versions) for devices I'm using: FGS-221 v 1.9. and FGD-211 1.9 (filenames are 353-010f-0200-0109-03-03-2a-01-09.xml and 354-010f-0100-0109-03-03-2a-01-09.xml). Also I found that Z-way has a script called UpdateXMLs.sh for update ZDDX DB and I updated a local DB. After restarting Z-way server I been able to select this device description records for my devices, it even selected them automatically.

After this I started to experience this bug on desktop browsers: UI hangs out with spinning loader and "Sorry, server has not completely started yet. Try realoding the interface later" dialog box. Further investigation showed that error occurs in getDataUpdate function in $.postJSON call when $.ajax parsing data returned by /ZWaveAPI/Data/Timestamp URL. The resulting JSON is so huge and it contains content of that XML files I mentioned before, so jQuery can't parse it and it returns status code "parsererror" instead of "success" into handlerDataUpdate function, and because of this handlerDataUpdate does nothing. I'v checked returned JSON data, and it looks fine, except huge portions on XML in a few "ZDDXML" and "ZDDXMLLang" fields (for each of Fibaro devices). I think that that XML inclusion is causing that parsing error in window.JSON.parse function.

I've checked this issue in Google Chrome 27.0.1423.0 dev-m and Firefox 20 (w7 x64) and they both have this parsing problem. At the same time, which is surprising, Safari in my iPad 1 with iOS 5.1.1 works fine - no problem, no parsing error with exactly the same code which causes the problem in "big" browsers.
So, using iPad, I can assign older description records for that devices (v 1.1) and then it works fine in all browsers. But I want to use xml file which is describes my devices better. I tried to replace jQuery by newer versions (up to 1.8.3) but it doesn't help, looks like all of them calling native browser window.JSON.parse function.

Any suggestions?
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Interresting finding! May be

Post by PoltoS »

Interresting finding! May be some wrong character is used in XML files. We will have a look. Can you reproduce it with one single ZDDX choosen (FGD-211 v1.9)? Or many of them need to be selected to experience the problem?
graycrow
Posts: 18
Joined: 09 Jan 2013 00:08

Each file is broken.

Post by graycrow »

Only one file needed for this problem to appear, but it doesn't matter which one. Both files causing it: FGD-211 v1.9 or FGS-221 v 1.9 - even if only one file is selected - problem appears.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

The problem was caused by the

Post by PoltoS »

The problem was caused by the presence of "tab" character in the XMLs. Unfortunatelly Chrome JSON do not like such files.

The problem was fixed on the P1 DB. Please go to /opt/z-way/erver/ZDDDX/ and run python ./UpdateXML.sh to update the base. Or run install script from the site to update it.
mbehnke
Posts: 5
Joined: 08 Jul 2013 17:36

Error

Post by mbehnke »

i tried to get the updates, but:

root@voyage:~# sh /opt/z-way-server/ZDDX/UpdateXMLs.sh
Updating ZDD XML database
Done
python: can't open file './MakeIndex.py': [Errno 2] No such file or directory
Don't forget to run MakeIndex.py manually
root@voyage:~# sh /opt/z-way-server/ZDDX/MakeIndex.py
/opt/z-way-server/ZDDX/MakeIndex.py: 18: import: not found
/opt/z-way-server/ZDDX/MakeIndex.py: 19: import: not found
/opt/z-way-server/ZDDX/MakeIndex.py: 20: import: not found
/opt/z-way-server/ZDDX/MakeIndex.py: 21: import: not found
/opt/z-way-server/ZDDX/MakeIndex.py: 24: Syntax error: "(" unexpected
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Run it using ./UpdateXMLs.sh

Post by PoltoS »

Run it using ./UpdateXMLs.sh from /opt/z-way-server/ZDDX folder.

You seems to run our demo Z-Box. Please write us directly, since no one on forum has even seen it ;)
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Still getting import errors

Post by pz1 »

Still getting these import errors in version 1.4
pi@raspberry /opt/z-way-server/ZDDX $ ./UpdateXMLs.sh
Updating ZDD XML database
Done
Creating index file for ZDDX
Error loading Z-Wave Device Description XML 290-0068-0000-0000-00-02-4e-00-00.xml: list index out of range
Error loading Z-Wave Device Description XML 466-0000-0000-0000-00-00-00-00-00.xml: list index out of range
Error loading Z-Wave Device Description XML 109-0002-0000-0000-00-00-00-00-00.xml: list index out of range
Error loading Z-Wave Device Description XML 440-0000-0000-0000-00-00-00-00-00.xml: list index out of range
Error loading Z-Wave Device Description XML 345-0000-0000-0000-00-00-00-00-00.xml: list index out of range
Error loading Z-Wave Device Description XML 446-0128-0128-0000-00-00-00-00-00.xml: list index out of range
Error loading Z-Wave Device Description XML 409-0123-0000-0000-00-00-00-00-00.xml: list index out of range
Done
Index created
Since 29-12-2016 I am no longer a moderator for this forum
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

This is not a problem. Just

Post by PoltoS »

This is not a problem. Just some records in the ZDDX database have no description (you see zeros in the file name - this is the problem). But these are just ignored in the index.
Post Reply