Cmd4
homebridge-cmd4 · v8.0.4
Exposes any HomeKit accessory type driven by shell commands or scripts you provide.
What it says it supports
Devices it names
- Any accessory via exec scripts
Shows up in Apple Home as from its README
Sensor readings in its code
What people report
Generic command-line plugin; the evidence only shows a user running a Samsung home theater switch and a CO2 sensor via scripts.
- Works2
| Device | Status | What they said | Source |
|---|---|---|---|
| Generic CarbonDioxideSensor | Works | carbonDioxideLevel supported by polling it alongside CarbonDioxideDetected; user got it workingSaved copy… CarbonDioxideDetected works in my Home.app, but carbonDioxideLevel are not displayed. Am I wrong? [image: 2019-06-05 23 35 47] This is part of a config.txt. { "type": "CarbonDioxideSensor", "name": "CO2", "carbonDioxideDetected": 0, "carbonDioxideLevel": 0, "polling": false, "interval": 540, "stateChangeResponseTime": 3, "state_cmd": "ruby ~/.homebridge/cmd4.rb" }, This is part of a ruby script. mode, acs_name, chara, value = ARGVcase acs_kindwhen "CO2" field = "co2" ppm = current_value(field,location) case chara when "CarbonDioxideDetected" puts ppm > 1000 ? 1 : 0 when "CarbonDioxideLevel" … Excerpt saved from GitHub on 2026-10-22. | Issue #25 · 2019-06 |
| Samsung HT-D5500 home theater | Works | Set up as a Switch via scripts; manufacturer/model/serial can be set for any deviceSaved copy… device.Which I have done 😉 I’m busy scripting up some motion sensors to be used as person presence detectors so I get notifications when my kids come home. What I’d love to find is a list of all devices supported by the Apple HomeKit app, as many of them appear as Not Supported. I also tried the Television device for my TV, but found it dificult to configure And the other thing that I note is that Gotta solve this too: [6/5/2020, 21:32:52] [Cmd4] The file $HOME/.homebridge/Cmd4Scripts/PersonPresent.sh does not exist, It is highly likely the state_cmd will fail. Hint: Do not use wildcards that … Excerpt saved from GitHub on 2026-10-22. | Issue #53 · 2020-06 |
Gathered from the plugin’s GitHub issues, pull requests, discussions, wiki and docs, and from r/homebridge. These are individual reports, so check the linked thread and the date before you buy.
How it connects
Local
Executes local shell commands
Compatibility
| Verified by Homebridge | No |
|---|---|
| Homebridge versions | ^1.8.0 || ^2.0.0-beta.0 |
| Homebridge 2.0 | Yes |
| Node.js | ^18.20.4 || ^20.18.0 || ^22.10.0 || ^24.0.0 |
| Settings in Homebridge UI | No |
| Matter | No |
| License | MIT |
Community signals
| Downloads a week | 80 |
|---|---|
| Downloads a month | 684 |
| GitHub stars | 158 |
| Open issues | 2 |
| Closed issues | 141 |
| Last code push | 2026-02-03 |
| Latest version | 8.0.4 (2026-02-03) |
| First published | 2017-12-06 |
| Releases | 123 |
In ReReHome
Whatever this plugin publishes reaches Apple Home as a normal HomeKit accessory behind your Homebridge bridge, so ReReHome shows and controls it like any other.
Bridges get their own settings page listing the accessories behind them.
Caveats from the README
- Author stopped supporting it as of September 2025
HomeKit services in its code
Found by scanning the published npm package. A plugin can register a service only for some devices.
- AccessCode
- AccessControl
- AccessoryMetrics
- AccessoryRuntimeInformation
- AirPurifier
- AirQualitySensor
- AssetUpdate
- Assistant
- AudioStreamManagement
- Battery
- BridgeConfiguration
- BridgingState
- CameraControl
- CameraOperatingMode
- CameraRTPStreamManagement
- CameraRecordingManagement
- CarbonDioxideSensor
- CarbonMonoxideSensor
- CloudRelay
- ContactSensor
- DataStreamTransportManagement
- Diagnostics
- Door
- Doorbell
- Fan
- Fanv2
- Faucet
- FilterMaintenance
- FirmwareUpdate
- GarageDoorOpener
- HeaterCooler
- HumidifierDehumidifier
- HumiditySensor
- InputSource
- IrrigationSystem
- LeakSensor
- LightSensor
- Lightbulb
- LockManagement
- LockMechanism
- Microphone
- MotionSensor
- NFCAccess
- OccupancySensor
- Outlet
- Pairing
- PowerManagement
- ProtocolInformation
- SecuritySystem
- ServiceLabel
- Siri
- SiriEndpoint
- Slats
- SmartSpeaker
- SmokeSensor
- Speaker
- StatefulProgrammableSwitch
- StatelessProgrammableSwitch
- Switch
- TapManagement
- TargetControl
- TargetControlManagement
- Television
- TelevisionSpeaker
- TemperatureSensor
- Thermostat
- ThreadTransport
- TimeInformation
- TransferTransportManagement
- Tunnel
- Valve
- WiFiRouter
- WiFiSatellite
- WiFiTransport
- Window
- WindowCovering