TeHyBug API

API URL: http://tehybug.com/api API Parameters:
act= - should contain the action type. Available values: last for latest sensor values or date to show values by date
bugs= - should contain the TeHyBug key, for multiple TeHyBugs the keys should be separated by comma.
date= - date in yyyy-mm-dd format. Works only with the date action. If this parameter is not set, the default value will be the current date in UTC.
All times are UTC and dates are in UTC.
All the sensor values are in metric system (Celsius, hPa etc...). For imperial system (Fahrenheit, inHg) you'll have to use a conversion formula.
The output data is in json format.

Link examples:
For the latest TeHyBug values: http://tehybug.com/api?bugs=YOUR_TEHYBUG_KEY&act=last
For the TeHyBug values by date: http://tehybug.com/api?bugs=YOUR_TEHYBUG_KEY&act=date&date=2018-08-29


Output example:

[{
"data_id":"76217",
"data_bug_key":"tehybug_key",
"data_details":
	{
		"t":"temperature",
		"h":"humidity",
		"key":"tehybug_key","query_string":"....",
		"bug_key":"tehybug_key"
	},
"data_time":"epoch_time",
"bug_title":"Kitchen"
}...]

TeHyRelay API

API URL: http://tehybug.com/api API Parameters:
act= - should contain the action type. Available values: on to turn the relay ON or off to turn the relay off
All times are UTC and dates are in UTC.
The output data is in json format.

Link examples:
Turn on relays: http://tehybug.com/api?relays=YOUR_TEHYRELAY_BUG_KEY&act=on
Turn off relays: http://tehybug.com/api?relays=YOUR_TEHYRELAY_BUG_KEY&act=off


Output example:

[{
"relay_key":"tehyrelay_bug_key",
"relay_status":"1",
"relay_last_active":"epoch_time",
"relay_last_updated":"epoch_time"
}...]