I’d like to share my experience of using Claude to model and implement a protocol for the Kasa webcams.

I’d like to share my experience of using Claude to model and implement a protocol for the Kasa webcams. I have multiple web cameras installed around the house + one doorbell, all of which are made by… | Sergey Vilgelm
I’d like to share my experience of using Claude to model and implement a protocol for the Kasa webcams. I have multiple web cameras installed around the house + one doorbell, all of which are made by Kasa (TP-Link brand), very cheap Wi-Fi cameras. For almost 2 years, I wanted to add them to HomeKit, so everyone in my family can watch them, talk to the strangers via the doorbell, etc..., but they don't support the HomeKit protocol. I installed the Scrypted app on a Raspberry Pi and routed the cameras through the Scrypted to HomeKit using the ffmpeg tool. This got me the video stream only, no audio, and no talking. This weekend, I decided to ask Claude if it can help me in creating a special plugin for Scrypted to properly decode the video and audio stream. It took me approximately half of the day, but it worked! I finally got video and audio together in HomeKit. But this was just a beginning. I also want to enable the talking feature, but in this case, there was no information at all about the protocol, format, nothing. So, Claude walked me through the process of intercepting the traffic from the Kasa app on my iPhone to the camera. I had to install a special proxy on my MacBook to configure the proxy on my iPhone, so all traffic should go through my laptop, through that app. This let me find an endpoint on the camera that is used to stream the audio to the cameras. The Claude also was able to reproduce the coding algorithm of the control messages. So, now I have a working plugin written in TypeScript that supports all features of the Kasa cameras and other Kasa products: https://lnkd.in/gx_uYcGw Implemented and optimized completely by Claude, I didn’t write even a single line of the code. But, it is not the end of the story. In order to debug and optimize the plugin, I created a MCP server for Scrypted: https://lnkd.in/gDHnkjD7 It really helped me in checking the logs and debugging weird issues. The MCP server implements almost all features of the Scrypted client; basically, it allows full control of the Scrypted installation. Btw, I was really, really surprised that the pure TS implementation consumed 3 times less memory than the first approach with using ffmpeg. The usage dropped from almost 6Gb to 2Gb of memory.