New metermaid docker container
I've written about my home setup before. I hated how much of a pain it was to set everything up, so I created a docker-compose script to spin up monitoring quickly and easily. I'm utilizing docker, and docker-compose scipts to orchestrate everything in seconds.
All tables will be created in the self hosted mysql. In this images, username:root and password: weatherdb will log in, and is available for other uses on port 3306 of the host running this script. This can be commented in the docker-compose.yml.
The catch is, of course... you need a software defined radio to do this. I purchased mine on Amazon a year ago for 20-30 dollars. https://www.amazon.com/gp/product/B00P2UOU72
# sudo yum install docker docker-compose git
# git clone https://github.com/jreiners/metermaid-docker
# cd metermaid-docker
# docker-compose up -d
Once it's up and running, you should be able to open a browser to dockerhostip:3000. You will be greeted with a grafana login, it's the default username and password of admin
.

admin
This will give you a clean grafana install with no dashboards. You can graph the data from the tables how you like. Currently mine looks like this:
Since it's a clean install, you will need to add the datasource, mine is using weatherdb:3306
-user `root` -pass `weatherdb` -database `metermaid`

Here are my queries I use in grafana, each graph is paired with the temperature for now.
I'm still trying to figure out the cost query.
temp query:
SELECT
UNIX_TIMESTAMP(epoch) as time_sec,
currenttemp as value,
"Temp" as metric
FROM weatherdb
WHERE $__timeFilter(epoch)
ORDER BY epoch ASC
electricity query:
SELECT
mId as metric,
mTime as time_sec,
mConsumed as value
FROM metermaid.utilities
WHERE
mId = '57444563'
and
$__unixEpochFilter(mTime)
;
gas query:
SELECT
mId as metric,
mTime as time_sec,
mConsumed as value
FROM metermaid.utilities
WHERE
mId='65921122'
and
$__unixEpochFilter(mTime)
;
wind query:
SELECT
UNIX_TIMESTAMP(epoch) as time_sec,
windspeed as value,
"windspeed" as metric
FROM weatherdb
WHERE $__timeFilter(epoch)
ORDER BY epoch ASC
pressure query:
SELECT
UNIX_TIMESTAMP(epoch) as time_sec,
pressure as value,
"pressure" as metric
FROM weatherdb
WHERE $__timeFilter(epoch)
ORDER BY epoch ASC
humidity query:
SELECT
UNIX_TIMESTAMP(epoch) as time_sec,
humidity as value,
"humidity" as metric
FROM weatherdb
WHERE $__timeFilter(epoch)
ORDER BY epoch ASC