UI Bug: ZDDX compatibility
Posted: 01 Mar 2013 01:11
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?
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?