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

QUERY: understanding the basics #3

Closed
mrose17 opened this issue Apr 5, 2014 · 5 comments
Closed

QUERY: understanding the basics #3

mrose17 opened this issue Apr 5, 2014 · 5 comments

Comments

@mrose17
Copy link
Contributor

mrose17 commented Apr 5, 2014

thanks for assembling this package! sorry if some of these questions lack clue.

i am one of the curators of #thethingsystem - http://thethingsystem.com/ - an open source home autonomy server. the primary repo is there: https://github.com/TheThingSystem/steward

our goal is to support as many things as possible. i am now in the process of exploring adding zigbee support. i've got your package with a digi xstick2 zb running on my Mac, RPi, and BBB.

what i now need to do is internalize the design pattern to use for:

  • device discovery
  • device identification
  • sending commands (e.g., "switch on")
  • and receiving updates (e.g., "switch now off" or "temperature is now 20C")

when i run app.js on a network with a zigbee smart plug and thermo/hydrometer, this is what i see after i do a reset, configure, allow join from the app.'s window:

%  node app.js
info  - socket.io started
datastore initialising
Zigbee manager server listening on port 3000
ZBee initialised. Parameters: { panid: '0000000000000000',
  id: ' ',
  sourceHigh: '0013a200',
  sourceLow: '40b663de',
  nodeDiscoveryTime: 6000 }
self node: { dec: [ 0, 19, 162, 0, 64, 182, 99, 222 ],
  hex: '0013a20040b663de' }
Firmware Version: 21a7
info  - handshake authorized rzqTNV4qZGKYYss_35aP
A client socket connected!
received command:  reset , data:  undefined
--- got zbee watchdogReset
--- got zbee coordinatorStarted
received command:  configure , data:  undefined
configuring
--- got zbee disassociated
--- got zbee coordinatorStarted
received command:  join , data:  undefined
joing allowed
Node 00137a0000009a70 discovered
Node 00137a0000009a70 got End Device Announce: { address16: [ 30, 17 ],
  address64: [ 0, 19, 122, 0, 0, 0, 154, 112 ],
  capability: 128 }
Node 00137a0000009a70 got End Device Announce: { address16: [ 30, 17 ],
  address64: [ 0, 19, 122, 0, 0, 0, 154, 112 ],
  capability: 128 }
Node 00137a0000009a70: could not locate app for endpoint: 10
Node 00137a0000009a70: could not locate cluster for endpoint: 10, clusterID: 1026 attribute report: {"address64":"00137a0000009a70","endpoint":10,"profileId":260,"clusterId":1026,"attributes":[{"id":0,"type":41,"data":[227,9]}]}
Node 00137a0000009a70: could not locate cluster for endpoint: 10, clusterID: 1029 attribute report: {"address64":"00137a0000009a70","endpoint":10,"profileId":260,"clusterId":1029,"attributes":[{"id":0,"type":33,"data":[162,17]}]}
error getting active endpoints: { msg: 'Never got Transmit status from XBee' }
Node 00137a0000009a70 got End Device Announce: { address16: [ 30, 17 ],
  address64: [ 0, 19, 122, 0, 0, 0, 154, 112 ],
  capability: 128 }
Node 00137a0000009a70: could not locate cluster for endpoint: 10, clusterID: 1026 attribute report: {"address64":"00137a0000009a70","endpoint":10,"profileId":260,"clusterId":1026,"attributes":[{"id":0,"type":41,"data":[1,10]}]}
Node 00137a0000009a70: could not locate cluster for endpoint: 10, clusterID: 1029 attribute report: {"address64":"00137a0000009a70","endpoint":10,"profileId":260,"clusterId":1029,"attributes":[{"id":0,"type":33,"data":[101,17]}]}

can you give me a hint as to how to interpret this? (i did the reset and the configure just to get a clean slate with the stick, as i've been testing it on multiple devices)

many thanks!

@mrose17
Copy link
Contributor Author

mrose17 commented Apr 15, 2014

@stormboy - hi. don't want to nag, but any chance you could put me on the path to enlightenment? many thanks!

@stormboy
Copy link
Owner

I've just come back from hiking, so I am catching up with civilisation right now.

Hey, great to know you're interested. I've been keeping an eye on The Thing System as I've been interested in the space of unifying the IoT. In fact, I worked on a project that was working towards this commencing around 2001. The backing of that project faded a few years, but some code has been put on GitHub under the name "Meemplex" https://github.com/ekoliving/Meemplex (with no documentation).

From the log above it looks like:

  • the XBee node is 0013a20040b663de
  • it found node 00137a0000009a70
  • an Application/Device object was created for endpoint 10 ("could not find app" just means a Device object is to be created)
  • a Cluster object was created for endpoint 10 and cluster 1026 (hex: 0x0402) Temperature measurement
  • a Cluster object was created for endpoint 10 and cluster 1029 (hex: 0x0405) Relative humidity measurement

Are you using my fork of the xbee module? I remember one of the main things was that "reply" messages were not handled properly on the main fork. Not sure if 'Never got Transmit status from XBee' is to do with that.

I hope that helps for a start.

Sorry, it's been a number of months since I've looked at this module, but I do have a motive to get back into this project because I have some Zigbee devices at home that I need to hook into my own system (which includes LIFX, Hue, Nest, Wemo, Zigbee Power meter, Solar inverter, Pioneer AVR, etc).

@mrose17
Copy link
Contributor Author

mrose17 commented Apr 15, 2014

hi. welcome back!

thanks for the response.

2001? that's pretty early…

i'm using your node-zbee which has a package.json with this dependency:

    "svd-xbee": "git://github.com/stormboy/svd-xbee"

so, i think that's all your forks.

zigbee would be a big plus for #thethingsystem. i've got an ecobee smart plug, an iris smart plug, a zbht-2 temperature/humidity sensor, and a few other things in my "zigbee drawer" (seriously).

the good news is that #thethingsystem has support for lifx, hue, nest, and wemo (except the baby monitor).

can you give me pointers to the solar inverter and pioneer avr you are using?

…and, here's my pitch:

  • i'll write a skeletal zigbee driver for the system that uses your node-zbee/svd-bee.
  • try to use #thethingsystem for the stuff you have (minus zigbee).
  • then take a crack at modifying the skeletal driver to talk to your zigbee stuff.

since this is an open source project, it's not a paying job, but i'm happy to donate hardware that's needed (a decade ago that'd be expensive!)

does that sound feasible?

thanks!

@stormboy
Copy link
Owner

Sounds good. I'll look into using thethingsystem side-by-side with my existing system in which modules communicate via MQTT and I have a web UI here https://github.com/stormboy/whims.

I have some Netvox gadgets, mainly focussed on wall plugs, buttons, and motion sensors. I don't have any Zigbee temperature or humidity sensors.

I get my smart meter data using a Raven USB stick (http://rainforestautomation.com/raven) as the Zigbee comms can only happen with a secret key, which is not easily achievable for open source projects. This device outputs an XML stream. My module: https://github.com/stormboy/node-raven . The data is picked up via MQTT and logged via this module https://github.com/stormboy/node-meem-datalog which also serves up historical data on request.

I'm reading data from my Aurora inverter over RS485 using the aurora command line tool (http://www.curtronics.com/Solar/AuroraData.html) in a cron job. Not really neat, but it works.

I have a Pioneer VSX 2021 AV receiver that can be controlled over IP. My module: https://github.com/stormboy/node-pioneer-avr

@mrose17
Copy link
Contributor Author

mrose17 commented Apr 18, 2014

nice. i hope to have something in the github repo for the steward in about a week for you on the zigbee stuff.

the steward supports mqtt in both directions, though i'm not sure how helpful that would be for you. i'm taking a look at the raven stick and the pioneer avr.

yes, the api key is a big pain. several of my modules require them as well. sigh.

@mrose17 mrose17 closed this as completed Apr 29, 2014
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

No branches or pull requests

2 participants