Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


mdf

mdf

3513 posts

Uber Geek

Trusted

#303896 18-Mar-2023 15:54
Send private message

I'm looking to log data from HASS temperature sensors (and then later visualise/analyse that data). InfluxDB and Grafana seems to be the most popular solution for this, though I've also seen Prometheus and Victoria Metrics mentioned as alternatives/supplements.

 

I've tried InfluxDB once before (when I was much more innocent and naive as to such things) and the HASS/Raspberry Pi setup I was using said "Nope!". Then the house lights stopped working and I had a new appreciation of Single Points of Failure. 

 

I'm now running HASS on an @xbmcnut NUC (i3/8GB) that has been rock solid for 3(?) years but I am still extremely wary of mucking around with a known working set up. Some other potentially fraught projects (hello Frigate) have been offloaded to other devices just for this reason. HASS has essentially become critical infrastructure and I probably need to think about some kind of dev/prod arrangement.

 

What is best practice/what are others doing for data logging? Is it best to:

 

  • Just to run Influx on the NUC (I know now it was almost certainly too many read/writes killing the SD card that caused my original problems)
  • Run Influx on the NUC but store the database file externally, say on a USB disk. Google seems to suggest that this isn't easy, but I haven't tried personally.
  • Run Influx entirely separate to the NUC/HASS:

     

    • Unraid server acting as a NAS. I can add a docker container for Influx but I'm a little leery about over-working this (see previous comments re single points of failure)
    • Raspberry Pi (3B, I think). But again potential for SD card issues
  • Use some kind of cloud service

Sensors are all Aqara Zigbee sensors via Zigbee2Mqtt to HASS.


Create new topic
amanzi
Amanzi
1292 posts

Uber Geek

ID Verified
Trusted
Lifetime subscriber

  #3052251 20-Mar-2023 10:06
Send private message

I'm not sure what is considered best practices, but I run HA on a Raspberry Pi using the official "Home Assistant Operating System" method but have configured it to boot off an SSD instead of SD card. Booting off an SSD is pretty easy - you just need to make sure you get a supported USB3-to-SATA adapter. It's much quicker than running off SD card and avoids the issues you've reported with write failures.

 

I use both InfluxDB and Grafana on the Pi, both installed using the official add-ons and have no issues at all. It's been running this way for over a year now without fault. I have a bunch of other add-ons installed too (Zigbee2MQTT, NodeRed, NUT, etc) and it works fine with plenty of juice in the tank.

 

I try to keep my Home Assistant running 24x7, but I don't treat it as critical. I don't do any offsite backups and I've never tested restoring from backup. I have back up plans in place in case HA goes down - some Zigbee switches and automations would stop working, but I have manual work-arounds in place to deal with that.




Silvrav
469 posts

Ultimate Geek

ID Verified

  #3052253 20-Mar-2023 10:09
Send private message

Are you running it natively on the NUC or via a VM or docket?

 

I would suggest a full backup of the image or installation for in case things go wrong.

 

I am in the process to set up a second VM as testing platform so that I dont have to mess around with the live installation as we also getting there were HA needs to be running 24/7.

 

Family also knows not to expect internet between 11 and 12 at night as this is usually when I do tests and the modem and or switch often needs to be restarted :p 

 

 

 

To add: I have total VM image backups as well as HA backups that are stored on site and offsite in the cloud - I find restoring a full VM image is quicker and easier then a HA backup


mdf

mdf

3513 posts

Uber Geek

Trusted

  #3055949 28-Mar-2023 19:34
Send private message

Sorry, missed the replies on this one.

 

Running HASS natively on the NUC. Sounds like I should be okay with running Influx on the NUC.




timmmay
20575 posts

Uber Geek

Trusted
Lifetime subscriber

  #3055953 28-Mar-2023 20:01
Send private message

I installed PostgreSQL on my Pi4 and set data retention to one week. I decided that any longer than that and I don't care, so I have the data deleted.

 

Using a separate disk / partition / data store sounds like a reasonable plan.


mdf

mdf

3513 posts

Uber Geek

Trusted

  #3055957 28-Mar-2023 20:24
Send private message

Are you writing to the SD card on the Pi or somewhere else? I was under the impression it was the number of read/writes that cause issues for IOT logging rather than the amount or length of time stored.

michaelmurfy
meow
13241 posts

Uber Geek

Moderator
ID Verified
Trusted
Lifetime subscriber

  #3055958 28-Mar-2023 20:28
Send private message

If you use high endurance SD cards on a Pi you’ll be fine.

Else, look at a HP Thinclient for running a bunch on.




Michael Murphy | https://murfy.nz
Referral Links: Quic Broadband (use R122101E7CV7Q for free setup)

Are you happy with what you get from Geekzone? Please consider supporting us by subscribing.
Opinions are my own and not the views of my employer.


timmmay
20575 posts

Uber Geek

Trusted
Lifetime subscriber

  #3055959 28-Mar-2023 20:41
Send private message

I've been running with a 64GB high endurance SD card for a year or sob on the Pi4.

Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.