Closed mifi closed 6 years ago
If we support local, users would be required to do a manual step of requesting a token before setting up their homebridge-telldus. We would have to instruct the user to:
Find his IP_OF_TELLDUS_DEVICE
Run: curl -i -d app="homebridge-telldus" -X PUT http://IP_OF_TELLDUS_DEVICE/api/token
Response:
{
"authUrl": "http://IP_OF_TELLDUS_DEVICE/api/authorize?token=0996b21ee3f74d2b99568d8207a8add9",
"token": "0996b21ee3f74d2b99568d8207a8add9"
}
Go to returned authUrl
in their browser
Tick One year and Auto renew access
Put token
from JSON response in homebridge-telldus config file.
Or we could create a simple electron app for assisting with this initial process, as well as configuring unknown devices.
See also: http://api.telldus.net/localapi/api/authentication.html
I have now implemented local support. See readme
We need to make or find an abstraction of both live and local. Currently we are using telldus-live npm module which is unmaintained and has old js code style.
I did not find an npm module that supports local and live at the same time. I found however these potential alternatives: https://github.com/ashpool/telldus-live-promise https://github.com/JakobPetersson/telldus-local
Or we could write a new which abstracts away the authentication.