Difference between revisions of "Foobot"
Minesadorada (talk | contribs) (Initial page) |
Minesadorada (talk | contribs) (Added screenshots) |
||
Line 4: | Line 4: | ||
* They do however publish an API which returns JSON data when queried, so I decided to port it to the PC using Lazarus and FPC | * They do however publish an API which returns JSON data when queried, so I decided to port it to the PC using Lazarus and FPC | ||
* The API page is here: https://api.foobot.io/apidoc/index.html | * The API page is here: https://api.foobot.io/apidoc/index.html | ||
− | + | ===Screenshots=== | |
+ | * Foobot Monitor | ||
+ | [[File:foobotmonitor.jpg]] | ||
+ | * Foobot Interrogator | ||
+ | [[File:foobotinterrogator1.jpg]] | ||
+ | <br>[[File:foobotinterrogator2.jpg]] | ||
===What you will need=== | ===What you will need=== | ||
1. A Foobot<br> | 1. A Foobot<br> |
Revision as of 13:39, 30 December 2016
Lazarus and the Foobot air quality monitor
- Foobot(http://foobot.io/) is an InternetOfThings gadget that monitors indoor air quality.
- Unfortunately, the company only supplies mobile phone apps to access the Foobot.
- They do however publish an API which returns JSON data when queried, so I decided to port it to the PC using Lazarus and FPC
- The API page is here: https://api.foobot.io/apidoc/index.html
Screenshots
- Foobot Monitor
- Foobot Interrogator
What you will need
1. A Foobot
2. A Foobot account
3. A free API Key (get one from the API page: https://api.foobot.io/apidoc/index.html)
Binary Downloads: Foobot Monitor
Windows 32/64 binaries:
https://svn.code.sf.net/p/lazarus-ccr/svn/applications/foobot/monitor/innosetup/setup_foobotmonitor.exe
Linux 32/64 binaries:
https://svn.code.sf.net/p/lazarus-ccr/svn/applications/foobot/monitor/linuxbinaries/foobotmonitor.zip
Binary Downloads: Foobot Interrogator
Windows 32/64 binaries:
https://svn.code.sf.net/p/lazarus-ccr/svn/applications/foobot/innosetup/foobotinterrogator_setup.exe
Linux 32/64 binaries:
https://svn.code.sf.net/p/lazarus-ccr/svn/applications/foobot/compiled/linuxbinaries.zip)
Source
Source code is in Lazarus CCR here: https://svn.code.sf.net/p/lazarus-ccr/svn/applications/foobot/
Functions
There are two main functions in foobot_utility.pas for you to use. Both will populate TObjects in foobot_objects.pas which you can read.
// Populates FoobotIdentityObject.TFoobotIdentityList collection
function FetchFoobotIdentity(aUsername, aSecretKey: string): boolean;
// Populates FoobotIdentityObject
function FetchFoobotData(DataFetchType: TDataFetchType = dfLast;
iCurrentFoobot: integer = 0; iLastIntervalSeconds: integer = 3600;
iLastAverageBySeconds: integer = 0; iStartTimeSeconds: int64 = 0;
iEndTimeSeconds: int64 = 0; aSecretKey: string = 'unknown'): boolean;