(defprocess root (fuzziness)
(defvariable blobs #’union)
(always
(when (eq (read-sensor ’image) ’black)
(subprocess (measure-blob) :gradient fuzziness)
(setf blobs
(list (get-from-sub (measure-blob) blob)))))
(avoid
(read-sensor ’query)
(let ((q (first (read-sensor ’query))))
(cond
((eq q ’blobs)
(actuate ’response (regional blobs)))
((eq q ’area)
(actuate ’response
(fold #’+ (mapcar #’second
(regional blobs)))))))))
(defprocess measure-blob ()
(defvariable uid #’max :atomic :base 0 :init (random 1))
(defvariable area #’sum :reduction :base 0 :init 1)
(defvariable blob :local)
(always
(setf blob (list uid area))))
Code to find a set of fuzzy blobs and their areas in a binary image. Each contiguous black area of the image runs a connected measure-blob pro- cess that names it and calculates its area. The set of blobs is collected by the root process and made accessible to the user on the response actuator...
When I push [my toaster] lever down, if there's a crumb stuck in the coils, it isn't long before my fragile pre-coffee state is shattered by the piercing siren of my smoke detector. It doesn't know about the toast, but really it should. If it were sociable, as soon as it detected particulate matter in the air, it would query the toaster to see if it had been activated. That would tell it that in all likelihood, it wasn't detecting an unattended, middle-of-the-night fire but instead a benign morning meal. The price of low-power radio networking and the just-minted funding for smart home energy networks makes this sociable smoke-detector scenario entirely within our reach. I want one.
Are there yet ZigBee products on the market?
Yes, there are. Some implement an actual ZigBee stack while others feature a ZigBee ready platform like EmberNet.
Examples in the residential space include Control4 (lighting), Eaton (home automation), Golden Power Manufacturing (sprinklers and thermostats), Hawking Technology (home gateways), Kalirel (heating), Mija (fire extinguishers), Nice (shutters), and TSC Systems (home automation).
Examples in the commercial space include Mija (fire extinguishers), Philips (lighting), Siemens (building automation), and TAC (building automation).