RaZberry as device

Discussions about RaZberry - Z-Wave board for Raspberry computer
klaus
Posts: 3
Joined: 10 Apr 2011 11:28

What we need is the zwave

Post by klaus »

What we need is the zwave module act as a on/off og dimmer device and transmit so we can control it from a zwave remote.

I have a Qees Ring http://www.pepper1.net/zwavedb/device/80 i like to have the 4 buttons control 4 "virtual" devices on the razberry to then control my philips hue light bulbs

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

This is possible with

Post by PoltoS »

This is possible with RaZberry - see my reply above. We will post a how to for a similar task.
klaus
Posts: 3
Joined: 10 Apr 2011 11:28

The how to ?

Post by klaus »

So where is the how to?
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Currently we have a js

Post by PoltoS »

Currently we have a js "module" that does it. it is called automation/modules/VirtualDimmer.js

This will be redesigned very soon, but for now you can use it as reference (debugPring shoud be replaced by system to make it usefull)
Agarwal
Posts: 1
Joined: 08 Oct 2014 03:30

Re: RaZberry as device

Post by Agarwal »

Where can I get that VirtualDimmer.js file, or any sample demonstrating how to use razberry to act as a device?
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: RaZberry as device

Post by PoltoS »

you are looking on a very old thread. What do you want to do?
mmccool
Posts: 2
Joined: 18 Dec 2021 12:05

Re: RaZberry as device

Post by mmccool »

I realize this is a very old thread but I have been looking all over for documentation on how to do this and this thread comes closest. It also mentions some sample code which I would love access to but can’t find.

I think it is best if I explain the use case.

My use case is that I have some programmable RGBW LED strips driven by an Adafruit M4 PXL8. This is an Arduino-like device but with 32KB of RAM and DMA support for smart pixels (requires high data rate and precise timing over a single wire to transmit 32 bits of RGBW data per pixel). Anyway, I have that all working, but want to control it directly over Z-wave. Basically these strips are also my home lighting, and I want to be able to turn them on and off with z-wave wall switches and set their overall color and brightness with z-wave controls, etc. In the interim I toggle power to them using an off-the-shelf z-wave switch but this only gives me on-off control, not brightness, and is kind of brutal on the strips (I would rather fade them out before cutting power). I also want to add some custom modes and use them as an ambient display. I also plan to permanently install some outdoors so Christmas decorating is just a matter of programming…

So one way to do this would be to get a Z-Uno. However, it is stupidly expensive, and anyway does not have enough memory to hold animations etc. nor the performance to drive the LEDs. So I would have to interface it to a Raspberry Pi over USB, which would then simply collect incoming commands from the Z-uno and send them to the M4 over another USB port. But this is a bit hacky and I would much rather use the Razberry board, which is cheaper… and I need a RaspPi anyway to manage and download new animations, etc. I also already bought the Razberry2.

One further complication is my primary controller is a SmartThings hub and it apparently does not play nice with secondary controllers. From what I have been reading, I can add Z-way as a secondary controller but need to disable SIS, SUC, etc and also need to exclude/include it every time I add a new device to the network, which is all a huge PITA since I don’t plan to use it for automation anyway.

ALL I want to do is expose a new device to the Z-wave network that can accept commands for an RGB light, plus some optional settings for mode changes, etc. I can then write a custom device handler in Smart Things to handle extensions like changing to different preloaded animations, etc.

So the sample code described above would be great. Where is it?
Last edited by mmccool on 18 Dec 2021 12:44, edited 1 time in total.
mmccool
Posts: 2
Joined: 18 Dec 2021 12:05

Re: RaZberry as device

Post by mmccool »

So… I *think* what I want to do is add a “virtual device”, probably in the switchRGB class: https://z-wave.me/manual/z-way/JavaScri ... 0000000000

It still would be nice to have some way to disable SIS, SUC in a way not susceptible to getting clobbered by updates, and update the routing table with having to do an exclusion/inclusion, but…

One thing I don’t understand is whether virtual devices are exposed as actual z-wave endpoints on the network or are just internal software constructs inside z-way for use with automation rules, etc. If the latter I *guess* I could make things work by watching for z-wave events (eg a button press on a switch) and then invoking the virtual device with an automation inside Z-way. But this is not ideal since battery-operated devices are not shared nicely (lifeline goes to the primary controller, which is a Smart Things hub) so I suspect I would only be able to use non-battery devices for control and not remotes, etc.

It also looks like the previously posted solution, binding some JS to get triggered upon seeing an external event on another Z-wave device, is a version of this “automation rule” approach. That means it may have the same issues with battery-operated devices and use by external hubs, automations, etc. It does not seem to create an actual Z-wave endpoint on the network for the device.
Post Reply