CoRE and Piston Rules Engine, first design steps

In an attempt to find the answer to this and I cannot. How do you grab the actual dashboard URL? BTW I am using an android and with the font increased in size so I can read it without the reading glasses :smile:

From the IDE logs

For users who have been lucky enough to get the contact book enabled it’s always nice to be able to select which users to send the push to. This is the code that ST uses in their “Photo Burst When…” SmartApp which I use in my other SmartApps:

def sendNotification(){
	
	if (location.contactBookEnabled) {
        sendNotificationToContacts(messageText, recipients)
    }
    else {
        sendPush(messageText)
        if (phone) {
            sendSms(phone, messageText)
        }
    }    
}

I think my Contact Book is busted, I can’t get it to work. It failed importing contacts, and if I use any input “name”, “contact” the app crashes…

It’s a feature that was pulled after it was initially released due to bugs… it’s been working fine for me using the above code. You can peek at a full implementation in this app:

Maybe @slagle or @jody.albritton can speak to the contact book’s status…

I’m wondering if it’s because it’s not fully released yet to everyone?

Can you set more than one variable name in same variable section? Do you seperate with a comma??

Well it burst my pistons so I pulled it out. I like my engine purring… :slight_smile:

1 Like

Umm, no, haven’t thought of that. But you can use as many "Set variable"s as you want.

Thanks @Turb02 didn’t realize I had to turn on the debug inside CoRE

Have you considered adding a way to create a variable from the piston’s local variables screen?

No, but could be a nice way.

v0.0.077.20160607 - Alpha test version - Variables galore in dashboard.

Does anyone on Android see the dashboard URL at the bottom of the page? Is it easy to copy or should I put it in an HTML input?

1 Like

I can see it just not very easy to copy.

It’s pretty tiny and in light grey lettering but I can copy it

Made it an input. Don’t want it to be obtrusive, it shows only on Android.

@ady624 - I wanted to bring up this question again because I think it may have gotten lost in all of the posts last night. Have you thought about being able to use $currentEventDevice as an Action?

The use case I’m thinking about right now is:

If…
Any of Light #1 or Light #2 changes to on

Then…
Using $currentEventDevice…
Do something

Now if there is another way of doing this please let me know.

I will think about it… I usually have to have a device object to work with and the $currentEventDevice is really a string representing a name. I cannot store devices into the state, but I could pass the event along and pick on its device. Maybe not using the variable, but I may find something. The problem is, since the device is “variable”, commands are impractical since they may or may not exist for that device. Imagine combining power meters and switches and temperature sensors. And then trying to turn the current device on, when the current device is a sensor… Maybe only with individual actions…

Thanks for walking me through the issues/limitations and the “If” would definitely have to be devices of all the same type. It could be done with several pistons but if you wanted to monitor all lights in your house that could become unmanageable.

What are you trying to do?