local MQTT publishing client to run on [ACTOP/KONG/etc] WiFi doorbells & clones
Before compiling: change of the mqtt clientid and broker IP address.
Compilation can be achieved on a debian using a cross compile toolchain for mips, with the following command line:
mips-linux-gnu-gcc -mips32 -muclibc -EL -mabi=32 -static mqttbell.c -o mqttbell
Installation on the doorbell is done with the following procedure:
- Connect to the doorbell using telnet (user: root, password: 123456)
- Have a TFTP Server running
- Upload your mqttbell on the doorbell (tftp -g -r mqttbell ip_of_tftp_server) in the /system/system/bin folder
- Download your /system/etc/ipcam.sh file to modify it on the debian machine
- In that file, add two lines: "iptables -t nat -A OUTPUT -p udp -d 112.74.124.169 -j REDIRECT" and "/system/system/bin/mqttbell &"
- Upload the modified file and make it executable (chmod +x)
- Start the commands manually to test
Now pushing the ring button on your doorbell should trigger a mqtt message.
Have fun...