Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daemon.log full #1

Closed
huwylphi opened this issue Feb 8, 2023 · 6 comments
Closed

daemon.log full #1

huwylphi opened this issue Feb 8, 2023 · 6 comments

Comments

@huwylphi
Copy link

huwylphi commented Feb 8, 2023

Hi,

I'm using node-red-smartpi to read the Smartpi values and publish them over MQTT with a custom payload.
Everything works great except that node-red is filling up the /var/log/daemon.log file.

I tried to disable logging in the /home/smartpi/.node-red/settings.js file but after restarting the node-red service, I can still see new entries every seconds like:

Feb 8 11:16:19 smartpi Node-RED[505448]: Values: 2023-02-08 11:16:19,0,0,0,0,240,240,240,0,0,0,1,1,1,50.039093041438626,49.951219512195124,49.96096799375488,0,0,0,0,0,0,0,

The tmpfs filesystem where /var/log in mounted on is set to 50MB and is full very quickly.
How can I disable such logging?

@nD-enerserve
Copy link
Collaborator

nD-enerserve commented Feb 8, 2023 via email

@huwylphi
Copy link
Author

huwylphi commented Feb 8, 2023

Hello,

thanks for that quick response.
I just updated to version 0.1.7 and can confirm that these logs are not written to the daemon.log file anymore.
You can close the issue if you wish, many thanks 👍

PS:

  1. my node-red flow is intended for home-assistant with MQTT auto-discovery. See following snapshot:
    image

Maybe I could share that example somehow since I think it might help other people using home-assistant?

  1. while implementing that flow, I noticed that the consume counter and produce counter respectively from the files /var/smartpi/consumecounter and /var/smartpi/producecounter were not available nor in the smartpi-values nor in the smartpi-input. So I added a watch on these files and read the content when the file changed, then join the value in my final payload to publish.
    Would it make sens that, instead of manually reading the files, rather include these two values / logic in the existing smartpi-values and smartpi-input?

  2. other missing values are power-total and current-total not included in the smartpi-values

@nD-enerserve
Copy link
Collaborator

nD-enerserve commented Feb 8, 2023 via email

@huwylphi
Copy link
Author

huwylphi commented Feb 8, 2023

Hi Jens,

that's great! So once the other values are included, probably we can simplify the node-red flow.

Find my current flow.json in the attachment

flows.zip

Edit: I've replaced the flow.zip file by anonymizing some MQTT connection string...

@nD-enerserve
Copy link
Collaborator

I have added
p total, i total, ep total, ec total.

There is now a subdirectory examples, where examples and exampleflows are collected.

@huwylphi
Copy link
Author

huwylphi commented Mar 8, 2023

Hi,

this is nice, thanks. I've updated the home assistance node-red flow example to work with v0.2.4:

  • simplified node-red flow by removing fetching of single values for p total and i total since now included in all values
  • included ep total and ec total in MQTT published payload

This is included in the PR#2

Kind regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants