Any experience integrating Z-uno with Ring alarm?

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
notcopumpkin
Posts: 6
Joined: 22 Jul 2019 01:31

Any experience integrating Z-uno with Ring alarm?

Post by notcopumpkin » 22 Jul 2019 01:39

I'm a Z-uno n00b and just picked one up last week. I've paired it with my Ring alarm system and the Ring sees the various channels I've set up on my Z-uno, but seems very spotty about updating the sensor values from it. I'm currently just testing it with some simple binary (ZUNO_SENSOR_BINARY_DOOR_WINDOW) sensors that are statically configured (when I attempted dynamic configuration I ran into this) and returning 255 and 0.

I've also set up some serial monitoring from my callbacks to see if the Ring base station ever polls for updates but I have yet to see any messages over serial except for when I send an unsolicited report.

Anyone have any experience or pointers for a complete n00b in this space?

User avatar
PoltoS
Posts: 4978
Joined: 26 Jan 2011 19:36

Re: Any experience integrating Z-uno with Ring alarm?

Post by PoltoS » 22 Jul 2019 17:42

Are you sure you need dynamic sensors? This is more for professionals. In most cases static channels are doing the job

notcopumpkin
Posts: 6
Joined: 22 Jul 2019 01:31

Re: Any experience integrating Z-uno with Ring alarm?

Post by notcopumpkin » 22 Jul 2019 18:05

No, I definitely don't need dynamic sensors but it would give me cleaner code, because all the getters are just pulling out fixed elements from an array of states. I wrote a macro to generate all the getters but it was still quite repetitive and generating the sensors "dynamically" would've made it easier. Another alternative would be to allow us to specify in the channel specification a `void *` to pass into our getters that lets us use the same code for different purposes.

Anyway, I have it working with static channels right now but am still wondering about the Ring integration in particular. In theory I'm included in its network and it lists my channels, but none of my updates seem to get to it.

User avatar
PoltoS
Posts: 4978
Joined: 26 Jan 2011 19:36

Re: Any experience integrating Z-uno with Ring alarm?

Post by PoltoS » 23 Jul 2019 02:07

In 2.1.5 the is a new (still not documented) approach to map a variable to the channel - specify a variable instead of a getter and NULL for setter. This will allow you to remove all getters and make the code much shorter

notcopumpkin
Posts: 6
Joined: 22 Jul 2019 01:31

Re: Any experience integrating Z-uno with Ring alarm?

Post by notcopumpkin » 23 Jul 2019 02:47

Interesting! How does the Z-uno machinery know whether it should call the first argument or read the value from it? Is it somehow trying to figure out if the value looks like a pointer?

Anyway, I'm guessing I'm the first one who's tried hooking up Z-uno to Ring so I'm going to have to tinker a bit :)

User avatar
PoltoS
Posts: 4978
Joined: 26 Jan 2011 19:36

Re: Any experience integrating Z-uno with Ring alarm?

Post by PoltoS » 23 Jul 2019 09:42

It is checking the type of the argument. If it is a function, it will call it, if a variable, it will make a virtual function to return this value.

Z-Uno is doing a lot of magic under the hood ;)

notcopumpkin
Posts: 6
Joined: 22 Jul 2019 01:31

Re: Any experience integrating Z-uno with Ring alarm?

Post by notcopumpkin » 23 Jul 2019 15:01

Wow, nice!

Post Reply