I have completed most of the restructuring of HouseControl, but decided to do things a bit differently. I have introduced two new devices: “speech” and “computer”.
Previously I had speech as an action in media devices, but the majority of what I am considering media devices, such as XBMC, iTunes and Spotify do not support text to speech, so it seemed sensible to have a separate speech device. All of my computers can act as speech devices, so I can choose where in the house I want text to be spoken.
I previously did not have “computer” as a device, as my computers were used to drive multiple devices and host other ones like the media devices. However, there are some things that seem to be properties of the computer as a device, rather than of any device attached to it, or hosted by it. So for example, actions such as “reboot”, and “shutdown”, apply to the computer as a whole.
I have also decided to make the computer volume control, a property of the computer device. Previously, I had it as a property of the media devices running on the computer, but this is not right as most media devices/services/programs have their own volume control, separate to the computer one.
I could have chosen to have a separate volume device, but it seems more natural for volume control to be actions on the computer device.
I am now planning to add program control to the computer device, so I can start programs, control GUI windows, and send keys to programs. To start the program, I will probably allow an arbitrary system command to executed. I have not decided on the exact syntax for all this yet.
Allowing all this program control has security issues, which I will need to address sometime. For the moment, none of this is available over the Internet.
I also plan to add browsing URLs to be part of computer control, so I can open an arbitrary URL on any computer using the default browser.
I will probably add some more sensing commands, e.g. to get the CPU usage and CPU usage of computers.
It is rather arbitrary what I classify as devices, services and actions. I seem to be converging on solutions that give maximum control, make the control commands most logical and make the code in HouseControl as clean as possible, but I am still some way from an ideal solution.
I usually have at least 4 computers running in the house. One of these is a Raspberry Pi running XBMC and connected to the TV. Most of the time the Raspberry Pi is running but the TV is off, so the Raspberry Pi cannot usually be used for speech or any audio or visual output. I don’t have separate speakers attached to the Raspberry Pi. Raspberry Pis have the big advantage of using no more than a couple of watts, so I can afford to leave them running all the time. I have another Raspberry Pi attached to the front door camera, and another on Keith the robot, but these are not on most of the time. I might keep the front door camera on permanently when I have it working in a more useful way.
I have an eMachines netbook running Windows as my production home automation server. This runs continuously with the lid shut, so does not use too much power. I use this rather than a Raspberry Pi, as it is easier for development, and more powerful than a Raspberry Pi. In the long run I might move to using a network of Raspberry Pis. I might put Linux on the eMachines netbook sometime, so that I can run ROS on it, and use it for robotics.
The other computers that are running most of the time are a desktop PC that I mainly use as a music server, and a guest PC for all the visitors coming and going in the house. (My grandsons do not need this as they just drive me off my laptop, so that they can play Minecraft on it). The desktop uses far too much power, so I switch it off in the evening when the TV is on, but I do need a lower power solution for running Spotify and acting as a guest computer.
My laptop is on whenever I am at home.
In moving to more flexible home control, I need more computers to be on all the time, I need them to be connected to effective speakers to play music and do text-to-speech alerts, all round the house, and they need the to be lower power. Ideally they should all have microphones. I also need always-on network storage, or maybe more cloud storage, and I need the server for this to be low power.
One issue with this is how to connect the speakers. For this I think I need small low-power AV receivers with just HMDI input and surround-sound speaker output.
I will also look at the various low-power alternatives to Raspberry Pis. There are a lot of such devices now, and I could do with something a bit more powerful than a Raspberry Pi. Currently most of the alternatives to the Raspberry Pi are not as cheap and do not have as good audio-visual capabilities.