[DEPRECATED THREAD] webCoRE design process

On my phone i get “5”

Yeah, that’s Friday. 0 = Sun, 1 = Mon, …, 6 = Sat

okay. it´s possible to convert the result 5 into the word “friday”?

Yes, though I can add a function for that.

You can use an expression with a series of ternary operators

oh super, a function would be great.
when do you have time for this?

Any thoughts on this?
Rick

I am having a problem with my CORE app. It gives me an error of ‘somethings wrong we can’t load your screen right now’ I read in the CORE thread that it was recommended that we should migrate to webcore. I started setting it up. Loaded all the apps in the IDE. I was going through the webcore setup on my app from the Samsung tablet. When I hit done I received the same error of ‘Somethings wrong we can’t load your screen right now’ Is this a CORE issue or should I contact support?

Have you enabled oauth on webCoRE?
This may give some guidance.

I did on webcore, not on the webcore piston

You don’t need to oauth individual pistons just the main app.
Did the link I attached help at all?

Yes. That’s what I have. Oauth enabled on webcore only. The link is what I went by the first time

Hey,

Did you ever figure this out? I’m using webcore and hue lights and would like to transition colours over a time period but as you mention, transition to color doesn’t seem to work.

@ady624 Hey Ady!

Excellent work and support, thanks a lot.

Here is two things that I stumbled upon during my first day of use. I know it’s been mentionned before but I figure it can’t hurt to report it’s an issue for me too.

  1. I have a trigger that only trigger on sunday at sunset (which was a couple of minutes ago for me (EDT)) and it didn’t fire. I had to select mondays to make it work,… Simply said, the day seems to be off by 1 day…

  2. I can’t clear the logs, even when trying very hard. The memory % is raising and it’s not what I want, but pressing clear logs does make it disappear but it stays there if I’m refresing.

Thanks again and I’ll continue to report any bugs I encounter.

  1. There was a bug introduced in one of the recent versions that has already been squashed. If you have any timer pistons you either need to let them run wrong and then they will schedule correctly after that. Or you can pause/resume and piston with a timer and it will force it to reschedule.

  2. The clear button is doing exactly what it was intended to do. Just get them out of the way for now. As for the memory %, each piston has 100,000 bytes. This includes all the code, undo/redo actions, logs. cache of changes etc. Far less of a problem than people make it out to be if it gets high. If you want to clear up some actual space then fire up the ST app and in the webcore settings you will see Clean up and rebuild data cache.

All future issues should be posted in a non deprecated thread. The latest is the Beta Milestone 2 thread.

I have a piston that was working fine, but now will not trigger on events. My event log shows “kill switch active, aborting piston execution”. I’ve read through the posts and tried toggling on/off the “kill switch” in the webcore settings, but this does not seem to be working. Any other suggestions?

1 Like

can someone tell me how I would write a mathematical expression to return a decimal of 2 places? for example, the expression (1/5) always returns 0, even though it should be 0.20. The expression 10/5 returns 2 correctly. thank you!

Depends where you are storing the result… can be a decimal or an integer variable.

Please post a piston screenshot.

I figured out my previous question. In order to return a decimal, I had to have a decimal in the equation first (e.g. 0.1 / 5 = 0.02, but 1 / 5 will drop the decimal resulting in 0).

I have another question. I want to replace an abbreviated text with a full text from a list.
For example, If an event pops up (i.e. a calendar reminder) with abbreviation “X1,” I want a function to automatically pick and replace “X1” with an address for example, whereby “[X1]: 123 address, city” is stored as a list defined as string[] among other addresses [X2]:234 address, city, [X3]:567 address,city,…etc. I want it to leave out the “[X1]:”, and only gives me the address as a result.

If X2 pops up, the function will automatically pick and replace from the long list [X2] with 234 address,city, again leaving out the “[X2]:”

This doesn’t work:
when variable abrv (containing X1) appears, then,

string[] full_address: (“X1”: “123 address, city”, “X2”: “234 address, city”, “X3:” “567 address, city”,…etc)
dynamic address = (replace(abrv, “abrv”, “full_address”) = invalid parameters message

contain() only returns true/false which is not what I need.

Thank you!

Try round(x, d) where x is your number, and d the number of decimals. Also, 1/5 may always return 0 because it’s evaluated as an integer division. If that’s the case, you can try 1/5.0 where the 5.0 will force it into a decimal evaluation.