Skip to content

Releases: ztalbot2000/homebridge-cmd4

New Types and a critical bug fix

12 Feb 19:19
Compare
Choose a tag to compare

Hi all,

    I hope you all enjoy Cmd4. I've updated it to reflect some new Accessories and Characteristics supported by Homebridge.
Most of these involve TLV8 (binary) values, but since Homebridge has them so should we 😀. I'm proud of the way I wrote Cmd4 in that adding new Accessories and Characteristics are as simple as updating the library files, so no code changes required 😁. This is why only the minor version update bump.

The New Accessories are:

AccessoryMetrics
AssetUpdate
Assistant
AudioStreamManagement
Battery
CameraRecordingManagement
CloudRelay
DataStreamTransportManagement
NFCAccess
SiriEndpoint
ThreadTransport

The new Characteristics are:

AssetUpdateReadiness
SupportedAssetTypes
ConfigurationState,
NFCAccessControlPoint,
NFCAccessSupportedConfiguration
SiriEndpointSessionStatus
ThreadControlPoint
ThreadNodeCapabilities
ThreadStatus
ThreadOpenThreadVersion

Bug fixes😢

Bug #130, linked accessories not accesible after restart (aeab5a40[]
Thanks to crbyxwpzfl for noticing this one! The bug probably existed for as long as LinkedTypes was added. Unit testing over restarts has always been difficult so I thank crbyxwpzfl very much for reporting it.

On a side note, if you are wondering about Cmd4 support for Homebridge-ui, I'm slowly, very slowly, working on it. My thoughts were to auto generate the schema based on the Cmd4 Library files. The dilemma is all the options Cmd4 supports and the limitations of the JSON schema format, coupled with homebridge-ui only supporting up to v6. That is not really an excuse, but hey this is all gratis anyway. I have not forgotten about it though!

Take care,
John Talbot

Minor fix for FakeGato Graph

30 Jan 18:10
Compare
Choose a tag to compare

Hi all,

There are three minor changes, one to fix FakeGato graphing for bug #124
The second resolves a constant that had a dangling underscore.
Finally there is a possability to try a different WoRm queue, being WoRm2 that might unclog large scale Aircon. They will test this out.

v6.0.4

04 Aug 15:25
Compare
Choose a tag to compare

v6.0.4 Fixes a bug with LinkedTypes not using global Constants
v6.0.3 Simplifies the schema for the upcoming Homebridge-UI integration. You may need to adjust your config.json accordingly, but highly unlikely. Sorry for the inconvenience.
v6.0.2 Solves an issue for future homebridge-ui integration and schema display for possible constants. There should be zero affect.
v6.0.1 Resolves bug#116. A day one bug where Cmd4 tried to validate the users state_cmd. This was never a good thing to do.

When Cmd4 was first implemented, I tried to be considerate in allowing either lower or upper case key/value pairs. Unfortunately as Homebridge has evolved and to use homebridge-ui you require a config-schema.json which accurately describes the Cmd4 Schema. This is impossible to achieve when the key/value pairs can be either lower or upper case; Especially when Cmd4 supports so many characteristics and devices.
To this end; Cmd4 Version 6 will be the version that prepares you for the change by Warning you that your config.json needs to be corrected. The duration of this preparatory stage will be pretty generous as I am still working on the config-schema.json integration with Homebridge-ui. I had to stop when it became evident what changes were required for Homebridge-ui integration.

Here are the rules / changes:

  1. No script changes are required. Cmd4 still sends: Get/Set < value >
  2. Constants are still fully capitalized. i.e. "statusFault": "NO_FAULT" or "category": "TELEVISION"
  3. As before Device Types start with an upper case. i.e. "type": "Television"
  4. Cmd4 directives and characteristics start with lower case: i.e. "polling": [ { "characteristic": "volume", "interval": 10 }]
  5. For advanced devices like the AirCon, Queue types remain the same:
    i.e. queueTypes: [ { "queueName": "MyQueue", "queueType": "WoRm" }]

Finally
I tried to make the warnings very explict for what the correction should be and believe me; I am more sorry to have
to do this than you may think.

Thank you,
John Talbot

Optimization & Simplification

27 Jul 12:10
Compare
Choose a tag to compare

v5.1.1 - bug #113 Fix Example script for AnyDevice SecuritySystemTargetState and create new example SecuritySystem script
v5.1.0 - As Part of V5 Performance/Optimization release, Cmd4 no longer calls process.exit that could take down the bridge if you had configured Cmd4 incorrectly. Instead Cmd4 uses "throw" which is more widely acceptable.
v5.0.2 - Bug fix for issue #112. Fakegato causes Cmd4 to not start in v5
v5.01 - Bug fix for thrown exception for incorrect use of this; Only encountered when a massive WoRm queue failure is created.

Cmd4 v5 is meant to be a simplification release as per the recommendations by homebridge. See https://git.io/JtMGR. With this major release a lot of options that were developed along the way are now automatic.
Gone are the very confusing Cmd4_Mode and RestartRecovery.

  • RestartRecovery is now automatic; Which not enabling could cause your device to turn on/off over a restart
  • Cmd4_Mode is as per https://git.io/JtMGR where the callback is immediate to homebridge with the data from your device to follow.
  • Demo mode is still available by not defining any polling.

Internally there is a lot of code that was removed, which only contributed to the complexity of Cmd4.
The only impact to you are the warnings that Cmd4_Mode and RestartRecovery are no longer required.

I hope you enjoy the changes
John Talbot

Overall Performance improvements

25 Jun 01:43
Compare
Choose a tag to compare

I've tried to make Cmd4 faster by removing duplicate/unneccessary code. This helps stabilize the queue.

As a note to those who use the queue, (Specifically Aircon).
A "Set" to this device can only happen if nothing is happening at the same time. This is the purpose of the Queue in "WoRm" (Write Once Read Many mode). However it is impossible to detect if you are interacting with the actual device at the same time, thus momentary errors can appear from homebridge and Cmd4.
The fact that Cmd4 tries to alleviate this Read/Write problem at all is significant. Many thanks to Mitchel Williams for all his efforts.

Take care,
John Talbot

I hope you all enjoy,
John Talbot

Major version changed as how to use Debug changed

24 Jun 05:38
Compare
Choose a tag to compare

Hi all,

Cmd4 v4.0.0 alters the way you enable Debug mode for this plugin only.

The reason for this is to NOT enable Debug in other plugins as well.

As the new Cmd4 documents reflect; There are two ways enable Debug mode for the Cmd4 plugin only.
Method 1

  • Add to your config.json in the Platform section of Cmd4, "Debug": true
    Method 2
  • Set the environmental variable DEBUG=Cmd4
    Note: for Homebridge-config-UI-x this means you just enter Cmd4 in the section for the DEBUG environmental variable.

Enjoy,
John Talbot

Polling queue fix for Aircon

13 Jun 00:29
Compare
Choose a tag to compare

The polling queue becomes a little more intelligent in that

  1. Only the latest setValue of a characteristic is used.
  2. setValues are placed ahead of getValues
  3. The stateChangezresponseTime applies to all characteristics of the devices queue
  4. Queue recovery purges old requests, instead of them accumulating.

As a note to all, A stateChangeResponseTime of Zero is the time taken for the script to run. Only devices like GarageDoorOpeners should have a stateChangeResponseTime to go between open and closed.
The timeout is how long the script can take before being killed.

Take care,
John Talbot

AntiFeat - Queue Burst is a bust

29 May 19:15
Compare
Choose a tag to compare

Hi all,

The Queue feature itself is meant for the Aircon, a special device which has many accessories in one device. Trying to talk to this thing has been nothing short of a never ending endeavour. The thought was that you could send all read characteristics at one (Burst), but the real fact is that when you interact with the device from outside HomeKit, Burst just confuses it more.
This release removes burst, but alters the queue that if an error is detected, Reads (Gets) are delayed for 1 minute until it is expected that the device is no longer manually being interacted with.

Hopefully this will do the trick.
John Talbot

Unit testing constants ...

26 May 03:16
Compare
Choose a tag to compare

Hi all,

Unit testing is a big part of Cmd4 with 9268 running successfully in under a minute before every submission. I'm always looking for new ways to benefit from unit testing.

  • This update checks not only if all constants that are defined are used, but it also scans all the source files for constants that were not defined. There were actually three used that were not defined, but just affected a possible FakeGato config of the Google file system.

Take care,
John Talbot

Resolve queue burst interval being zero

23 May 01:03
Compare
Choose a tag to compare

A fix for the possible inadvertent creation of a burst interval of zero, meaning it would run continuously.
Changed related characteristics to an array for future handling of multiple related characteristics.

Take care,
John Talbot