JoschaMiddendorf / fhem-docker

Docker Container for FHEM House-Automation-System - Full install with all dependencies
MIT License
6 stars 0 forks source link

add influxdb & xiaomi device module #32

Closed artcrime closed 6 years ago

artcrime commented 6 years ago

Hi,

nice docker container. It would be nice if you would add the following modules into the container:

93_InfluxDBLog.pm 72_XiaomiDevice.pm 74_XiaomiBTLESens.pm 74_XiaomiFlowerSens.pm

It works everything if just copy the modules to the docker volume, but you asked for suggestions ;-)

regards

JoschaMiddendorf commented 6 years ago

Hey thank you for your suggestion.

72_XiaomiDevice.pm 74_XiaomiBTLESens.pm and 74_XiaomiFlowerSens.pm are available from SVN and therefore coming automatically if you perform an update of FHEM.

93_InfluxDBLog.pm looks interesting I will give the module a test and maybe add its repository to controls.txt to make it available via updates on new installations.

If you don't want to initialize your installation again, just perform the following commands in FHEM to have all modules available.

update add https://raw.githubusercontent.com/dsgrafiniert/fhem-InfluxDBLog/master/controls_influx.txt
update
shutdown restart

Best regards Joscha

artcrime commented 6 years ago

just made the update, and it worked! Did you already test the influx db module?

JoschaMiddendorf commented 6 years ago

im currently a bit buisy, do you have a good tutorial to get started?

artcrime commented 6 years ago

Perhaps you try to read the official "how to get started" https://docs.influxdata.com/influxdb/v1.5/introduction/getting-started/

Influxdb syntax is similar to sql syntax. The FHEM module will only insert integer and float values into the the database so dont wonder if you miss something. For the graphing part you should use grafana it has a really good workflow for creating new dashboards / graphs and it supports mysql db as datasource as well! So you are able to combine both datasources. I would rather only use influx db because it is much faster than mysql or mariadb.

Be careful when dont add a default retention policy to influx it is set to 4 weeks so all older data ist lost after that.

I put all together to different docker containers and it works great!