Just started to play around with PLEG. I have a fairly complex scene that I managed to configure using PLEG, but when the action is triggered, I need to issue http commands to certain devices. There’s no plugin that would simplify “talking” to these devices. Ideally, I’d like to write some LUUP code or invoke them using curl. I can’t find a way to do this in the action editor. Any workaround?
You could put your Lua in an MCV scene and set it to trigger when the appropriate PLEG condition is satisfied.
thanks for the pointer. This should do it ![]()
I refuse to put a LUA tab in PLEG … that’s like surrendering!
Hmm, just come across this little conundrum… I could do with a small snippet of Luup in a PLEG action… Guess I’ll have to work my way around it then ![]()
Actually, how would I best go about this?
I have a sensor on my garage door, and when it is open (tripped) I want to send an UDP message to my server so it can switch a BlinkStick on. When the door is closed (not tripped), I want to send a different UDP message to my server so that it switches the BlinkStick off again.
I created 2 scenes (one for each UDP message), but I can’t select them as an action?
Ah nevermind. All I needed was one scene with two triggers (one for sensor tripped, other for sensor not tripped) and then put the UDP code into the trigger luup section. Seems this time PLEG is not the answer ![]()
I’m not sure I understand your thinking. I think the lack is crippling. PLEG is a very powerful tool and I would see the LUA tab as only making it even MORE powerful.
I’m new to PLEG (and the whole system to be honest). I came across this thread when searching for advanced PLEG actions. Unless I am missing something (fully possible), this severely cripples the actions of PLEG. I can see not wanting a LUA tab for conditions, triggers etc. but without LUA on the actions, I’m limited to what is presented by the GUI for each device.
For example, I wanted to send a push notification (from the plugin) that had status of some sensors in the message. Only way I could think to do it was to create a scene and trigger that. Once I finished my LUA code in the scene, I realized basically the whole thing was there and just used a scene instead of PLEG.
Just my opinion. Please fill in my gaps if I’m missing something!! Thanks for the great plugin!
You can do a push notification from the Advanced tab in Actions.
Yes but I can’t programmatically define the message… Such as at a set time a message with the individual status of open sensors. I can only predefine a static message. I could do it by creating additional conditions but say I have 10 sensors, that’s 100 combinations. Not to mention one would have to test all of them… Oi.