la7dja / esphome-influxdb Goto Github PK
View Code? Open in Web Editor NEWInfluxDB custom component for ESPHome
License: MIT License
InfluxDB custom component for ESPHome
License: MIT License
For those curious how to communicate to Influx 2.x, this UDP method now requires telegraf. Otherwise, I suggest using an HTTP based "polling" (configured on InfluxDB side) or push. It seems that polling via "scraper" may be the most configuration friendly option if you can get a stable hostname or network address.
InfluxDB 2.2 doesn’t directly support the alternate write protocols
[supported in InfluxDB 1.x](https://docs.influxdata.com/influxdb/v1.8/supported_protocols/) (CollectD, Graphite, OpenTSDB, Prometheus, UDP).
Use [Telegraf](https://docs.influxdata.com/telegraf/v1.22/) to translate these protocols to line protocol.
https://docs.influxdata.com/influxdb/v2.2/upgrade/v1-to-v2/automatic-upgrade/#supported-protocols
Hi,
I see you've fixed some issues with the original source. There are however still two settings that need to be updated in init.py https://github.com/jabastien/esphome-influxdb/blob/c6669d3bcfa14ac8300db0b46764c6718a53c3ad/__init__.py#L63
Nameable needs to be change to EntityBase here as well.
One other question:
Do you know which version of Influx this works with? For InfluxDB2 I think you need to specify a bucket and api-key. Those properties cannot be specified as far as I can see.
KR
Bert
Hi,
i have successfully been using this component to send measured data of my energy plug (Blitzwolf SHP6 running ESPhome) to my influxdb 1.8 database.
This is my configuration:
# Connection to InfluxDB
influxdb:
host: 192.168.84.16
port: 8089
publish_all: false
tags:
device: '${device_name}'
client: '${client_name}'
sensor: '${sensor_name}'
sensors:
power:
ignore: false
measurement: 'plugs'
tags:
units: 'Watts'
voltage:
ignore: false
measurement: 'plugs'
tags:
units: 'Volts'
This worked as long as I specified an IP address in the "host" section. (either the local LAN IP address of my Influxdb host, either my public IP address)
However, when I replace the IP address by a domain ( subdomain.domain.be or myname.synology.me), the data doesn't arrive in my Influxdb anymore. The ESPHome log doesn't give any error message, so the specified domain seems to be valid.
I tried different ways of entering the domain:
host: subdomain.domain.be
or
host: "subdomain.domain.be"
or
host: 'subdomain.domain.be'
They all give the same result: no error messages in ESPHome log, but no data arrives in my influxDB.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.