Monday at 11:13 PM2 days After nearly a decade, I finally had a flash of insight about what is causing a program set of mine to fail. But now that I know, I have no idea what I can do about it.I have a set of backyard lights (one circuit) slaved programmatically to a motion detector. The lights stay 30% dim from sunset to about 11 PM. When motion is detected in the backyard during nighttime hours (even after 11), they come on slowly, stay lit until one minute beyond the last motion detected, then dim slowly to the rest state appropriate to the hour.Anytime after dark, manually controlling these lights stops their automatic behavior, by setting a state variable. If I set them on (for an evening cookout), they stay on. If I set them off (for a meteor shower pool party), they stay off, even if motion is detected. The lights can be returned to automatic program behavior by issuing a fast-off, which resets the state variable.Or that's the goal.The problem is that sometimes this behavior would work, and sometimes it wouldn't. Specifically, the automatic behavior would not shut off despite having manually controlled the lights. Sometimes it would work fine, but sometimes it simply wouldn't.I went nuts diddling my programs, assuming it was some sort of timing race with another program (possibly the motion-detected program), yet could never beat this behavior fully. But a couple nights ago, I finally figured it out.The code I use to reset the state variable looks like this:If'Pool Lanterns Switch' is switched Fast off Or 'Nook - D Pool Lanterns' is switched Fast off Or 'Portable - Pool Post Lamps' is switched Fast offThen$Manual_Pool_Lamps_sw = 0 ...The code used to set it is similar, except that this triplet is repeated for every action OTHER than fast-off.It finally dawned on me that the failure case always occurred when I used the admin console or my iPhone app (I use MobiLinc Pro) to manually control those lights... whereas it always succeeded if I used any of the physical switches enumerated in the code to control the lights. Even if I told the admin console or MobiLinc Pro to send the command to the hardwired "pool lanterns switch" instead of just the related scene, it still didn't "count" for the purposes of the program as seeing "pool lanterns switch switched."The program environment doesn't seem to allow me to select for such control inputs coming from the admin console or the app. It doesn't seem to allow me any handle by which I could intercept controls going to the scene, or be triggered by those controls going to the scene. It doesn't seem to allow for a scene itself to set a state variable.How do I do what I want to do? Edited Monday at 11:16 PM2 days by lhranch
Monday at 11:50 PM2 days First thing that comes to mind …Create programs that turn them off or on and sets the required variables at the same time. Put the program as favorite in UD mobile in a group called back yard lights. if you use Alexa, you could expose the programs for spoken commands. Edited Tuesday at 12:01 AM2 days by hart2hart
Tuesday at 12:08 AM2 days You could also leverage a Keypadlinc button to also trigger your programs with an ‘Or’ keypadlinc button A is On/Off.I’ve also used the virtual device plugin to create virtual switches and then turn those on / off as a favorite. Again put those as Or clause in existing programs to trigger them. Edited Tuesday at 12:19 AM2 days by hart2hart
Tuesday at 03:21 AM2 days 3 hours ago, hart2hart said:I’ve also used the virtual device plugin to create virtual switches and then turn those on / off as a favorite.This has become my favorite approach for when I want to control a scene from UDMobile or the admin panel...create a virtual switch, include it in the scene as controller, then use the virtual switch in UDMobile. It acts as an indicator for the scene status, and can trigger programs when they are part of the condition. I expect that approach would work great here, but the virtual switch would have to be included as a fourth line in your program condition.
Tuesday at 02:15 PM1 day This may be too simple, but have you tried a separate "trigger" program for use in UDM ? I use simple programs like this in UDM. They provide status and each click runs toggles between the THEN and the ELSE, providing hte trigger for the target program.In your case the THEN would run the Then of your ON program. The ELSE would be to run the THEN of your OFF program. Naples Pool Stop LD - [ID 0335][Parent 01A5][Not Enabled]If Program 'Naples Pool Stop LD' is False Then Run Program 'Pool Emergency Stop' (Then Path) Else Run Program 'Pool Emergency Stop' (Else Path)
Tuesday at 02:58 PM1 day 15 hours ago, lhranch said:'Pool Lanterns Switch' is switched Fast off Or 'Nook - D Pool Lanterns' is switched Fast off Or 'Portable - Pool Post Lamps' is switched Fast off15 hours ago, lhranch said:It finally dawned on me that the failure case always occurred when I used the admin console or my iPhone app (I use MobiLinc Pro) to manually control those lights... whereas it always succeeded if I used any of the physical switches enumerated in the code to control the lights.This is because your program is using "switched" (the text), but the program us using control (or controls, I forget and not able to log into admin console currently). With "control" used that is changed to "switched" in the program and is looking for that physical control of a device. So by using admin console or an app it is not "controlling" or physically switching the device. So has proabbly always failed if using an app. I don't think there is a status of "fast off" so not sure if that would work instead and not rely on the physical operation of a device.Some good options above for how to make this work with an app controlling the situation.
7 hours ago7 hr Author On 12/22/2025 at 5:08 PM, hart2hart said:I’ve also used the virtual device plugin to create virtual switches and then turn those on / off as a favorite. Again put those as Or clause in existing programs to trigger them.I'm envisioning this as being a software-based pseudo-device that imitates a switch, but that an app like the admin control or MobiLinc could control and the ISY programming would respond to it as a switch physically being switched. That's precisely what I was hoping to find.I'm unfamiliar with this plugin. Is it the one here? https://github.com/UniversalDevicesInc-PG3/VirtualDo I download everything into the eisy and then "make" the package, or is there a simple installer? And then where do I install the result?(I tend to find things on github distinctly lacking in documentation. They assume you understand a whole bunch of conventions that I don't.)
7 hours ago7 hr You install it by going into "plugins" and selecting PG3. This will allow you to log into PG3 then select and install the plugin from the production list. The more information button will let you see the instructions on how to define virtual devices by entering custom parameters.
7 hours ago7 hr The language "switched" means you physically pushed the button, or at least that is the case with a switchlinc or KPL. Other devices it means that the command initiated at THAT device. If the device responded to a command issued elsewhere, it won't trigger the program.You would need to add to your program triggers that you can initiate from your phone. The easiest way I would say is to create a favorite in UD mobile that is the actual program. Add to your program to shut the devices off as well. If you actually click the switch itself and do the "fast off", it won't matter that the program shuts it off as well, it will already be off, no harm done.EDIT: I see you are using mobile linc and not UD mobile. I assume Mobile linc also lets you create favorites that might include programs where you can execute a "run then" by hitting the favorite button. Edited 7 hours ago7 hr by apostolakisl
7 hours ago7 hr One thing: the Virtual plugin doesn't generate Switched events, only Status changes. It would be handy if it could create Switched events too, but there is no physical device involved.
6 hours ago6 hr Author 29 minutes ago, Guy Lavoie said:One thing: the Virtual plugin doesn't generate Switched events, only Status changes. It would be handy if it could create Switched events too, but there is no physical device involved.Ah, if that is the case, it's not worth my while pursuing the virtual devices, as they won't work with my existing program any better than the programmatic control buttons do now. I've added both programs' THEN clauses to my favorites dashboard and I'll leave it at that.A good thing, as I seem entirely unable to activate PG3. It honors neither the default admin/admin as in the basic documentation, or admin/{what I changed it to during setup}, which works fine when using ssh to the eisy. Both these combos result in 500 Internal Server Error from the login page on port 3000, whereas leaving the password blank results in 401 Unauthorized. Edited 6 hours ago6 hr by lhranch
6 hours ago6 hr Guy gave you how to start with PG3x and install it. It’s straightforward. No tech knowledge required.In parameters for plug in in just enter a number say 10 as the key and switch as data and as I recall Restart the Virtual plugin. The switch will show up at the top admin console tree. You can get more sophisticated and define it this way to send in the name you want.Key Data10 {"id": "10", "type": "switch", "name": "Patio:Landscape Lights"} Edited 6 hours ago6 hr by hart2hart
6 hours ago6 hr Author 3 minutes ago, hart2hart said:Guy gave you how to start with PG3x and install it. It’s straightforward. No tech knowledge required.I'm assuming our postings crossed in the aether. I can't even log into the darn thing.
6 hours ago6 hr 6 minutes ago, lhranch said:I'm assuming our postings crossed in the aether. I can't even log into the darn thing.It uses you eISY username and password or if you’re on 6.x fw it uses you portal login. The then methods works great but if you just want to review PG3x try authentication methods above.
5 hours ago5 hr Author 9 minutes ago, hart2hart said:It uses you eISY username and password or if you’re on 6.x fw it uses you portal login. The then methods works great but if you just want to review PG3x try authentication methods above.As they say in Canada, "yeah, no." It doesn't take it.In retrospect, I suspect it might have something to do with the fact that I changed the name of the admin user in Admin Console to something that isn't admin (it offered, and I do have hackers polling my port). Now Admin Console takes that name and password, while SSH still seems to require "admin" and the same password. The cognitive dissonance may be the reason PG3 login is reporting "500 Internal Server Error" on all non-blank logins.
5 hours ago5 hr The fact that virtual devices don't generate control events can be worked around, by having the status change trigger a program that then resets the status after a short wait. It just makes things a bit more cumbersome.
Create an account or sign in to comment