Rule Builder iOS app

Sorry to hear that Greg. I have a question for you… in the instance when the lights turned on at 10, did the 5:30 rule run correctly that day? SmartRules basically has a list of time triggered rules to process, and when it triggers, it will start at the top of the list and run any whose time has passed. I’m thinking that if there was some SmartThings issue causing the 5:30 rule to not run, it would remain in the list, then run at 10 when it finally did run.

If you go to https://graph.api.smartthings.com/location/list, then click “smartapps” (right side), then click on SmartRules, at the bottom, you should see a list of “Job History”. Can you see when the “recurringEventTriggered” ran on a day that the weirdness happened?

I am experiencing random lighting issues of slight dimming and then going back up. I have rebooted the hub in hopes that will fix. We will see. Have not had problems in a long time.

So I was set as away for the 5:30 trigger, so it didn’t run (because of the condition if home is active) and then at 10 it shows up in the log as running.

Today it ran the 5:30pm trigger, so I’ll let you know if the 10pm trigger includes both 5:30 and 10pm triggers.

Either way, it sounds like a bug that it needs to check all the conditions too to see if it should run.

Greg

What happened at 10?

everything worked perfectly!

Great. We’ll keep an eye on this issue and look for any possible improvements on handling scheduled events that fail to run.

@obycode am I missing something but I noticed that when I authorize the app and select my devices I see the option to include “button” devices. However when I go to create a rule based on the push of that button I don’t see buttons in the list of triggers. Same goes with momentary switches.

That doesn’t seem right. You selected buttons during the log in process? Can you try logging in again with the SmartThings live logging running and send me what shows up? (May want to send in a direct message)

So I figured it out, I initially added the new devices using the smartrules app in the smart things app. Once I opened the iOS smartrules app and logged out the back in. The devices then appeared in my rules.

Ah, yes. If you update the device list in SmartThings, SmartRules can not currently get the updates automatically. You’ll need to use the refresh button, or log out and back in. Glad it is working well now!

I’m curious since I don’t have an Apple Watch to test on yet. We’ve gotten a could of reports of the SmartRules Apple Watch app not working. Has anyone had success with it, or does it not work for anyone? It still works great on the simulator :confused:

I just got my Apple Watch yesterday and this was one of the 1st apps I installed on it - good work! Also thanks for being responsive/available to talk about it.

I think you need to enable “Background App Refresh” on SmartRules on the IPhone app since the only time my Apple Watch works to run the Quick Taps is when the SmartRules app is running in the foreground.

Just now when I tried I hit a quick tap on the watch and it didn’t do anything on my lamp in the house. When I switched over to the SmartRules app on the iPhone it ran the command I had kicked off on the watch a minute ago and turned the lamp on.

2 Likes

Thanks for the tip! According to the documentation from Apple, I shouldn’t need to enable any background modes, but this tells me there must be something wrong with the background task. This gives me a great starting point. This is one of the things that is not possible to test on the simulator. Would you mind possibly beta testing a fix for me?

Sure, would love to help beta test.

1 Like

This is a great app, sorry I did not get into it sooner. I have 2 questions:

  1. Just so I understand, nothing you “program” on this is stored in the phone correct? The phone app is basically just a remote to connect to the smartapp, right? I just like to understand how stuff works :smile:

  2. Would there be anyway to add PushBullet as an Action. @baldeagle072 wrote PushBullet Notifier which I use alot and it would be nice to be able to choose that in addition to SMS and push.

Thanks for such a great app!!
Scott

I’d like to beta test too

Thanks!

You’re right. The rules are sent from the phone to the SmartThings cloud where they run just like any other SmartApp. No rules execute on the phone itself. There are copies of the rules saved to the phone for you to see and edit.

I’ll take a look to see if this is possible. I’m trying to keep the supported “things” limited to using only the official capabilities defined by SmartThings (see here - https://graph.api.smartthings.com/ide/doc/capabilities), and that PushBullet device doesn’t support any of those. Here is an idea for an easy workaround that would work with the SmartRules version 1.2.1 (currently awaiting Apple approval): Modify the PushBullet device type to support the “Speech Synthesis” capability, then give it a method called speak(string), where that string is the message pushed to PushBullet. This would be a very simple change to the code.

1 Like

Great thanks!

@baldeagle072, would that be possible? No big deal if not, I just figured I would ask.

It is definitely possible, but I don’t think a device should have a capability that it doesn’t actually represent. If you want to implement this on your own device type, you would need to add just a few lines of code to it:

The definition needs to be changed to this (a couple lines added):

definition (name: "Pushbullet", namespace: "baldeagle072", author: "Eric Roberts") {
    command "push", ["string", "string"]
    command "push", ["string"]
    command "test"
    command "speak", ["string"]
    capability "Polling"
    capability "Refresh"
    capability "Speech Synthesis"
}

Then you need to add this method:

def speak(message) {
     push(null, message)
}

DISCLAIMER: This is untested. Let me know if this works. As far as I can tell, it should work.

2 Likes

Agreed, but in this case, it is just such a simple workaround, and the powers that be don’t seem to be adding any new capabilities, so this is a “good enough” way to make it work for now.