mattludwigs

mattludwigs

Grizzly - Z-Wave Library for Elixir

Grizzly is a library for working with Z-Wave devices. Z-Wave is a low-frequency radio protocol for controlling smart home devices on a mesh network. Grizzly leverages Z-Wave over IP (Z/IP) to communicate to Z-Wave devices via DTLS. Grizzly provides complete support for the various Z-Wave security groups, extensible device behavior, and reliable error isolation between device behaviors.

Hardware requirements are:

  1. Z-Wave bridge controller
  2. zipgaway binary from Silicon Labs
  3. A Nerves system, custom or official.

To get up and running fast with a raspberry pi 3 check out the grizzly quickstart.

The zipgateway binary will need to be cross-compiled for your target. This can be a bit tricky, so if you need help with this part of the setup process please reach out on the forum by using the grizzly tag.

Z-Wave is a complex protocol with many moving parts and pitfalls. We hope that Grizzly provides a simple API for handling these complexities. As home automation and IoT grows in popularity we are excited to help the Elixir ecosystem provide reliable solutions to hard problems in this space.

If you have questions please feel free to reach out on the forum using the grizzly tag.

Special thanks to SmartRent for their support in open sourcing Grizzly!

Happy IoT hacking!

First 10 of 48 Posts Switch mode

tielur

tielur

Yay! I can’t wait to try it out! Big thanks to @mattludwigs and the entire SmartRent team!

:heart: :bear: :heart:

ryanwinchester

ryanwinchester

I can’t wait to try it out!

slouchpie

slouchpie

This is really really cool. I have been using Hypriot OS with elixir on docker containers to do home network stuff and was thinking about how to use z-wave with pi and elixir. I can’t wait to get this working.

By the way, if you want to get more people involved, I think you should announce Grizzly here: https://www.reddit.com/r/homeautomation/ Some people there would love this project.

mattludwigs

mattludwigs OP

Thank you! If you run into any issues getting setup feel free to ask a question.

Thanks for the suggestion, I will look into announcing it there too soon!

mattludwigs

mattludwigs OP

New release v0.4.3

  • Enhancements
    • Support Powerlevel command class
    • Doc clean up
    • Grizzly.send_command/2 and Grizzly.send_command/3
      can be passed a node id instead of a node.
mattludwigs

mattludwigs OP

New release v0.5.0

TLDR; Provides better error handling when trying to encode command arguments. Improves robustness of Grizzly.

Introduces Grizzly.Command.EncodeError exception and updates encoding and
decoding functions to return tagged tuples. We now use these things when trying
to send a command via Grizzly.send_command/3 so if you have invalid command
arguments we can provide useful error handling with
{:error, Grizzly.Command.EncodeError.t()}. The EncodeError.t() implements
Elixir’s exception behaviour so you can leverage the standard library to
work with the exception.

Unless you have implemented custom commands or used one of the many command
encoders or decodes explicitly this update should not affect you too much. If
you have used the encoder/decoders explicitly please see the documentation for
the ones you have used to see the updated API. If you have written a command we
encourage you to validate the arguments and return the {:error, EncodeError.t()}
to improve the usability of and robustness your command. The new
Grizzly.Command.Encoding module provides some useful functionality for
validating specs for command arguments.

  • Enhancements
    • Provide command argument validation and error handling via
      Grizzly.Command.EncodeError.()
    • Update all the command arg encoder/decoder to use tagged
      tuples for better handling of invalid command arguments
    • Introduces new Grizzly.Command.Encoding modules for helping
      validate command argument specifications
  • Fixes
    • Crashes when providing invalid command arguments

Big thanks to @jfcloutier for the hard work on this!

mattludwigs

mattludwigs OP

New Release: v0.6.0

Changed Grizzly.CommandClass.CommandClassVersion to Grizzly.CommandClass.Version
and changed Grizzly.ComamndClass.CommandClassVersion.Get to
Grizzly.CommandClass.Version.CommandClassGet as these names reflect the Z-Wave
specification better.

If you only have used Grizzly.get_command_class_version/2 and the related function
in Grizzly.Node module this change should not affect you.

  • Enhancements
    • Add support for:
      • MultiChannelAssociation Command Class
      • WakeUp Command Class NoMoreInformation command
      • Complete Association Command Class
      • ZwaveplusInfo Command Class
      • Version Get Command
    • Clean up docs
    • Renamed Grizzly.CommandClass.CommandClassVersion to Grizzly.CommandClass.Version
    • Renamed Grizzly.CommandClass.CommandClassVersion.Get to
      Grizzly.CommandClass.Version.CommandClassGet

Another shout out to @jfcloutier for adding more support to for commands and command classes!

mattludwigs

mattludwigs OP

New Release: v0.6.1

  • Enhancements
    • Update commands IntervalGet and ManufacturerSpecificGet to be more
      consistent
    • Better handling of invalid ManufacturerSpecific info received from
      devices
mattludwigs

mattludwigs OP

New Release: v0.6.2

  • Enhancements
    • Remove the dependence on pidof allowing grizzly to work on any nerves
      device without the need of busybox
mattludwigs

mattludwigs OP

New Release: v0.6.3

  • Enhancements
    • Supports AssociationGroupInformation Command Class

Where Next?

Trending in Announcing Top

bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
387 14960 120
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
shahryarjb
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly. One of i...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

Other Trending Topics Top

type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
bjorng
We want to introduce a new native datatype to Erlang: native records. Although replacing all tuple records with native records is not our...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New

We're in Beta

About us Mission Statement