# \[APP\]\[Pro\] Audit - Adds logging and tracing to your Homey Pro and integrates into third party systems

**URL:** <https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554>\
**Category:** Apps\
**Created:** [January 18, 2024, 1:22pm UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554 "2024-01-18T13:22:00Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 4, 2024, 2:53pm UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/61 "2024-07-04T14:53:07Z")

</div>

Hi Jamie,  
Great improvements!

App v1.0.13 and restarted several times:  
I see level [Alert] still being active for alarm capabilities, instead of level [Warning]

 ![Screenshot from 2024-07-04 16-36-51](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/3/e3272cbd4cc1cdf37b12e27bfce7f05d059244ec.png)

```auto
{
    "context": {
        "runtime": {
            "column": 28,
            "file": "../../../../../../lib/watcher/capability.js",
            "function": "trigger",
            "line": 57,
            "method": "trigger",
            "type": "Capability"
        },
        "system": {
            "main_file": "/opt/homey-client/system/manager/ManagerApps/AppProcess/bootstrap.js",
            "pid": 17965
        }
    },
    "detail": {
        "code": "alarm_motion.binary_sensor.cam_tuin_motion_detection",
        "device": "Cam Tuin",
        "driver": "homey:app:io.home-assistant.community:camera",
        "owner": "",
        "type": "alarm",
        "value": "true",
        "zone": "[0b] Algemeen"
    },
    "dt": "2024-07-04T14:29:11.656Z",
    "level": "alert",
    "message": "Cam Tuin ",
    "meta": {
        "action": "update",
        "entity": "capability",
        "fields": [
            "alarm_motion.binary_sensor.cam_tuin_motion_detection"
        ],
        "id": "7231862b-b20e-463b-8be7-d2e0f1e00237",
        "name": "Motion detection",
        "reason": "alarm_motion.binary_sensor.cam_tuin_motion_detection",
        "timestamp": 1720103351547
    }
}

```

And Audit app alerts:

```auto
{
    "context": {
        "runtime": {
            "column": 28,
            "file": "../../../../../../node_modules/@logtail/winston/dist/cjs/winston.js",
            "function": "log",
            "line": 36,
            "method": "log",
            "type": "LogtailTransport"
        },
        "system": {
            "main_file": "/opt/homey-client/system/manager/ManagerApps/AppProcess/bootstrap.js",
            "pid": 17965
        }
    },
    "dt": "2024-07-04T14:20:05.355Z",
    "level": "alert",
    "message": "BetterStack is connected"
}

```

.

```auto
{
    "context": {
        "runtime": {
            "column": 28,
            "file": "../../../../../../node_modules/@logtail/winston/dist/cjs/winston.js",
            "function": "log",
            "line": 36,
            "method": "log",
            "type": "LogtailTransport"
        },
        "system": {
            "main_file": "/opt/homey-client/system/manager/ManagerApps/AppProcess/bootstrap.js",
            "pid": 17771
        }
    },
    "dt": "2024-07-04T14:19:33.656Z",
    "level": "alert",
    "message": "The weather polling has been disabled"
}

```

.  
Btw any idea why the weather polling gets disabled by default?

---

<div class="post-metadata">

**Author:** ![Jamie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jamie/32/5274_2.png) [@Jamie](https://community.homey.app/u/Jamie)\
**Post date:** [July 4, 2024, 3:22pm UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/62 "2024-07-04T15:22:13Z")

</div>

Hmm tricky one, because its just given the device a ‘alarm’ rather then saying what type of alarm it is.

Weather is disabled by default, because athom did a really poor job of it and its rate limiting - it even caused their outage a couple months back. I disabled it until they fixed the problem and I could test. Ill reenable it tomorrow so we can see if they really did fix it :

> **[Post mortem API outage](https://homey.app/en-au/blog/post-mortem-api-outage/)**

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 4, 2024, 3:32pm UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/63 "2024-07-04T15:32:13Z")

</div>

I notice  
`"code": "alarm_motion. ....`  
as well as  
`"type": "alarm"`.  
It’s from a HA community app device, maybe dev RonnyW can explain why it’s type is `alarm` and not `alarm.motion`?  
No biggie btw 😊 😉

.

> [@Jamie](#):
>
> Weather is disabled by default, because Athom did a really poor job

Ah I see, I was just curious about the notification  
But getting the weather updates would be a nice addition to the app.  
Thanx!

---

<div class="post-metadata">

**Author:** ![SingKT](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/singkt/32/173226_2.png) [@SingKT](https://community.homey.app/u/SingKT)\
**Post date:** [July 4, 2024, 7:27pm UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/64 "2024-07-04T19:27:36Z")

</div>

Audit 1.0.13 with level _notice_ produced:

> 04.07.2024, 21:03:00,541] alert: Audit Log has been initialized  
> [04.07.2024, 21:12:07,821] notice: Wetter Ffm morgen Wetterdatum updated from 20:12 05.07.2024 to 21:12 05.07.2024  
> [04.07.2024, 21:17:10,700] notice: Nous P1 Eingeschaltet  
> [04.07.2024, 21:17:19,738] notice: Nous P1 Ausgeschaltet  
> [04.07.2024, 21:17:43,680] warning: Aqara doorS1 Kontakt-Alarm ist angegangen  
> [04.07.2024, 21:17:43,699] notice: Waschküche has became active  
> [04.07.2024, 21:17:43,715] notice: 0. Keller has became active  
> [04.07.2024, 21:17:43,727] notice: Heim has became active  
> [04.07.2024, 21:17:47,134] warning: Aqara doorS1 Kontakt-Alarm ist ausgegangen  
> [04.07.2024, 21:17:47,146] notice: Waschküche has became inactive  
> [04.07.2024, 21:17:47,155] notice: 0. Keller has became inactive  
> [04.07.2024, 21:17:47,162] notice: Heim has became inactive  
> [04.07.2024, 21:17:59,224] alert: DoorS\_6o Sabotage-Alarm ist angegangen  
> [04.07.2024, 21:18:29,251] alert: DoorS\_6o Sabotage-Alarm ist ausgegangen  
> [04.07.2024, 21:19:18,651] notice: Wetter Ffm Vorhersagezeit updated from 04.07.2024 20:59 to 04.07.2024 21:19  
> [04.07.2024, 21:19:18,673] notice: Wetter Ffm Bezeichnung updated from Mäßig bewölkt to Klarer Himmel  
> [04.07.2024, 21:19:18,721] notice: Wetter Ffm has been updated  
> [04.07.2024, 21:19:18,822] notice: Wetter Ffm Wetterlage updated from Clouds to Clear  
> [04.07.2024, 21:19:18,826] notice: Wetter Ffm Spezifische Wetterlage updated from 802 to 800  
> [04.07.2024, 21:19:18,841] notice: Wetter Ffm Wetterlage Bezeichnung updated from Bewölkt to Klar

To be frank the weather information I‘d prefer under label _info_. They are from the _Open-meteo weather_ App. The _open weather_ App is handelt alike.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 4, 2024, 8:53pm UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/65 "2024-07-04T20:53:26Z")

</div>

> [@Sharkys](#):
>
> I think I simply registered, created resource, copied token…

Got reply from Bstack support, the pw can be set in account settings \> security 🤪

---

<div class="post-metadata">

**Author:** ![Jamie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jamie/32/5274_2.png) [@Jamie](https://community.homey.app/u/Jamie)\
**Post date:** [July 5, 2024, 1:58am UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/66 "2024-07-05T01:58:27Z")

</div>

I’m happy to have a look at that, if you can supply the log message json either from Betterstack or your detailed log. I only speak English so I need that other information to understand the item and why it was classified as it was.

So the audit app currently relies heavily on developers utilising the inbuilt capabilities. Ie it checks th reason for “alarm\_contact” and if that fails it then looks at the “type” in this case it (correctly) pick up alarm. BUT the reason for you it “alarm\_contactblahnlah” - I’ll add some fuzzy logic for you which should solve it.

---

<div class="post-metadata">

**Author:** ![Jamie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jamie/32/5274_2.png) [@Jamie](https://community.homey.app/u/Jamie)\
**Post date:** [July 5, 2024, 3:14pm UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/67 "2024-07-05T15:14:40Z")

</div>

New version of the app,

> **[Audit](https://homey.app/en-au/app/com.audit/Audit/)**
>
> Adds logging and tracing to your homey and integrates into third party systems

- Weather has been enabled, currently capped to check once every 15 minutes.
- @Peter_Kawa your (and everyone elses) alarm (and similar) issues should now be solved.
- Stability Fixes

Sorry for the frequent updates, I would prefer if there was a way to have a beta to iron out these things … but there is not, there are two errors I am still seeing one of them looks to be an issue on Homey the other is running out of hard drive space, I may have to limit the detail logs to 24 hours only and maybe 3 days for message logs - with sanity checks on the files.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 6, 2024, 10:52am UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/68 "2024-07-06T10:52:49Z")

</div>

Hi Jamie, at around 10:45UTC, I just sent a diag report from my daily driver Homey, mentioning logging to Bstack still worked, but I was wrong there: it didn’t.  
App memory use is above 50MB’s, which is pretty high for Pro 2019.

The app at my test-Homey Pro 2019 doesn’t crash, app settings are mirrored from the main Homey.  
The app uses around 25MB’s on this one.

Thx.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 7, 2024, 12:15am UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/69 "2024-07-07T00:15:38Z")

</div>

I’ve noticed the log rotating is performed at midnight UTC, Jamie.  
I think it should rotate at midnight local time? Here it’s UTC+2

> ![Screenshot_20240707-021157_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/e/7eb91131f1dded6aef0843a84e13c96896483044.jpeg)

---

<div class="post-metadata">

**Author:** ![Jamie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jamie/32/5274_2.png) [@Jamie](https://community.homey.app/u/Jamie)\
**Post date:** [July 7, 2024, 11:42am UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/70 "2024-07-07T11:42:16Z")

</div>

Sorry I don’t think that’s going to be easy, all the dates are in utc, I’m just overwriting the date of the logs to be based on the homey Timezone.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 7, 2024, 2:04pm UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/71 "2024-07-07T14:04:50Z")

</div>

No problem. Although it’s mentioned in the logs, I think maybe it’s a good idea to mention this somewhere in the manual/howto?

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [July 8, 2024, 3:01am UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/72 "2024-07-08T03:01:31Z")

</div>

> [@Peter\_Kawa](#):
>
> should rotate at midnight local time? Here it’s UTC+2

@Jamie also be aware of “daylight saving” if you choose to do actions around 01:00~03:00 at these days things might be messed up (run twice or not at all)

---

<div class="post-metadata">

**Author:** ![Jamie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jamie/32/5274_2.png) [@Jamie](https://community.homey.app/u/Jamie)\
**Post date:** [July 8, 2024, 10:14pm UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/73 "2024-07-08T22:14:00Z")

</div>

I’m a bit worried that files in utc and logs in local time is a little confusing as things won’t be where your expecting and your log file will be rotated and zipped up potentially half way through the day - I might look at reverting this feature.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 8, 2024, 10:26pm UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/74 "2024-07-08T22:26:06Z")

</div>

I hope you can make it user selectable, if possible at all.  
Something like:

* * *

Show timestamps in UTC instead of local time ☑  
(Note: logs always rotate @ 0:00 UTC)

* * *

Digging through logs with UTC timestamps is not my most fav thing to do.  
But it’s your app and your time of course.

Still, it’s quite absurd it can be so hard to use local time in general in Homey app code

---

<div class="post-metadata">

**Author:** ![Jamie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jamie/32/5274_2.png) [@Jamie](https://community.homey.app/u/Jamie)\
**Post date:** [July 8, 2024, 11:00pm UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/75 "2024-07-08T23:00:06Z")

</div>

Your post didnt show the examples?

To be fair the issue with the time stuff isn’t Homey’s fault - its the library i’m using to rotate and manage the files.

I am trying to think of a good way (in all my apps) to have more advance features available but not immediately accessible - (think power experiments). If you know of an app that manages this well - let me know.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 8, 2024, 11:40pm UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/76 "2024-07-08T23:40:27Z")

</div>

Sorry, is the example visible now in my prev post?

About local time stuff, I just read about others struggling with it, after Athom made UTC time the default instead of local time.

> [@Jamie](#):
>
> I am trying to think of a good way (in all my apps) to have more advance features available but not immediately accessible - (think power experiments). If you know of an app that manages this well - let me know.

I get it. Now only the ‘Maintenance \> Try to repair’ section pops up, as you already use in \< group \> app.

A thingy about the weather updates (no biggie):  
It seems to be logged, and triggers the ‘weather changed’ flowcard when the weather got _updated_ instead of _changed_, resulting in identical logs, and flow output. We can’t react on weather changes now.

Not sure if it’s intentional or not possible to catch a _changed_ event.  
Xmpl:

> ![Screenshot_20240709-010628_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/8/087e021fde1fa971c6f815b47b1b141983412321.jpeg)

> ![Screenshot_20240709-011236_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/f/3f7d0352b1dccb181f5d884ea837233edc892443.jpeg)

Thx!

---

<div class="post-metadata">

**Author:** ![Jamie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jamie/32/5274_2.png) [@Jamie](https://community.homey.app/u/Jamie)\
**Post date:** [July 9, 2024, 12:52am UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/77 "2024-07-09T00:52:51Z")

</div>

Yep, weather has three bugs I’ve seen

1. it does an init to get the weather then followed shortly by a normal request (rather then waiting 5 min)
2. when the temp and other values change rather then just showing the item which is changed all values are sent (though it seems to work for pressure sometimes)
3. it sends the notice on update rather then on change

I’ll fix them when I next do an update, let me j ow if you come across anything else.

If you want better weather support comment here on this request to Athom (which in typical fashion the have just ignored)

> <https://github.com/athombv/homey-web-api-issues/issues/54>
>
> I am receiving a 408 error from the weather endpoint, \*\*however\*\* this in fact s…eems to be a rate limit. 
> 
> I am calling the endpoints \`getWeather\` once a minute, after a while I start getting the 408 error until I stop.
> 
> Further to this, my app also seems to be breaking the homey iOS app, the home page (which ahs the weather on it) will throw a rate\_limited exception page. 
> 
> Once a minute hardly seems excessive, given it updates every 15 minutes. 
> 
> What is the rate limit for the weather endpoint, and can it please be documented.

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [July 9, 2024, 5:29am UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/78 "2024-07-09T05:29:52Z")

</div>

Please note however that the issue is marked as Closed by Herman, not sure they even read comments on closed issues at all ☹

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 9, 2024, 5:49am UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/79 "2024-07-09T05:49:39Z")

</div>

They should?  
Hmmm I might drive to Enschede when we’re ignored! 🏍 😬

---

<div class="post-metadata">

**Author:** ![Jamie](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jamie/32/5274_2.png) [@Jamie](https://community.homey.app/u/Jamie)\
**Post date:** [July 10, 2024, 2:04pm UTC](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554/80 "2024-07-10T14:04:05Z")

</div>

Latest version includes fixes for the weather auditing and updates the audit level of device auditing, specificaly device warning messages and device unavailable messages.

Note that I will be updating the flow action cards, then going to start focusing back on version 2 of this app and/or other new apps on my todo list.

[Previous page](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554.md?page=3)

[Next page](https://community.homey.app/t/app-pro-audit-adds-logging-and-tracing-to-your-homey-pro-and-integrates-into-third-party-systems/101554.md?page=5)
