That XOR protocol is a different one, and older than anything in the article. It is the original TP-Link Smart Home protocol used by the Kasa line (HS100, HS110 and similar): JSON on port 9999, obfuscated with an XOR autokey cipher, with no authentication at all.
Tapo devices never spoke it. Their original protocol was an AES passthrough over HTTP, KLAP replaced that in 2023, and TPAP is the newest. As far as I know, newer Kasa hardware and firmware moved to KLAP as well, which would explain why your access method stopped working on the newer ones. My library only covers Tapo devices; for Kasa, python-kasa is the one to look at.
On the cloud: the devices do have to be set up through the phone app with a TP-Link cloud account. Once set up, though, most functions of most devices can be used locally through the library, with neither the devices nor the library having internet access. The main catch is credentials: if you change the account password, for example, the devices need to be online for a little while to pick up the new one.
Ah, okay. Thanks for the clarification. I actually do have some Tapo cameras as well - being used with the official cloud service, subscription fee and all - because they solve a problem (and aren't observing my day to day life). So if/when I end up taking over digital ownership of those, I look forward to using your library.
I've built the same code but in swift. I've come to the exact same conclusions that you have on the protocol. I got Claude Code to implement TPAP compatibility solely by interacting with my local plugs, looking at the shape of responses and RFC 9383 to figure out it was SPAKE2+. It took a bit of time to figure out the last bit: that the SHA-1 of the password, then PBKDF2 with the plug's salt, split into two halves; a context of "PAKE V1" plus both sides' random numbers; empty identities
We appreciate you posting your work and engaging in the discussion. But it's a no-no on HN to post comments that are generated (including polished or translated) by LLMs or other text-generation tools.
Totally AI-generated, sure. But saying "No AI edits" at all is going way too far, IMO. Taken to its logical extreme, that even bans using a spell-checker. And what about non native English speakers? Is it really wrong for them to use a translation tool so they can participate?
I mean, it's y'all site, you can do what you want. But FWIW, I think making that too much of an absolute "bright line" is a net negative for HN.
> to its logical extreme, that even bans using a spell-checker
But we're not taking it to that logical extreme. We're fine with using LLMs for checking of spelling and grammar, or for suggesting improvements to text you've authored yourself, and then using your own human judgement to apply the changes back into your text.
What we are saying is: don't copy+paste something from an LLM chatbot or translation tool into a Hacker News comment box and submit it.
We're fine with using LLMs for checking of spelling and grammar, and for suggesting improvements to text you've authored yourself, and then using your own human judgement to apply the changes back into your text.
That's good to hear. I think what I was mostly reacting to above was this:
(including polished or translated)
which to me reads as more of that "bright line" stance I was objecting to. But if that's not the case, then that's cool.
The article is also AI, I recognize its style from a mile away. I don't mind it super much when it's yapping like this about what it did for the tasks that I myself gave it, but I don't enjoy it for reading pleasure on the off-times.
Indeed! I don't maintain a Home Assistant integration myself, but anyone who does can leverage this library, and anyone who wants to start a new one is welcome to.
I can bet author didn't even read his own AI generated text.... I don't have any issue with AI, but it would be nice if people spend time over creating quality stuff.
Does it give you some kind of sense of accomplishment to lecture and shame people (who have no interest in your opinion) over their very mild critiques of AI writing style?
If you are going to be 'the-grump' you should find something interesting to be grumpy about, nobody wants to hear your "everyone should be nice all the time except me" horse crap. If it isn't intentional trolling you have next to zero insight into what you are actually doing.
And who has an interest in your opinion, pray tell.
I'll dish it out and dish it back, but I'll never talk down to someone because I don't like how they write or their method of solving problems. We are not all born with the same gifts (or with English as our native tongue).
That's what some here don't seem to understand, that there's a way to put things gently when you're addressing someone to their (virtual) face.
I'm telling you, directly, that nobody wants to hear what you have to say in this thread. You seem like an intelligent person and I'm sure you are a net positive force in the world. Here, however, you're being obnoxious and you aren't contributing anything of value. I don't care about your arguments about fairness or dishing it out, nobody wants you to dish it out, nobody wants to dish it back. Interacting with you in the ways you have interacted in this thread is not valuable and it is not a contribution.
My lacklustre writing skills aside, that garbage needs to be called what it is.
It is either satire designed to grab engagement by shocking people, or the genuine anti-AI frustration of a mediocre writer who has realised they've lost their edge, because their work isn't worth paying for over AI.
The people winning literary awards will keep winning them with their manual writing, and they will keep making good money ghostwriting.
But my article, which is meant to communicate some software features in decent, readable prose, isn't worth $10k of ghostwriting. AI will have to do. So you go get, sir, and please stop gatekeeping! (Not you specifically, you get my drift.)
The unchanged AI style is grating to read. I'd rather read the bullet points you fed to your AI than this style. Of course I'd really rather read your own quirky writing style (which identifies you as a human), but if you don't have the bandwidth for that, just post the prompt.
In all honesty, I read your whole page and didn't find it one bit distracting or noticeable. I got to the end and saw the disclaimer about the AI writing and thought, "well, at least that'll head off the inevitable bitching about it being AI writing." Then I came to HN and saw people acting like you were committing atrocities. Sigh.
> It is either satire designed to grab engagement by shocking people
it is satire - it's trying very hard to be obvious about it, yet amusingly still fails to get thru now and then
it's an attempt to get inside the head of those people who rush over from one of the various syndicates, pangram verdict in hand, to slam any and all ai writing - usually with pre-cooked burns, uninterested in the actual substance - the ai shout-down brigade
The disclaimer at the end of the article says AI was used to "polish" the writing. I would guess it's this polish that can be a little off-putting: It reads like a magazine article written by and for people who aren't particularly interested in the topic.
It's written like one of those long form magazine articles. Which is fine for that kind of thing but maybe not great for software release notes. It goes buildup buildup buildup ... underwhelming payoff.
It's bad at some many levels - but it's also a case of if you know, you know. There no universal "KPIs" one can check to say it's good or bad.
But it's full on the "AI slop" style, a mix of LinkedIn/Online Marketing/Listicle like writing. That it's part of hundreds of thousands of articles, all with the same mechanical style, makes it even more tedious than if it was just some individual blog post here and there.
"Set the scene" paragraphs to add suspense, repeated lists of three or more items, "and, honestly"/"does real load-bearing work" and phrases like this, mic drops after every few paragraphs, writing about mundane stuff like a marketing executive, the list goes on.
This one isn't even one of the really eggregious examples.
since GLM 5.2 (perhaps even earlier?) it has been remarkably easy to reverse engineer any closed protocol you want as long as you have a binary. previously, it required so much manual effort as to simply not be worth it 95% of the time.
now all you need is IDA or Ghidra MCP, a binary and some vague sloppy instructions.
some more recent models even started instrumenting a running binary (when possible) to enumerate the protocol without being explicitly instructed to, which is even better.
Without admitting to anything, I was surprised by how little time it took to add support for the new protocol to the library. And I didn't even need an MCP server.
You don't even need an MCP, I just let the agent write scripts for headless ghidra. The MCPs are fragile and there isn't a whole lot of knowledge about how to use them in the training datasets, whereas there are plenty of ghidra scripts (and proper docs for the APIs).
> there isn't a whole lot of knowledge about how to use them in the training datasets
if you include a SKILL.md for the MCP (or just dump it into the prompt) it's not a problem.
I don't use Ghidra but IDA Pro MCP works extremely well for me for all manner of tasks. for example, some software likes to call home for license checking (and I wish to run it with networking denied to it). it no longer does.
Seriously, though, the popular Ghidra MCP is really badly architected; it's way better to rearchitect it or just script Ghidra directly. With that said, Opus 5.5 seems to have been trained on CoT from the popular Ghidra MCP. This makes it work better, but also makes it even more inefficient if you modify the MCP without changing its name and shape significantly (it will try to make tool calls using the "mainline" format, then have to retry them when they fail).
Even with Opus 5.5, IMO it's better to just ditch the MCP and let the LLMs eat with bintools and headless Ghidra; with both GLM and Opus this produces significantly more efficient results than the popular MCP. On the other hand the IDA Pro MCP is much better architected and seems to be pretty good.
It depends on what you're reversing. It tends not to like DRM-shaped things or security-sensitive things, but e.g. game engines are fine. (For the things it doesn't like, dropping down to Opus 4.8 or 4.6 usually works)
Works fine for me. I didn't explicitly say decompile but it had no issue digging into executables to give me information on how it and various file formats were designed.
Reversed an old video game pretty extensively for me. Got it running in 30 minutes, then patched some bugs, reversed the entire game logic VM and rendering pipeline, and we're now in process of expressing game logic as Lisp and upscaling assets for rendered that it already made to operate at 4x its hardcoded resolution...
Starting point was literally original installer copied over from a CD, which I hold on to and dug up from an old hard drive, plus a short prompt asking to make it work. Installing Ghirda and developing a whole framework for patching the binary, as well as substituting DirectDraw with its own DLL shim, was Claude's own invention.
I will note that Opus 4.8 and below was unable to use the MCP very well, misused it really often even with instructing. Good to see that they have improved some things.
I've had good luck aiming for easier targets. Android APKs, Java, and .NET binaries are usually easy to reverse engineer with AI and without any advanced tooling.
I feel like I'm either too dumb to get this, or not the target audience. I don't know what a Tapo is, but it's apparently a library to interact with Tapo devices, whatever that might be. And now it can talk TPAP, whatever that is. TP-Link is mentioned, so I'll guess Routers and move on :)
Tapo devices are basically smart home stuff. You normally have to use their ecosystem to control those devices, i.e. use their apps etc. However, people do not like the fact that you're locked in those apps and want to use those devices via platforms like Homeassistant, so people figure out how to do it by tricks like this.
They’re also a cheap way to get into BirdNET and Apple HomeKit Secure Video if you get their cheapest security cams that have some weather proofing. You can get a microphone (and camera) outdoors without having to shell out a lot of money for a Raspberry Pi + microphone + all the protective casing required to keep it from breaking.
With software like Scrypted or Frigate, I was able to use an Apple TV 4K to get a security feed into my Apple Home with iCloud+. You don’t need to buy Homekit certified products, and if I have time to try this, I hopefully could get rid of any TP-Link tied software altogether.
They're also really cheap energy monitoring plugs, probably the cheapest from a known brand you can get. I also really like their light switches and they work great in HA. FWIW I also have them completely locked down on the network like all other IOT devices.
These comments should be barred from HN, just like "HN is turning into Reddit" is. Which is quite ironic, because the ubiquitous, reductive, low-effort "AI slop" comments make Reddit super annoying.
Wait, I think the comments that complain about the comments that complain about the AI slop should be banned. Then I wouldn't have been able to write this one, further clogging up the interwebz and reducing HN to another dying forum, just like Reddit.
We should encourage each other to divest from hardware suppliers who are unfriendly to it's users. TP-Link should be publishing specifications to make it as easy as possible to interact with the hardware you purchase, not trying to maximize lock in or force you into a closed ecosystem.
The transaction should be you give them money, they give you hardware and as much information as they reasonably can to use it effectively and safely, repair it later if necessary, etc.
We have become used to having to take whatever we get as though consumers have no power in the market. Stop buying TP-Link hardware until they treat us as paying customers. Encourage other people to stop also. Don't buy hardware from manufacturers who treat you like crap, and don't participate in attempts to 'make it work' by reverse engineering it while they release firmware to break those attempts again and again. Stop funding your own opposition!
63 comments
[ 0.16 ms ] story [ 16.5 ms ] threadTapo devices never spoke it. Their original protocol was an AES passthrough over HTTP, KLAP replaced that in 2023, and TPAP is the newest. As far as I know, newer Kasa hardware and firmware moved to KLAP as well, which would explain why your access method stopped working on the newer ones. My library only covers Tapo devices; for Kasa, python-kasa is the one to look at.
On the cloud: the devices do have to be set up through the phone app with a TP-Link cloud account. Once set up, though, most functions of most devices can be used locally through the library, with neither the devices nor the library having internet access. The main catch is credentials: if you change the account password, for example, the devices need to be online for a little while to pick up the new one.
Great work!
See https://news.ycombinator.com/newsguidelines.html#generated and https://news.ycombinator.com/item?id=47340079.
Please write all comments by hand, from your own thoughts, and resist the temptation to copy+paste anything from a chatbot or translation tool.
I mean, it's y'all site, you can do what you want. But FWIW, I think making that too much of an absolute "bright line" is a net negative for HN.
But we're not taking it to that logical extreme. We're fine with using LLMs for checking of spelling and grammar, or for suggesting improvements to text you've authored yourself, and then using your own human judgement to apply the changes back into your text.
What we are saying is: don't copy+paste something from an LLM chatbot or translation tool into a Hacker News comment box and submit it.
That's good to hear. I think what I was mostly reacting to above was this:
(including polished or translated)
which to me reads as more of that "bright line" stance I was objecting to. But if that's not the case, then that's cool.
I assume because it has Python wrapper, the HomeAsstant integration can make use of it soon?
I don't even really care AI or human if its written like this. I would rather do anything else than continue reading.
There's no reason to be this nasty. If you don't like the writing, skip the post.
For what it's worth, the writing is clear and it gets the point across.
OP, thank you for doing the work and for sharing it.
I can bet author didn't even read his own AI generated text.... I don't have any issue with AI, but it would be nice if people spend time over creating quality stuff.
Get a life and read something you want to read instead of spilling your bile on somebody sharing their work.
If you are going to be 'the-grump' you should find something interesting to be grumpy about, nobody wants to hear your "everyone should be nice all the time except me" horse crap. If it isn't intentional trolling you have next to zero insight into what you are actually doing.
I'll dish it out and dish it back, but I'll never talk down to someone because I don't like how they write or their method of solving problems. We are not all born with the same gifts (or with English as our native tongue).
That's what some here don't seem to understand, that there's a way to put things gently when you're addressing someone to their (virtual) face.
It is either satire designed to grab engagement by shocking people, or the genuine anti-AI frustration of a mediocre writer who has realised they've lost their edge, because their work isn't worth paying for over AI.
The people winning literary awards will keep winning them with their manual writing, and they will keep making good money ghostwriting.
But my article, which is meant to communicate some software features in decent, readable prose, isn't worth $10k of ghostwriting. AI will have to do. So you go get, sir, and please stop gatekeeping! (Not you specifically, you get my drift.)
The Economist recently published a piece on this very subject, too, and I found it a good listen: https://www.economist.com/by-invitation/2026/09/07/this-arti...
it is satire - it's trying very hard to be obvious about it, yet amusingly still fails to get thru now and then
it's an attempt to get inside the head of those people who rush over from one of the various syndicates, pangram verdict in hand, to slam any and all ai writing - usually with pre-cooked burns, uninterested in the actual substance - the ai shout-down brigade
But it's full on the "AI slop" style, a mix of LinkedIn/Online Marketing/Listicle like writing. That it's part of hundreds of thousands of articles, all with the same mechanical style, makes it even more tedious than if it was just some individual blog post here and there.
"Set the scene" paragraphs to add suspense, repeated lists of three or more items, "and, honestly"/"does real load-bearing work" and phrases like this, mic drops after every few paragraphs, writing about mundane stuff like a marketing executive, the list goes on.
This one isn't even one of the really eggregious examples.
"At least nine issues tell the same story"
"every change lands in both at once"
It's Claudlish, so of course a community full of people who spend lots of time talking to Claude would notice this.
now all you need is IDA or Ghidra MCP, a binary and some vague sloppy instructions.
some more recent models even started instrumenting a running binary (when possible) to enumerate the protocol without being explicitly instructed to, which is even better.
I don't use Ghidra but IDA Pro MCP works extremely well for me for all manner of tasks. for example, some software likes to call home for license checking (and I wish to run it with networking denied to it). it no longer does.
Seriously, though, the popular Ghidra MCP is really badly architected; it's way better to rearchitect it or just script Ghidra directly. With that said, Opus 5.5 seems to have been trained on CoT from the popular Ghidra MCP. This makes it work better, but also makes it even more inefficient if you modify the MCP without changing its name and shape significantly (it will try to make tool calls using the "mainline" format, then have to retry them when they fail).
Even with Opus 5.5, IMO it's better to just ditch the MCP and let the LLMs eat with bintools and headless Ghidra; with both GLM and Opus this produces significantly more efficient results than the popular MCP. On the other hand the IDA Pro MCP is much better architected and seems to be pretty good.
Starting point was literally original installer copied over from a CD, which I hold on to and dug up from an old hard drive, plus a short prompt asking to make it work. Installing Ghirda and developing a whole framework for patching the binary, as well as substituting DirectDraw with its own DLL shim, was Claude's own invention.
With software like Scrypted or Frigate, I was able to use an Apple TV 4K to get a security feed into my Apple Home with iCloud+. You don’t need to buy Homekit certified products, and if I have time to try this, I hopefully could get rid of any TP-Link tied software altogether.
The transaction should be you give them money, they give you hardware and as much information as they reasonably can to use it effectively and safely, repair it later if necessary, etc.
We have become used to having to take whatever we get as though consumers have no power in the market. Stop buying TP-Link hardware until they treat us as paying customers. Encourage other people to stop also. Don't buy hardware from manufacturers who treat you like crap, and don't participate in attempts to 'make it work' by reverse engineering it while they release firmware to break those attempts again and again. Stop funding your own opposition!