Comments (7)
Hello! Thanks for taking a look at this project - fair warning it's still not stable. I've had to take a short break from this - but I'll be back soon. But for now...
A couple of things:
- You've managed to successfully join a device to your network? Did you get the node object from zigbee.NodeJoinEvent?
- You are constantly reading events with z.ReadEvent()?
- What is device you're trying to query? Does it act as a router or an end-device? I still have problems with the behaviour of some simplier end devices, like temperature sensors.
If you want to attach your test code, I'm happy to look over it.
from zstack.
Code was taken from example in README.
- Devices joined and Node object were looking normal
- z.ReadEvent() was always reading and there were regular NodeUpdateEvent events
- Devices were Xiaomi button and motion sensor
I tried to look at frames that was send back after QueryNodeDescription but I don't found needed frames. But I don't sure that I was looking in right place.
If you don't have much time to deeply look at my problem it would be great if you show me from what place I can go to detect problem
from zstack.
Assuming the zstack is sending the ZdoNodeDescReq to the adapter (which given you've initialised, seen a join message, etc), I suspect your problem is actually the end devices. Sent at:
Line 20 in 5e01b57
I have a pretty large array of the Xiaomi stuff (buttons, temp sensors, motion sensors), and they can all be a bit touchy about joining to networks. They quite aggressively sleep, so as soon as they've joined they sleep.
The "work around"/only way to make them queryable, is to do the pairing process, and as soon as they join, tap the reset button so the LED on the front of them flashes. This wakes them up, which allows the node that's routing for them to send the query packets.
See this page, basic pairing instructions, step 4:
https://community.hubitat.com/t/xiaomi-aqara-zigbee-device-drivers-possibly-may-no-longer-be-maintained/631
I swear that zigbee2mqtt used to have this in more detail on their pages, but it seems to have disappeared, so I don't know if there is some work around.
An example of shimmeringbee/zda - which uses shimmeringbee/zstack and shimmeringbee/zcl - but abstracts away zigbee... but it doesn't actually support temp/humidity yet.
https://imgur.com/a/kqycs0N <- Note the one long press to start pairing, and then continued clicking after the blue light has come on (couldn't actually see it because of the camera so guessed).
https://gist.github.com/pwood/70726f8a0f3bd5f61efc5dd7757c40fc <- output of zda enumeration
from zstack.
Thx for help, I managed to enumerate endpoints. For now I have failed to read product information: ZCL communicator waiting for reply, context expired
error, and I also don't resave any messages from devices is it ok?
Code example: https://gist.github.com/MrEhbr/c77e606eb732c150a2ce48bcf95061a1
from zstack.
Ahh, moved to zda... you're enumerating every device every sixty seconds, so you would need keep pressing the reset button.
zda will automatically start an enumeration of a device when a new one joins, and enumerate the capabilities... a EnumerateDeviceSuccess would then be sent.
The idea of zda and da is to hide zigbee from a piece of controller software - hence standardised capabilities... as the da layer you wont be able to send custom ZCL messages, that's hidden.
da/zda is still in a state of flux, I need to drop the Device struct and move it to interfaces for behaviour. The API will be changing.
This is my own test driver for zda: https://gist.github.com/pwood/cd95044873a1f35ca0a76d9f185a6758 - looks somewhat similar.
The Xaiomi sensors just send ZCL messages to the controller (they dont even advertise the clusters on their endpoints) - which at the moment zda will be ignoring because I haven't got to supporting temp/humidity/pressure. The only capability I've completed is basic On/Off which I was using to prove all parts of the stack.
You've basically reached the end of what I've implemented so far. As I say - I've been taking a break from zigbee, mostly due to DIY work on the house that the wife needed doing ;) - but I'm going to come back to it soon. Probably this weekend.
from zstack.
One more time thx for your help. Now I'll know what to do next, first I'll try to add support for the devices I have
from zstack.
Good luck @MrEhbr, any follow up please feel free to raise a query in the zda
project. I have just completed a semi large refactor in da
and zda
to do with da.Device now being an interface, rather than a struct. Also I see you are on the Discord, so feel free to grab me there too. Just @ me.
from zstack.
Related Issues (20)
- Add support for receiving ZCL data from zigbee devices
- Convert Node based commands to accept IEEE Address rather than Network Address
- Node Table can be accessed by two different Go routines
- If End Devices parent is the Coordinator, it may have issues after restart HOT 1
- Implement persistable network address and IEEE address cache
- Support CC2652 adapter
- Fix Channel Selection
- Initialisation fails on linux/arm7 HOT 1
- Join/leave works but cannot receive a single NodeIncomingMessageEvent HOT 9
- Initialize() fails when config is changed (or just generated), but works on second try HOT 3
- Z-Stack appears to crash on CC2652R HOT 5
- Update to use `persistence` layer for storing node table.
- Add support for registering Endpoints.
- Add support for binding and unbinding. HOT 2
- Add support for querying Active Endpoints from remote devices.
- Add support for querying endpoints.
- Haromnise names of ZStack message structs
- Provide Usage Examples for ZStack Layer HOT 2
- Add support for sending ZCL data to zigbee devices
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zstack.