DC power? - Other possibly dumb questions

I'm in the process of building my own off grid home and aquaponics farm.  Generating and storing the electricity ain't that big of a deal for me.  That's just basic wiring from my PV and turbine into my charge controller.  My battery bank is wired up for 24 volt and I'm going from there into a 3000 watt inverter for AC.  

Everything i've read throughout the wiki and on this site everything seems to only monitor AC and not DC power generation.  Honestly I was hoping to find something simple to almost "plug and play" for monitoring everything.  I don't have the time to solder boards and circuits with every other project I have on my hands at the moment, mostly construction.

Am I just missing out on something?  Have I just not been able to find how to monitor the power coming into my battery bank?  Can I only monitor what's coming out of my inverter?

Another thing, I am not tied to the grid what so ever.  If I don't generate the power I need then I just sit in darkness at night until day light arrives or wind starts moving my first turbine.  I can live with that for now.

Finally, the information that can be generated with this project can it be shipped via syslog?  I happen to use logstash heavily at work and do love what I can do with the data I generate and dump into various JSON objects to do things with elsewhere.

Robert Wall's picture

Re: DC power? - Other possibly dumb questions

People have done and are doing dc measurements: Monitoring power usage on a 24Volt DC battery solar system using Emontx, it's just that most people are interested in monitoring the grid and PV infeeds. If you are limiting yourself to a 'plug and play' solution, then I'm afraid you will have to go down the ac route and monitor your inverter output. But the question I'd ask: Does your inverter give you that information anyway, and can you extract it? If it does have a data output that you can interrogate, then maybe you won't need to do any electronic construction.
Assuming that you've got your data, either by measuring or asking for it, then if you're able and willing to write some software, you can export the data in whatever format you want. We do use JSON for emoncms, but it seems that would bypass syslog, which you're keen to utilise.

sumnerboy's picture

Re: DC power? - Other possibly dumb questions

Re. your question about shipping data to syslog, one option is to use the new MQTT event module to publish values to MQTT topic(s) of your choice and then setup mqttwarn (https://github.com/jpmens/mqttwarn#syslog) to monitor those topics and forward the values to syslog. mqttwarn can do transformations and filtering as well as notifications to a huge range of other services.

Likewise, mqttwarn can be used to forward data into EmonCMS (https://github.com/jpmens/mqttwarn#emoncms). I am using this with a modified emontx sketch which publishs values to MQTT topics rather than send via RF (http://openenergymonitor.org/emon/node/5922). mqttwarn then transforms the values into payloads suitable for EmonCMS and sends them via HTTP requests. 

As you can probably tell I am very interested in MQTT! 

smilhomme's picture

Re: DC power? - Other possibly dumb questions

Hi,

I was wondering the same thing about using logstash and the whole ELK stack. Finally got something working...
I use the logstash input plugin http_poller. Maybe there's a better way. Below is my config. It surely could have improvements but it's my first shot with all these tools. Would be more than happy to have comments.

I'd prefer Emonpi to send its data to logstash as soon as available but didn't find how to yet, so I poll every minute which reduce the resolution compared to the 5s refresh.

input {
  http_poller {
    urls => {
      emonPI_ct1 => "http://192.168.0.89/emoncms/nodes/5/rx/1?id=5&apikey=XXXX"
      emonPI_ct2 => "http://192.168.0.89/emoncms/nodes/5/rx/2?id=5&apikey=XXXX"
      emonPI_T_out => "http://192.168.0.89/emoncms/nodes/5/rx/5?id=5&apikey=XXXX"
      emonPI_Vrms => "http://192.168.0.89/emoncms/nodes/5/rx/4?id=5&apikey=XXXX"
    }
    request_timeout => 30
    interval => 60
    codec => "json"
    # A hash of request metadata info (timing, response headers, etc.) will be sent here
    # metadata_target => "poll_metadata"
  }
}

filter {
  mutate {
    lowercase => [ "name" ]
    convert => { "value" => "float" }
    add_tag => [ "emon" ] 
  }
  if [unit] == "W" {
    mutate { 
      rename => { "value" => "value_%{name}" }
      add_field => { "type" => "power" }
    }
  }
  if [unit] == "C" {
    mutate { 
      rename => { "value" => "value_%{name}" }
      add_field => { "type" => "temperature" }
    }
  }
  if [unit] == "V" {
    mutate { 
      rename => { "value" => "value_vrms" } 
      add_field => { "type" => "tension" }
    }
  }
  if [unit] == "%" {
    mutate {
      rename => { "value" => "value_%{name}" }
      add_field => { "type" => "humidity" }
    }
  }
}

output {
  elasticsearch {
    index => "emonpi-%{+YYYY.MM.dd}"
  }
}

Once in Elasticsearch, I run Kibana for visualization and dashboard.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.