# Energy Meter - periodic update via Modbus

**URL:** <https://community.homey.app/t/energy-meter-periodic-update-via-modbus/146038>\
**Category:** Developers\
**Created:** [November 27, 2025, 9:42pm UTC](https://community.homey.app/t/energy-meter-periodic-update-via-modbus/146038 "2025-11-27T21:42:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![s\_dimaio](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/s_dimaio/32/78995_2.png) [@s\_dimaio](https://community.homey.app/u/s_dimaio)\
**Post date:** [November 27, 2025, 9:42pm UTC](https://community.homey.app/t/energy-meter-periodic-update-via-modbus/146038/1 "2025-11-27T21:42:30Z")

</div>

Hi everyone,

I’m working on an app that retrieves data from an energy meter via Modbus. To do this, I set a timer that checks the energy data via Modbus every 30 seconds and updates Homey if there are any changes. After a few hours, however, the app stops working (I don’t get any errors, but the energy consumption data simply isn’t updated anymore). I’ve checked the code several times and there shouldn’t be any memory leaks, but I wanted to see if there was a way (for example, using Homey’s development tools) to determine if the lack of updates is due to Homey forcing the app to stop.

I’d also like to know if you have any other ideas for managing the periodic retrieval of data via Modbus without using homey.setTimeout.

Thank you.

Simone

---

<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:** [November 27, 2025, 11:41pm UTC](https://community.homey.app/t/energy-meter-periodic-update-via-modbus/146038/2 "2025-11-27T23:41:42Z")

</div>

> [@s\_dimaio](#):
>
> don’t get any errors

Did you use `homey app run -r`  
This will show the debug log.

---

<div class="post-metadata">

**Author:** ![s\_dimaio](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/s_dimaio/32/78995_2.png) [@s\_dimaio](https://community.homey.app/u/s_dimaio)\
**Post date:** [November 28, 2025, 5:56am UTC](https://community.homey.app/t/energy-meter-periodic-update-via-modbus/146038/3 "2025-11-28T05:56:21Z")

</div>

Hi Peter, the problem is that updates arrive promptly for several hours/days before stopping, as if Homey stopped the timer at a certain point. So I was thinking of Homey Developers Tool rather than homey app run --r, but at first glance I couldn’t find any alerts.

---

<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:** [November 28, 2025, 5:12pm UTC](https://community.homey.app/t/energy-meter-periodic-update-via-modbus/146038/4 "2025-11-28T17:12:42Z")

</div>

Hi Simone,  
With using `homey app run -r`, I was thinking like: when the updates stop after x days, you’d see error messages popping up in the console. If not…, and if the issue is not on the Energy device, or MQTT, the only cause I can think of atm is Homey CPU or Memory management shutting down the app, due to exceeding CPU use or memory use.

You can use Dev Tools as well at the same time.

---

<div class="post-metadata">

**Author:** ![s\_dimaio](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/s_dimaio/32/78995_2.png) [@s\_dimaio](https://community.homey.app/u/s_dimaio)\
**Post date:** [November 28, 2025, 7:01pm UTC](https://community.homey.app/t/energy-meter-periodic-update-via-modbus/146038/5 "2025-11-28T19:01:18Z")

</div>

Thanks Peter, I’m starting to think I’ve been using ‘homey app run --r’ incorrectly all along. I was convinced that once I closed VSCode, the app would stop working and that only ‘homey app install’ was persistent…  
Anyway, I’ve now run ‘homey app run --r’. How can I see the logs in a few days without keeping my PC on all the time? I tried reopening VSCode, but there’s no log in the terminal.

---

<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:** [November 28, 2025, 7:11pm UTC](https://community.homey.app/t/energy-meter-periodic-update-via-modbus/146038/6 "2025-11-28T19:11:02Z")

</div>

YW.  
AFAIK you’ll need to keep the console open.

---

<div class="post-metadata">

**Author:** ![s\_dimaio](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/s_dimaio/32/78995_2.png) [@s\_dimaio](https://community.homey.app/u/s_dimaio)\
**Post date:** [November 28, 2025, 7:23pm UTC](https://community.homey.app/t/energy-meter-periodic-update-via-modbus/146038/7 "2025-11-28T19:23:40Z")

</div>

Then I think I’ll try saving the logs inside /userdata folder. Thanks for now!
