Grizzly - Z-Wave Library for Elixir

v0.8.5

  • Fixes
    • various spelling and documentation fixes
    • Dialyzer fixes
3 Likes

v0.8.7

  • Enhancements
    • Support FIRMWARE_UPDATE_MD meta data report command v5
1 Like

v0.8.8

  • Enhancements
    • Make Z-Wave versions standard version formatting
  • Fixes
    • Paring the FirmwareMD report for version 5
    • Fix spec for queued commands

v0.9.0-rc.0

This is release is a massive rework of the entire API and internal works of Grizzly. Please see the release notes for more details as there are a number of breaking changes.

The reasons for this was to provide a better API, better startup times, more robustness with the runtime, and hopefully better long term maintenance. Grizzly does a lot in the way to handle the sequencing of commands the lifecycle of sending and receiving them. Some of this a little complex and was hard to test. Now, while still a little complex, these sections of the code that had a higher risk for regressions are not built in such a way that we can test them. This makes maintaining and releasing code much less low risk.

Also, we did not use OTP in such a way to provide a self-healing system in areas that would greatly benefit from that. With this release all that has better supervision, meaning that the underlining Z-Wave communication should never get into a state that isn’t self-healing. This is very important for embedded devices as they should be able to run indefinitely without human interaction and having a self-healing system is key to achieving this.

For more detailed guide to the breaking changes and how to upgrade please see
our Grizzly v0.8.0 -> v0.9.0 guide.

This release presents a simpler API, faster boot time, more robustness in Z-Wave communication,
and resolves all open issues on Grizzly that were reported as bugs.

Removed APIs

  • Grizzly.Node struct
  • Grizzly.Conn module
  • Grizzly.Notifications module
  • Grizzly.Packet module
  • Grizzly.close_connection
  • Grizzly.command_class_versions_known?
  • Grizzly.update_command_class_versions
  • Grizzly.start_learn_mode
  • Grizzly.get_command_class_version
  • Grizzly.has_command_class
  • Grizzly.connected?
  • Grizzly.has_command_class_names
  • Grizzly.config
  • Grizzly.Network.busy?
  • Grizzly.Network.ready?
  • Grizzly.Network.get_state
  • Grizzly.Network.set_state
  • Grizzly.Network.get_node
  • Grizzly.Node.new
  • Grizzly.Node.update
  • Grizzly.Node.put_ip
  • Grizzly.Node.get_ip
  • Grizzly.Node.connect
  • Grizzly.Node.disconnect
  • Grizzly.Node.make_config
  • Grizzly.Node.has_command_class?
  • Grizzly.Node.connected?
  • Grizzly.Node.command_class_names
  • Grizzly.Node.update_command_class_versions
  • Grizzly.Node.get_command_class_version
  • Grizzly.Node.command_class_version_known?
  • Grizzly.Node.update_command_class
  • Grizzly.Node.put_association
  • Grizzly.Node.get_association_list
  • Grizzly.Node.configure_association
  • Grizzly.Node.get_network_information
  • Grizzly.Node.initialize_command_versions

Moved APIs

  • Grizzly.reset_controller -> Grizzly.Network.reset_controller
  • Grizzly.get_nodes -> Grizzly.Network.get_node_ids
  • Grizzly.get_node_info -> Grizzly.Node.get_node_info
  • Grizzly.Notifications.subscribe -> Grizzly.subscribe_command and
    Grizzly.subscribe_commands
  • Grizzly.Notifications.unsubscribe -> Grizzly.unsubscribe
  • Grizzly.add_node -> Grizzly.Inclusions.add_node
  • Grizzly.remove_node -> Grizzly.Inclusions.remove_node
  • Grizzly.add_node_stop -> Grizzly.Inclusions.add_node_stop
  • Grizzly.remove_node_stop -> Grizzly.Inclusions.remove_node_stop
  • Grizzly.Client -> Grizzly.Transport
  • Grizzly.Security -> Grizzly.ZWave.Security
  • Grizzly.DSK -> Grizzly.ZWave.DSK
  • Grizzly.Node.add_lifeline_group -> Grizzly.Node.set_lifeline_association

We moved all the commands and command classes to be under the the
Grizzly.ZWave module namespace and refactored the command behaviour.

Grizzly.send_command Changes

The main API function to Grizzly has changed in that it only takes a node id,
command name (atom), command args, and command options.

Also it no longer returns a plain map when there is data to report back from
a Z-Wave node but it will return {:ok, %Grizzly.ZWave.Command{}}.

Please see Grizzly and Grizzly.ZWave.Command docs for more information.

Connections

Grizzly uses the zipgateway binary under the hood. The binary has its own
networking stack and provides a DTLS server for us to connect to. Prior to
Grizzly v0.9.0 we greatly exposed that implementation detail. However, starting
in Grizzly v0.9.0 we have hidden that implementation detail away and all
connection functionally is handle by Grizzly internally. This leaves the
consumer of Grizzly to just work about sending and receiving commands.

If you are using %Grizzly.Conn{} directly this is no longer available and you
should upgrade to just using the node id you were sending commands to.

When Grizzly is Ready

We use to send a notification to let the consumer to know when Grizzly is
read. Staring in v0.9.0 the consumer needs to configure Grizzly’s runtime
with the on_ready module, function, arg callback.

config :grizzly,
  runtime: [
    on_ready: {MyApp, :some_function, []}
  ]

See Grizzly.Runtime for more details

Inclusion Handler Behaviour

Adding and removing a Z-Wave node can be a very interactive process that
involves users being able to talk to the including controller and device. The
way Grizzly < v0.9.0 did it wasn’t vary useful or robust. By adding the the
inclusion handler behaviour we allow the consumer to have full control over the
inclusion process, enabling closer to Z-Wave specification inclusion process.

See Grizzly.InclusionHandler and Grizzly.Inclusions for more information.

Command Handler Behaviour

If you need to handle a Z-Wave command lifecycle differently than the default
Grizzly implementation you can make your own handler and pass it into
Grizzly.send_command as an option:

Grizzly.send_command(node_id, :switch_binary_set, [value: :on], handler: MyHandler)

See Grizzly.CommandHandler for more information.

Supporting Commands

At the point of the rc.0 release are not fully 100% supporting the same
commands as in < v0.8.8, but we are really close. The commands that we haven’t
pulled over are not critical to average Z-Wave device control. We will work to
get all the commands back into place.

Thank you to Jean-Francois Cloutier for contributing so much to this release.

4 Likes

v0.9.0-rc.1

Breaking Changes

  • Grizzly.ZWave.IconTypes removed icon_type from the atom values of the
    icon name.
  • Grizzly.ZWave.DeciveTypes.icon_name() ->
    Grizzly.ZWave.DeviceTypes.name()
  • Grizzly.ZWave.DeciveTypes.icon_integer() ->
    Grizzly.ZWave.DeviceTypes.value()

Enhancements

  • Doc updates
  • Internal code quality
  • Deps updates
  • Better types around DSKs
  • CI support for elixir versions 1.8, 1.9, and 1.10
  • Support all versions of the meter report
  • Support a low battery report

v0.9.0-rc.2

Deprecated

  • Grizzly.Node.get_node_info/1 - use Grizzly.Node.get_info/1 instead

Added

  • Grizzly.Node.get_info/1
  • Grizzly.ZWave.CommandClasses.Supervision
  • Grizzly.ZWave.Commands.SupervisionGet
  • Grizzly.ZWave.Commands.SupervisionReport
  • Grizzly.ZWave.CommandClasses.SensorBinary
  • Grizzly.ZWave.Commands.SensorBinaryGet
  • Grizzly.ZWave.Commands.SensorBinaryReport

Enhancements

  • Support for DoorLockOperationReport >= V3 parsing

Fixes

  • Bad parsing of NodeAddStatus :failed value

Thank you to those who contributed to this release:

  • Jean-Francois Cloutier

v0.9.0-rc.3

Enhancements

  • Some Z-Wave devices report the wrong value for the switch multilevel
    report so we added support for those values.

Fixes

  • When two processes quickly sent the same command to the same device only
    one process would receive the response

Thank you to those who contributed to this release:

  • Jean-Francois Cloutier

v0.9.0-rc.4

Enhancements

  • Add Grizzly.ZWave.Commands.FirmwareMDGet
  • Add Grizzly.ZWave.Commands.FirmwareUpdateMDRequestGet
  • Add Grizzly.ZWave.Commands.FirmwareUpdateMDRequestReport
  • Add Grizzly.ZWave.Commands.FirmwareUpdateMDStatusReport
  • Add Grizzly.ZWave.Commands.FrimwareUpdateMDReport
  • Add Grizzly.ZWave.Commands.FirmwareUpdateActivationSet
  • Add Grizzly.ZWave.Commands.FirmwareUpdateActivationReport
  • Remove some dead code

Fixes

  • When resetting the controller we were not closing the connections to
    the nodes. This caused some error logging in zipgateway and also left
    open unused resources. This could cause problems later when reconnecting
    devices to resources that were already in the system.

Thank you to those who contributed to this release:

  • Jean-Francois Cloutier

v0.10.0

Removed the parameter :secure_command_classes from
Grizzly.ZWave.Command.NodeInfoCacheReport. Also updated the param
:command_classes to be a keyword list of the various command classes that
the node can have.

The fields in the keyword list are:

  • :non_secure_supported
  • :non_secure_controlled
  • :secure_supported
  • :secure_controlled

If you are using :secure_command_classes for checking if the device is
securely added you can update like this:


{:ok, node_info} = Grizzly.Node.get_info(10)

Keyword.get(Grizzly.ZWave.Command.param!(node_info, :command_classes), :secure_controlled)

Enhancements

  • Add Grizzly.ZWave.Commands.AssociationGroupCommandListGet
  • Add Grizzly.ZWave.Commands.AssociationGroupCommandListReport
  • Add Grizzly.ZWave.Commands.AssociationGroupInfoGet
  • Add Grizzly.ZWave.Commands.AssociationGroupInfoReport
  • Add Grizzly.ZWave.Commands.AssociationGroupNameGet
  • Add Grizzly.ZWave.Commands.AssociationGroupNameReport
  • Add Grizzly.ZWave.Commands.MultiChannelEndpointGet
  • Add Grizzly.ZWave.Commands.MultiChannelEndpointReport

Fixes

  • Internal command class name discrepancies

Thank you to those who contributed to this release:

  • Jean-Francois Cloutier
1 Like

v.0.10.1

Enhancements

  • Add Grizzly.ZWave.Commands.ConfigurationGet
  • Add Grizzly.ZWave.Commands.ConfigurationReport

Thank you to those who contributed to this release:

  • Jean-Francois Cloutier

v0.10.2

Enhancements

  • Add Grizzly.ZWave.Commands.FailedNodeRemove
  • Add Grizzly.ZWave.Commands.FailedNodeRemoveStatus

Fixes

  • Sensor types returned from the support sensors report
  • Broken link in docs

Thank you to those who contributed to this release:

  • Jean-Francois Cloutier

v0.10.3

Enhancements

  • Add handle_timeout/2 to the Grizzly.InclusionHandler behaviour. This
    allows for handling when an inclusion process timeout.
  • Add Grizzly.Inclusions.stop/0 force stop any type of inclusion process.
  • Add Grizzly.FirmwareUpdates module for updating the Z-Wave firmware on
    Z-Wave hardware

Fixes

  • not parsing command classes correctly on Grizzly.ZWave.Commands.NodeAddStatus
  • Not stopping an inclusion process correctly when calling
    Grizzly.Inclusions.add_node_stop/0

Thank you to those who contributed to this release:

  • Jean-Francois Cloutier

v0.11.0

Grizzly now supports parsing alarm/notification parameters as a keyword list of
parameters. This change is breaking because the event parameters use to be the
raw binary we received from the Z-Wave network and now it is a keyword list.

We only support lock and keypad event parameters currently, but this puts into
place the start of being able to support event parameters.

Enhancements

  • Support parsing event parameters for lock and keypad operations

Thank you to those who contributed to this release:

  • Jean-Francois Cloutier
2 Likes

v0.12.0

There is a small breaking change that will only effect you if you have
:water_leak_detected_known_location and :water_leak_dropped_known_location
hard coded into your application for any reason. These are notifications about
water leaks, and so if you have not directly tried to match on or handle logic
about water leak notifications then this breaking change should not effect you.

From a high level this release provides updates to Z-Wave notifications in
terms of command support and package parsing, extra tooling for better
introspection, a handful of new commands and command classes, and helpful
configuration items.

Enhancements

  • Add Grizzly.ZWave.Commands.ApplicationNodeInfoReport
  • Add Grizzly.ZWave.CommandClass.NodeNaming
  • Add Grizzly.ZWave.Commands.NodeLocationGet
  • Add Grizzly.ZWave.Commands.NodeLocationReport
  • Add Grizzly.ZWave.Commands.NodeLocationSet
  • Add Grizzly.ZWave.Commands.NodeNameGet
  • Add Grizzly.ZWave.Commands.NodeNameReport
  • Add Grizzly.ZWave.Commands.NodeNameSet
  • Add Grizzly.ZWave.Commands.AlarmGet
  • Add Grizzly.ZWave.Commands.AlarmSet
  • Add Grizzly.ZWave.Commands.AlarmEventSupportedGet
  • Add Grizzly.ZWave.Commands.AlarmEventSupportedReport
  • Add Grizzly.ZWave.Commands.AlarmTypeSupportedGet
  • Add Grizzly.ZWave.Commands.AlarmTypeSupportedReport
  • Add Grizzly.ZWave.Commands.AssociationGroupingsGet
  • Add Grizzly.ZWave.Commands.AssociationGroupingsReport
  • Add Grizzly.ZWave.Commands.AssociationRemove
  • Add Grizzly.ZWave.Commands.AssociationReport
  • Add Grizzly.ZWave.Commands.AssociationSpecificGroupingsGet
  • Add Grizzly.ZWave.Commands.AssociationSpecificGroupingsReport
  • Add Grizzly.ZWave.CommandClasses.MultiChannelAssociation
  • Add Grizzly.ZWave.Commands.MultiChannelAssociationGroupingsGet
  • Add Grizzly.ZWave.Commands.MultiChannelAssociationGroupingsReport
  • Add Grizzly.ZWave.Commands.MultiChannelAssociationRemove
  • Add Grizzly.ZWave.Commands.MultiChannelAssociationReport
  • Add Grizzly.ZWave.Commands.MultiChannelAssociationSet
  • Add Grizzly.ZWave.CommandClass.DeviceResetLocally
  • Add Grizzly.ZWave.Commands.DeviceResetLocallyNotification
  • Add Grizzly.ZWave.Commands.LearnModeSet
  • Add Grizzly.ZWave.Commands.LearnModeSetStatus
  • Add Grizzly.Inclusions.learn_mode/1
  • Add Grizzly.Inclusions.learn_mode_stop/0
  • Support version 8 of the Grizzly.ZWave.Commands.AlarmReport
  • Support parsing naming and location parameters from Z-Wave notifications
  • Add mix zipgateway.cfg to print out the zipgateway config that Grizzly
    is configured to use.
  • Add Grizzly.list_commands/0 to list all support Z-Wave commands in
    Grizzly.
  • Add Grizzly.commands_for_command_class/1 for listing the Z-Wave commands
    support by Grizzly for a particular command class.
  • Add :handlers to :grizzly configuration options for firmware update and
    inclusion handlers.
  • Documentation updates

Fixes

  • Parsing the wrong byte for into the wrong notification type
  • Invalid type spec for Grizzly.ZWave.Security.failed_type_from_byte/1

Thank you to those who contributed to this release:

  • Jean-Francois Cloutier

v0.12.1

Enhancements

  • Add Grizzly.ZWave.Commands.MultiChannelAggregatedMemberGet
  • Add Grizzly.ZWave.Commands.MultiChannelAggregatedMemberReport
  • Add Grizzly.ZWave.Commands.MultiChannelCapabilityGet
  • Add Grizzly.ZWave.Commands.MultiChannelCommandEncapsulation
  • Add Grizzly.ZWave.Commands.MultiChannelEndpointFind
  • Add Grizzly.ZWave.Commands.MultiChannelEndpointFindReport
  • Add Grizzly.ZWave.CommandClasses.MultiCommand
  • Add Grizzly.ZWave.Commands.MultiCommandEncapsulation
  • Add Grizzly.ZWave.CommandClasses.Time
  • Add Grizzly.ZWave.Commands.DateGet
  • Add Grizzly.ZWave.Commands.DateReport
  • Add Grizzly.ZWave.Commands.TimeGet
  • Add Grizzly.ZWave.Commands.TimeReport
  • Add Grizzly.ZWave.Commands.TimeOffsetGet
  • Add Grizzly.ZWave.Commands.TimeOffsetReport
  • Add Grizzly.ZWave.Commands.TimeOffsetSet
  • Add Grizzly.ZWave.CommandsClasses.TimeParameters
  • Add Grizzly.ZWave.Commands.TimeParametersGet
  • Add Grizzly.ZWave.Commands.TimeParametersReport
  • Add Grizzly.ZWave.Commands.TimeParametersSet
  • Documentation updates

Fixes

  • Some devices send alarm reports that do not match the specification in a
    minor way. So, we allow for parsing of these reports now.
  • Fixed internal command class name to module implementation mapping issue
    for :switch_multilevel_set and :switch_multilevel_get commands.

Thank you to those who contributed to this release:

  • Jean-Francois Cloutier

v0.12.2

Enhancements

  • Add Grizzly.ZWave.CommandClasses.Hail
  • Add Grizzly.ZWave.Commands.Hail
  • Support updated Z-Wave spec command params for
    Grizzly.ZWave.Commands.DoorLockOperationReport

v0.12.3

Fixes

  • Handle multichannel commands that are not appropriately encapsulated

Thank you to those who contributed to this release:

  • Jean-Francois Cloutier

v0.13.0

This update breaks the main Grizzly.send_command/4 API as Grizzly use to
respond with different tuples but now it will return with the new
Grizzly.Report.t() data structure. A full guide on the breaking changes
and what needs to be updated can be found here.

This change allows us to gather more information about a response from Grizzly.
For example, with this change, you can get transmission stats about network
properties when sending a command now:

{:ok, report} = Grizzly.send_command(node_id, command, command_args, transmission_stats: true)

report.transmission_stats

See Grizzly.Report module for full details.

Enhancements

  • Add Grizzly.Report
  • Add getting transmission stats for sent commands
  • Docs and type spec updates
1 Like

v0.14.0

This breaking change has to do with how Grizzly is started. It is no longer an
application. Grizzly exposes the Grizzly.Supervisor module for a consuming
application to add to its supervision tree. All other APIs are backwards capable.

See the upgrade guide
for more specifics on how to upgrade.

Breaking Changes

  • Grizzly is not an OTP application anymore and will need to be started
    manually via the new Grizzly.Supervisor module
  • All application config/mix config options are not used
  • Removed the Grizzly.Runtime module

Enhancements

  • Add Grizzly.Supervisor module
  • Add Grizzly.ZWave.CommandClasses.Indicator
  • Add Grizzly.ZWave.Commands.IndicatorGet
  • Add Grizzly.ZWave.Commands.IndicatorSet
  • Add Grizzly.ZWave.Commands.IndicatorReport
  • Add Grizzly.ZWave.Commands.IndicatorSupportedGet
  • Add Grizzly.ZWave.Commands.IndicatorSupportedReport
  • Add Grizzly.ZWave.CommandClasses.Antitheft
  • Add Grizzly.ZWave.Commands.AntitheftGet
  • Add Grizzly.ZWave.Commands.AntitheftReport
  • Add Grizzly.ZWave.CommandClasses.AntitheftUnlock
  • Add Grizzly.ZWave.Commands.AntitheftUnlockSet
  • Add Grizzly.ZWave.Commands.AntitheftUnlockGet
  • Add Grizzly.ZWave.Commands.AntitheftUnlockReport
  • Add Grizzly.ZWave.Commands.ConfigurationBulkGet
  • Add Grizzly.ZWave.Commands.ConfigurationBulkSet
  • Add Grizzly.ZWave.Commands.ConfigurationBulkReport
  • Add Grizzly.ZWave.Commands.ConfigurationPropertiesGet
  • Add Grizzly.ZWave.CommandClasses.ApplicationStatus
  • Add Grizzly.ZWave.Commands.ApplicationBusy
  • Add Grizzly.ZWave.Commands.ApplicationRejectedRequest

Thank you to those who contributed to this release:

  • Jean-Francois Cloutier

v0.14.1

Enhancements

  • Support zipgateway 7.14.01
  • Add Grizzly.ZWave.CommandClasses.CentralScene
  • Add Grizzly.ZWave.Commands.CentralSceneConfigurationGet
  • Add Grizzly.ZWave.Commands.CentralSceneConfigurationSet
  • Add Grizzly.ZWave.Commands.CentralSceneConfigurationReport
  • Add Grizzly.ZWave.Commands.CentralSceneNotification
  • Add Grizzly.ZWave.Commands.CentralSceneSupportedGet
  • Add Grizzly.ZWave.Commands.CentralSceneSupportedReport

Thank you to those who contributed to this release:

  • Jean-Francois Cloutier