Posts

Motion Lights using Philips Hue with Z-Wave Sensors

To work around the limitations of Fibaro HCL that does not allow you to use LUA scripts, Domotics fill that gap and allows you to use more than just Z-wave devices. The major problem with using Hue with the HCL, is that the Hue API requires action via a HTTP PUT to change the state of the lights. The HCL only allows HTTP GET using the string method for Virtual Devices. Domoticz allows you to add Hue directly as "Hardware" and automatically adds all the  bulbs and scenes as "Devices". To trigger the API to Domoticz, we use HTTP GET (yes, that is a Yay!!!). Create a 2 button virtual device with the following string using the IP address and port of the Domoticz server On button: GET /json.htm?type=command&param=switchlight&idx= &switchcmd=On&level=0&passcode= HTTP/1.10x0D0x0A0x0D0x0A Off  button: GET /json.htm?type=command&param=switchlight&idx= &switchcmd=Off&level=0&passcode= HTTP/1.10x0D0x0A0x0D0x0A When we ...

Alexa, Turn on Computer

Image
There is many ways to wake your computer up and put your computer to hibernate using Alexa. I will use: 1. computer with cygwin enabled with sshd service 2. domoticz on a raspberry pi 3. ha-bridge on raspberry pi 4. Amazon echo I'm more of a computer user than a developer, but I find that Domoticz is great as it helps non-developers download unix commands and allow a direct call to shell scripts. More great things about Domoticz is that it convert HTTP POST to GET methods when you are using triggers that can't do POST to Philips Hue lights (I will cover that in another post) Step 1: Setup a dummy hardware used for virtual switches Step 2: Create a virtual sensor as a light switch called Computer For the On script use: script:///home/pi/domoticz/scripts/pc-wake.sh The bash script should contain #!/bin/bash wakeonlan  BC:5F:F4:88:92:B6 For the Off script use: script:///home/pi/domoticz/scripts/pc-hibernate.sh This bash script cont...

Alexa Turn On / Off TV

Image
I have a Samsung LED smart TV. The "smart" TV let's you turn off the TV, but it doesn't let you turn it on as the IP address is not available when it's off. That sort of makes sense. While it is possible to then download a command to turn off the TV. you will need to go through the TV settings to enable HDMI-CEC. This means that turning on the apple TV for example will in turn turn on the TV and set the channel to Apple TV. What you need. 1. Domoticz 2. iSamsung command (https://www.domoticz.com/wiki/Samsung_TV) 3. atvremote command (i took this from homeassistant) Use Domoticz to create a dummy device and add a virtual selector device. There are 4 buttons I programmed and here are the corresponding commands. if your TV has the IP address 192.168.1.x (Replace x with the actual IP address of the TV) To turn the TV off script:///usr/local/bin/iSamsungTV 192.168.1.x -KEY KEY_POWEROFF To use Apple TV to turn on the TV to Apple TV channel ...

Using bridges to integrate gaps

There are some great products out there, but some great products just don't connect to other great products out of the box. Things that work Out of the box 1. Alexa with Hue 2. Homekit/Siri with Hue 3. Fibaro HCL to Sonos (limited features using plug in) Things that can be bridged 1. Alexa to Fibaro HCL (ha-bridge) 2. Alexa to Sonos (ha-bridge + sonos-http-api) 3. Fibaro HCL to Hue for Automation Scenes (Domoticz) 4. Fibaro HCL to Sonos for Scene Automation (sonos-http-api) Things that shouldn't be bridged 1. Alexa with Siri Automation Management Control 1. Alexa for voice controls 2. Individual Fibaro, Hue and Sonos schedulers for alerts and alarms 3. IFTTT for integration with cloud services and email. 4. Fibaro for integrated scenes, e.g. door opens, lights come on and music start playing. Z-wave motion sensor triggers Hue light.

Restarting Home Automation

Many years ago, I attempted to embark on home automation. Those were the days of X-10 and honestly, a lot of effort to make simple things work. Needless to say, I didn't get very far and gave up pretty much early into the game to wait for more sustainable standards. This year, I decided to go home automation shopping and picked up a bunch of the most popular / stable products off the shelf and add them to my semi smart home. The whole setup now consists of 1. Alexa Echo and Echo Dot 2. Philips Hue Lights 3. Apple TV 4. Sonos (Playbar and sub (for TV), Play1 and a Play5) 5. Dlink NAS 6. Raspberry Pi 7. Bluetooth audio receiver 8. Fibaro Home Center Lite (HCL) Z-Wave Bridge and various Z-wave devices including (i) Power Plug Switches with/without power metering (ii) Door Sensor (ii) Motion Sensor 9. Computer 10. Mobile phones I also managed to hook up the old CCTV unit to the Fibaro HCL using polled extraction of JPEG. After hooking it all up, the last couple of...

is the PPC Mac still usable?

I'm back to using the PPC Macs again just for fun. Namely the G5 iMac 10.4 and recently donated G4 iBook 10.5. The designs are quaint and with the right mix of software, can still be quite a usable computer. Most applications are on the internet (and I refrain from using the word "cloud").   Optimised Firefox So the first thing to do to make this computer usable is to get the "latest" and "optimised" browser which I downloaded from http://rpm-mozilla.org.uk Media Player If Quicktime isn't able to play a media file, I like VLC and you can still get a PPC version from their download page. Select the Universal version. http://www.videolan.org/vlc/download-macosx.html Remote Desktop Client To use other applications and get more power, we probably have to connect to our main system. We will need a remote desktop tool for that. We could use the standard VNC to another machine on the home network which is great. This feature is avail...

Forwarding X in snow leopard

Just picked this up from a blog http://blog.carldr.com/ as I needed to forward GUI apps over SSH. The answer was just to replace localhost with 127.0.0.1. Start Terminal from utilities run "startx" in the terminal right click on the dock (my recent fav trick) run "xterm" from Applications menu. The next are commands to run in the xterm. xhost + ssh -R 6000:127.0.0.1:5000 myserver Now, you can run your GUI app I still have habits to do the xhost +, sometimes it's just conditioning and I'm not even sure if the commands are useful.