The Market Ticker
Commentary on The Capital Markets- Category [Small Business]
Logging in or registering will improve your experience here
Main Navigation
MUST-READ Selection(s):
Don't Do It Lennar -- Talk To Me Instead

Display list of topics

Sarah's Resources You Should See
Sarah's Blog Buy Sarah's Pictures
Full-Text Search & Archives
Legal Disclaimer

The content on this site is provided without any warranty, express or implied. All opinions expressed on this site are those of the author and may contain errors or omissions.


The author may have a position in any company or security mentioned herein. Actions you undertake as a consequence of any analysis, opinion or advertisement on this site are your sole responsibility.

Market charts, when present, used with permission of TD Ameritrade/ThinkOrSwim Inc. Neither TD Ameritrade or ThinkOrSwim have reviewed, approved or disapproved any content herein.

The Market Ticker content may be sent unmodified to lawmakers via print or electronic means or excerpted online for non-commercial purposes provided full attribution is given and the original article source is linked to. Please contact Karl Denninger for reprint permission in other media, to republish full articles, or for any commercial use (which includes any site where advertising is displayed.)

Submissions or tips on matters of economic or political interest may be sent "over the transom" to The Editor at any time. To be considered for publication your submission must include full and correct contact information and be related to an economic or political matter of the day. All submissions become the property of The Market Ticker.

Considering sending spam? Read this first.

2018-05-14 14:28 by Karl Denninger
in Small Business , 114 references
[Comments enabled]  

Well, that wasn't all that hard.

I've never previously written a single line of Java, nor developed for Android.  Ported Android itself, yes, but not written apps -- nor used "Android Studio", Google's IDE for it.

A few weeks ago I bought the "Big Nerd Ranch" book on it, and read it.  It's a solid couple inches thick and, if you've never done programming, you'll be lost in the first half-dozen pages.  Figuring out Java at the same time was quite a trick (and one the authors warn against), but being a guy I don't read instructions anyway.


But now Beastie (yes, phk, the beer is on me if we are co-resident somewhere) peeks out the window, and the App lives.


I find some of the admonitions from Google rather amusing.  They really want you to use their cloud message management system rather than exempt your app from their battery sleep/doze stuff, for example.  I understand why, in many cases, but, in this specific case.... nope, nope and nope.  The impact on power consumption?  Nearly unmeasurable over a full night's sleep with the phone unplugged; according to GSAM consumption is about 1% over 8 hours.

A couple of weeks post-sitting down with this monstrosity and there's an app, complete with power management, background networking, preferences and all that.

HomeDaemon-MCP itself (the server/operational piece) has been taught how to do persistent notifications to mobiles as well, which is very nice.  What that means is that if you "miss one" because you're out of range (for example) as soon as you come back into range you'll get the notification.  Ditto if your phone reboots.  This also means that the complexity of said notifications can be infinite, and is subject to user permissions.

Speaking of which that's one of the big deals.  Multiple users with different permission bit masks are fully supported down to an individual device level for both read and write access flags.

I don't know if I prefer the app over the web interface for HomeDaemon-MCP, to be honest.  The app has its advantages on a phone, not the least of which is its persistence and notification capabilities.  That's real nice; what I used to do for notifications was to have the base system send a text message.  That works of course but this is nicer, easier to customize (choose your tone, do you want vibration or just sound, etc) more-granular, and has less risk of getting lost (yes, carriers do lose text messages on a somewhat-regular basis.)

The "about" page can be read here for the app... I think you'll like it.

If you do, and want to pick up the whole package -- including the App -- for marketing and sale of course, the email link is on the right.  No cloud used, security is completely under the owner's control and licensing is done with privately-CA-issued certificates -- which are damn near bomb-proof and enable both buy-once-use-forever models as well as annual or even monthly subscription-type licenses.  You choose.  And yes, the price for the whole shooting match is reasonable.

View this entry with comments (opens new window)

2018-04-07 12:26 by Karl Denninger
in Small Business , 113 references
[Comments enabled]  

You might have read this article when I published it originally.

Or, maybe not.

If not, then please do.  It lays out a pretty decent case, I think.

What I've now completed is the majority of the back-end work to make implementing a mobile app a rather trivial piece of coding -- instead of a lot of work.

Let me lay out the how and why for you on this.

The "hard way" to do a mobile app is to have it do all the work.  The easy way, every time, is for the mobile app to be little more than a terminal into something.

But this is a problem in the general sense even when there's a web server included because you then have to parse the web output.  That's somewhat of a pain in the ass.  So what you need to make mobile app development easy is a trivially-parsable reply format, preferably one that updates in real time for you.

HTML5 makes "dynamic updates" pretty easy, which is nice.  You send down a little javascript "listener" and then make a call to a resource that comes back with the MIME type "text/event-stream", and then sends updates.  Each has a tag, which matches that tag in your HTML document.  This connection can be (and should be!) persistent, in that this reduces overhead greatly.

Well, that's nice, but the persistence can be a problem from a resource consumption and management standpoint.  If you're not particularly persistent then the "retry" stanza will reconnect, so many pages and servers do exactly that -- they send the data but then allow the connection to close, relying on the connection cache ("Connection: keep-alive")  to cut down the overhead to something reasonable.  This will give you "every 3-5 seconds" updates -- good enough for most implementations such as social media and messaging.

What you want with an app, however, is an actual dynamic stream that stays open for minutes at a time because otherwise the overhead is a five-alarm pain in the butt.  Implementing true persistence on the server end gives you the ability to push updates as fast as you're willing to burn the CPU to handle.  You can get single-digit millisecond latencies (or better) if you are willing to burn the CPU for it, but getting latencies down into the couple hundred millisecond range, or ten to twenty times faster is an utterly-trivial exercise and actually cuts load since connection renegotiation frequency goes down enormously.

HomeDaemon did the first, until now.  It now has had the web code refactored to implement the second, which means that it is now very easy to add to the web backend a specific calling sequence that will output a table of units with locations, names, types and similar parameters followed by a stream of updates of status with one call that is nothing more than a glorified "GET" instance, and key it all off a given security level to match the user's privilege set.  Since SSL is in play the call (with authentication) and reply, plus the data stream that comes is secure.  And since the lifetime of a connection is now minutes where after the initial burst updates of status take just a few tens of bytes the overhead becomes extremely small -- which is fabulous both for data and power consumption on a handheld.

So there's no app for Android -- yet.  But the predicate for the back-end support for one is now 80% complete with the other 20% in process.  Yeah, implementing that was a five-alarm pain in the ass -- but now it's done.

After the back end is complete, along with the calling sequence, I'm going to teach myself how to write Android apps.

And yeah, somewhere between now and the endpoint of that the asking price is going to go way up for all the obvious reasons, so if you believe in the "MAGA" stuff and want to prove me wrong then get rich at the same time -- read this article again, then contact me.

View this entry with comments (opens new window)

2018-01-08 12:49 by Karl Denninger
in Small Business , 113 references
[Comments enabled]  

Here's some more on the license server that was recently added to HomeDaemon-MCP.

One of the biggest issues that faces any software publisher today is piracy and security.  The two are intertwined; not only do you lose sales (maybe a lot of them) to piracy, but what's worse is that stolen copies of the code frequently have "special features" (viruses and similar nasties) added to them, and since most software installers run with privileges this is a huge problem since the user grants permission for the code to install.

If that happens to include a trojan, cryptolocker or other nasty the user is screwed.

HomeDaemon-MCP of courses faces the same challenge, were I to start distributing it or if someone buys it and starts distributing it.  The code also inherently uses cryptography via the OpenSSL library, which it must to (among other things) provide a SSL-protected web server so you can control and monitor your home without other people breaking in.

For those who haven't run a web server with a certificate before in order to have the little padlock show up on user's displays you must have both a certificate and key.  The certificate is public and anyone can retrieve it but the key must remain private.  In addition someone has to "vouch" for that certificate and key belonging to you as being actually yours, which is why there are companies that sell said certificate certification services (e.g. Comodo, Verisign, etc.)  The idea behind "public" certification authorities is that they allegedly actually vet who someone is (at some level, which depends on the service bought and paid for) and supposed are trustworthy (that is, they won't allow anyone to impersonate them and, for example, issue a bogus certificate.)  There's plenty of reason to believe the latter is definitely not true if the person doing the insisting on impersonation is a government agency, by the way (since a government can insist rather loudly including by locking people up or even shooting them if they refuse), but for ordinary brigands and thieves it's probably secure against such games.

In the realm of a private device there's no reason to pay for a public certificate though; you're not a business taking money from the random public. In that case the company that sells you the "thing" is, if trustworthy (and if not why did you give them money?) probably good enough.  However, the requirement for a certificate that is vouched for by someone you trust still exists or anyone can stick a random certificate that claims to identify your site "in the middle" and by doing so decode all the traffic and steal it -- including your password, at which point breaking in becomes pretty darn easy!

HomeDaemon-MCP has always allowed you to specify who is the "root" of that trust in the certificates it uses.  This is now part of what the license server provides.

In addition the certificate and key are also provided by the license server.  That is, formerly if someone stole (or "borrowed") your SD card they could trivially read the key file since it's physically there and virtually any computer can read an SD card -- suddenly your system is not secure any more.  That's because if the key file has a password on it (which would prevent its use, at least without a lot of resource to crack it, as it's encrypted) the software can't start on its own after a power failure because there's nobody present to put in the password.  This by the way is true for most web servers as well, which is why most of them in "ordinary" commerce rely on the physical security of the device rather than a password on the private key for the certificate in question.  This is mitigated by the fact that if your certificate is compromised (e.g. you learn someone may have stolen the key file) you can ask whoever issued it to revoke it and reissue a new certificate, which of course you'd do after generating a new key (and fixing however the old one got stolen.)  As a result the utility of stealing a key on a webserver is somewhat limited since the certificate it is linked to is easily marked compromised (in other words explicitly "do not trust this") and replaced.

What's been coded into HomeDaemon-MCP to effect the "boot up" is a pair of certificates -- that is, CA certificates to validate the connection to the license server.  There is both a root certificate (for which the key is stored on an offline piece of media in a safe and an "intermediate" certificate (which has its key available to sign regular certificates.)  This particular intermediate certificate signs only one server certificate -- for the license server.  Rather than read them from a file the system instead has them coded in the executable.  If these keys are stolen from the server side, that is, if whoever is running the license server itself has a security problem then you'd have to reissue all the keys anyway since you must assume they've all -- including the server's certificate and issuer certificate -- have been compromised.  As a result there's little downside to this approach; if such a breach occurs then the binaries would have to be recompiled and re-issued and until they are, the old ones would refuse to talk to the fixed license server with its new certificate chain.

In addition the server and client sides are both coded to insist on extremely high security connections; if a client tries to connect using something that can be replayed or is not sufficiently safe the server will refuse.

Now when the HomeDaemon-MCP code starts up it asynchronously starts to not only run as usual but also tries to acquire a license set.  It does so by sending a unique hardware ID, a user-specified password and cryptographic hashes of both the executable being run and the operating system kernel.

The server then validates all of this against its data, specifically:

  • Is the hardware ID known to the license server?  That is, did the user steal the software and is trying to use it on multiple (or an unauthorized) piece(s) of hardware?

  • Is the password correct?  That is, is the user's assertion of being the owner of the hardware in question reasonably "good"?

  • Is the executable's hash good?  That is, not only has it not been tampered with (essential) but is it an authorized revision (useful)?  This allows the license granter to, for example, only allow "free" updates for a certain period of time.

  • Is the kernel's hash good?  This is one the license granter may not care about, but on the other hand they may.  It provides the ability to gate support and operation to a list of known-good operating system kernels.  Since a tampered-with operating system is even more dangerous than a tampered executable this is arguably quite a good thing.  However, it is somewhat limited in that the overhead cost of real-time cryptographically checking every operating system component is extremely high, and thus that's not attempted.

  • Is the place the connection is coming from ok?  The current code doesn't check IP addresses against a white or black list, but there's no reason it can't since every connection has an endpoint and TCP connections will not work unless they are valid in both directions.  This doesn't stop someone from "bouncing" off another address but it can prevent someone from using a license in an area that the granter considers "prohibited" (e.g. Iran, China, etc.) without the user taking extraordinary steps.

If the server doesn't like any of the parameters passed to it then it simply shuts down the connection and goes away with no response at all.  The client code will keep trying a couple of times a minute.

If and only if it likes all of the parameters provided then it responds with an operational CA chain for the web and master server, the certificate and key for same, and, if the client is authorized to run as a slave node, the certificate and key for that (which is distinct from that used for the web server.)  All of this is sent over a PFS-encrypted channel and thus is useless if the raw data is captured and replayed even if you somehow manage to later steal the license server's private key.

The HomeDaemon-MCP code installs those credentials and as a result encrypted mode operation, including web access, immediately becomes functional.  A couple of times a day, or if the code is restarted (e.g. after a power failure) the same scenario repeats so if updates are made to the license data the new certificate(s) and key(s) will be loaded.

Since access to the web server functionality is pointless if there's no web access at all (e.g. no access to the Internet) the short delay during startup means nothing since you, as the user, can't get to the service until internet access is restored.  Because license acquisition takes place asynchronously event processing starts immediately and operates normally even if the server is unavailable for some period of time -- but you can't get into the system to manually control or monitor it as the web server (and master capability) is effectively non-functional, immediately closing any connection attempted as the system knows the security credentials are missing.

At no time is any of the returned data stored locally, and there's also no buffer space in which to stash it in the code; instead it is dynamically allocated as required and then immediately cleared when no longer needed.  Therefore if you were to force an attachment and RAM dump of the executable you might be able to recover the credentials, but the the amount of code-hacking you'd have to do to make that information usable in the binary would be quite severe.  The other alternative would be to hack the binary to disable secure-mode operation entirely.  However, if you managed to pull off not only killing the checks but also enabling the access without the credentials you would basically destroy any pretense of security in the application itself and thus render it not only worthless to the user but potentially quite dangerous since random people on the Internet could quite-trivially break in and/or steal your login and password!  In addition if the legitimate licensee figures out you did any of this with his certificate and key he can sign into the license sever's client side and request that the server revoke it.

As such this appears to be pretty good as a security model.  Nothing is perfect; all commercial applications suffer from some risk of hackery and this is no exception, but as applications go since access to the outside world is basically required and secure access to same is also required in order to make it safe hacking out the protection scheme, if violated through hacking on the binary, leaves you with a highly-compromised piece of code that nobody in their right mind would use to control anything.

The License Server code as it sits right now runs against a flat directory structure and doesn't check kernel and executable hashes, or against a Postgres database -- with the query process entirely configurable.  The latter is also multi-threaded making possible very high levels of performance.    What won't be included is the customer-facing front end that handles people setting up their accounts and paying, since that's highly specific to whatever sort of payment model and collection system (e.g. credit cards, PayPal, etc) you wish to use.  I can of course code something along those lines up for a price -- or you can, if there's not already an appropriate "cart-style" web application that fits your needs or that you already have.

As a reminder HomeDaemon-MCP is for sale "lock, stock and barrel" and in source form; my previous article on the potential market is here, and the page on some of the capabilities can be found here.  Finally, there's a not-yet filed provisional patent related to the code that, for obvious reasons, I won't be going into any sort of detail on but will file same before turning over anything that could lead you to figure it out.  Who knows what that's worth, and the acquiring party will be free to file the permanent application and pursue its perfection and issue, should they so choose.  It's entirely possible that patent is more than worth the asking price on its own, incidentally..... but of course as with all things of this sort nobody knows until it's filed and marketed.

Look to the right for contact information.

View this entry with comments (opens new window)

Bet against my view on "Make America Great Again".

And have about a million and a half to put on the table in support of your belief.

For what?


So let's say you spent the $1.5m and acquire everything.

Here's a hypothetical way of looking at the opportunity.

There are roughly 80 million single-family, detached homes in the US. (I'll ignore condos, mobile homes and townhouses, although some of the first and last are potential customers as well.)

We'll also assume you can appeal to just 0.1% of those single-family homes.  That's a tiny penetration.

But it would amount to 80,000 installations.

The hardware cost to install is under $100 for a minimal install (that's the power that comes from running on a $35 hardware base!) and under $500 for a typical install including sensors and control points (e.g. switches, etc.)

We'll assume you sell the base hardware and software alone for a one-time price of $350, and 50% of your installs go that way (homeowner does the rest on his or her own.)  That's $10m in gross profit.

The real money is in the annuity stream and installed systems.  We'll assume those have a minimum install of $1,500 billed out, of which $500 is your fixed cost.  That fixed cost includes $100 for the controller and $400 for a mix of motion sensors and controlled points.  Install time is 3 hours @ $60 each for skilled labor, or $180.  That's $820 across 40,000 installs, or $32.8 million.  We're now to $42.8 million in gross profit.

Now assume you use the certificate system built into the software and slightly extend it (yes, I can do that on a contract basis, or you can if you have a competent programmer on staff, since the framework is already in the code) to add an annuity-style revenue stream for maintenance, updates and offer an option to the customer for same.  We'll assume you charge $20/month for this and half your 40,000 install-it-for-me customers go for it.

That's another $4.8 million a year in revenue and the effort to issue the certs is about 1 minute each per year.  You can automate that, of course, but there will be expense in doing so.  Of course the actual time spent servicing said customer is variable (and you'd have to take a guess on that), but over 3 years that gets you to $57.2 million.

We haven't yet included what you can make off the "higher end" installations (the million dollar+ homes and condos) where the owner wants not 10 control points but 30, and is willing to pay for it.  He gets convenience, security (e.g. access to his IP cameras and triggering points from them), no cloud required so Google, Amazon and others do not have access to the inside of his home, everand you get to sell that -- it's private, it's his or hers, and it's accessible and controllable from anywhere in the world via said secure infrastructure that has no access for anyone other than him -- including you!

Let's assume that of the 40,000 "you install" locations 10% of them are truly high-end homes (remember, we started with 0.1% penetration into the market and now we're at 10% of 50% of those) are not $1,500 installations, they're $3,000+ installations and your gross margin on those is 50% -- which is easily achievable.  That's another $6 million in gross profit; we are now at $63.2 million.

Is this a reasonable projection over three years time?  It's in the game.  No, it's not "riskless" by any means, but on an adjusted risk:reward basis it looks pretty damn good.  In fact, it's not all that far off what I accomplished with MCSNet in terms of return-on-invested capital.  The real return is always on sweat equity as that gives you much more control for the risk you take, but you have to have something that affords you enough operating margin to make it worth it.

Of course there's SG&A to be accounted for.  How good of a businessperson are you?  Cost control is a big part of the game in any business but any line of work is a hell of a lot easier to succeed at when you start with a nice fat margin on the goods and services you sell up front.

This is a 40%+ gross margin business, in short, as I analyze it, and in areas where you have existing people I bet you can sell to vastly more than 0.1% of the households.  Certainly in many metro areas far more than 0.1% are in the $300,000+ price category where a system like this is a tiny percentage of the home's price yet the value delivered in convenience, energy saving and security dramatically outweigh the tiny uptick in cost generated by including or adding it.

So if you're "MAGA" or just believe my view on monopolists, the rule of law and such is horribly pessimistic and wrong, and in addition have the cash to put on the table to back your position with a big fat check then come do so.  Show me that my pessimism is unwarranted the best way anyone ever can -- by making a bunch of money that I am intentionally leaving on the table, handing to me just one fortieth of what I could have had.  We'll drink a beer together when you prove my view on the business environment in the US to be unreasonably pessimistic and you'll laugh as you motor away from the pier on your new yacht.

Of course the above is all "back-of-the-envelope" speculation but that's how a decent functional business plan starts being developed.  It's how MCSNet was developed originally, but before it was actually executed on I fleshed it out and actually wrote a full five-year business plan with pro-forma financials.

The difference between doing something like this and the Ponzi scheme nonsense peddled by many on Wall Street such as belief in 30% growth figures into the indefinite future when you already have half the nation on your service (cough-amazon-netflix-facesucker-cough-cough!) this sort of back-of-the-envelope pencil-out assumes 0.1% penetration into potential buyers.

What happens if you can get 2% penetration?  You make well north of a billion, and then you really laugh at me.

So if you're both "accredited" (you almost-certainly are if you have the capital) and this makes you salivate look right, click and email me.  We'll talk.

When I started MCSNet my view on business changed. I don't consider a 10% gross margin to be attractive at all.  IMHO if you can't get into the 30s it's not worth it on a risk-adjusted basis, and the target is 40%.  IMHO this, while certainly not "buy it and sit" like speculating in something like Bitfraud, fits that category -- but since success is of course directly related to both your analysis (rather than mine) and how you execute (rather than how I execute) this is all hypothetical, but if that 0.1% penetration can be turned into 0.5%, well...... you do the math.

View this entry with comments (opens new window)

I've talked about HomeDaemon-MCP before.

It's still here, of course, but has continued to be refined and developed.

The current version is 3.0.0 and runs the place.  What's distinct about it compared against other choices?

First and foremost, it has no "central site" requirement at all.

In other words nobody but the owner has access to it and what it controls and monitors.  It uses SSL certificates both to secure your login (via a simple https interface) and to control slave connections between units (of which it can support an effective infinite number of.)  It will talk seamlessly to Zwave devices (including secure ones using AES encryption) and, for those who insist or have legacy devices, X10.

The certificate-based security model means it's trivial to set it up either a "buy it once, get a certificate good for what amounts to lifetime service" or a "buy a certificate good for a year" sort of model (e.g. subscriptions) on the retail side.

In the present political environment I have no interest in retailing it or developing the business structure to either put forward a distribution model or a retail sales model.

But you might.

Oh, and there's a provisional patent related to it that I will file (obviously before I tell anyone what that is or how it works) and it will go with the code, if someone buys it from me.

Yes, this is a "one check" sort of deal, but as you can imagine it might be a fairly large check.

If there's interest use the links on the right to email me and I'll get back to you promptly.

This is what the "monitor" page looks like on my cellphone:

And this is what's running all of that except for the pool gear (it'll run on essentially any system that can run FreeBSD; the Pi happens to be nice and cheap!)

The pool gear has another Pi with a handful of inexpensive ADC (commodity "adafruit" modules for analog sense and relay) ports to switch the valves, pump VFD and spa heater, enclosed in an inexpensive outdoor-gasketed sprinkler-controller enclosure.  It connects over a machine-certificate secured SSL link via WiFi, appearing as a seamless part of the whole.

No more spying, no Alexa, and if you're wondering how stable it is here's your answer -- the last downtime was due to me voluntarily turning the power off to do some work on the rack underneath it..

HD-MCP Controller
Private System; unauthorized access is punishable by law.

$ uptime
2:57PM up 144 days, 17:16, 1 users, load averages: 0.19, 0.18, 0.13

View this entry with comments (opens new window)