Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Update database to cd-jackson.com #28

Merged
merged 1 commit into from
Jul 17, 2017

Conversation

lukescott
Copy link
Collaborator

Fix for #27. There are a number of issues that I wasn't sure how to address:

  • There are multiple command class sets under "endpoints". I log this as a warning and use the first one on the generator. I imagine you would want all of these. I'm wondering if this is what "index" means on openzwave's setValue.

  • There are some duplicates of manufacturer id + product type + product id. I use the first one and skip the rest. I suppose there may be a fourth parameter needed to distinguish... version maybe? Manufacturer info just has those 3 parameters when queuing the device.

  • A device may have more that one "device ref" (product type + product id). I just duplicate the record when there are more than one. But it would be nice to point to the same record with multiple ids.

So far I have my HomeSeer switches showing information now. Not sure how to resolve the issues above.

@codecov-io
Copy link

Codecov Report

Merging #28 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #28   +/-   ##
=======================================
  Coverage   59.83%   59.83%           
=======================================
  Files          36       36           
  Lines        1845     1845           
=======================================
  Hits         1104     1104           
  Misses        715      715           
  Partials       26       26
Impacted Files Coverage Δ
zwave-example/example.go 4.41% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c389b24...7ea03bd. Read the comment docs.

@stamp
Copy link
Member

stamp commented May 23, 2017

Nice work!

I tested your new devices.go file and it seems to work perfectly. My Fibaro Wall Plug FGWPF-102 (010f:0602:1001) is missing from the old database and did show up with our :)

Endpoints is a feature in the zwave protocol allowing nodes to have multichannel capabilities. Take a zwave enabled power strip for example. By using endpoints is possible to control each socket in the power strip separately thru the same zwave node. Without endpoints the power strip would have to emulate one zwave node for each socket.

You are correct. Version is the next parameter to distinguish between the duplicates. This should be done during the startup interview but we haven't implemented it yet. Right now the interview is pretty basic and only runs a couple of querys. Until then i think its safe just to skip the duplicates.

One simple solution to "point" to the same record could be to update the database.New() switch and add multiple case values there. That way we only store one definition but many "device refs" point to the same definition.

@jonaz
Copy link
Member

jonaz commented Jul 17, 2017

@stamp did you forget to merge this?

@stamp
Copy link
Member

stamp commented Jul 17, 2017

Oops! :P

@stamp stamp merged commit de0e793 into stampzilla:master Jul 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants