comap_genset is a HACS-compatible custom integration for the ComAp InteliLite 4 AMF20 controller.
The integration is built around the real UMOD export from this installation:
comap_amf20_actual_profile_from_uploaded_umod.jsoncomap_amf20_uploaded_registers.csv
It does not use the public sample map as the primary source of register addresses.
- Local LAN only, Modbus/TCP only
- Config flow and options flow
DataUpdateCoordinatorbased polling- Separate
sensor,binary_sensor, andbuttonplatforms - Multi-register decoding for
stringandint32 - Profile-driven scaling and display precision
- Read-only by default
- Optional raw unknown register exposure from the CSV export
- Experimental
start_stop_testcontrol via coil4700, gated behind an option - Optional user-configured Modbus coil controls for alarm acknowledge, reset, start, and stop
- Diagnostics endpoint
- RPM
- Load active power total and L1/L2/L3
- Generator frequency
- Generator voltage L1-N / L2-N / L3-N
- Load current L1 / L2 / L3
- Battery voltage
- Oil pressure
- Coolant temperature
- Fuel level
- Genset kWh
- Running hours
- Controller mode raw
- Engine state raw
- Connection type raw
- ID string
- Firmware version
- Alarm word 1..8
The JSON profile contains more named values, and the integration exposes them as sensors as well.
This repository is currently prepared as a HACS custom repository.
Repository URL:
https://github.com/wrybak/comap-genset-ha
Quick link:
Steps:
- Open HACS in Home Assistant.
- Open the menu in the top-right corner.
- Select
Custom repositories. - Add
https://github.com/wrybak/comap-genset-ha. - Select repository type
Integration. - Click
Add. - Search HACS for
ComAp Genset. - Open the repository page and click
Download. - Restart Home Assistant.
- Go to
Settings -> Devices & services -> Add integration. - Select
ComAp Genset. - Enter:
- controller IP or local hostname
- TCP port, usually
502 - Modbus
unit_id - poll interval in seconds
After installation, HACS stores the integration under custom_components/comap_genset.
unit_id is the Modbus device address used inside the Modbus/TCP request.
Start with:
1if you do not know the configured value
How to tell what is wrong:
- Wrong host or port: the integration usually cannot open the TCP connection at all, setup fails immediately, and Home Assistant logs connection errors such as timeout, refused connection, or unreachable host.
- Wrong
unit_id: TCP connection to the controller works, but register reads fail because the controller does not answer for that slave address or returns Modbus errors. Setup may fail even though the IP and port are correct.
Practical checks:
- Confirm the controller IP address and that Modbus/TCP is enabled on port
502. - Try
unit_id: 1first. - If that fails but the controller is reachable on the network, verify the Modbus slave address in the ComAp controller settings or ComAp service tool.
- If another SCADA, PLC, or Home Assistant Modbus setup already talks to this controller, reuse the same
unit_id.
poll_interval_secondsunit_idexpose_raw_unknown_registersdefaultfalseenable_experimental_controldefaultfalseenable_write_controlsdefaultfalseenable_dangerous_controlsdefaultfalse- optional confirmed coil addresses:
acknowledge_alarm_coilreset_fault_coilstart_genset_coilstop_genset_coil
When experimental control is enabled, the integration logs a clear warning and exposes:
- button entity
Start/Stop Test - service
comap_genset.start_stop_test - optional configured buttons/services for:
acknowledge_alarmreset_faultstart_gensetstop_genset
- advanced experimental services:
comap_genset.pulse_coilcomap_genset.write_register
service: comap_genset.start_stop_test
data:
entry_id: "YOUR_CONFIG_ENTRY_ID"If only one ComAp controller is configured, entry_id can be omitted.
Named configured command example:
service: comap_genset.acknowledge_alarm
data:
entry_id: "YOUR_CONFIG_ENTRY_ID"Generic experimental write examples:
service: comap_genset.pulse_coil
data:
entry_id: "YOUR_CONFIG_ENTRY_ID"
address: 4700service: comap_genset.write_register
data:
entry_id: "YOUR_CONFIG_ENTRY_ID"
address: 5000
value: 1Low fuel notification:
alias: ComAp Low Fuel Alert
triggers:
- trigger: numeric_state
entity_id: sensor.<your_controller_name>_fuel_level
below: 20
actions:
- action: notify.mobile_app_phone
data:
message: "Generator fuel level dropped below 20%."
mode: singleRunning hours threshold:
alias: ComAp Maintenance Reminder
triggers:
- trigger: numeric_state
entity_id: sensor.<your_controller_name>_running_hours
above: 250
actions:
- action: persistent_notification.create
data:
title: "ComAp maintenance"
message: "Running hours crossed 250h. Review the genset service interval."
mode: singleAlarm word change watcher:
alias: ComAp Alarm Word Changed
triggers:
- trigger: state
entity_id:
- sensor.<your_controller_name>_alarm_word_1
- sensor.<your_controller_name>_alarm_word_2
- sensor.<your_controller_name>_alarm_word_3
- sensor.<your_controller_name>_alarm_word_4
actions:
- action: logbook.log
data:
name: "ComAp Genset"
message: "Alarm word changed: {{ trigger.entity_id }} -> {{ trigger.to_state.state }}"
mode: queued- The integration is intentionally read-only by default.
- Additional write controls are available only when you explicitly enable them in options and provide confirmed addresses.
- Raw
BinaryObjectentities are best-effort. If the controller does not expose direct discrete input reads for some unknown bits, those entities will remain unavailable. - The UMOD export used here contains no Setpoint section, so writable holding-register control is intentionally not implemented in the MVP.
- Enum decoding tables for
controller_mode_raw,engine_state_raw, andconnection_type_raware not included yet. Those values are exposed as numeric raw sensors. - This repository does not guess write addresses for
acknowledge_alarm,start_genset,stop_genset,reset_fault, or controller mode changes. You must confirm those addresses from your actual controller documentation or service tooling before enabling them.
The repository is prepared for HACS releases with:
hacs.json- GitHub Actions for
HACS validateandHassfest - GitHub Releases using semantic version tags matching
manifest.json
Current release line:
0.2.2