Closed paalkr closed 7 years ago
Thanks @paalkr! I'll look into this as soon as I can.
Just pushed 0.6.0 to master that should work with the new API, please try it out @paalkr
Thanks @the-louie , I will try out the new version later tonight.
Hi. This works as far as I can tell. Thanks for taking time to update the code :)
No problem, I just need to start to use it for real my self so I can spot these problems before you do :)
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.
A request like https://minside.sectoralarm.no/Panel/GetPanelHistory/ will provide a nice json that should be pretty easy to process in python.
Example taken from my system, while logged on in a web browser
A POST request to https://minside.sectoralarm.no/Panel/GetOverview/ with PanelId= will give you another Json with the current status (the same history json object 0), but also a ton of other nice information objects regarding your system. Most interestingly stuff like smartplugs, temperature sensors and lock are mentioned in the list. Obviously Sector Alarm are planning to go all into the Smart Home business.
Just as a reference, https://minside.sectoralarm.no/Settings/GetText?lang=nb , will give you the complete translation json object (for whom it might interest ;) ) And in Swedish https://minside.sectoralarm.no/Settings/GetText?lang=sv