Tank Utility Sensor API

Avatar
  • updated

Hi I would like a hand creating this API for aTank Sensor Called Tankutility

i would like to read the volume value and temperature value from comfortclick GUI

i am following this API Guide ( API Guide) how ever i am only able to get the Token Value under Response Value line

here is a picture of where i am stuck right now

Image 2945

Avatar
Alexander Paredes

Hi Ricardo, Thanks for all the support, this is great!!, it will be great if we can share this plugin so comfortclick can add it to the example libriary list. are they still offering a jigsaw or a colibri as a reward? XD

Avatar
Ricardo Pinto


Getting better...

Avatar
Ricardo Pinto

I forgot to include some items, like orientation of the tank, fuel type, and battery...


Just noticed now...

Avatar
Ricardo Pinto

Hi,

I've successfully extracted the info and created Http Device for the tank. Made it in a rush, so probably it may need some editing.

I'm attaching the file export, so you can adapt it to your needs.


TankUtility API.bos


I've set the GetToken to 86400 (24h). The API says that the token expires in 24h, so I've set it to 86400s, and the info extraction to 3600s (every hour).

I'm sending the devices set to false. Please set the devices to true, and insert your e-mail and password on the authentication (only on the first device created named as GetToken). If you want to see some results right away, you can force to send manually the commands, that's how I did it first.

Result:

Some notes:

The GetDevices command, lists all the devices available on the account

As there's only one device available, I've set the command "Device ID" token to the first device on the array: device[0]

If you have other devices on the account, you need to change the index to the one you need.

Example:

If you only have one device, keep it device[0]

If you have let's say 4 devices, and want to extract the information of the third, please change it to device[2]

(The index starts from 0...)


Hopefully you can now change it and adapt it to your needs.


Best regards

Avatar
Alexander Paredes

hi ricardo i just sent you the email with the credentials, it will be great if we acomplish to connect tank utility to comfortclick

it will add a great tool to monitor propane gas tanks

Avatar
Ricardo Pinto


Hi,

Perfect, that would be useful for testing.

I'll send you an email so you can send me that old account data.

Best regards

Avatar
Alexander Paredes

Hi here is my email . miguel dot paredes at domytec dot com, i can share with you a old tank monitor account in case you need so you can help me out creating this integration

i case of the expiration token, i noticed that  by just changing the end cyclically delay option for http device on BOS can renew the token

Avatar
Ricardo Pinto

Hi guys,

I just read the API very quickly, I haven't sat around a little bit to see closely how to do it.

The API says something about the token expiring in 24h, so maybe you'll need a workaround to extract the token at 00:00 everyday for example.

I will come back to you as soon as possible. I can try to help, but I don't have access to any device to test it.

Alexander, can you share your e-mail? If so, please share without the @ or . or whatever, to avoid any e-mail bots sniffing the posts. After you share the e-mail, you can edit the post and delete it so it doesn't stay here.

You can write something like ricardo dot pinto at visiontech dot pt

Best regards

Avatar
Jürgen Jürgenson
Quote from Alexander Paredes

thats the problem i am not able to create the others commands.


Ok let me show you how i am placing the commands

i am creating a new command and in the command line placing the command 

https://data.tankutility.com/api/devices?token

and in header i am selecting the response data from the previous token command

but this is the value that is displaying

am i doing something wrong, can you please help me out on how to place this commands on comfortclick?

regards

I think for the command you only use: "/api/devices?token" not the full link  as the https://data.tankutility.com is already in the http driver Host URL. And for the heather you need to have %0 in the text field otherwise it wont link to the generated token.

But Ricardo knows best, im just guessing. As i haven't had the need to use temp tokens.
Edit: Try it like this for the whole command(not the heather) line use "/api/devices?token=%0" then put the token to the properties under it.

Avatar
Alexander Paredes

thats the problem i am not able to create the others commands.


Ok let me show you how i am placing the commands

i am creating a new command and in the command line placing the command 

https://data.tankutility.com/api/devices?token

and in header i am selecting the response data from the previous token command

but this is the value that is displaying

am i doing something wrong, can you please help me out on how to place this commands on comfortclick?

regards