To confirm: I used this one: wget https://github.com/fg2it/grafana-on-raspberry/releases/download/v3.1.1-jessie/grafana_3.1.1-1470786449_armhf.deb
I compiled grafana myself. I wasnāt easy.
This worked ok to get phantomjs.
This to compile grafana:
http://gridengine.eu/index.php/other-stories/230-installing-grafana-on-raspberry-pi-2-2015-10-24
But I could not make the package, because theyāve changed the name of phantomjs. I had phantomjs, and the script wanted phantojs-prebuild. I got it working by removing phantomjs from grafanas package.json. Itās not pretty but is works. I have phantomjs on my path.
Edit:I have Pi3
This is for a previous release of phantomjs and unfortunately, build that way, the resulting binary has more dependency that it should and you wonāt have the possibility to move it to an other distro has easily as you should. If you are interested, you can see the way they build the last version, v2.1.1, (see deploy/
on the v2.1.1 tag).
Recent versions (I think >=v3) of grafana will need a v2.1.1 binary to build cleanly.
The change in naming, is not for phantomjs binary but for the npm module that deploys phantomjs binary. It was named phantomjs in the beginning but since this was confusing, they changed the name to phantomjs-prebuild. In fact, this is the recent version of this module that will require a v2.1.1 phantomjs binary.
There are cleaner way to build grafana and deb packages can be build to with not so much trouble I you need them. If you are interested, you can read detailed steps on how to do it here. Alternately, you can simply use this .deb this PuckStar tested it on Pi3 and reported it is working fine.
Im trying to get influx and grafan running on my pi3 with hass.
Do you run influx and grafana on the same rpi3 with hass?
How many entitys do you have and how large has your influxdb get and for how many days have you run it?
I have 100 entitys and my home_assistant_v2.db is 200mb after only 1v i think I have to by a largert ssd card
Would you please summarize the steps you took to install this, it would help alot
Yes I run it on the same pi3 with HASS.
About how large it gets Iām trying to find that out myself as well
I found this info but am not sure what is means:
http://imageshack.com/i/pnWMrohUp
note that your home_assistant.db is not the Influx db and that you can put a retention on that as well:
put this in your hass config:
recorder:
purge_days: 30
I followed the steps in the blog https://home-assistant.io/blog/2015/12/07/influxdb-and-grafana/ except the installation of influx itself. See other replies in this topic of how I managed with that (like using this wget: wget https://github.com/fg2it/grafana-on-raspberry/releases/download/v3.1.1-jessie/grafana_3.1.1-1470786449_armhf.deb4).
I have my recorder set to 30 days. But would be nice to have some temperature readings stored longer.
Iām trying to find something other than InfluxDB & Grafana.
Conās for InfluxDB:
- updating old data is difficult. That is understandable because itās meant to be time-series insert-only database. The problem is and will be that HA device names may change and I as user cannot do anything about it. Then if you have years worth of data, it can suddenly change and you have to insert the old data again. It is obvious it is not working.
- Influxdb does not support joins anymore, so you cannot join data. Only one table at one query. You cannot create another mapping table from preventing the device name change problem. You cannot actually do anything because the lack of complex multi-table queries.
- no functions yet to take advantage of time series data, meaning fetch data of previous and next rows.
Proās
- its easy to use Grafana graphs.
- easy on SD card.
For Grafana you can now do:
sudo apt-get install adduser libfontconfig curl -L https://github.com/fg2it/grafana-on-raspberry/releases/download/v4.0.1/grafana_4.0.1-1480722482_armhf.deb -o /tmp/grafana_4.0.1-1480722482_armhf.deb sudo dpkg -i /tmp/grafana_4.0.1-1480722482_armhf.deb
sudo systemctl daemon-reload
sudo enable grafana-server
sudo start grafana-server
Maybe someone in here can help me too. Iām not having any luck on installing influxdb on hass aio.
From console while trying to install:
pi@raspberrypi:~ $ curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add - source /etc/os-release
OK
pi@raspberrypi:~ $ test $VERSION_ID = "7" && echo "deb https://repos.influxdata.com/devian wheezy stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
-bash: test: =: unary operator expected
pi@raspberrypi:~ $ test $VERSION_ID = "8" && echo "deb https://repos.influxdata.com/devian jessie stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
-bash: test: =: unary operator expected
pi@raspberrypi:~ $ sudo apt-get update && sudo apt-get install influxdb Hit http://repo.mosquitto.org jessie InRelease
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://repo.mosquitto.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Ign http://repo.mosquitto.org jessie/main Translation-en_GB
Ign http://repo.mosquitto.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package influxdb
pi@raspberrypi:~ $ sudo service influxdb start
Failed to start influxdb.service: Unit influxdb.service failed to load: No such file or directory.
Youāve got a couple of typing errors.
It seems two different commands got accidentally merged in the first line.
Should be like this:
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/os-release
The second problem is that you have devian
where it should say debian
in the second and third command you have there.
I wrote a walkthrough on influxdb/grafana integration here in case it helps later:
Ha! How embarrassingā¦ Thank you.
For anyone who comes across this thread via Google - I have published a fairly detailed guide about how to set up Grafana and InfluxDB on a Raspberry Pi with HA installed on my blog. The guide is in Swedish, sadly, but Google Translate should work well.
https://snillevilla.se/snygg-statistik-i-home-assistant-med-grafana-och-influxdb/
Very nice guide
Thanks for this guide!
A live saver!!! Thanks a lot!
Now i see that influx recorded the data after installing all the stuff. I would like to see the older data in grafana too. How do i do that?
O, and by installing this way by @snillevilla, do i now have two databases? One from Hass and one from influxdb?
EDIT:
Ok i got it:
$ sudo su -s /bin/bash homeassistant
$ source /srv/homeassistant/bin/activate
$ hass --script influxdb_import --dbname INFLUXDB_DB_NAME
How did you get the Charts entry in your menu ?
Second question : I installed succesfully InfluxDB & Grafana from add-on repository. It works fine on local network, but Grafana failed to access to Influxdb when Iām trying to access from ouside my local network (I can access to Grafana webpage and HASS webpage from ouside). Any clue ?
You can achieve this with panel_iframeā¦ ex:
panel_iframe:
grafana:
title: 'Charts'
icon: mdi:elevation-rise
url: 'http://192.168.129.115:3000/dashboard/db/energy'
I use a vpn for connecting to local network at home so i donāt have that problem. Itās like sitting at home while at work
Arghhhhh Canāt have iframe panel if using SSL connectionā¦ I understand now why youāre using VPN
I think you can use iframe but you also need to expose your grafana via SSL since a ssl/tls protected page cannot iframe a non SSL/tls page.
If you have a reverse proxy (nginx, caddy etc) then set up as different subdomain etc.