How do I configure Advanced Device Features through PLEG?

Good morning,
I’m trying to figure out how to change advanced configuration settings of my switches and outlets through PLEG. I’ve got all the conditions and triggers set up, but I don’t see the configuration items I’d like to change.

What I’m trying to do, is when the house modes plugin changes state to Night, I want to turn off the blue light on my bedroom GE Jasco switches and outlets, so it doesn’t keep us from getting to sleep. One of the outlets is right in the line of sight of my wife, and she complains about it rather constantly. I’d like to keep the blue LED on during the day and such, but I’m don’t want them on when we’re sleeping.

Another advanced function I’d like to perform is controlling the dim rate of a light when it’s turned on automatically, so it’s not so jarring.

I’ve found this page with the variables that need to be changed, but nothing seems to match up on the logic actions page.

Thanks for any advice you can provide.

I thought I figured it out, but it doesn’t seem to work. I found the PutByte action under Logic Actions. The conditions are being met (off of a schedule), but the LEDs are remaining on. I’ve attached the status report from my fidgeting this morning.

The items pertaining to this are:

sStatusLEDOn Day of Week 06:00:00 1,2,3,4,5,6,7 None Day of Week 22:00:00 1,2,3,4,5,6,7 None

cStatusLEDOn sStatusLEDOn false 0 0
cStatusLEDOff ! sStatusLEDOn true 2018-12-29 09:42:38.677 0

Action: cStatusLEDOn
MB Floor Jen[203] PutByte StartAddress=3 StopAddress=3 Value=0
MB Floor Tim[190] PutByte StartAddress=3 StopAddress=3 Value=0
MB Fan Light[191] PutByte StartAddress=3 StopAddress=3 Value=0
Master Bed Fan[192] PutByte StartAddress=3 StopAddress=3 Value=0

Action: cStatusLEDOff
MB Floor Tim[190] PutByte StartAddress=3 StopAddress=3 Value=2
MB Fan Light[191] PutByte StartAddress=3 StopAddress=3 Value=2
Master Bed Fan[192] PutByte StartAddress=3 StopAddress=3 Value=2
MB Floor Jen[203] PutByte StartAddress=3 StopAddress=3 Value=2

Still no progress. I thought I might have to send a Reconfigure command after setting the parameter, but that isn’t doing anything either. Anybody have experience with this? Would Luup be better for this?

Some progress last night. I tried using Luup from Apps --> Develop Apps --> Test Luup code (Lua), and entered a series of commands to turn the LED on and off, and it worked pretty much right away, as far as I can tell. Took 10 or 15 seconds to get from my computer to my bedroom to check, so I can’t say if it was instantaneous or not, but it was good enough for the purposes I needed.

To turn the LEDs off:

luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1','SendData',{Node='48',Data='112 4 3 1 2'},1) luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1','SendData',{Node='49',Data='112 4 3 1 2'},1) luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1','SendData',{Node='50',Data='112 4 3 1 2'},1) luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1','SendData',{Node='56',Data='112 4 3 1 2'},1)

To Turn the LEDs back on:

luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1','SendData',{Node='48',Data='112 4 3 1 0'},1) luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1','SendData',{Node='49',Data='112 4 3 1 0'},1) luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1','SendData',{Node='50',Data='112 4 3 1 0'},1) luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1','SendData',{Node='56',Data='112 4 3 1 0'},1)

I used a PLEG schedule to activate this code, and it didn’t seem to work. Any idea why it wouldn’t work from PLEG, but would work from Apps?

Action: cStatusLEDOn
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘48’,Data=‘112 4 3 1 0’},1)
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘49’,Data=‘112 4 3 1 0’},1)
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘50’,Data=‘112 4 3 1 0’},1)
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘56’,Data=‘112 4 3 1 0’},1)

Action: cStatusLEDOff
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘48’,Data=‘112 4 3 1 2’},1)
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘49’,Data=‘112 4 3 1 2’},1)
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘50’,Data=‘112 4 3 1 2’},1)
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘56’,Data=‘112 4 3 1 2’},1)

I’ve attached my latest status report. Any help would be greatly appreciated.

I don’t have any experience with this, but what happens if you run the action manually by pressing the button ‘run’ in the tab ‘Logic Actions’ in PLEG? Does the action execute or not?

I need to double check, but I don’t believe it did. I was trying a bunch of different things last night, and I’m pretty sure I tried that. I believe I found another thread a while back saying that Luup commands run the through PLEG for device parameters wasn’t working for them either. I need to track that thread down and see if there was a resolution to it.

My next step is to try and just run the code through a normal Vera scene since it’s just a simple schedule I want to run. I’m trying to move away from the scenes and do more things through PLEG, but I may need to apply the KISS principle here to make it work, since I know the code works through the App developer tools.

See post below.,50391.0.html

See post below.,50391.0.html[/quote]

Excellent, thanks! I’ll give that a shot!

So, I have some results, and I’ll have to wait until this evening for it to automatically do it’s thing to be sure, but I believe I fixed the issue.

  1. The LUUP commands worked running from a Scene…well, 3 out of 4 devices. The 4th device, is a GE 14287 smart fan switch". It’s actually one of their newer switches, however, according to this thread, the LED isn’t configurable from parameters, but only physically from the device. Looks like that road has been gone down before. Although there is some suggestion that it might be configurable with a custom xml file (don’t want to go there).

  2. Deleting that node from the PLEG Luup entry, the “run” button did change the status of the LEDs. It’s likely there was an error on the code execution (need to learn to how to look at log entries on this thing).

See post below.,50391.0.html[/quote]

Excellent, thanks! I’ll give that a shot![/quote]

So, the linked thread talks about setting the load level, but not really about ramping it over a period of time. That is the actually the device I have in my living room by hapenstance, but what I need to do is ramp it up slowly over 45 seconds or a minute, something like that. I’d probably want to ramp it up to 60%, 5 or 10 percent at a time. My thought is initially turn it on to 20%, then at 10 second intervals, bring it up another 10%… I’m pretty sure I’ll need to use counters and timers for this; just not sure how.

For ramping up a light, you can run multiple device commands in a single action in PLEG on a delay. For my wake up action, I run 6, 10 second ramps going from 5% to 100%, so my 2 nightstand lamps slowly ramps up. Better than an alarm clock (which sounds 1 min later as a backup to a Vera restart).

No, that thread, as well as the link you posted talked about setting parameter 7 and 8 to time how long a DIM command takes to ramp… The thread is really us talking about the settings are somewhat counter-intuitive. And you may need to set the undocumented parameter 6 in some of the newer z-wave plus GE/Jasco switches. From

[code]Dim Rate Adjustments
Both the number of steps (or levels) that the dimmer will change and the timing of the steps can be modified to suit personal preferences. The timing of the steps can be adjusted in 10 millisecond intervals. As an example, the default setting for parameter 8 is ?3?. This means that the lighting level will change every 30 milliseconds when the Dim Command is received. A value of 255 would mean that the level would change every 2.55 seconds. Combined, the two parameters allow dim rate adjustments from 10 milliseconds to 4.2 minutes to go from maximum-to-minimum or minimum-to-maximum brightness levels.

  1. When Receiving a Z-Wave Dim Command

Parameter 7 (number of steps or levels)
Parameter 8 (timing of the steps)
Length: 1 Byte
Valid Values:
Parameter 7 (default = 1) Valid Values: 1-99
Parameter 8 (default = 3) Valid Values: 1-255[/code]

I do something similar with my Fibaro switches. I have the LUUP code in a scene and run the scene from PLEG. I find it better to keep all and only the logic in PLEG and see this as a “programmed plugin”. Separating like this makes testing a lot easier too. Good luck!

Sent from my SM-G960F using Tapatalk

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules