Skip to content

Commit

Permalink
v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mattludwigs committed Jul 11, 2019
1 parent 1467037 commit 0fd103c
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 2 deletions.
65 changes: 65 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,70 @@
## Changelog

## v0.3.0

The big change here is removing the in memory
cache for devices on the network. Most common
use cases will be for a consuming application to
hold on to the network device information and apply
some costume logic to now that is managed.

Also, we would have to keep both the external
and internal cache in sync, which is really hard
and was creating an odd event based system, which
also lends itself to complexity.

### Breaking Changes

`Grizzly.list_nodes()` -> `Grizzly.get_nodes()`

This is mostly because before we were listing nodes
from a cache, and now we are getting nodes from the
Z-Wave network.

Also with `get_nodes` we don't automatically connect
to the nodes. So getting and connecting to all nodes
on the Z-Wave network might look something like this:

```elixir
def get_and_connect() do
case Grizzly.get_nodes() do
{:ok, nodes} -> Enum.map(nodes, &Grizzly.Node.connect/1)
error -> error
end
end
```

`Grizzly.update_command_class_versions/2` -> `Grizzly.update_command_class_versions/1`

Before we would pass if the update would be async or not
after reviewing how this gets used it made sense to
always do it sync. Also it returns a `Node.t()` now
with the command classes updated with the version.

This is the same change found in `Grizzly.Node.update_command_class_versions`

`Grizzly.command_class_version/3` -> `Grizzly.get_command_class_version/2`

Removed the `use_cache` param as there is no longer a cache.

Same change found in `Grizzly.Node.get_command_class_version`

* Enhancements
* Support `Grizzly.CommandClass.Time` command class
* Support `Grizzly.CommandClass.TimeParameters` `GET` and `SET` commands
* Support `Grizzly.CommandClass.ScheduleEntryLock` command class
* `Grizzly.Notifications.subscribe_all/1` - subscribe to many notifications at once
* `Grizzly.CommandClass.name/1` - get the name of the command class
* `Grizzly.CommandClass.version/1` - get the version of the command class
* `Grizzly.Network.get_nodes/0` - get the nodes on the network
* `Grizzly.Network.get_node/1` - get a node by node id from the network
* `Grizzly.Network.get_node_info/1` - get node information about a node via node id
* `Grizzly.Node.get_ip/1` - can now take either a `Node.t()` or a node id
* Updates
* Docs and type clean up
* Fixes
* Timeout when getting command class versions

## v0.2.1

* Updates
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ An Elixir library for Z-Wave
```elixir
def deps do
[
{:grizzly, "~> 0.2", organization: "smartrent"}
{:grizzly, "~> 0.3", organization: "smartrent"}
]
end
```
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Grizzly.MixProject do
def project do
[
app: :grizzly,
version: "0.2.1",
version: "0.3.0",
elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
Expand Down

0 comments on commit 0fd103c

Please sign in to comment.