Page 1 of 1

Any experience integrating Z-uno with Ring alarm?

Posted: 22 Jul 2019 01:39
by notcopumpkin
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?

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

Posted: 22 Jul 2019 17:42
by PoltoS
Are you sure you need dynamic sensors? This is more for professionals. In most cases static channels are doing the job

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

Posted: 22 Jul 2019 18:05
by notcopumpkin
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.

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

Posted: 23 Jul 2019 02:07
by PoltoS
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

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

Posted: 23 Jul 2019 02:47
by notcopumpkin
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 :)

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

Posted: 23 Jul 2019 09:42
by PoltoS
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 ;)

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

Posted: 23 Jul 2019 15:01
by notcopumpkin
Wow, nice!

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

Posted: 25 Jul 2020 09:08
by AnonyMuskOx
Did you ever get this to work. I want to dump ADT. So I need to wire all my existing sensors to this and pair it with the Ring Alarm. If you did get your code to work could you post it on GitHub so I could take a look.

Thanks