Integrating Zendure with Home Assistant: Overcoming Cloudflare Challenges

Hey everyone, I wanted to share my journey of integrating my Zendure battery hub into my Home Assistant setup. It’s been quite the adventure, but I’m thrilled to say I’ve made some progress! :tada:

Initially, I was really excited about using MQTT for real-time data from my solar panels. I switched from ZHA to MQTT and even upgraded to EMQX for better performance. But then came the hurdle—Cloudflare Tunnel was blocking my local MQTT connection. :confused:

After some research, I found a solution that involved configuring local access through Cloudflare. It wasn’t straightforward, but I managed to get it working by adjusting the tunnel settings and ensuring the MQTT broker was accessible on port 1883. :rocket:

For those who might be facing similar issues, here’s a quick tip: if you’re using Python scripts to connect Zendure to Home Assistant, make sure your local IP and port are correctly configured. If Cloudflare is still a roadblock, exploring NGINX as a reverse proxy might be the way to go. It adds a bit more setup, but it’s worth it for seamless integration. :bulb:

This experience has really taught me the importance of persistence and the value of community support. If anyone has questions or needs help with similar setups, feel free to reach out! I’m happy to share what I’ve learned. :handshake:

Happy tinkering! :star2: