The homewizard is a wireless home automation system. For more information about the homewizard and for ordering info visit I am not related to the homewizard team, their company or anything else. I am just a very happy user of their system!

I have started to develop this php class for the homewizard to create my own backup system for the homewizard, to collect data from the homewizard and store it in a MySQL database and to design my own website for it.

The basics
The basic communications to the homewizard is done by a URL. The setup is very easy so when new features are added everyone can modify the class in order to have the new features added. You can always find the latest version I have created on github.

A basic homewizard command looks something like this: http://[hw ip-address]/[hw password]/[hw command].

A few simple examples:
  • Set switch 1 to state off:

  • Set scene 1 to state on:

  • Set switch 1 to dim state 50%:

The php class
As you can see in the above examples the setup is very simple. The only problem is, what are all those commands! To find those commands I have used google, wireshark and tried many of them until I found one again. Since I do not own all the devices that the homewizard supports I have had some help from friends that do own the devices and they sent me the commands used. All the commands that I know are added to this php class and make the usage very easy.
For the class setup I choose to set a public function where some simple input filtering can be done/added and the real work is done in a private function.

One thing is very important to know, since the password is passed in plain text within the URL, never connect you homewizard directly to the internet or enable the debugging option within a production enviroment!

A few available and most used commands:
  • handshake(): Test connectivity and get info from the hw.
  • get_switches(): Load the detailed switches data.
  • get_thermometers(): Load the detailed thermometers data.
  • get_scenes(): Load the detailed scenes data.
  • get_energymeters(): Load the detailed energymeters data.
  • get_uvmeters(): Load the detailed uvmeters data.
  • get_windmeters(): Load the detailed windmeters data.
  • get_rainmeters(): Load the detailed rainmeters data.
  • get_timers(): Load the detailed timers data.
  • get_status(): Get the complete status from the homewizard (simple data).
  • get_sensors(): Get all the sensors from the homewizard (extended data).
  • switch_on ($id, $level): Switch on. Set level in case a dimmer.
  • switch_off($id): Switch off.
  • switch_scene_on($id): Switch a scene on.
  • switch_scene_off($id): Switch a scene off.
  • And a lot more... Check the class to see them all :-)

Domoticz integration
Just visit my github and follow the installation instructions.

The usage of the class is, at least I think so, very easy. Just include the class, define the object and set the connect parameters. You can then test the connection with the handshake() method. Mind, for this function the password is not required, it just tests the connection and returns true or false. If connection is successfull a few variables are set with homewizard details like version and serialnumber.
After a successfull connection you can start switching or get some sensor data. Each method will return false or true and when true the data is stored in a variable you can access after the method is executed.

For example:

All methods with their variables are written within the class public functions and easy for you to read and find. Here you can see all the return values and which variables are set after a successfull execution.

Keep in mind, in all my examples I left out the connection paramters, make sure you always set $object->ip_address and $object->password!

Get a thermometer view: