SmartThings Community

[DEPRECATED THREAD] webCoRE design process

Is there any current way with WebCore to start a piston based on a specific code being used for a smart lock. It looks like currently the answer is no. The wiki shows it as on the list of things that may be added in the future. I was curious if anyone had any work arounds or tricks.

Check the $currentEventDeviceIndex variable when the lock is unlocked with different codes. It won’t return the actual code, but it may return the code’s slot (0 for manually unlocked, 1-5 for each code slot). If yours works this way you may be able to use that, something like the following:

If
  Lock changes to unlocked
  and 
  $currentEventDeviceIndex is 3
Then
  Do stuff

Hi I need to update the apps to the latest version, but I’m in the UK and can’t use the gitHub. Does that mean I have to delete everything and re install it?

I’m in the UK and you can integrate Github.
What you can do is just overwrite all the existing code with the new code.
DON’T delete your existing code as you will lose all you existing pistons.
Just go to Adrian’s github repository and copy and paste all 4 ‘codes’.
When you overwrite them, just save and publish for me.

Brilliant thanks for your help, I will do that! How do you integrate gitHub I’ve never been able to as it says only available in US.

Thanks Robin. I was then going to rummage round for that thread.
Have to watch the election results instead.
:smile:

1 Like

Looks like we might have a hung parliament :imp:

There goes the hard brexit we need… Teresa May can be a right dumb tart sometimes, she had a parliamentary majority and threw it in the bin!

Gonna write a piston that spams her .gov email every time I open my front door!!!

3 Likes

Ha ha, they lost majority? :wink: she had like 330 out of 326 seats, she was down to an estimated 310 earlier, are the voting results in? And wait, do you want out of EU?

Just the BBC exit poll… but it’s normally very close to the actual results.

Yes, I want out of EU… then I can get duty free fags on the ferry from Calais!

And we can scrap human rights laws in order to send scumbag terrorists back to the desert they want the world to be!!

4 Likes

Voted OUT myself. (UK Expat in Canada)
Same reasons as you Robin, and one more important one:
===>> those that give up freedom for security deserve neither
The kowtowing to the UK EU Masters had to stop!
J

2 Likes

@ady624

I have 2 emergency pistons.
One of burglar alarm trips, one of fire alarm trips. Similar but not the same.

Either way, is there a way to have webcore poll all of the devices before turning them on or off, store the “previous state for each”, and then return them to their previous state when condition clears?

I.E. (both are “Door Sensors” that trip/clear condition based on open/closed)
smoke stops sounding (door sensor on relay to hardwired smokes, changes from open to closed),
alarm changes from Sounding to disarmed (door sensor on relay from alarm panel from open to closed).

Also, I have 100+ devices of which 60+ are switchable of some kind.
I did setup global variables for sections of the house, but the problem is within rash “room/area” there are too many possible combinations.

Ideas?

Problem Loading LIFX Scenes:

I’ve generated a token at cloud.lifx.com and pasted it into the settings in webcore, but in my piston where I try to call it, I get the error message “Sorry, there seems to be no available LIFX scenes, please ensure the LIFX integration is working.” I definitely have scenes and have called them from original CoRE before… any idea what gives?

Currently working on implementing full LIFX API, might have messed something up.

1 Like

How come the local time variable is two hours off? My smartthings does have the right time. Can I change it somehow?

That’s how it’s supposed to be… @ady624 mentioned it before somewhere and it’s based on a certain number of ms since a date in the 70’s… some kind of universal time.

This video might explain some of the idiosyncrasies involved in programming time:

1 Like

Okay, so when should we enable parallelism and when should we not?

If you have no problem with pistons running at the same time for different events. For example, if you are relaying events to another service, say IFTTT or a web request and you’re not using any variables or carry-over logic (where you’re relying on past events to control future events - say using execute on condition change only).

Interesting. Here’s another question. Why does “clear log” not clear the logs? They do clear, but if you go back to dashboard and back into a piston all the logs are back in there.

It clears the logs from the current view, it was never meant to clear the logs from the piston itself (logs are currently hosted in the piston’s state, they may eventually move from there). I can make it clear the piston logs for good, just never was the intention.