Home Automation – Take 1

One of my life long objectives is to automate everything around me,but there has always been one are where due to technological limitations or high price that I never ventured to – home automation.

I’ve had a set of Philips Hue lights for a couple of years, and some other random bits of pieces (1 Wemo plug, Netatmo weather sensors,…) , but nothing that was really running “automatically” or was in any way grouped together.

This all changed when my friend Konstantinos brought me a Google Home device over from the US.I was surprised with how it finally made the Philips Hue lamps more than a gimmick and actually made them more flexible, but at the same time it was clear to me that Google Home still does little to integrate all of the random little devices that exist out there (yes, it has ifttt integration, but it’s not only slow  but extremely limited), many of them not more than stupid ideas, many still lacking a lot to make them truly useful, but others, if used correctly (and with a lot of patience) actually quite flexible and surprisingly useful (some would disagree here) in day to day life.

After some research , I came across home-assistant.io, an open source hub for a lot of devices and online services (as I’m writing this it has support for 583 components). Home assistant allowed me to integrate all of the devices I had and made them work together, and allowed me to script simple but useful functionality (eg. turn on hue lights 1 hour before sunset if we are at home). For the stats geeks it also allows for integration with Grafana.

Main issue with home assistant ? It made me want to automate more ! I eventually purchased a set of zwave (a wireless networking protocol) devices to be able to act on other parts of the apartment (turn on light relays, close/open shades) as well as to trigger action on movement or door’s opening as well as a Logitech Harmony Hub to be able to trigger actions via infrared.

For most people out there most of these automations are unnecessary or just a sign of laziness. For me they are a demonstration of what consumer technology is able to do when pushed a little bit beyond its normal uses.

Below is my current device list as well as what they are currently being used for.

  • 2x Google Home – Voice Control (lights, scenes [eg. bedtime, watch tv])
  • Logitech Harmony Hub – Infrared control (Interact with TV, Amplifier, Cable receiver)
  • Philips Hue lights – A lot of them spread out through out the apartment
  • 2x Aeontec Door Sensor – Apartment door (sends alert to phones if door is opened and there is no one home); home office door (turns lights on if darkside when door is opened, turns light of when door is closed)
  • Aeontec Multisensor – Turns on dinning room lights if we sit at table and it’s dark
  • Fibaro Switch – Allows turning hall lights on or off
  • Fibaro Roller Shutter – Control of electrical window shade (automatically closes when no one is home and living room get’s too warm) ; Closes down when entering “Watch TV” scene
  • Netatmo Sensors – Humidity, Temperature and CO2 sensors
  • A few Mi Flower Sensors – Measuring humidity and sending alerts when it gets too low

Other non-core components that also interact with this : Yamaha Amplifier, Chromecast, nVidia Shield TV (curious to see what role it will take once Google Assistant is integrated), Lametric time, Plex, …

Some other automations:

  • Bedroom lights fading on automatically in the morning and dimming of at night;
  • Living rooms dimming during dinner, and dimming off at night;
  • TV turning on to night news if I’m at home;
  • (…)

I consider this to be only the beginning, and there is a lot of tuning still to be done, but I find it amazing how much can already be done with so little tinkering.


Raspberry PI (auto) Flickr uploader

I’ve always used Flickr as the main backup repository for my DSLR photos, but I have to admit that their desktop uploading solution was never one that I really liked…

Usually I don’t like to have to leave my workstation on just to upload photos, and I don’t like to use it while photos are being uploaded because the bandwidth usage makes Chrome extremely slow, so I decided that I needed a way to upload my photos as automatically as possible (at least the JPG versions, the RAW/NEF files are a different story…).

This seemed like a great chance to play with my Raspberry PI 3. I googled around and didn’t find anything that did what I wanted, so I did a simple Python script that is fired up by usbmount whenever a mass storage device is connected and uploads the files to Flickr.

If anyone is interested, just head to github.com/drcursor/flickrup.

IKEA Electric Standing Desk

Ever since I started using an electric standing desk at work, I’ve wanted to have the same solution at home.

Up until recently this goal was put aside due to the very high prices of electrical standing desks ($1200/$2000). I even thought about getting a “normal” standing desk, but in all honesty, I’m quite sure I wouldn’t use it regularly – not only it’s not the healthiest of solutions (sitting all day long is bad, but standing all day long can be even worse…), I’m quite lazy and as such would easily revert to using some other desk in the house, or even worse – work from the couch.

Last week I noticed that IKEA had an interesting new solution (Bekant) for standing desks, and one that doesn’t break the bank (~$670) – only issue – the size! Even though they have it available in different sizes and forms (including corner solutions) – they were all just too large. After doing some research (that included reading some dreadful reviews), I was able to determine that I could actually buy the electrical feet and use a smaller desk top (I wanted something shorter than 80cm, was able to get 60cm ).

This solution is not “supported” by IKEA, but required almost no adaptation – I had to drill 4 holes on the table top to screw in the legs (took me around 25 minutes to measure and drill and an extra 25 minutes to assemble the legs). Table is sturdy and stable even when at full height. Motor noise speed is exactly the same as in all other electric standing desks I tried out in the past and is not disturbing at all. Getting from sitting to standing position takes around 10 to 15 seconds (see video at the end of the post).

Given that it’s also very comfortable when sitting I’m now using this very simple but effective standing desk app.

Next steps ? Arduino the hell out of it and make it change positions via the standing desk app. I already checked and the buttons don’t work by closing a circuit, so I need to do some further research (I would welcome anyone wanting to give me some pointers here).

Quite proud of the result 🙂

Addendum #1

As so many people have asked for the parts list, here it is:

Addendum #2

More than a couple of people asked for a video of the table going up and down, so here it is:

Colocação de Projector

Depois de várias variações sobre a forma como coloco o meu projector no tecto, deixo vos aqui algumas fotos de como pus da ultima vez. Embora continue sem ser muito prático retirar e voltar a colocar o projector, penso que a estabilidade é óptima, assim como a capacidade de afinação, distancia do tecto (as soluções comerciais deixam sempre muito espaço e tenho um tecto baixo), e acima de tudo : o preço.


Os “X” exteriores correspondem aos parafusos do tecto, e os “X” interiores aos do projector.

O material escolhido para esta placa deve ser : fino, não inflamável e duro (não deve dobrar muito/nada). Sinceramente não sei o nome do material que acabei por escolher, embora me pareça que o ideal fosse optar por alguma espécie de acrílico.

Devem-se fazer com que os furos do tecto correspondam exactamente aos da placa – no meu caso, optei por furar tecto e placa ao mesmo tempo (tenho tecto falso).

Por ter tecto falso optei por parafusos próprios para o efeito, cada tecto requer um tipo de parafuso e possivelmente buchas diferentes. Se procurarem em qualquer AKI ou parecido, facilmente encontrarão o mais adequado.

Fotos antes da colocação:

Depois da colocação:

Depois de tudo apertado e ajustado:

Integração Flickr WordPress

Há uns tempos quis integrar no blog um acesso às fotos que tenho na minha conta flickr, encontrei montes de coisas por ai, mas nada que realmente me satisfizesse, peguei nalgumas das soluções e fiz uma colagem que passo a disponibilizar aqui.

Entretanto já desisti da ideia (podem ver o resultado final [sem css adequada] aqui) e passei a usar um script, o satellite para galeria das fotos que tenho no flick, mas, no espirito de “isto pode vir a dar jeito a alguém”…

Uma das outras coisas que inclui neste tar, foi um script que construi para poder criar RSSs das fotografias em tamanho real (ou outro) do flickr, visto que este não o disponibiliza, sendo também configurável o número de fotografias a mostrar.

Espero que sirva de alguma coisa a alguém, mas não batam muito no ceguinho que eu não sou programador (mas deixem as vossas opiniões na mesma!).

WordPress Incoming Links

O WordPress oferece na parte de administração uma função interessante, o “Incoming Links” que nos permite ver que sites estão a fazer links para o nosso blog. Nas ultimas versões o wordpress deixou de usar o Technorati e passou a usar o Google Blog Search. Sinceramente nenhum dos dois me satisfazia por completo por duas razoes:

– Ambos mostravam links oriundos de sites meus (por exemplo o meu livejournal que é uma cópia integral do blog..)
– Um mostrava uns links outro outros…

A minha primeira tentativa de resolver isto foi tentando alterar os parametros de procura do google blog search para excluir os urls que não me interessavam… ora qual a minha surpresa quando descobri que os senhores do google nao suportam a utilização da exclusão (-) simultaneamente com a utilização da keyword “link:”…

Acabei por criar um Yahoo Pipe que concatena os RSSs do google blog search e do technorati, e filtra os URLs que não me interessam… podem ver e retirar daqui.

Para utilizar estes RSSs basta alterar a linha “$rss_feed = apply_filters(….)” do ficheiro wp-admin/index-extra.php .

© 2022 E. Balsa

Theme based on hemingway.Up ↑