Some days ago the Norwegian (and probably also the Swedish) web pages for Sector Alarm has been totally refactored. The bad news is that the current login code does not work anymore. The good news is that data can be retrieved as json, so no more need to parse html ;). The code can then probably be greatly simplified.
{
"Status": "success",
"Message": "ok",
"LogDetails": [
{
"Time": "/Date(1497956292000)/",
"EventType": "disarmed",
"User": "3",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1497938414000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1497698277000)/",
"EventType": "disarmed",
"User": "1",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1497690532000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1497602048000)/",
"EventType": "disarmed",
"User": "2",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1497595104000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1497377300000)/",
"EventType": "disarmed",
"User": "1",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1497369127000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1497276461000)/",
"EventType": "disarmed",
"User": "1",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1497248538000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1497203733000)/",
"EventType": "disarmed",
"User": "2",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1497085424000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1496991125000)/",
"EventType": "disarmed",
"User": "1",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1496988150000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1496832636000)/",
"EventType": "disarmed",
"User": "Ukjent bruker",
"Channel": "App/Web",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1496832555000)/",
"EventType": "armed",
"User": "Ukjent bruker",
"Channel": "App/Web",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1496319159000)/",
"EventType": "disarmed",
"User": "3",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1496296846000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1496229995000)/",
"EventType": "disarmed",
"User": "3",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1496210549000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1495980289000)/",
"EventType": "disarmed",
"User": "2",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1495703890000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1495387768000)/",
"EventType": "disarmed",
"User": "2",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1495380457000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1495298154000)/",
"EventType": "disarmed",
"User": "2",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1495270547000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1495109779000)/",
"EventType": "disarmed",
"User": "1",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1495099343000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1495099312000)/",
"EventType": "disarmed",
"User": "1",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1495019783000)/",
"EventType": "disarmed",
"User": "3",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1495003916000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1494851141000)/",
"EventType": "disarmed",
"User": "3",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1494829693000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1494245671000)/",
"EventType": "disarmed",
"User": "3",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1494226095000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1494226048000)/",
"EventType": "disarmed",
"User": "2",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1494225965000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1493814356000)/",
"EventType": "disarmed",
"User": "2",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1493790565000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1493722861000)/",
"EventType": "disarmed",
"User": "1",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1493704236000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1493566654000)/",
"EventType": "disarmed",
"User": "2",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1493530722000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1493530614000)/",
"EventType": "disarmed",
"User": "2",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1493530206000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1493530141000)/",
"EventType": "disarmed",
"User": "1",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1493036354000)/",
"EventType": "disarmed",
"User": "3",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1493015573000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
},
{
"Time": "/Date(1492961641000)/",
"EventType": "disarmed",
"User": "2",
"Channel": "",
"LockName": "home.event.disarming"
},
{
"Time": "/Date(1492938798000)/",
"EventType": "armed",
"User": "Panel",
"Channel": "Betjeningspanel",
"LockName": "home.event.arming"
}
]
}