All Projects → ztalbot2000 → Homebridge Cmd4

ztalbot2000 / Homebridge Cmd4

Licence: apache-2.0
CMD4 Plugin for Homebridge - Supports ~All Accessory Types & now all Characteristics too

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Homebridge Cmd4

homebridge-switcheroo
Simple on/off or multiswitch radio buttons for http reqs. Useful for lights, A/V systems, home automation, whatever
Stars: ✭ 38 (-58.7%)
Mutual labels:  homebridge, switch, homekit
Homebridge Http Switch
Powerful http switch for Homebridge: https://github.com/homebridge/homebridge
Stars: ✭ 111 (+20.65%)
Mutual labels:  homebridge, homekit, switch
Homebridge Webos Tv
Homebridge plugin for LG webOS TVs
Stars: ✭ 433 (+370.65%)
Mutual labels:  homebridge, homekit
Homebridge Raspbian Image
Official Homebridge Raspberry Pi Image based on Raspbian Lite.
Stars: ✭ 534 (+480.43%)
Mutual labels:  homebridge, homekit
Cmd
The standard library flag package with its missing features
Stars: ✭ 32 (-65.22%)
Mutual labels:  cmd, command
Homebridge
HomeKit support for the impatient
Stars: ✭ 19,073 (+20631.52%)
Mutual labels:  homebridge, homekit
Homebridge Unifi Protect
📹 Complete HomeKit integration for UniFi Protect with full support for most features including autoconfiguration, motion detection, and multiple controllers: https://homebridge.io
Stars: ✭ 335 (+264.13%)
Mutual labels:  homebridge, homekit
Blockcmd
A PocketMine-MP plugin to block certain commands from being used by players in your server
Stars: ✭ 12 (-86.96%)
Mutual labels:  cmd, plugin
homebridge-lg-thinq-ac
Homebridge plugin for LG ThinQ-enabled portable air conditioner
Stars: ✭ 44 (-52.17%)
Mutual labels:  homebridge, homekit
Homebridge Loxone Ws
Websocket based Loxone plugin for homebridge
Stars: ✭ 37 (-59.78%)
Mutual labels:  homebridge, homekit
Homebridge Govee
Homebridge plugin to control Govee devices supported by the official Govee API.
Stars: ✭ 33 (-64.13%)
Mutual labels:  homebridge, homekit
Homebridge Hubitat Tonesto7
Hubitat Homebridge Plugin
Stars: ✭ 45 (-51.09%)
Mutual labels:  homebridge, homekit
Hoobs
Build your Smart Home with HOOBS. Connect over 2,000 Accessories to your favorite Ecosystem.
Stars: ✭ 325 (+253.26%)
Mutual labels:  homebridge, homekit
Homebridge Smartthings
SmartThings Homebridge Plugin
Stars: ✭ 323 (+251.09%)
Mutual labels:  homebridge, homekit
Homepoint
Espressif ESP32 Based Smarthome screen for MQTT
Stars: ✭ 391 (+325%)
Mutual labels:  homebridge, homekit
Homebridge Tplink Smarthome
TP-Link Smarthome Plugin for Homebridge
Stars: ✭ 277 (+201.09%)
Mutual labels:  homebridge, homekit
Homebridge Camera Ffmpeg
Homebridge Plugin Providing FFmpeg-based Camera Support
Stars: ✭ 726 (+689.13%)
Mutual labels:  homebridge, homekit
Homebridge Weather
OpenWeatherMap Plugin for Homebridge
Stars: ✭ 78 (-15.22%)
Mutual labels:  homebridge, plugin
homebridge-ecobee3-sensors
Homebridge plugin that exposes Ecobee 3 sensors as HomeKit accessories.
Stars: ✭ 21 (-77.17%)
Mutual labels:  homebridge, homekit
homebridge-konnected
A Homebridge plugin for Konnected Alarm Panel devices
Stars: ✭ 25 (-72.83%)
Mutual labels:  homebridge, homekit

Homebridges-cmd4 - CMD4 Plugin for Homebridge - Supports ~All Accessory Types and now all Characteristics too!!



    Cmd4 is a plugin for Homebridge that lets you see what Homebridge and Homekit are all about, without actually owning a single accessory! For the more advanced user, Cmd4 brings CLI support for all device types (Accessories) and characteristics.

Homebridge UI User. Do not click on any inline links. Homebridge UI does not supprt them. Bug#1098



Table of Contents



About the Cmd4 Plugin

    This plugin allows you to see what Homebridge is all about, without having any home control accessories. If you can run Homebridge and install this plugin, all the possible accessories are now available to you within HomeKit or Eve. (Except Camera Streaming).

    Similar to other command plugins, you can use Cmd4 to execute command line interface (CLI) scripts, but with Cmd4 the devices don't just appear in HomeKit as a Switch or a Light, but now they can appear as a Garage Door opener, Air Purifier ... and you can control all of their characteristics too.



How the Cmd4 Plugin Works

    Cmd4 comes with a fully populated and documented config.json file that is set to using just the cached entry's in the config file itself. This makes HomeKit behave as if you actually have all these Accessories! If you choose to add in your own scripts, the Cmd4 Github pages at http://ztalbot2000.github.io/homebridge-cmd4 have example script templates and further development instructions.



Features

    Cmd4 supports, Lights, Garage Door Openers, Outlets, Switches, Lock Maintenance Systems, Lock Management Systems, Humidity Sensors, Doors, Light Sensors, Temperature Sensors, Contact Sensors, Motion Sensors, Thermostats, Security Systems, Battery Services, Filter Maintenance Systems, Air Purifiers, Television, Television Speaker, Input Sources, Irrigation Systems, ... everything but Camera Streaming since it is not pliable to a command line Interface.

    Cmd4 also supports three types of polling, modified by the "fetch" directive.

  • { "fetch": "Always" } - As before, Always fetch characteristic value. ( Default )
  • { "fetch": "Cached" } - Never fetch characteristic value. Use cached value. The cached value would have to be updated through polling.
  • { "fetch": "Polled" } - Polled characteristics act like before, "Always". Non polled characteristic values are fetched from cache.

    Cmd4 supports Fakegato History and retaining previous state over restarts.

    Cmd4 can be configured to respond to actual devices directly or by modifying the script file it calls.

    Cmd4 Version 2.0 supported linked Accessories and the latest 3.0 Version supports both Platform plugin and Accessory plugin configurations as documented on developers.homebridge.io.



Screenshots



Installation Details

Step 1. Install Homebridge

See homebridge for complete details.

Step 2. Install Cmd4 Plugin

   *SHELL*> sudo npm install -g --unsafe-perm homebridge-cmd4

Step 3. Install/Update your config.json file

    Use the provided config.json file or add it to your own.

   *SHELL*> cp /usr/lib/node_modules/homebridge-cmd4/Extras/config.json $HOME/.homebridge/

Step 4. Restart homebridge

See homebridge for complete details.

Step 5. Try Homekit

    If you are not already familiar with Homekit, you may wish to look at the documentation for Homebridge and how to configure it with Homekit. The gist of it is that you enter the manual code defined in the config.json file. I chose 5555555 for simplicity.

That's it! Enjoy all your new Virtual Accessories!. ✅



Basic Troubleshooting

Error: Command failed

    This error is indicative to many situations. The most common is that the command took to long to run.

  Error: Command failed: /homebridge/Server.sh Get 'Server' 'On'

    at ChildProcess.exithandler (child_process.js:297:12)
    at ChildProcess.emit (events.js:193:13)
    at maybeClose (internal/child_process.js:1001:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
  killed: true
  code: null
  signal: SIGTERM,
  cmd: "/homebridge/Server.sh Get Server On"

Check that the command exists, but also that the timeout value in your config.json for that accessory is not too low.

Removing Cached Information

    Starting with Cmd4 Version 3 the restartRecover option, defaulted to true, will mean that sometimes changing the config.json accessory options will have no affect. There are two ways to resolve this.
Note: As of version 3.0.4, Cmd4 directives like polling, state_cmd, etc will try to be restored from the config.json.

  • Restart with { restartRecover: false } set in your config.json.
  • Remove Homebridges cached information.
       ^Shell*> rm -rf $HOME/.homebridge/accessories $HOME/.homebridge/persist
    

Debug Steps

Step 1. Change to your $HOME directory

    Homebridge is expected to run from a user's home directory where it can find the .homebridge/config.json.

   *SHELL*> cd $HOME

Step 2. Run homebridge in debug mode

   *SHELL*> DEBUG=* homebridge -D



Rationale

    After playing with homebridge-cmd and then homebridge-cmdswitch2, I really wanted to control as much as I could. I did not have all the devices, but I did have a light and a Sony Android TV. I wanted to control these and see what else I could do.
    If you were wondering what happened to version 3, well I learned a lot, hence the working cmd4.



Todo

  • [X] Linked characteristics, i.e. a smoke detectors battery is not yet linked.
  • [ ] Support for custom characteristics for an accessory. Not possible as it would not be displayed by any GUI
  • [X] Support multi word device names. (Technically done, but scripting is hard for newbies).
  • [ ] Scripting language to avoid creating new Homebridge modules.
  • [ ] HTTP commands. Might be just to many options
  • [ ] Become Homebridge Certified. ( The schema file would be very difficult )



Contributing

    Best ways to contribute

Promotion

    Like the project? Please support to ensure continued development going forward:

  • Star this repo on [GitHub][homebridge-cmd4-repo]
  • Follow the repo on [GitHub][homebridge-cmd4-repo]
  • Follow me



Inspiration and special thanks

Based on the best of:



License

See LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].