Fix some issues and deprecations, add option to use public API
Fixes issue #12
Updates code in line with HA architecture changes to avoid warnings in log
Add option to use public API. This should be functionally exactly the same as the existing API (which is an emulated version of the official app). There's no real reason to use it, it might be marginally faster/slower or more/less reliable, but I can't notice any difference.