Page 1 of 1
new app, telljs, tellstick web GUI and REST API with NodeJS
Posted: Fri Mar 17, 2023 9:45 am
by enyone
TellStick Web GUI and REST API with NodeJS
https://github.com/enyone/telljs
Re: new app, telljs, tellstick web GUI and REST API with Nod
Posted: Fri Mar 17, 2023 9:45 am
by riro
Nice!
If you can implement some user/pass functionality and change how ID's are used I guess SwitchQueen should be able to use that API ... (Would not get all functions that you get with a SwitchKing installation)
Like this:
Code: Select all
http://servernamn:8800/devices/{id}/turnon
http://servernamn:8800/datasources
(Datasource = Sensor)
This is how SwitchKing talks:
http://www.switchking.se/en/component/c ... rest-anrop
Sample on how SwitchQueen tests authentication (in PHP) to a SwitchKing server
Code: Select all
$context = stream_context_create(array(
'http' => array(
'header' => "Authorization: Basic " . base64_encode(SK_REST_USER . ":" . SK_REST_PASS)
)
));
$url = "http://" . SK_REST_SERVER . ":" . SK_REST_PORT . "/Datasources";
$data = file_get_contents($url, false, $context);
Re: new app, telljs, tellstick web GUI and REST API with Nod
Posted: Fri Mar 17, 2023 9:45 am
by enyone
Yes, I'm planning to implement authentication, adding device, dimmers, bells within few weeks or so.
Re: new app, telljs, tellstick web GUI and REST API with Nod
Posted: Fri Mar 17, 2023 9:45 am
by Hexagon
To get async calls to all functions, ability to read sensors etc. I recomment node-telldus (
https://github.com/Hexagon/node-telldus | npm install telldus )