Supress logging when error?

Hi,

I have many flows that ends in sending updates to a MySQL database, maybe 50 events per minute. I also have shaky internet pretty often.

I thought that if I put a delay for 20 seconds and then try the same (that had an error) then-card again (writing to MySQL) I would avoid sending the first error to the timeline, but it seems to write the error to the timeline even though I thought I “catch” it by the delay-repeat… my thought here was to “ride out” the error until Internet was back.

This results in that I never have a nice/up to date timeline since this breaks all the time as a lot of errors are written to it. Is this avoidable please?

Thanks

To me this is the easiest way to ignore triggers for a certain amount of time:
(I prefer Chronograph timer app for this)

That’s a smart way to delay them! :+1:

My problem is more “weird” though, as I wanted to postpone the error-logging until the last then-card and not get them for every subsequent then-card. I didn’t expect Homey to send an error-log for a card that had error-handling.

Well, my real underlying problem seem to be my flakey Internet.

Thanks!

1 Like

Thanks.
So I “translated” your case to:

  • save the first 1 or 2 errors, in case the second or third card errors as well;
  • only when the third card errors, send all 3 errors to timeline;
  • when the third card doesn’t error, wipe the first 2 saved errors;
  • when the second card doesn’t error, wipe the first saved error.

I used a variable to temporary store the 1st and 2nd error message:

I hope it’s usable, or at least give some inspiration !

Wow, very impressive!

I will definitely use this, but for more singular things in flows, very cool indeed!

When I say more singular things I mean that today I handle changes from roughly 100 sensors (power plugs/temperatures/movement/humidity/lumen etc) that can fire more than 100 times per minute at the same time.

I thought that I could change my flows to have a longer delay between the same “THEN”-card (updating sensor date to MariaDB) and after say, 3-4 more “if-error-proceed-to-next-THEN-card” either output 1 error to the log (or Internet was back and the last THEN-card was successful).
But I realized that all error are logged and are not catched by the error->THEN-card.

All error logging breaks my timeline in minutes (and I mean literally break) my timeline (I haven’t seen logs since September ha ha) because as soon as my (very flakey, considering changing it) Internet is down that exact second that my sensors fire and MySQL is down for a few seconds, the timeline will be flooded with error messages. Either my old Homey Pro 2019 handled the error-“handling” differently or my new Homey Pro 2023 is quicker, I don’t know, or my Internet is super bad this month.

So this solution would fill all flows enormously but for certain flows, this is perfect.

Many thanks!

1 Like

Thanks!
Timeline is not a good logging tool imho, it gets rate limited at more than X messages / X minutes/hour(s) (without warnings), it lacks search and sort functions, messages dissappear after X days without “control”.

I prefer Simple Log app for logging I don’t need to be notified of (it’s just used for troubleshooting and monitor how flows behave).
It uses local Homey storage, and it’s hasn’t got X messages/hour limits.
It’s also possible to add it to the Dashboard as alternative timeline.

Stuff I need to see, is sent to Signal by using the 4-in-1 CallMeBot app. Of course it’s not an option if internet is flaky.
Signal has a search function, and auto-remove messages function.
But that has a limited API use, loads of messages/minute, aren’t allowed, internet dependent, risk of data theft.

About flaky internet:
you can add a “switch”, which is On when OK, and Off when offline.
I use Net Scan for this, and monitor a few websites (which should “always” be online).
It provides for a tag (online true/false), usable as And conditions in flows, and it can trigger flows.

Power sensors & system load:
Just FYI,
I had many many “power has changed” triggers, and because these can fire almost every second, it caused a high load on Homey; 250% was sort of standard.
At first I couldn’t imagine this would cause so much stress, but after changing most of these flows to time triggered flows, like, When every 5s, load went back to sane levels.

1 Like

Very interesting indeed. Maybe all sensor data is putting to much of pressure on my Homey then, which is quite understandable with the amount of data pushed.

One of the problems was exactly that my Timeline was broken for days, but when I read your comment about Simply Log it struck me, but I do use Simple Log (to write both to the Timeline and the Simple Log log), but my flow for capturing this and send it to MariaDB (to display and sort/search it) in a Web page was targeting WHEN=log written to Timeline, so I just steered it to WHEN=log written in Simple Log and Voilà!, so thank you for making think twice about this!

Good tip about having a InternetOK variable, I will defintely use that in the future.

It’s also possible to add it to the Dashboard as alternative timeline.

I did not know that, that’s great!

time triggered flows, like, When every 5s,

Maybe this didn’t exist in Homey Pro 2019, this sounds very cool, how do you do that?

Thanks!

I was very interested in creating a Dashboard using the Simple Log, how do I do that please?

Also, did you mean Network Check for setting a Internet on/off or Net Scan (do you use Device then for the like Cloudflare or Google)?

Thanks!

Hi Pat,

Network Check is perfectly fine, only Net Scan can check local connections as well, or local/internet connections on specific port numbers.

Perfect, many thanks!

1 Like