PLEG & Vacation Ghost

I wanted to enable and diasble Vacation Ghost from Homewave remotely, rather than logging into the UI.
The Ghost plugin doesn’t seem to interface directly with Homewave so i wanted to have a PLEG that followed the state of a Virtual Switch and copied it to enable or disable the Ghost.

This is the Report from the PLEG:

Ghost Follower
Device ID: 1522013-10-11 13:02:54 PLC Version: 5.1

Device Properties
Name Device Name Device Variable Last Change Value
GhSw GhostStatus Status 2013-10-11 12:58:58 1
VacGh VacationGhost State 2013-10-11 12:15:44 0

Name Expression Last True State
ghostOn GhSW==1 AND VacGh==0 2013-10-11 12:58:58 true
ghostOff GhSw==0 AND VacGh==1 2013-10-11 12:58:44 false

Actions for Condition: ghostOn
Device Action Arguments
VacationGhost Set newTargetValue=1

Actions for Condition: ghostOff
Device Action Arguments
VacationGhost Set newTargetValue=0

This works great when the ghost is off and the Vswitch is off. Switch Vswitch on, and it enables the ghost.

the other way round doesn’t work though. with the ghost on and Vswitch on, turn the Vswitch off and nothing happens.

It looks like the state of the ghost is not getting updated in Vera at all, hence it’s not running.

To get round it, i can remove the “AND VacGh==1” for ghostOff, but would that mean the statement is always true for the Vswitch being off, and hence be running all the time? It does work though.


I use scenes to enable/disable devices which i cannot access directly via homewave, like multi switch, iphonelocator… works really well and is very easy to implement. Just write a scene which enables ghost, then it’ll show up in homewave… job done !

PLEG is Event oriented … It does things when things happen … it is not “Running all the Time”

All you need for conditions is:

ghostOn GhSW==1
ghostOff GhSw==0

These conditions will be evaluated when ever the Ghost Switch changes state.
At that time it will fire the actions.

Note: I believe it has been acknowledged that there are some problems when you try to disable ghost plugin while it is already running.

Thanks for the responses. I had thought about the scene thing, but i was hoping PLEG might be a bit cleaner.
I might go with Richard’s suggestion of the shortened condition so i can easily the status in Homewave.