Questions about writing an App for the Zooz ZSE11 Multi Sensor

I just received the Zooz ZSE11 from Amazon today and I created an App to test it out. I simply subscribed and provided my handler entry point and then did the following:

log.debug "getCurrentStates = " + evt.device.getCurrentStates()
log.debug "currentTemperature = " + evt.device.currentValue("temperature")
log.debug "currentHumidity = " + evt.device.currentValue("humidity")
log.debug "currentIlluminance = " + evt.device.currentValue("illuminance")
log.debug "currentMotion = " + evt.device.currentValue("motion")
log.debug "currentBattery = " + evt.device.currentValue("battery")

It worked great... but I noticed, as I expected, to see slow updates so the battery would last. I was going to use the Basic Z-Wave Tool to change some parameters to speed it up but I am not sure how I replace that driver based solution with a driver that is hidden/built in. The second confusion I have is that when I look at the Devices tab and look a Zooz it updates pretty fast. Why isn't my App updating at the same rate. How can I make it update as quick as the device view without changes to the parameters that the Zooz documentation says to change to get quicker updates.

Thanks

I am likely not reading your post closely enough, but it feels like it would be useful if you posted the full code for your app and screenshots of the logs from your app along with similar debug logs for the device.



I held my hand over the Zooz device and then removed my hand a few times to toggle the motion indication. You will see that in the log under the Zooz_ZSE11 device view that it changed several times after 04:04:23 AM. If you look at the tab Zooz, which is the App view under logging, we had no changes after 04:04:23 AM. My question is why doesn't my event handler get notified about that?

I also would like to know a reasonably safe way to change the parameters in the device (Specified in the Zooz documentation) to set update speeds. If my understanding is correct I need to replace the driver for Zooz with the source code give by the app "Basic Z-Wave Tool" as outlined in the Hubitat doc's for it.

Thanks For The Help

That actually looks to be working correctly.... I think....

In your screenshot of the App code, in the updated() method, you subscribe to changes in Illuminance, not motion. Looking at the logs for the Zooz ZSE11 device, Illuminance is reported twice, zero lux at 4:04:13am and 94 lux at 4:04:23am. In the final screenshot the App correctly logs the messages you have in the "handler" method at these two times. The later changes to motion detected by the device would not be reported to or responded to by the App as you only subscribe to changes in Illuminance. If you subscribe to motion in the App, then I would expect to see additional activity by the App.

O'heck! and shucks!! (I really wanted to use more explicit language but I am new and better take it easy) I will change the subscribed to Motion and I am sure I will see what I think your telling me. A couple more years of doing this I might have it down... LOL :pray:

Thanks, I will try to limit the really dumb questions.

1 Like

Trust me, we've all been there... and continue to find ourselves in similar situations. You'll only get a causal knod of the head around here acknowledging similar experiences...

I've also been making small steps into developing Apps myself only recently, after putting it off for a long time now. Takes a bit of a mindshift from the drivers I have been used to developing.

And a tip, the kind of question you had may be more appropriate under the developers category, unless the custom apps and drivers is a sub-category... but a general question such as this could be better placed under the general developers category, I think... Not that it matters to me, I just look at "Latest", but others may be more discerning...

I know this is going to amaze you but I made the change in the subscribe for motion and I get the same update rate in my app logging as I do in my device logging... your really surprised aren't you :grinning:

Drivers is something I will be trying to do sometime in the future. When I get to that can you point me to what tool/app is available to monitor all my zwave/zigbee/whatever traffic. I wouldn't think I would need any hardware except the C8 that I have right?

Can you give me some words of wisdom as to how I should safely go about changing parameters in my device. The doc's for my Zooz device have tweaks for updating measurements and would like to give that a try. The method under Advanced seems a little much... do we have something better?

2 Likes

Glad to hear you got the result you... should have.... :wink:

Ah... When I said I had been used to developing drivers, I meant virtual / API-based drivers, not drivers for Z-type devices. So I'm not sure how best to adjust settings on a physical device like I think you are describing. Can help you out when the time comes with more general driver development, but not really with Zigbee or Z-Wave communications. But there are others here who can, so you are not alone.

Hehehe.... Excuse me, I only chuckle at the prospect of only needing one home automation hub....:slight_smile:

Depends on exactly what you are wanting to monitor. If you want to monitor / track the raw communications between your devices and the HE hub, again, that's not something I have delved into. I believe others have used Zigbee coordinators (sticks) to sniff Zigbee comm's, but I could be wrong... Not sure about Z-Wave. If you are more interested in tracking the state changes in the devices within HE, like the motion or illuminance changes shown in your logs, that I am more familiar with. Many people export those details to an external InfluxDB database and analyse the data using Grafana. The default for doing this is typically running InfluxDB and Grafana (plus something to parse the event data) on a Raspberry Pi, but there are many alternatives, from cloud instance, to docker variations, NAS installations, etc. But it depends on what you are looking for...

Sniffing raw comms is what I have in mind but that won't be for sometime... so much to learn before I take a deep dive. When you got time I would appreciate pointing me to something that would allow me to change parameters in devices. I looked at the Basic Z-Wave Tool you guys have and I don't think that will work in situations that have hidden drivers... which is my situation with the Zooz. The only other thin I saw was under Devices->Advanced and that looked like I could really screw things up. I will keep looking and appreciate all your help.

1 Like

If by that you mean built-in drivers, it is still the same drill. Change to the Basic Z-Wave Tool, make your changes, and change back to the original driver.

Thanks. I am so new I did not know that it was under Device->type. I thought you copy over the old source code driver and then the original back when done. A couple more years and I'll have this thing down! maybe.
Thanks again.

1 Like

What are you trying to do exactly? I am very confused.

This community drive may be useful, it exposes most of the settings: [RELEASE] Zooz Q Sensor (ZSE11) community driver

I have on my todo list, to also make a driver for ZSE11 since it seems Zooz has discontinued the very fast ZSE40 in favor of the slow ZSE11 :frowning:

Not possible with Hubitat hub, you need other software and a reprogrammed USB stick (zniffer).

1 Like

I'm confused too jtp10181. I'm a newbee to Hubitat and to get familiar with custom app writing I got a Zooz ZSE11. I don't intend to do anything fancy with it and probably can get by with just making Rules... but I am interested in trying to figure out how to write custom app's so I went the harder way. I was going to use the built in driver for it but realized that it did not have all the features available that the Zooz doc's mention and so someone was nice enough to let me know about the Basic Z-Wave Tool which would allow me to add/tweak parameters in the device. But I think I will use the driver you pointed out and see if I can control those features in a much more straight forward manner... Thks, I appreciate you mentioning it. My first program will simply be to turn on my living room lights based on the illuminance.

You also mentioned that to sniff Zwave/Zigbee/Matter I wouldn't get by with just the Hubitat C8 and some fancy app/driver. Could you give me some specifics on exactly what is needed in the way of HW and SW. I have developed on a PC and used WireShark to sniff Ethernet packets so this seems to be a natural progression... Thks.

Here is a really old guide on Zniffer for Z-Wave. Z-Wave Sniffing, Zniffing And You: A Guide To Pulling Packets From Thin Air

Somewhere else I posted some additional instructions and links to the file packages that can no longer be found from SiLabs.

I have no idea about Zigbee and Matter.