Hey everyone, I wanted to share my successful experience integrating Tibber energy data into Home Assistant using MQTT! ![]()
After spending quite some time troubleshooting and following various guides, I finally managed to get real-time energy pricing data flowing into my setup. Here’s a quick rundown of how I did it:
-
Getting the Tibber API Token: First, I had to activate Tibber’s API and obtain an authorization token. This was straightforward once I followed their documentation.
-
Setting Up the MQTT Script: I created a bash script that fetches the energy price data from Tibber’s API and publishes it to my MQTT broker. The script runs automatically every hour thanks to cron scheduling.
-
Configuring Home Assistant: I added a new MQTT thing in Home Assistant to handle the Tibber data. Using JSON path transformations, I extracted the relevant values like the current energy price and the start time of the pricing period.
-
Visualizing the Data: To make the data more accessible, I set up a simple dashboard in Grafana that trends the energy prices over time. This helps me plan when to run energy-intensive appliances for cost savings.
The whole process was a bit of a learning curve, especially getting comfortable with JSON path and MQTT configurations, but it’s incredibly rewarding to see everything working seamlessly now! ![]()
If anyone has questions or needs help setting this up, feel free to reach out. I’d be happy to share my scripts and configuration files. Looking forward to hearing about your projects too! ![]()