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

Please add RPi MQTT Topic ~/memory_load in percentage #42

Closed
thijselblaso opened this issue Jan 4, 2022 · 7 comments
Closed

Please add RPi MQTT Topic ~/memory_load in percentage #42

thijselblaso opened this issue Jan 4, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request fixed This is fixed and avail. in the current release Workaround Provided Developer or other github member has provided an alternative solution

Comments

@thijselblaso
Copy link

First of all thanks for this! I use it for all my pi's!

I like to have an MQTT topic with memory load in percentage. Is that possible?

@ironsheep
Copy link
Owner

@thijselblaso do you mean a separate topic for memory used vs. free? Currentlhy we have these topics:

Screen Shot 2022-01-04 at 14 29 08
?

@thijselblaso
Copy link
Author

@ironsheep yes, as a separate topic. I know that there is a memory attribute but I can not make a sensor out of it. I tried to separate the attribute memory in only used RAM in percentage with a sensor template in HA, but I can not make it work. I have a screenshot of my lovelace dashboard. The first one is my unraid server with glance integration. The MQTT server and pihole are raspberry pi's. What I'm missing there is the current used RAM
Screenshot_20220104-230816

@ironsheep
Copy link
Owner

@thijselblaso yes, this shouldn't be too hard. GImme a week or so...

@ironsheep ironsheep self-assigned this Jan 5, 2022
@ironsheep ironsheep added enhancement New feature or request Looking Into This labels Jan 5, 2022
@thijselblaso
Copy link
Author

@ironsheep Thank you, I appreciate it!

@smeegoan
Copy link

smeegoan commented Jul 28, 2022

as a workaround you can use the following template sensor:

  - sensor:   
      - name: "pi4b memory usage"
        unique_id: pi4b_memory_usage
        unit_of_measurement: "%"
        icon: mdi:memory
        state: "{{(100-(state_attr('sensor.rpi_monitor_pi4b','memory')['free_mb']|float)*100 / (state_attr('sensor.rpi_monitor_pi4b','memory')['size_mb']|float))| round(2)}}"

@ironsheep
Copy link
Owner

ironsheep commented Feb 18, 2023

Added new sensor. Update appears in v1.7.3 and later.

Screen Shot 2023-02-18 at 15 43 30

(Pardon the Pitre suffixes that's the name of my RPi!)

@ironsheep ironsheep added Workaround Provided Developer or other github member has provided an alternative solution fixed This is fixed and avail. in the current release and removed Looking Into This labels Feb 18, 2023
@ironsheep
Copy link
Owner

Changes commited and appear in v1.7.3 and later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed This is fixed and avail. in the current release Workaround Provided Developer or other github member has provided an alternative solution
Projects
None yet
Development

No branches or pull requests

3 participants