In my VOLTTRON agent I am making some calculations and then publishing some float data to the VOLTTRON message bus where then the forward agent should pick it up and SQL agent ingest the data into the time scale SQL.
Can someone help me with if I publish to the bus with this in my agent code:
#publish to message bus
self.vip.pubsub.publish(
peer="pubsub",
topic=
f"LBS_AGENT",
headers={headers.TIMESTAMP: format_timestamp(get_aware_utc_now())},
message=f"TOTAL_AIR_FLOW/{total_flow_temp}",
)
How would I query for it in Grafana? This doesn't work:
SELECT
"time" AS "time",
metric AS metric,
value
FROM slipstream_volttron
WHERE
$__timeFilter("time") AND
metric LIKE 'TOTAL_AIR_FLOW'
ORDER BY 1,2