You should be able to add it as both Energy Meter and Power Meter.
You’ll want the stuff on the Power Meter side.
EDIT: Adding pic
Is there a way to get RM to react to a Notification message in context? For example, I’m using User Lock Manager, and when a given code unlocks my door, it presents a notification saying “Front Door Lock was unlocked by xxxxx”
I would like to have a given name trip a virtual switch. Thoughts on how this might be done if possible/
@diehllane, many thanks; solution worked. energy option looks for kwhr, power option looks for watts. this was bothering me for 2wks.
a complicated way to do it on android is to is use tasker, autonotifications plugin, sharptools plugin (paid apps).
autonotifications can store / parse messages into variables. that way you derive some context from the notification and have tasker/sharptools perform some tasks.
Hi All, hoping someone can help. I want an ‘all lights’ on/off virtual switch. I have created a virtual switch and am trying to use it in RM to control all lighting.
My issues:
How do I have the virtual switch state mirror the status of my lighting? (Ie, if any of my lighting is on, the virtual swith state will be ‘on’. If all my lights are off it will be ‘off’). I guess I need the virtual switch to check the status of my lighting, but don’t know how.
Secondly, I know how to set up separate rules to turn all lights off, and one to turn all lights on. But how would I combine these in a single rule (or is there no advantage to doing so)
Thanks!
There’s no sense having it track the state of your lights. What I mean is, yes, you have a switch to turn on all your lights, but you wouldn’t want that switch to be “on” if only 2 of the 10 lights tied to it are on, because if you want to turn on all your lights now your only option is to turn that switch “off” (which switches off your lights that are on), and then turn that switch back on again.
I would make the Rule Machine rule like this:
Trigger: Virtual All On Switch On or Virtual All On Switch Off
Condition: Virtual All On Switch On
True: Turn on bulb(s)
False: Turn off bulb(s)
Ok I see what you mean about mirroring the state, it’s just, aesthetically, I don’t want to see a grey (off) switch when my lights (or some of them) are on.
Perhaps I need a virtual momentary switch instead.
Thanks for the RM guidance, I’ll.give that a try.
Amazing job! This is exactly what I’ve been looking for.
I’m new to ST (about a month) and have mainly been playing with lighting automation. The RM really gives me the flexibility I’m looking for so great work!
(As you might guess from the spelling of colour, I’m from the UK.)
I noticed some odd behaviour that you might like to know about…
I’m using LIFX bulbs, which I know has some issues, and one of them is causing the following error when I execute a set colour action.
14:05:26: error groovy.lang.MissingMethodException: No signature of method: physicalgraph.device.HubMultiAction.add() is applicable for argument types: (java.util.LinkedHashMap) values: [[name:hue, value:52, isStateChange:false, …]]
This was covered earlier in the thread and elsewhere, but there are two interesting things about it when in RM actions:
The colour and brightness setting works anyway. The bulb comes on and the colour is set correctly.
The bulb then immediately turns off again! I think the error is causing the false action to run.
The way I am using it is that the trigger’s condition is whether the bulb is off. If true (off) it sets the colour and brightness. If false (on) it turns the bulb off. If I use an action other than setting the colour, I don’t get an error and the trigger works as intended. If I don’t set a false action, the bulb stays on. But if an error occurs, the bulb comes on to the correct colour and then immediately turns off.
To test the theory, I’ve set the false action to set dimmer 100%, and that works. It goes from off to the right colour and then immediately brightens to 100.
Any thoughts?
It would be helpful if you showed the entire error message, as the one you showed in your post does not include the line number. And it would also be helpful if you could post a screenshot of the rule that is throwing this error.
I was trying to set notifications based on contact sensors and motion sensors and I noticed there is an option for “Push” and also “Notification”. “Notification” seems to do nothing. Can anyone explain what the difference between these two actions?
Push does a push notification to your phone and a notification entry in the notification stream (viewable on your phone). Notification only does the latter.
Oh thanks. I feel like an idiot…after reading your reply, it makes total sense. Thanks.
Best SA ever, btw!
Certainly:
14:17:14: error groovy.lang.MissingMethodException: No signature of method: physicalgraph.device.HubMultiAction.add() is applicable for argument types: (java.util.LinkedHashMap) values: [[name:hue, value:52, isStateChange:false, …]]
Possible solutions: add(java.lang.String), add(java.util.List), add(physicalgraph.device.HubAction), add(physicalgraph.device.HubMultiAction), any(), any(groovy.lang.Closure) @ line 2219
The below is the example for the test I mentioned - the false rule would normally be turning off the bulb.
OK, so it can’t possibly be going to False all by itself. This is a Trigger, so the rule is only evaluated when the button is pushed, at which point it is either true or false. After that, it’s not going to do anything at all until the button is pushed again.
Well, it definitely performs the true action followed by the false action. And it only does so when the true action is is set colour, which is why I assumed the error was responsible somehow.
My other thought was that once the bulb has turned on, the condition is now false. Could the error be causing it to somehow evaluate it again, and execute the false action?
Here’s a log of the whole event after pressing ‘Sofa Button 1’. So there is an event immediately after the error indicating that TV (the bulb) is now on, and subsequent lines set the level to 100. This is what makes me suspect the error is causing the false action to run. There are no other rules or actions containing the instruction to set level to 100.
655c44de-b5f2-4b0d-b1e3-6ca86507bae8 17:09:32: debug updating TS
655c44de-b5f2-4b0d-b1e3-6ca86507bae8 17:09:32: debug event from: TV, value: 100, source: DEVICE, description:
085c8981-57f0-4c63-b37c-20bca6a218d2 17:09:32: info Sofa Button 1 Pushed is now False
085c8981-57f0-4c63-b37c-20bca6a218d2 17:09:31: info Sofa Button 1 Pushed: Sofa Minimote button pushed
cc6509d4-1ca1-4279-a3bd-cdc38ce561a9 17:09:31: debug setLevel 100
655c44de-b5f2-4b0d-b1e3-6ca86507bae8 17:09:30: debug updating TS
655c44de-b5f2-4b0d-b1e3-6ca86507bae8 17:09:30: debug event from: TV, value: on, source: DEVICE, description:
085c8981-57f0-4c63-b37c-20bca6a218d2 17:09:30: error groovy.lang.MissingMethodException: No signature of method: physicalgraph.device.HubMultiAction.add() is applicable for argument types: (java.util.LinkedHashMap) values: [[name:hue, value:52, isStateChange:false, ...]]
Possible solutions: add(java.lang.String), add(java.util.List), add(physicalgraph.device.HubAction), add(physicalgraph.device.HubMultiAction), any(), any(groovy.lang.Closure) @ line 2219
085c8981-57f0-4c63-b37c-20bca6a218d2 17:09:29: info Sofa Button 1 Pushed: Sofa Minimote button pushed
cc6509d4-1ca1-4279-a3bd-cdc38ce561a9 17:09:29: debug setColor [hue:52, saturation:19, level:35]
618dae1b-6c12-408d-9584-5e02848ca871 17:09:29: info Minimote Button 3 Held: Sofa Minimote button pushed
052fe66d-4fd6-4ced-9026-d4555f4359b1 17:09:29: info Sofa Button 2 Pushed: Sofa Minimote button pushed
5a4dc679-e1fd-45a4-b3cb-3c3b8ed00512 17:09:29: info Sofa Button 3 Pushed: Sofa Minimote button pushed
Nowhere in what you’ve shown does it show the rule being true. It’s pretty much impossible to tell what’s actually going on from what you’ve shown and the way you have it set up. It would help if you just showed the log from the rule only. Is the TV bulb on or off when you pushed the button the first time? This is a confusing mess. What is with the other buttons being pressed? Where are the “debug” messages coming from?
If you want to debug this, you’re going to have to isolate the issue better.
OK, I’ve removed all the other variables, like other triggers and SmartTiles. This is the scenario:
I have a trigger defined on ‘Aeon Minimote Button 1 pushed’. Condition is ‘bulb off’. True action is to ‘set colour X and level of bulb to 35’. False action is to ‘set level to 100’.
Here is a cleaner log, after removing all other triggers. The rule is 085c… and the bulb is cc65…
085c8981-57f0-4c63-b37c-20bca6a218d2 19:48:39: info Sofa Button 1 Pushed is now False
085c8981-57f0-4c63-b37c-20bca6a218d2 19:48:38: info Sofa Button 1 Pushed: Sofa Minimote button pushed
cc6509d4-1ca1-4279-a3bd-cdc38ce561a9 19:48:38: debug setLevel 100
085c8981-57f0-4c63-b37c-20bca6a218d2 19:48:37: error groovy.lang.MissingMethodException: No signature of method: physicalgraph.device.HubMultiAction.add() is applicable for argument types: (java.util.LinkedHashMap) values: [[name:hue, value:52, isStateChange:false, ...]]
Possible solutions: add(java.lang.String), add(java.util.List), add(physicalgraph.device.HubAction), add(physicalgraph.device.HubMultiAction), any(), any(groovy.lang.Closure) @ line 2219
085c8981-57f0-4c63-b37c-20bca6a218d2 19:48:36: info Sofa Button 1 Pushed: Sofa Minimote button pushed
cc6509d4-1ca1-4279-a3bd-cdc38ce561a9 19:48:36: debug setColor [hue:52, saturation:19, level:35]
To be clear, the bulb brightening to 100 is not caused by anything else. Whatever I put in the false action of the trigger is executed spontaneously after the true action, if an error occurs during the true action.
Where are the “debug” log entries coming from??
No, this is coming from something else. The rule is only running once, not twice true then false.
Have you tried removing this particular rule, and recreating it?
The debug entries are from the bulb itself, cc65 is the LIFX bulb device.
I suspect you have a bad Device Handler, but I really don’t know. You could try this: Go to IDE / My Locations / List SmartApps / click on this rule. Take screenshots of the entire page, and post them here. That will tell me some essential facts.[quote=“Charliemouse, post:2899, topic:28730”]
Whatever I put in the false action of the trigger is executed spontaneously after the true action, if an error occurs during the true action.
[/quote]
That’s strange, not something coming from anything I know about, if that’s actually what is happening. Put a push notify in as the false action and see if that happens. Besides which, once the error is thrown the rule is toast, its execution aborted.