Kohler Oncue Generator Oil Temperature

I’m the same PatPend who reversed the Oncue api linked above. I’m willing to put a bounty to have a Kohler Onque integration developed because I still don’t have the knowhow to do it myself.

I would have made an integration by now if I could keep my generator online. Once the thing seems to go offline, it seems to never come back up until its cold rebooted.

My Oncue would constantly go offline when it was first installed. At the time the Kohler cloud was very unreliable but it has been better (for me at least) over the last few years. How is your controller connected, wifi or ethernet? Has Kohler and/or your installer been any help?

I have been using the kohler.py that is linked above and it has worked fairly well for me. I added the following template sensors:

#=========================
#----- Kohler Oil
#=========================
#  - platform: command_line
#    command: python /config/python_scripts/kohler.py
#    name: kohler_sensors
#    unit_of_measurement: '°F'
# use attribute names in json attributes.  Add number to kohler.py
  - platform: command_line
    command: python /config/python_scripts/kohler.py --process_id 1 2 3 4 5 6 7 11 18 20 26 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 65 66 67 68 69 91 93 94 95 96 97 98 102 113 114 115 116 118 119 121 122 123 124 125 126 128 129 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 153 154 155 156 157 158 159 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 188 190 191 192 193 194 195 196 197 198 199 200 206 208 209 210 211 212 213 215 216 219 220 221 222 225 226 227 228 229 239 240 241 242 243 244 245 246 247 248 265 267 270 271 272 274 275 276 277 278 279 292 294 295 303 306 308 309 310 311 312 313 314 315 316 317 549 550 563 585 586 587 588 700 706 707 713 714 715 722 723 726 732 733 739 740 741 748 749 750 751 752 753 756 852 857 858 859 860 861 862 863 864 865 866 867 868 869 870 872 873 903 904 905 906 907 908 909 910 911 912 913 914 915 1221 1222 1224 1225 1226 1227 1229 1230 1231 1232 1234 1289 1290 1291 1292 1293 1294 1315 1316 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1395 1398 1399 1412 1413 1414 1424 1425 1426 1427 1428 1429 1474 1475 1476 1477 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671
    name: kohler_sensors
    json_attributes:
        - lube_oil_temperature
        - engine_speed
        - battery_voltage
        - engine_total_run_time
        - generator_voltage_ab
        - genset_date_timeof_next_maintenance
    value_template: "{{ value_json.engine_speed }}}"

It is ethernet. It looks like there is a newer firmware available that might fix the issue. I’ll give it a try after the holidays

1 Like

This is awesome, thank you for this integration. Is it possible to install it now (I am happy to help test) or do I have to wait for the next HA release?

I uploaded it to a github repo so it can be tested before the release

mkdir -p /config/custom_components
cd /config/custom_components
git clone https://github.com/bdraco/oncue_custom oncue

Restart

Do you prefer I post feedback here or on github?

Here is fine unless we need to do some debugging

Happy to report no bugs or errors presented themselves. The integration took a little while to initialize and then started up and ran flawlessly.

How often does it poll the Kohler cloud? Using the phone app I started a generator exercise and the integration didn’t update generator state, engine speed etc. for several minutes. The Oncue web app polls every 5 seconds so it refreshes constantly. Please consider making the polling interval shorter, or perhaps user-configurable. Perhaps a “last update time” or presence sensor could be added.

If you’re receptive to feature requests, I think these would be great to have:

In addition to Generator Voltage Average Line To Line and Generator Frequency (presumably measured immediately at the generator output) please consider adding sensors for Source1 Voltage Average Line To Line and Source1 Frequency. These reflect the utility grid and would be useful an many situation, to monitor grid quality and for example to trigger an action upon a brownout condition. Also potentially useful is Source2 Voltage Average Line To Line and Source2 Frequency. Presumably these are generator output measured at the ATS contactor. Although this seems to be redundant with Generator Voltage Average Line To Line and Generator Frequency already implemented in the integration, one can envision a scenario where they differ due to a hardware failure so having both could form the basis of a diagnostic script.

Please consider reporting status of the load control peripheral (“load shedding”). Peripheral parameters for “peripheralid”: “3” are states of the load shedding circuits (load shedding=TRUE/FALSE). It would be useful to monitor these sensors. For example a rule could be created where if one or more devices are in load shed status, adjust thermostat setpoints to decrease the need for load shedding to maintain occupant comfort.

Allowing the integration to start/stop generator exercise would be great. You could get rid of the Kohler app altogether.

https://api.kohler.com/krm/v1/devices/command?sessionkey=SESSIONKEY&device=SERIALNUMBER&service=doaction&value=startunloadedfullspeedexercise
https://api.kohler.com/krm/v1/devices/command?sessionkey=SESSIONKEY&device=SERIALNUMBER&service=doaction&value=startunloadedcycleexercise
https://api.kohler.com/krm/v1/devices/command?sessionkey=SESSIONKEY&device=SERIALNUMBER&service=doaction&value=startloadedfullspeedexercise
https://api.kohler.com/krm/v1/devices/command?sessionkey=SESSIONKEY&device=SERIALNUMBER&service=doaction&value=endexercise

Some other random stuff:

Get current/next exercise details
https://api.kohler.com/krm/v1/devices/exerciseinfo?sessionkey=SESSIONKEY&device=SERIALNUMBER

Get alert count
https://api.kohler.com/krm/v1/notifications/unviewedcount?sessionkey=SESSIONKEY

Get active alerts and event log
https://api.kohler.com/krm/v1/devices/devicedetails?sessionkey=SESSIONKEY&device=SERIALNUMBER&parameters=none&events=25&showperipheraldetails=false&eventoffset=0

Ideally soon the Energy dashboard will [hopefully] support a generator device in addition to grid and solar panel devices, so that all energy sources can be harmonized in one panel.

Thanks again for taking up this integration, it’s a great contribution.

I added a few more here

I added support for the exercises to the aiooncue package, but I’m not sure how valuable that is to add to Home Assistant so I didn’t do it.

It is set to 10 minutes. I’m not sure how Kohler is going to react if we poll more frequently as I don’t want to see the integration get blocked.

Also I uploaded the changes to the custom repo here Kohler Oncue Generator Oil Temperature - #28 by bdraco

Does your genset have an RDC2 controller? What values are you seeing for Genset Total Energy (param 119)? The oncue cloud is showing my total energy is 45gWh over 162 total loaded runtime hours. I wish.

I have the product_name='RDC 2.4', hardware_version='327'

Looks like its a case of GIGO. Something Kohler will have to fix.

Does the integration request a new session key as part of each polling cycle, or does it save the session key for re-use in subsequent polls and only request a new session key if “Invalid session” is returned?

It saves the key between requests and only requests a new one if it gets an error code that its expired.

I see this integration is included in the Feb. 2022 beta. I installed with no issues. Your document calls out different units then I have. I would think if the Kohler generator is supported with Oncue, it will work with your integration. I have the 20RCA generator.