I’ve been having a look around website and it looks very impressive, I do have a couple of questions that hopefully are pretty straight forward.
What i am hoping to achieve is to install sub metering in our offices (3 or 4 cts and a optical sensor/pulse input for nat. Gas for a start).
We have an internal management application running on aws.
My objective is to integrate the energy recording with the existing management app as opposed to using emoncms.org or any other emoncms application.
Is it possible to publish the data to a database within our internal app?
Currently, I’m of the view point that the emonTx V3 With the ESP8266 Huzzah WIFI Module will give me enough inputs but I’m just unsure as to whether I can publish the data to the database.
Also, is it possible use multiple emonTX’s posting to the same database?
Thanks for any help,
Welcome, Michael, to the OEM forum.
You haven’t filled in your country in your profile - as I don’t know any better, I’m assuming you have the standard UK single phase mains supply. It’s ever so slightly important to know what system we’re dealing with when you’re monitoring it.
I don’t know that, so I’ll need to give you generic answers.
If you know the data format that’s required, and have somebody who knows a bit about the “C” and “C++” languages, then you should be able to edit the emonTx software to write the data that you need in the format that your database accepts.
Provided that your database can accept some form of source identification along with the data, and use that to know how to use it, then yes.
If it’s any help, the default emonTx sketch sends the data as characters to the ESP8266 in the form “VAR1:value1,VAR2:Value2” etc and I believe (I don’t know because I don’t have one) the ESP8266 adds the source identification.
However, my colleague @borpin will recommend a Pi Zero W - he prefers that instead of the ESP8266.
If you know, of have someone who is familiar with, the Pi, then you might like to consider that.
Would the measuring be co-located and are there multiple offices? i.e. are the electric boards close to the gas meter so you are suggesting one EmonTX?
I do prefer the Pi, similar price but far more flexible especially if you don’t want to use emoncms in any form.
As Robert says, the EmonTX in it’s simplest form just outputs serial text, so yes it is possible to send that to a database.
One thing to watch, if the power is interrupted to the EmonTX, the counters reset to zero. Emoncms handles that; you would have to do the same.
In broad terms, I would attach an RPi to each EmonTX. Read the data off the serial using the emonhub subsystem and send it on by MQTT as a JSON data frame to another system to process it for the database (Node-RED for instance). If the optical sensor is required some distance away, then you could just attach that to an RPi and use the same mechanism for the data.
Have a read of this thread (slightly misleadingly titled) Avoiding wireless connections - EmonTX serial RPiZero solution and also this for the pulse Emonhub Pulse Interfacer
In my defence, I think that when I started that thread I was reckoning to use a Pi 3b or 4 - which has an ethernet port - to hardwire my emonTx’s to my LAN, but I was then steered (correctly) to using Pi Zeros instead.
But happy for the thread title to be changed if that helps others!