Just wanted to thank all those that emailed me and the few that private messaged me here! Itâs amazing all the help youâre all offering! I will hopefully have more time to look at this tonight and/or this weekend. One major difference between our two panels is the zones.htm
file.
UltraSync zones.html
Here is what mine looks like (and this is what my tool currently parses):
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>UltraSync :: Secure Network</title>
<meta name="viewport" content="initial-scale=1.0, width=device-width, maximum-scale = 1.0, minimum-scale = 1.0" />
<script src="/v_ZW_03.02-C/eng_us.js" charset="utf-8"></script>
<link href="/v_ZW_03.02-C/m.css" rel="stylesheet">
<script src="/v_ZW_03.02-C/master.js" charset="utf-8"></script>
<script src="/v_ZW_03.02-C/status.js" charset="utf-8"></script>
</head>
<body onload = "afterLoad();">
<script>
var zoneDisplay = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
var zoneNames = ["Sensor%20No1","Sensor%20No2","Sensor%20No3","Sensor%20No4","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21","%21"];
var zoneSequence = [108,0,2,77,12,100,0,12,0,14,175,91,0,0,0,0,26,0];
var zoneStatus = ["000000000000000000000000","000000000000000000000000","000000000000000000000000","000000000000000000000000","000000000000000000000000","000000000000000000000000","000000000000000000000000","000000000000000000000000","000000000000000000000000","000000000000000000000000","000000000000000000000000","040200000000000000000000","000000000000000000000000","000000000000000000000000","000000000000000000000000","000000000000000000000000","000000000000000000000000","E0F2FFFFFFFFFFFFFFFFFFFF"];
var ismaster = 1;
var isinstaller = 0;
function getSession(){return "158BE52A55BFF0A0";}
...
Comnav zones.htm
Here is what the ones who are getting the JSON error:
<!doctype html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>ComNav :: Secure Network</title>
<meta name="viewport" content="initial-scale=1.0, width=device-width, maximum-scale = 1.0, minimum-scale = 1.0" />
<link href="/v_CN_0.106-j/m.css" rel="stylesheet">
<script src="/v_CN_0.106-j/master.js" charset="utf-8"></script>
<script src="/v_CN_0.106-j/status.js" charset="utf-8"></script>
</head>
<body onload = "afterLoad();">
<script>
var zoneDisplay = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
var zoneStates = new Array("Not Ready", "Tamper", "Trouble","Bypass","Inhibited","Alarm","Low Battery","Supervision Fault"
,"","","","","","");
var zoneNames = new Array("","","","","","","","","","","","","","","","");
var zoneSequence = new Array(27,0,0,0,239,182,0,0,0,0,129,0,0,0);
var zoneStatus = new Array(new Array(0,0),new Array(0,0),new Array(0,0),new Array(0,0),new Array(0,0),new Array(0,0),new Array(0,0),new Array(0,0),new Array(0,0),new Array(0,0),new Array(0,0),new Array(0,0),new Array(0,0),new Array(0,0));
function getSession(){return "87FCE66F5B718C96";}
...
For the non-developers, Iâm just letting you know the problem we will have to solve (and no doubt it will happen) is how to figure out the connection between the 2 very differently presented variables (for the same hardware). Specifically have a look at the zoneSequence
and zoneStatus
variables (see how they differ above). Iâm pretty sure the zoneSequence
is apples to apples to the other (just presented slightly differently). The zoneStatus
is a different ball game though.
I think under the hood, I can use the /v_CN_xx.xx-y/
as a switch. Depending if itâs a CN or a ZW Iâll have to parse these 2 variables differently.
There are other minor differences too which shouldnât have a negative outcome to our goals such as:
- the encodingâŚ
utf-8
vs iso-8859-1
- This is worth keeping in the back of our head as Python v3 (what HA uses) is all
utf-8
. So any special characters that exist in Area/Sensor assignments could cause a crash later on. First round of fixing this Iâm going to ignore this, but to keep in the back of our mind to support all character sets.
- the NX-595 doesnât tell you on the first page if youâre the
installer
and or a master
account.
- At this time, this info is nice to have but not useful for our purposes
seq.json
Some more details Iâd like to have from you all If one of you guys could also log into your NX-595 and use your browsers Network Console (this is part of Chrome/Firefoxâs developer tools) and have a look for a file that repetitively gets updated and requested called seq.json
. I would love for someone to email me or private message me a copy of this too. This file plays an important roll in getting status updates.
status.json
If a sensor getâs tripped in your house, this will be reflected in the seq.json
file. But a request to status.json
is then made to get more details on the change that took place when this happens. So to get a copy of this file, youâll just need to wave your hands in-front of a sensor; or open your front door or something. Iâd really appreciate if someone can provide me a copy of there NX595 hub version of it.