I still think your underestimating the complexity of the software in that product then. It's not just sitting there watching one sensor to flip a relay (ie, replacing a simple mercury switch), but also sitting on a TCP/IP based network wirelessly, accepting touch input, allowing remote access, being able to self update, and so on. I could easily see the software costs for that product being over a million, including design and such. Sure, some of this comes along with an embedded OS, but it's still going to take a few well paid engineers and designers a bit of time to crank the needed software out. Really well paid ones if you want it highly optimized for an embedded system to use a low power CPU.
The device is clearly in the sales range of thousands at this point, so cost per unit on the software is going to be high.