Import historical energy measurement data from Shelly EM devices into InfluxDB for long-term storage and analysis.
- ⚡ Efficient data import by querying only new data since the last import
- 🔄 Support for InfluxDB v1.8 and v2.x
- ⏱️ Configurable polling interval
- 🔌 Poll from multiple Shelly EM devices
- 🐳 Docker support
- 📝 Written in TypeScript using Bun runtime
- 🏠 Available as Home Assistant Addon
- 🗄 Prevent data gaps that can occur with live polling solutions like HomeAssistant, particularly during outages when Home Assistant is down or during network interruptions. The Shelly Pro 3EM devices store historical data for up to 60 days, allowing us to retrieve data even after extended outages.
- 💾 Long-term storage of energy data
- 📊 Analysis and visualization using Grafana, see Dashboard Examples
- 🔒 No cloud, no need to expose your devices to the internet
Shelly EM History 2 Influx is available as a Home Assistant Addon.
See the Addon-Repository for more information.
You can either use docker-compose or pull the image directly from the GitHub Container Registry.
- Create a
config
directory and adjust thedefault.yaml
to your needs. - Run the container:
docker run --rm -v $(pwd)/config:/app/config ghcr.io/psi-4ward/shelly-em-history2influx:latest
Requirements:
- Bun runtime
# Clone the repository
git clone https://github.com/psi-4ward/Shelly-EM-History2Influx.git
cd Shelly-EM-History2Influx
# Install dependencies
bun install --production --frozen-lockfile
# Adjust the configuration
vim config/default.yaml
# Start the application
bun start
The configuration is done through YAML files in the config
directory.
Adjust default.yaml
to your needs.
You can also create a overwrite-file for your specific environment, e.g. config/production.yaml
.
The environment will be parsed from the NODE_ENV
environment variable.
BSD-2-Clause
Christoph Wiechert