<< Click to Display Table of Contents >> History DB read |
![]() ![]() ![]() |
To read history data from History DB table through TeslaCloud you have to use key word - teslascadahistorydb and name of the Tag in the topic. Value contains in JSON format:
{
historydbname: {tablename},
name: {tagname},
begindate: {begin},
enddate: {end}
}
Where:
{tablename} - Name of History DB.
{tagname} - Name of the tag you want to read history information.
{begin} - Begin time period in milliseconds since 1970 year.
{end} - End time period in milliseconds since 1970 year.
History values will be returned in JSON format:
{
x: {time},
y: {tagvalue}
}
Where:
{time} - Time in milliseconds since 1970 year.
{tagvalue} - Value of the tag.
Example:
Topic: teslascadahistorydb/Temperature
Value: {"historydbname":"HistoryDB0", "name":"Temperature", "begindate":1, "enddate":1688373780250}
RESPONSE:
Value: {"x":1688311087038, "y":26.0, "x": 1688360294299, "y":25.1.....}