Integrating the iKettle (and Sonos) on a Fibaro Home Center 2


The Fibaro Home Center 2 can be extended to control 3rd party devices via IP connections. Two such IP connected devices are the iKettle (made by Smarter Applications) and the Sonos PLAY:3 (made by Sonos, Inc).
RGBW Controller RGBW Controller

To control 3rd party devices via IP, it's necessary to create a Virtual Device for each device. Now, if you're good at programming and learn the Lua language and look into the protocols that these devices use, it is possible for you to create the Virtual Devices yourself… but it's much easier if you just import one that someone else has written.

The forum at forum.fibaro.com is full of amazing people who love to write Lua code and many of them have put their hand to writing Virtual Devices for just about everything. One such person is the amazing Krikroff who wrote a Virtual Device for controlling Sonos.

The iKettle


The iKettle is a fantastic device that allows you to boil your water at 65, 80, 95 and 100 degrees C. It can keep your water warm at that temperature after it has reached it and it can alert you if you forgot to put water in it! But the most exciting feature (as you may have guessed from the first letter in the name), it can do all this from your smart phone (on android 4.0 and above and iOS 7.0 +)

We have written a Virtual Device to control the iKettle and to receive feedback from it which can be used in other scenes on the Home Center 2. This allows the iKettle to be controlled not only from its native app, but from any smartphone or computer which can connect to the Fibaro System.

The iKettle Virtual Device

RGBW Controller
You can download the Fibaro UK iKettle Virtual Device by clicking here [update: new version with keep warm function]. Right click on the iKettle to the left and save the image. You can import this into your Home Center 2 and use it as the icon for the Virtual Device.

Once you have downloaded the Virtual Device you will need to unzip it and save the .vfib file somewhere you can find it again.

Now, log into your Home Center 2 and follow the following instructions to install the Virtual Device:

  1. Click on Devices
  2. Click on Add or remove device in the menu on the left.
  3. Scroll down so you can see the section called To add the Virtual Device
  4. Click the Browse button and select the .vfib file you saved earlier.
  5. Click the Import virtual device button.
  6. Name your virtual device and assign it to a room.
  7. Enter the IP Address of your iKettle in the box.
  8. Enter 2000 in the TCP Port box.
  9. Click save!

This will save your new iKettle virtual device and connect to it. If everything is working well, you will see the status of the iKettle at the bottom of the virtual device interface.

This global variable will be updated whenever the iKettle changes state. Making things happen (playing our sonos!) You can use the global variable (iKettleFB) to trigger other scenes to run. So… let's make the Sonos virtual device play when the iKettle boils. To do this create a new Lua scene:

  1. Click on Scenes
  2. On the menu on the left, click Add scene
  3. Name the scene iKettle Monitor and assign it to a room.
  4. Click the Advanced tab and choose to save the scene as Lua.
  5. Click Advanced and paste the code below into the top box.
  6. Change the device ID on the pressButton action call (line 14) to the device ID of the Sonos virtual Device.

Conclusion

And there you have it: by creating Virtual Devices to control two completely independent devices, we have been able using the Home Center 2, to interconnect them and cause the Sonos to play when the iKettle boils!