I’ve been on a journey to integrate my FritzBox router with Homematic to create a seamless automation setup. My goal was to automatically enable call forwarding and disable the Wi-Fi when I leave home, and revert these settings when I return. This would save me from manually adjusting settings every time I leave or come back.
Initially, I faced challenges with the iconv and md5sum commands not being recognized by Homematic. After some research and with the help of my friend Google, I discovered that using Tcl scripting was the way to go. I created a custom script that handles the necessary MD5 hashing and UTF-16 conversion, which replaced the problematic commands.
Next, I tackled the issue of wget not supporting POST requests on the CCU. I found a modified version of wget that supports POST, which I installed on my system. This allowed me to send the required login and configuration commands to the FritzBox.
The final scripts handle both departure and arrival scenarios. For departure, they enable call forwarding and disable the Wi-Fi. For arrival, they disable call forwarding and re-enable the Wi-Fi. The scripts also include proper login and logout procedures to ensure everything runs smoothly.
Testing these scripts has been a rewarding experience. They work perfectly when triggered by Homematic events, such as detecting motion or changes in presence. This integration has significantly simplified my daily routine, and I’m thrilled with the results.
I’d like to share my scripts and the steps I took in case anyone else is looking to achieve similar automation. It’s been a great learning experience, and I’m happy to contribute to the community by sharing my findings.
Happy automating!