Sunday, November 12, 2017

home automation, alexa and an LG lm660 series tv, cctv and more

I thought I'd try alexa, and so it began ....

Alexa (unlike google home) talks over your LAN to philips HUE devices, so you can simply setup a fake hue bridge to interface with alexa.  this is much easier than the official lambda foo you have to do in aws.

I also had domoticz setup, tracking my solar usage, electrical usage, and Nest data. 

So, using habridge I ended up connecting habridge to domoticz, but will probably remove that integration, and just do habridge direct to my scripts.

in domoticz I setup virtual switches that ran scripts, so habridge saw these switches and presented them like hue lights to alexa, so I can say things like 'alexa turn on sky tv' , or 'alexa turn on netflix'

My two interesting problems were 1) how to turn on my tv, as it doesn't have WOL, and 2) how to handle CCTV (not really alexa related)

My tv is an LG lm660t , which doesn't have WOL, so looked at solutions to use infra red to turn it on, but it all felt pretty flaky.  I got a raspberry PI , and hooked it up to a hdmi port, and turned on simpllink in the LG, so I could now run a commandline tool on the pi, to tell the tv to wake up via the hdmi port.  This tool became a script behind a virtual switch on domoticz.

This was pretty cool, but as my tv had netflix and medialink / plex apps installed, I wanted to be able to make them run too, I extended to send those commands following the dev docs

now I could turn on the tv via the pi, then signal the tv to launch and app, or turn off the tv.

I also hooked up sky tv via this tool , so I could control it via IP 

that left me with one last job , hooking up cctv, I wanted to be able to view my annke streams which are 1080p mp4 rtsp streams, and thought about plex, but ended up just using the pi, as all it would take was switching the input, no lag or boot times etc.

I endedup using this to do it, but had to override some settings to make it work just right on my tv.  I got lines and sync problems and all kinds of weird things until I put these lines in /boot/config.txt



then it was all good

No comments:

Fire Alarms