Exploring Energy Monitoring and Automation with Shelly and OpenHAB

I’ve been diving into the world of energy monitoring and automation lately, and I wanted to share my experiences and some tips that might help others on a similar journey.

Starting with energy monitoring, I’ve been using the Shelly Plug S to track power consumption of individual devices. It’s fantastic how it provides detailed attributes like watts and kilowatt-hours. However, I wanted more than just raw data—I wanted to understand the actual cost associated with each device’s usage.

I also have the Tibber integration in Home Assistant, which gives me real-time electricity prices. The challenge was combining these two datasets to calculate the cost per device. After some research, I realized that while there are feature requests for this functionality in the energy dashboard, I needed a workaround until it’s officially supported.

Here’s what I came up with: I created a custom sensor that multiplies the current power usage (in watts) by the time elapsed and the current electricity price. It’s not perfect, but it gives a rough estimate of the cost. I’d love to hear if anyone has a more accurate method or if they’ve implemented something similar!

On the automation front, I’ve been experimenting with OpenHAB to create a more seamless experience. One thing I stumbled upon was configuring scenes that run at specific times but also depend on conditions like light levels. I noticed that sometimes scenes were running outside their scheduled parameters, which was puzzling. After some troubleshooting, I realized it was related to how the lux sensor was being polled. If anyone has similar issues, I’d recommend checking the sensor’s update interval and ensuring it’s set correctly.

Another interesting project I’m working on is integrating my Google Home Hub Max into Home Assistant. It showed up in the Google Cast integration but wasn’t appearing in the Nest section initially. After a bit of digging, I found that enabling the Nest API in Home Assistant settings did the trick. It’s now fully integrated, and I couldn’t be happier with how it works alongside my other devices.

If anyone has tips on optimizing energy monitoring or setting up more efficient automations, I’d love to hear them! Let’s keep the conversation going and help each other create smarter homes. :rocket: