Using webCoRE with Hubitat

It looks right to me

I see text:MyData as part of the map

Also may want to remove your keys if you did not otherwise obfuscate them

First line should have logged this though?: [referer:null, text:MyData, remoteAddr:[184.101.238.181, 70.132.62.153]]

Anyone experiencing problems with push notifications? Most of my pistons are made to send push notifications to hubitat android app (for me and my wife). There's few pistons that are configured exactly same way but we never receive push notifications from those pistons.
Any tips what to do or check?

Ensure you have the notification device configured in main webcore.

Create a simple piston to test, and we can debug from that simple piston if still not working.

If it does work (sometimes), then sometimes re-creating the one statement on HE is something else to try.

1 Like

It's me again..

When opening Webcore dashboard and pistons I often get notification which says always the same thing:
"database updated to version xxxxxxxx". It happens now and then and it does not matter which piston I'm dealing with. I'm pretty sure it repeats same notification multiple times with same pistons. Is this normal?

Few questions:

  • are you on the latest version of webcore of HE? If unsure and if using HPM, do a repair on webcore.

  • are you using webcore on ST also?

    • if so are you on the latest version there?

Are you switching between ST and HE?

Have you cleared all your browser caches and restarted the browser?

Ok did a repair and now it says: HubitatHome \ webCoRE_Hubitat (v0.3.111).
I was using webcore on ST and 6h ago deleted all my pistons and updated devices (there were two left anymore). Now removed whole webcore from ST.

I was switching between ST and HE. I haven't cleared cache. Maybe I should do that especially now that I stopped using ST webcore.

EDIT: this is what I got at the morning when opening first piston:
image

Database is always updating..to same version it was..

EDIT2: and here is what I red from piston log. This is from yesterday though and it's probably from the middle of the update process when child was not yet updated but parent was right?

2.2.2021 klo 21.42.44 +296ms
+434ms	║WARNING: Results may be unreliable because the parent app's version(v0.3.111.20210130_HE) is newer than the child app's version(v0.3.110.20210123_HE). Please update both apps to the same version.

EDIT3: one more weird thing (?). I'm seeing this in every piston that has variables.
image
So variable has been set but when I click on it.


Nothing is there. I have to manually add variable state to every piston and then save it again.

Hi...this seems real simple but just doesnt work...I'm trying to check if a T2- T1 is greater than 2 seconds
where T1=MB_Closed and T2=MB_open

I bolded the line in the logs...but it seems backwards ...
Comparison (time) 83356000 is_after (time) 83053000 = true (5ms)

but the test is if MB_Open_Timestamp is after MB_Close_Timestamp
but MB_Open_Timestamp is 10:53:58 and MB_Close_Timestamp is 10:54:02
and that clearly looks FALSE to me...but its reporting as true.... am I doing something wrong?

image

here are logs
Logs
12/6/2021, 11:09:20 PM +575ms
+2ms ╔Received event [Mailbox].contact = closed with a delay of 27ms, canQueue: true, calledMyself: false
+16ms ║RunTime initialize > 16 LockT > 0ms > rtDT > 7ms > pistonT > 6ms (first state access 9 3 13)
+19ms ║Runtime (7803 bytes) successfully initialized in 7ms (v0.3.113.20210703_HE)
+19ms ║╔Execution stage started
+25ms ║║Comparison (enum) closed changes_to (string) open = false (0ms)
+26ms ║║Cancelling condition #2's schedules...
+27ms ║║Condition #2 evaluated false (5ms)
+28ms ║║Cancelling condition #1's schedules...
+29ms ║║Condition group #1 evaluated false (state changed) (7ms)
+34ms ║║Comparison (enum) closed changes_to (string) closed = true (0ms)
+35ms ║║Cancelling condition #16's schedules...
+36ms ║║Condition #16 evaluated true (5ms)
+37ms ║║Cancelling condition #15's schedules...
+38ms ║║Condition group #15 evaluated true (state changed) (7ms)
+39ms ║║Cancelling statement #17's schedules...
+46ms ║║Executed virtual command setVariable (2ms)
+49ms ║╚Execution stage complete. (29ms)
+51ms ╚Event processed successfully (49ms)
12/6/2021, 11:09:16 PM +137ms
+3ms ╔Received event [Mailbox].contact = open with a delay of 21ms, canQueue: true, calledMyself: false
+50ms ║RunTime initialize > 49 LockT > 1ms > rtDT > 41ms > pistonT > 41ms (first state access 7 4 45)
+52ms ║Runtime (7879 bytes) successfully initialized in 41ms (v0.3.113.20210703_HE)
+53ms ║╔Execution stage started
+59ms ║║Comparison (enum) open changes_to (string) open = true (0ms)
+60ms ║║Cancelling condition #2's schedules...
+61ms ║║Condition #2 evaluated true (5ms)
+62ms ║║Cancelling condition #1's schedules...
+63ms ║║Condition group #1 evaluated true (state changed) (7ms)
+64ms ║║Cancelling statement #3's schedules...
+71ms ║║Executed virtual command setVariable (2ms)
+78ms ║║Comparison (time) 83356000 is_after (time) 83053000 = true (5ms)
+80ms ║║Cancelling condition #6's schedules...
+81ms ║║Condition #6 evaluated true (8ms)
+82ms ║║Cancelling condition #5's schedules...
+83ms ║║Condition group #5 evaluated true (state changed) (10ms)
+84ms ║║Cancelling statement #7's schedules...
+88ms ║║Executed virtual command setVariable (1ms)
+94ms ║║Executed virtual command setVariable (2ms)
+99ms ║║Comparison (enum) open changes_to (string) closed = false (0ms)
+100ms ║║Condition #16 evaluated false (4ms)
+101ms ║║Condition group #15 evaluated false (state did not change) (6ms)
+104ms ║╚Execution stage complete. (51ms)
+107ms ╚Event processed successfully (104ms)
12/6/2021, 11:08:47 PM +210ms
+16ms ╔Subscribing to devices...
+19ms ║Using Attribute subscription
+104ms ║Device missing from piston. Loading all from parent (82ms)
+115ms ║Using Attribute subscription
+118ms ║Subscribing to Mailbox.contact...
+123ms ║Piston controls Echo - Kitchen...
Logging level

Also the offset value seems to be lost in the output

The way you have this coded

You get an open event, and you set open time to now.

Now will be after close by definition...

I think you want a single trigger:

if MB contact changes

then
if contact is open do open stuff
if contact is closed, do closed stuff.

I think folks in the webcore forum can help you further.

From the piston operation, the contact is open or closed. You can save the time when you see open or close, but I don't think you need to be comparing the times (or I don't understand your overall logic you are trying to achieve).

In general it seems for your mailbox

  • it gets opened then closed
    this operation could be someone filling it, or someone emptying it. The events look the same - ie it gets opened, then closed.

In the case of the mailman, then could open it, empty it then close it (and not put anything in)

Or they could open it, put something in, then close it....

Similar for you - you may be filling or emptying it.

So you need to state more of what is your logic that has you understand on the open/close if someone is filling or emptying....

1 Like

the reason behind the logic....is I wanted a way to know when the mail was taken out by us.
so when the mailman puts the mail in I will detect the open
BUT to tell that I picked up the mail, I will press down on the switch for 2 seconds and then release and then close the mailbox. The holding down of 2 secs is why I'm comparing between the two.

but putting that aside.... the compare as far as I can tell is NOT working..... right?

Thanks again for the help
Tim

1 Like

I Finally got the webcore code to do what I want. I have a switch on my mailbox that goes back to my hubitat. When the mailman put the mail in, the status will be set to FULL when we pickup the mail, and press the switch for 2 seconds, the status is set to EMPTY
It shows on the dashboard
image

If anyone is interested, I can share the webcore code.

1 Like

How did you manage to introduce /newlines between those four lines of text? I think I played with that and realized I didn't know the proper technique. Even when my Expression in webCoRE looked like multiple lines, the Send Email function still sent me a message with everything on a single line.

UPDATE: Seems I am not alone in this particular "How to Introduce Paragraph Breaks" struggle.

Its a little hit or miss.... i may have added a few spaces but just the size of each piece of info forced the next to another line ....i also researched adding carriage return but no great solutions
image

The tl;dr I came away with was to use this construct between intended lines of your Expression:

[single apostrophe] [ENTER key] [single apostrophe]

But I think you accomplished the same thing simply by pressing ENTER between running text – already enclosed by ' ' marks – which introduced the new paragraph breaks shown. Or, as you stated, making each line so long without breakable whitespace that the wrapping occurred naturally.

1 Like

You can embed a <br/> in the webCoRE expression to force the line break. Might not show in the expression text after you close it, but it will still be there.

2 Likes

I'm struggling to debug a webcore piston....when I realize that something didnt happen I go and check the log for that piston. I have full logging enabled but I only get 2 events..... everything else if GONE.... Is there any way to make it bigger ?
Thanks

There is a piston setting to raise logs

He console -> apps -> select piston -> max number of history logs

I use /n

2 Likes

thanks!!!!!

weird webcore/echo speak issue back..... very puzzled ,...the webcore log shows it calling the echo speak
image
but it doesn't happen..
I've tried several other test methods (i.e. testing within the echo speak app or adding a piston that looks for a double tap on samsung button to talk to the same 2 echos and that works every time.

When I had this issue a week ago, I did a repair of webcore AND echo speak and it started working

Today I did JUST a repair of webcore and it started working.... so I think it points to webcore but of course not sure....
How do I troubleshoot ?

Download the Hubitat app