We can easily use an additional Raspberry Pi for the client side, which will be responsible for turn the lamp on and off. For this example, we will use the tiny PiTFT 2.8 touchscreen to control the light. Note that other touchscreens, of course, will work just as well; the important thing is that the image contains a web browser:
$ source /path/to/poky/oe-init-build-env pitft28r_client_proj
Update bblayers.conf
like this:
$ cat local/bblayers.conf # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf # changes incompatibly LCONF_VERSION = "6" BBPATH = "${TOPDIR}" BBFILES ?= "" BBLAYERS ?= " /path/to/poky/meta /path/to/poky/meta-yocto /path/to/poky/meta-yocto-bsp /path/to/meta-raspberrypi /path/to/meta-openembedded/meta-oe /path/to/meta-openembedded/meta-multimedia " BBLAYERS_NON_REMOVABLE ?= " /path/to/poky/meta /path/to/poky/meta-yocto
Then, update local.conf:
$ echo "MACHINE = "raspberrypi2"" >> conf/local.conf $ echo "MACHINE_FEATURES += "pitft pitft28r"" >> conf/local.conf $ echo "LICENSE_FLAGS_WHITELIST = "commercial"" >> conf/local.conf
Build the image with the following command, boot it, and go tohttp://my_rpi_ipadress:3344
:
$ bitbake core-image-sato
18.223.134.29