new app, telljs, tellstick web GUI and REST API with NodeJS

Moderator: Telldus

Post Reply
enyone
Posts: 3
Joined: Fri Mar 17, 2023 9:45 am

new app, telljs, tellstick web GUI and REST API with NodeJS

Post by enyone »

TellStick Web GUI and REST API with NodeJS
https://github.com/enyone/telljs
riro
Posts: 39
Joined: Fri Mar 17, 2023 9:45 am

Re: new app, telljs, tellstick web GUI and REST API with Nod

Post 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);
http://switchqueen.snowland.se/ - Every king needs his queen
enyone
Posts: 3
Joined: Fri Mar 17, 2023 9:45 am

Re: new app, telljs, tellstick web GUI and REST API with Nod

Post by enyone »

Yes, I'm planning to implement authentication, adding device, dimmers, bells within few weeks or so.
Hexagon
Posts: 6
Joined: Fri Mar 17, 2023 9:45 am

Re: new app, telljs, tellstick web GUI and REST API with Nod

Post 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 )
Post Reply