Monitor your Generac generator with Home Assistant

I recently acquired a Generac brand standby generator. It’s a 22KW Reliance (rebadged Guardian series) generator system, air-cooled and runs off of propane (in my case, or natural gas as an alternative). Of course, I had to instrument it to figure out what it was up to, and minimally I wanted to know if I was in the middle of a power outage, running on generator power.

Generac offers a cloud-based accessory that uses a cellular modem (and just in the last month or two, a wi-fi based version) that can provide simple outage information. Of course there’s a monthly fee for this, and that solution isn’t really all that great in my case… I don’t have reliable cell coverage at my home, and my cable ISP will often go out during power failures since they don’t have backup power for the trunk amplifiers in their outside plant. So no way to report the outage to the cloud, and now way to get an outage notification back from the cloud into Home Assistant.

If you poke around, you’ll find this open-source project called “genmon” which is a series of python scripts that runs on a raspberry pi and talks to the generator via the same accessory port that the Generac cellular modem accessory uses; turns out it speaks ModBus. See GitHub - jgyates/genmon: Generac (and other models) Generator Monitoring using a Raspberry Pi and WiFi for this very cool bit of software! If you have one of these generators, even if you don’t want to connect to Home Assistant, this genmon package will give you way more visibility into the state and performance of your generator, including Alarm conditions, maintenance warnings, current state, load, RPM, utility and generator voltage and much more. You probably want genmon for your Generac generator!

I started thinking about how to hack on this thing to get it to talk to Home Assistant; maybe some MQTT client bashed into genmon, or some custom component ? Turns out that genmon has some interfaces that, in addition to it’s own pretty UI, can return JSON responses with all the good stuff…

So all I needed to do was cobble up some REST and template sensors to extract the information needed; no new code required.

This is still very early days, and has not been tested “in anger” during an actual power outage. But it might serve as a useful example in the mean time.

Why do this? Mostly because I can… and also to provide some notification that utility power is lost and we’re running on backup generator power. Unless you can hear the generator running, you don’t actually know this is the case - so maybe now’s not the time to run the Electric Clothes Dryer, Electric Ovens, all while the AC is cooling things down… the generator actually has the capacity to do so, but I think the fuel costs are about $5 an hour at the elevated loads…

Enjoy. I’m sure there’s plenty of room for improvement and I’ve not really started on any useful automations yet. This is structured to be dropped into the “packages” directory and self-contained.

(Edit 28 May 2021) Here’s the most recent version of my Home Assistant configuration. It no longer uses the REST-base approach described above.

(Edit 22 Dec 2022) Updated with new-style MQTT sensor configuration. Also see this post in the thread which is a variation that assumes that “JSON for Numerics” is turned on in genmon for a different variation, and without my my funky 19916/ MQTT topic prefix.

generator.yaml
################################################################
## Package / Generator
################################################################
#
#  Version 0.6
#
#  (This file is used as a "package" within the Home Assistant
#  configuration files.  If you don't use packages with your Home
#  Assistant configuration files, you need only take the relevant
#  sections of this file and add them to where you define
#  sensors, binary_sensors, etc.)

#  This package is used to interwork with (only) Generac-brand standby
#  generator systems with Nexus, Evolution and H100 controllers, also
#  using the open-source "genmon" package.  This package typically
#  runs on a dedicated Raspberry Pi (2, 3 or Zero) and is connected
#  via a serial cable to the controller located inside the generator
#  cabinet.  See:

#     https://github.com/jgyates/genmon

#  for additional information about genmon, how it works and what's
#  required to implement it.  Thanks very much to the author for a
#  quite complete and featureful monitoring system that can send
#  email, SMS notifications and many other things!

#  The genmon package consists of a number of components, the primary
#  one being the actual Python script that communicates with the
#  generator using a ModBus protocol.

#  In practice, this means running the genmon.py and genserv.py (web
#  server) daemons on the Raspberry Pi connected to the generator.

#  Among the optional components is a daemon which can monitor
#  the generator via genmon, and publish relevant information to
#  MQTT topics.  You can enable this MQTT genmon component using
#  the genmon web UI.  Of note: you'll need to ensure that the
#  MQTT topics match what's configured as topics in this file.

#  This module implements a means to collect this data without
#  requiring a custom component, or additional software that needs to
#  run.  This uses a number of MQTT sensors and jinga2 templates to
#  receive the published data and expose them as sensor entities in
#  Home Assistant.

#  Note that the MQTT topics in this file all have a "19916/" prefix
#  specified on the otherwise default MQTT topics that genmon would
#  use.  The only reason this is present is to match the local
#  convention that I happen to use personally, and ought not to be
#  considered any kind of recommendation.  Likely, you'll want to just
#  remove that prefix when adapting this configuration for your own
#  purposes.

#  genmon MQTT flushes out MQTT updated every 60 seconds.  You can choose
#  to have MQTT sensors for any or all of these data.  Note that some
#  of the published data changes rather often, such as wifi RSSI,
#  uptime counters, etc.  You might want to configure your recorder
#  component to not store those values to avoid needlessly bloating
#  the recorder database with historically uninteresting data.

#  The MQTT configuration presumes that you have the "JSON Numerics"
#  configuration switch turned OFF in the genmon MQTT configuration.
#  If you need this enabled for other reasons, then you'll need to
#  select an alternative topic with the "/value" suffix appended for
#  a number of the MQTT sensors that are defined.  These are present
#  below in the configure, but commented out.  You'll need to
#  manually switch the topics in this circumstance.

#  note that the unique_id values in this file are not signficant (or
#  even required at all).  They exist so that the entities show up
#  within the Home Assistant configuration GUI for customization.  I
#  chose to use UUIDs because it was an easy source of unique values,
#  no harm would likely come from using these same values or any that
#  you choose from on your own.

#  Louis Mamakos <[email protected]>
#  28 May 2021

################################################
## Customize
################################################

homeassistant:
  customize:
    ################################################
    ## Node Anchors
    ################################################

    package.node_anchors:
      customize: &customize
        package: 'generator'

    ################################################
    ## generator customization
    ################################################
    binary_sensor.genmon_power_outage:
      friendly_name: 'Generator Power Outage'

    sensor.genmon_outage_status:
      friendly_name: 'Generator Status'

    sensor.genmon_outage_utility_voltage:
      friendly_name: 'Generator Utility Voltage'

    sensor.genmon_generator_battery:
      friendly_name: 'Generator Battery Voltage'

    sensor.genmon_generator_rpm:
      friendly_name: 'Generator RPM'

    sensor.genmon_generator_frequency:
      friendly_name: 'Generator Frequency'

    sensor.genmon_generator_output_voltage:
      friendly_name: 'Generator Output Voltage'

    sensor.genmon_generator_output_current:
      friendly_name: 'Generator Output Current'

    sensor.genmon_generator_output_power:
      friendly_name: 'Generator Output Power'

    sensor.genmon_generator_last_alarm_log:
      friendly_name: 'Generator Last Alarm'

    sensor.genmon_generator_last_service_log:
      friendly_name: 'Generator Last Service Log'

    sensor.genmon_generator_last_action:
      friendly_name: 'Generator Last Action'

    sensor.genmon_generator_capacity:
      friendly_name: 'Generator Capacity'

    sensor.genmon_generator_exercise_time:
      friendly_name: 'Generator Exercise Time'

    sensor.genmon_mon_cpu_temperature:
      friendly_name: 'Generator CPU Temperature'

    sensor.genmon_mon_uptime:
      friendly_name: 'Generator Monitor Uptime'

    sensor.genmon_mon_load:
      friendly_name: 'Generator Monitor Load'

    sensor.genmon_outage_summary:
      friendly_name: 'Generator Outage Summary'


################################################
## generator sensors
################################################

#
#  The MQTT topics need to match what's transmitted by the
#  genmon host.  I use a non-standard MQTT prefix of '19916/' to
#  conform with the convention that I happen to use with my own
#  home automation system.
#
sensor:
  - platform: filter
    unique_id: "f0231fdf-7f1c-4acf-ad8d-c4245b722321"
    name: Genmon Generator Battery
    entity_id: sensor.genmon_generator_battery_raw
    filters:
      - filter: time_throttle
        window_size: "00:15"

  - platform: filter
    unique_id: "25046a19-4cf0-45d2-8834-cedde8b6a3dc"
    name: Genmon Mon CPU Temperature
    entity_id: sensor.genmon_mon_cpu_temperature_raw
    filters:
      - filter: time_throttle
        window_size: "00:10"
mqtt:
  sensor:
    - name: Genmon Outage Status
      unique_id: "fd8f8c07-7d6f-4aea-92b5-16b7d8acc66b"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      state_topic: '19916/generator/Outage/Status'

    - name: Genmon Outage Utility Voltage
      unique_id: "f565fed6-8a19-49d4-8066-4015c5ca91b1"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      state_topic: '19916/generator/Outage/Utility Voltage'
      # state_topic: '19916/generator/Outage/Utility Voltage/value'   # if JSON numerics
      value_template: '{{ value | regex_replace(" V", "") | float | round(0) }}'
      unit_of_measurement: "VAC"

    # status related sensors
    - name: Genmon Generator Battery Raw
      unique_id: "713eb4b9-feec-4425-8c83-84a9f486aae7"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      state_topic: '19916/generator/Status/Engine/Battery Voltage'
      # state_topic: '19916/generator/Status/Engine/Battery Voltage/value'   # if JSON numerics
      unit_of_measurement: "V"
      value_template: '{{ value | regex_replace(" V", "") | float | round(1) }}'


    - name:  Genmon Generator RPM
      unique_id: "f3a8aedd-206b-4e5f-baa9-677496ee8d3c"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      unit_of_measurement: "RPM"
      state_topic: '19916/generator/Status/Engine/RPM'
      # state_topic: '19916/generator/Status/Engine/RPM/value'    # if JSON numerics
      value_template: '{{ value | int }}'

    - name: Genmon Generator Frequency
      unique_id: "cbdc9c28-5748-4aef-91bc-5b5ec95ed545"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      unit_of_measurement: "HZ"
      state_topic: '19916/generator/Status/Engine/Frequency'
      # state_topic: '19916/generator/Status/Engine/Frequency/value'   # if JSON numerics
      value_template: '{{ value | regex_replace(" Hz","") | float }}'

    - name: Genmon Generator Output Voltage
      unique_id: "f5f462db-e16d-4596-9bd3-232b70fa5038"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      unit_of_measurement: "VAC"
      state_topic: '19916/generator/Status/Engine/Output Voltage'
      # state_topic: '19916/generator/Status/Engine/Output Voltage/value'   # if JSON numerics
      value_template: '{{ value | regex_replace(" V","") | float | round(1) }}'

    # current measurement is garbage on 22KW product, apparently
    - name: Genmon Generator Output Current
      unique_id: "10e1def6-35fd-4922-932a-90f25abb7f29"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      unit_of_measurement: "A"
      state_topic: '19916/generator/Status/Engine/Output Current'
      # state_topic: '19916/generator/Status/Engine/Output Current/value'   # if JSON numerics
      value_template: '{{ value | regex_replace(" A","") | float | round(1) }}'

    # current measurement is garbage on 22KW product, apparently, so this value may
    # also be suspect on that model
    - name: Genmon Generator Output Power
      unique_id: "914a4e97-54a0-41e7-bbeb-a256134e5e35"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      unit_of_measurement: "W"
      state_topic: '19916/generator/Status/Engine/Output Power (Single Phase)'
      # state_topic: '19916/generator/Status/Engine/Output Power (Single Phase)/value'   # if JSON numerics
      # this is normalized to watts from kilowatts
      value_template: '{{ value | regex_replace(" kW","") | float * 1000 | round(0) }}'

    - name: Genmon Generator Last Alarm Log
      unique_id: "8cb64471-9123-48f6-b9be-15c01595981e"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      state_topic: '19916/generator/Status/Last Log Entries/Logs/Alarm Log'

    - name: Genmon Generator Last Service Log
      unique_id: "bce3182a-a525-47dc-937c-8be4e5afc619"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      state_topic: '19916/generator/Status/Last Log Entries/Logs/Service Log'

    - name: Genmon Generator Last Action
      unique_id: "bf48e972-0b96-489a-9eee-4f2030017c3f"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      state_topic: '19916/generator/Status/Last Log Entries/Logs/Start Stop Log'

      # maint related sensors
    - name: Genmon Generator Capacity
      unique_id: "bf7cbe92-2b1e-48ca-addd-df963697626c"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      state_topic: '19916/generator/Maintenance/Rated kW'
      # normalize to watts
      value_template: '{{ value | regex_replace(" *[Kk]W", "") | float * 1000 | round(1) }}'
      unit_of_measurement: 'W'

    - name: Genmon Generator Exercise Time
      unique_id: "825657b6-c67a-427a-bee9-7b6ea2182628"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      state_topic: '19916/generator/Maintenance/Exercise/Exercise Time'
      # might be nice to maybe somehow normalize this, but not sure into what date/time representation
      # value is something like:  "Weekly Sunday 17:35 Quiet Mode On"

    - name: Genmon Total Run Time
      unique_id: "41c981db-5979-4ee6-b9fb-d1ca44f83b3f"
      expire_after: 300
      state_topic: '19916/generator/Maintenance/Service/Total Run Hours'
      value_template: '{{ value | regex_replace(" +h$", "") | default(0) | float }}'
      unit_of_measurement: hours

    - name: Genmon Hardware Version
      unique_id: "927b24b7-772d-434a-8fa1-4f1c5549c90d"
      expire_after: 300
      state_topic: '19916/generator/Maintenance/Service/Hardware Version'

    - name: Genmon Firmware Version
      unique_id: "4cf182de-c37b-48c9-8727-75e1f5053d0d"
      expire_after: 300
      state_topic: '19916/generator/Maintenance/Service/Firmware Version'

    # genmon monitor related sensors
    - name: Genmon Mon CPU Temperature Raw
      unique_id: "792c8096-84a3-4870-ac23-8cc5dcc8f8f0"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      unit_of_measurement: "°F"
      device_class: temperature
      state_topic: '19916/generator/Monitor/Platform Stats/CPU Temperature'
      value_template: '{{ value | regex_replace(" F","") | float | round(0) }}'

    - name: Genmon Mon Uptime
      unique_id: "7c398cb0-43bf-469b-b49f-ae8b526cac32"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      # maybe parse this out into minutes/hours?
      state_topic: '19916/generator/Monitor/Platform Stats/System Uptime'

    - name: Genmon Mon Load
      unique_id: "60b44a17-2535-47da-af10-7f6b45d35d3a"
      expire_after: 300   # genmon MQTT flushes out MQTT updated every 60 seconds
      unit_of_measurement: '%'
      state_topic: '19916/generator/Monitor/Platform Stats/CPU Utilization'
      value_template: '{{ value | regex_replace(" *%","") | float | round(1) }}'

    - name: Genmon Version
      unique_id: "9bc1d83a-34bc-4a1e-a643-3c0eb62501dd"
      expire_after: 300
      state_topic: '19916/generator/Monitor/Generator Monitor Stats/Generator Monitor Version'

    # note that these following  are unique to my own specific situation and
    # are values collected from 1-wire bus temperature sensors connected to the Raspberry
    # Pi running genmon.  These do not come from the standard generator controller or
    # the on-board temperature sensor in the Raspberry Pi ARM CPU.  You should omit
    # these sensors if you're adapting my file for your own purposes.

    - name: Genmon 1W Controller Box
      unique_id: "882cb971-bf3e-4281-a158-bf0d0e3eb4ea"
      expire_after: 600
      unit_of_measurement: °F
      state_topic: '19916/generator/Status/External Temperature Sensors/28-00000bc56fa5'
      value_template: '{{ value | regex_replace(" *F", "") | float | round(1) }}'

    - name: Genmon 1W Outside Air
      unique_id: "1f54deef-b168-431a-aa9d-2af8e1fbf2c7"
      expire_after: 600
      unit_of_measurement: °F
      state_topic: '19916/generator/Status/External Temperature Sensors/28-020a91770670'
      value_template: '{{ value | regex_replace(" *F", "") | float | round(1) }}'

    - name: Genmon TC Generator Body
      unique_id: "8ca45d5e-91fb-4826-bc75-ea1b3d8046c4"
      expire_after: 600
      unit_of_measurement: °F
      state_topic: '19916/generator/Status/External Temperature Sensors/3b-6d800cc77f01'
      value_template: '{{ value | regex_replace(" *F", "") | float | round(1) }}'

    - name: Genmon TC Oil Cooler
      unique_id: "545c8624-4428-4791-ba95-df671b74aafe"
      expire_after: 600
      unit_of_measurement: °F
      state_topic: '19916/generator/Status/External Temperature Sensors/3b-4c880b6ac367'
      value_template: '{{ value | regex_replace(" *F", "") | float | round(1) }}'

    - name: Genmon TC Engine Body
      unique_id: "d6f20e32-04bf-4155-842f-d68346e3a68b"
      expire_after: 600
      unit_of_measurement: °F
      state_topic: '19916/generator/Status/External Temperature Sensors/3b-4c880b6ac389'
      value_template: '{{ value | regex_replace(" *F", "") | float | round(1) }}'

  binary_sensor:
      #
      #  probably the most useful sensor - are we in a power outage condition or not?
      #
    - name: Genmon Power Outage
      unique_id: "468414df-32b1-4127-8636-4202a11b880c"
      state_topic: '19916/generator/Outage/System In Outage'
      payload_off: 'No'

template:
  - sensor:
        # This particular sensor is probably a bad idea because it continuously updates
        # its value during an outage.  The convention in Home Assistant these days
        # seems to be to record a timestamp reflecting the onset of some condition,
        # and then use some sort of clever UI presentation to display the interval
        # or elapsed time.  The problem here is that this will spam the recorder database
        # (and influxdb, if you're using that component) with constantly changing values
        # while an outage is in progress.  In practice, this only happens during outages
        # while hopefully are not that frequent, so the "damage" done to these databases
        # is, in practice, minimal.  Still, this isn't a great example of how to do things,
        # though does illustrate some jinja2 template acrobatics.
      - name: generator_outage_summary
        unique_id: "11be76cc-02bc-4868-b033-5efc60a289c5"
        state: >-
          {% if states.sensor.genmon_outage_status.state | regex_match('System in outage') %}
             {% set duration = (as_timestamp(now()) - as_timestamp(states.sensor.genmon_outage_status.state)) | regex_replace('System in outage since ') | int %}
             {% set hours = duration // 3600 %}
             {% set duration = duration - hours * 3600 %}
             {% set minutes = duration // 60 %}
             {% set seconds = duration % 60 %}
             Outage active for {{ '%d:%02d:%02d' | format(hours, minutes, seconds) }}
          {% else %}
            {{ states.sensor.genmon_outage_status.state }}
          {% endif %}

automation:
  - alias: 'start power outage'
    initial_state: true
    trigger:
      - platform: state
        entity_id: binary_sensor.genmon_power_outage
        from: 'off'
        to: 'on'
        # so ideally wait a little bit for the generator to time out the utility power
        # loss, start and operate the automatic transfer switch from utility to generator
        # network equipment should be a UPS.. hopefully ISP connectivity is still working
        for:
          seconds: 45
    action:
      - service: notify.pushover_louie
        data:
          message: "Utiliy Power Loss at {{  now().strftime('%Y-%m-%d %H:%M:%S') }}"
          title: "HASS"

# maybe also initiate a zwave heal network or something after power is restored to
# from standby generator after a ~45 second interruption?  Switch back is pretty
# quick, with only a couple hundred millisecond transfer time in the ATS..

#
  - alias: end power outage
    initial_state: true
    trigger:
      - platform: state
        entity_id: binary_sensor.genmon_power_outage
        from: 'on'
        to: 'off'
    action:
      - service: notify.pushover_louie
        data:
          message: "Transfer back to utiliy power at {{  now().strftime('%Y-%m-%d %H:%M:%S') }}"
          title: "HASS"

############################################################################3
#
# Fun facts (For 22kw generac model)
#
#  Per specification, fuel consumption for propane is
#        2.56 gal/hr at 50% load (11KW)
#        3.87 gal/hr at 100% load (22KW)
#
#  Per genmon code, the 3 term polynomial to compute this is: [0, 2.74, 1.16]
#
#        gal/hr = (T0 * pctLoad^2) + (T1 * pctLoad) + T3
#        gal/hr =                    2.74 * pctLoad + 1.16
#
#  This is a pretty good fit to the spec sheet -
#       50% = 2.53 gal/hr  (vs 2.56 spec)
#      100% = 3.90 gal/hr  (vs 3.87 spec)
#
#  Home assistant could compute a gallons/hour rate in a template sensor if this seems useful.
11 Likes

It really makes me wonder if there is any piece of electronics kit that doesn’t get hacked these days.

1 Like

Some updates on how I’ve changed my Home Assistant integration with genmon, Generac Generator Monitoring using a Raspberry Pi and WiFi to be simpler and more efficient.

After the initial work using REST and template sensors, there was a follow-up discussion in the GitHub genmon issues page. Now, there’s a more efficient alternative available. The genmon package now has an MQTT publisher that will push out the relevant data to an MQTT broker. This is handy, as you no longer need to fuss over how often to poll with the REST sensors (and all the associated overhead of opening and closing TCP connections, etc.)

All of the MQTT-specific parameters, including which set of data are published, MQTT broker, topic prefix, etc. are specified in a configuration file.

Each specific bit of data is published to its own topic. The MQTT publisher only pushes out changed values, rather than all of them every few seconds… Of note is a parameter that specifies an interval where any data value that’s not changed will still be flushed out. This is handy should you happen to restart Home Assistant – you’ll fairly quickly get the current value. This is also nice if you’re trying to graph some of these values to ensure there’s data points available every so often.

So now there’s a number of MQTT sensor entities (and one MQTT binary_sensor) that can be created.

I’ve attached my generator package as an example.
generator.yaml (8.6 KB)

Hope this is helpful!

5 Likes

great post

@pftg4 - glad you liked it!

Now that I have visibility into what’s going on, it of course raises more questions that are answered. I managed to frighten myself real good while looking at the AC frequency from the generator during one of the weekly exercise runs. It was all over the place! I though something was busted real good in there.

Nope, I was just being stupid. Turns out that by default my generator’s exercise cycle starts running at full speed, and then slows down for next 4 and half minutes just to reduce the noise produced. Slowing down means lower RPM from the motor, means lower AC line frequency from the generator. During the exercise run this is of no consequence since the transfer switch had not switched over to the generator. But I learned something that day!

1 Like

Hi!

Looking into getting a generator as well. Glad to see there is an alternative to the mobile link.

You still got it up and running? How do you like the Generac in general?

I’ve been happy with the Generac generator so far. Looking at the outage log that genmon keeps around, I have a total of 12 hours of run time “in anger” during power outage incidents. One of the outages was 6.5 hours all by itself. It performed completely as expected.

What’s interesting is that the generator is quiet enough that mostly we don’t notice when it starts and runs, especially late at night which seems to be when these interruptions occur. What usually happens is the power drops, there’s about a 20 second delay before the generator starts and transfers the load. Then the laser printer in my home office gets power restored, and it wakes up and makes a noise that wakes me up. And I have to listen closely to hear the generator running.

So I really do need to get around to building an automation to turn some RGB lamps to flashing red or something during an outage :slight_smile:

Now, only 12 hours of runtime under load isn’t really a great baseline to conclude much of anything. Except, perhaps, that it’s clear it doesn’t obviously suck badly and make me regret installing it. It does what it’s supposed to do, and ideally it will continue to do so.

So, I don’t regret making my choice. Things that factor into this for me is that my rural electric co-op will install and service the generator, which is really important. I live out in the sticks, in the country, and having someone competent to support the product is a big deal. I’m also really pleased that something like genmon exists that allows me to monitor and operate the generator. I wonder how many generators this software has sold for Generac?

In my professional experience, I’ve only had experience with larger capacity diesel generators. All things being equal, I think I would prefer having a diesel engine rather than propane/natural gas. However, all things are not equal – the economics for diesel make more sense for larger capacities. And then there’s the question of the longevity of the fuel supply - the Propane in the tank isn’t going to go bad, while diesel fuel will degrade over time, it will have stuff growing in it, etc. And I really don’t have a large enough need for diesel fuel in my lawn tractor to be able to cycle through it. So as a practical matter, propane was a better choice for me.

The genmon software seems to be really well supported, amazingly so given its open-source software.

In short, no regrets so far. I can’t think of anything I’d obviously have done differently.

This is really good. I was stuck before finding this, thank you.
I really like the red light automation idea too.
You’re quite a bit more advanced than me so what i gleaned from your file was the sensor mqtt message labels. I’ve got my work cut out for me to be able to understand and use the rest of your configuration.

This is great. We are looking to put a standby generator at our cabin and I wanted away to monitor it remotely. I know Generac has a service, but I hate 3rd party cloud services and would much rather integrate everything with my own hassio.

Thanks for sharing this

@adamg, when I first started investigating this a bit more than a year ago, my local electric co-op guy told me that they were coming out with a “wi-fi” version of the monitoring thing. Which was of no use, because all it did was talk to their cloud service – over the Internet that was going to be down because of the power outage it was responding to :slight_smile: So I was really pleased to find genmon so I could do all this locally.

And just a couple of days ago, genmon pushed an alert to me for an (apparently annual) “inspect battery” alarm. This is just a maintenance reminder, but who knows how long it would have been before I noticed the yellow alarm light on the side of the generator? Sure is nice to get this delivered to me directly.

I have it showing up in Home Assistant in the sensor.genmon_generator_last_service_log sensor with the value 07/03/19 13:40:03 Inspect Battery

Hey, what about Champion’s generators? I have one for RV trips and other kinds of outdoors activity. Can I adopt the initial code from GitHub or it might be coded from the scratch?

You should look at the code on github (which isn’t my project, just one that I found.) The genmon code starts off with a fundamental assumption that there’s a MODBUS serial interface on the generator’s controller that it can poll to get information about the operation of the generator. From what I can tell, there’s no standard schema for this information, despite having a common MODBUS serial transport and device register abstraction. Watching the genmon project, I’ve seen new Generac generators come along, and there’s some experimental poking around to figure WTF some register does and how it differs from the already known models that genmon supports.

I don’t know anything about Champion generators, nor did I consider them when I did my research. The Generac (and similar) models that I looked at are “fixed”, permanently installed generators with an external transfer switch that operates automatically. So there’s a non-trivial component in the controller aspect of the generator and that also comes along with this monitoring capability.

Most portable generators that I’ve seen don’t seem to have some controller embedded within them that controls their operation, much less expose an external interface. Perhaps yours is different? I dunno… Taking a quick look, it appears that your generator is in a different category and may not expose the same style (or any) monitoring/control interface. I don’t necessarily think that hacking on genmon is the place to start.

However, maybe there’s some signals you can find, and with suitable isolation, connect to some ESP8266/ESP32 thing with ESPHome to monitor some states associated with your generator? Probably piggy-backing on whatever indicator lamps are present would be the place to start investigations. It’s probably a fairly “hostile” operating environment, and you’re likely going to want to have optoisolators or something between GPIO pins on a microcontroller and whatever signals you happen to find.

And there’s already other projects and products that can monitor the power usage on a circuit that would be directly applicable as well. That would seems like one of the more useful things to have available when considering generator operation.

Thank you so much @lmamakos for sharing that generator.yaml file!! I just installed a genmon pi with my new Generac 10kW automatic generator and it’s working well. To be able to integrate it with Home Assistant makes it even more valuable. Thanks again :beers:

This project looks interesting. I’ve got a 20kw generic that I purchased in 2014. I’ve never noticed any sort of accessory port on the controller though. Can you give me some idea where to look for it?

it is in the side panel under the controller. I have a 22kw air cooled, so yours is probably similar.

Note that the connector is likely under a sticker near where other cables plug in.

Thanks. It has always irritated me that I can’t get notifications for problems with the generator. I did annual maintenance a few weeks ago and found the battery had failed (swollen and no charge). No telling how long the generator had been unable to start and I never noticed the little yellow light.

I’m not really up on rpi projects but I think this might be a good one to start with.

The GenMon project is well maintained.
If they updated your firmware there might be a potential issue with genmon.
The GenMon project gives you way more information then the Generac sold system; I was going to get the Generac system but it had not been released yet when I got the generator and then I stumbled across GenMon. I have been running GenMon on my generator for several years now; the only issue I have had is a failure of the SD card on the pi a few months ago.
I utilize MQTT to get info to HA; the Dev added a MQTT notification for system updates upon my request.

“They” meaning Gererac? I don’t have anything installed on the generator that is network capable so no way to install firmware updates.

I have less experience with MQTT than I do with rpi (none :smile:) but I’m sure I can figure that out too. Everything in HA seems to be well documented.

Is there a support forum for genmon? I’m sure to have some questions once I start digging into this.

The service guy may have updated firmware. I know the Dev is working on ways around the changes.

You can web scrap the info from the web server on the pi also; or just link in an iFrame.
I used GenMon years before I knew about HA.