TellStick ZNet local API beta testing

Moderator: Telldus

Post Reply
matzh
Posts: 4
Joined: Fri Mar 17, 2023 9:45 am

TellStick ZNet local API beta testing

Post by matzh »

Hi!

Thought it would be good to share experiences and ideas here.
Personally I am currently stuck because the token expires the same second I receive it...
I am on beta v1.0.7-55-g22c56a3.
I have also tried some LUA scripting to inform my PHP GW about events but there seems to be limitations in reaching the LUA http/socket functions.
I have both these cases pending as questions to Telldus (could of course be my bad) and will update this thread as I progress.

Please share your experiences and progress beta testing the ZNet local API.

BR,

Matz
nino
Posts: 2
Joined: Fri Mar 17, 2023 9:45 am

Re: TellStick ZNet local API beta testing

Post by nino »

Hi,

I get the following return data when I call api/devices/list
{"error": "No app was configured in the token"}
I am on beta: v1.0.7-72-gbe5674b

Can I do anything wrong? Or someone else with the same error?

BR,

Niklas
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: TellStick ZNet local API beta testing

Post by micke.prag »

In the first step when requesting the token the parameter "app" must be set. It this is missing then you get the error you have above.
Try requesting a new token but also include the name of your app.
Micke Prag
Software
Telldus Technologies
nino
Posts: 2
Joined: Fri Mar 17, 2023 9:45 am

Re: TellStick ZNet local API beta testing

Post by nino »

I found the problem.
I use vb .net WebRequest and chose the wrong Content Type in the first step and the parameter app was missed.
Now, everything works fine.
Lazzerman
Posts: 3
Joined: Fri Mar 17, 2023 9:45 am

Re: TellStick ZNet local API beta testing

Post by Lazzerman »

Hi guys,

I've written a short Local API guide + included a demo Project in C# - Visual Studio Community Edition

You can find it here:

http://sharepoint.larssiden.se/smart-and-telldus/

The text is in Swedish - but you should manage the cUrl and Code anyway :-)

// Lazze
n1ko
Posts: 1
Joined: Fri Mar 17, 2023 9:45 am

Re: TellStick ZNet local API beta testing

Post by n1ko »

I wrote a small ruby script to pipe sensor metrics from the local API to statsd. The benefit over live api is that you can get as granular metrics as your sensors produce compared to the limitation of 5/10mins on live API.

https://github.com/n1koo/znet_local_to_statsd

FWIW probably also serves as a starting point for other people working rubby since I implemented the token exchange phase too.
Post Reply