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

https://www.linkedin.com/posts/svilgelm_id-like-to-share-my-experience-of-using-activity-7455675924555153409-w9Rf

#scrypted #homekit #kasa

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.

LinkedIn

Turned of #blueiris for my self hosted #cctv after trying out #scrypted and loving it.

The HomeKit integration and mobile app are really nice.

https://www.scrypted.app/

Scrypted

Video Integration Platform

Looks like my #Scrypted server has a failing SSD... 🫣

Intenso M.2 1TB, not even a year old. SmartTools doesn't show anything suspicious other than the drive hard-resetting itself during a 10-minute self test (in other words: the drive probably has a crappy SMART implementation too).

Already ordered a new (Kioxia) drive, lets hope this one survives until the new one arrives.

#linux

Ok. Haven’t been able to crack this #HomeAssistant nut, so I'm giving up and going to bed.

I have #Scrypted setup as an add-on. I need to start it with an environment variable in order to use a plug-in. I cannot figure out how to do it. I've added the setting to `config.json` in Scrypted's filesystem root, but every time I restart the plugin it gets overwritten with a blank file.

Hey #HomeAssistant people. I run HAOS on an ODROID. I'm running #Scrypted as an add-on, and I want to add an environment variable to it so I can run the Rockchip Essentials version of ffmpeg. I can't figure out how. #FediHelp?

Okay so I’ve finally got most of my smart home things running off of #HomeAssistant and then linked into HomeKit. This includes all my zwave devices on Hubitat as well as my Hue hub.

After years of running #HomeBridge and #Scrypted on my homelab, I’ve noticed that these devices are far more reliable than any native #HomeKit stuff I have, so we’ll see how this works out.

This was a false alarm, it was working (kinda), it just doesn’t work with the specific web UI I was trying to protect (#Scrypted). I tried a different one and it was fine. 🙄 Think I need to add some custom stuff in the advanced tab in #Nginx Proxy Manager for Scrypted to work. #Authelia #proxmox

I finally figured out how to get #Scrypted installed in #HomeAsstant (you have to add Scrypted's custom add-on repository as noted in the Scrypted documentation). Problem is it has an 8-10 second lag, unlike WebRTC (go2rtc) which has a 2-3 second lag. Ugh.

So do I do WebRTC -> Scrypted -> HomeKit?

IT'S ALL SO EASY!

Found a better deal: N100/16GB/512GB for €130

Plus room for a 2.5” SATA SSD. Just ordered one, will be using it for my #Scrypted #NVR setup.

https://nl.aliexpress.com/item/1005007036843065.html

Bmax B4 Plus Mini Pc Windows 11 Pc Intel N 100 16Gb 512Gb Ssd 2 * Hdmi 1 * Type-C Ondersteunt 4K @ 60Hz 750Mhz Intel Uhd Graphics - AliExpress 7

Smarter Shopping, Better Living! Aliexpress.com

aliexpress.
#Scrypted NVR requires a paid license. Nope-a-roonie. https://docs.scrypted.app/desktop-application.html
Scrypted Docs

Video Integration Platform