Monthly Archives: March 2017

Repurposing an old LCD TV into an interactive wall calendar

Now that I’ve upgraded the living room TV, I’ve moved my old 42” Plasma into our bedroom and I’m now left with a spare 22′ LCD TV.

Until now we had an old school paper wall calendar, mainly for birthdays and anniversaries, but let’s be honest we don’t look at it that often as it’s pretty much static (albeit with the monthly page flip)

I’ve stumbled upon DAKBoard and decided to repurpose my old tv into an interactive wall Calendar.

It’s free to sign up and create your own dashboard. I set up a family calendar in Google, set my location for the weather, and changed the picture setting to pull the live feed from my CCTV.

First I bought a Raspberry Pi Zero W as the “brain” of the new calendar. It would really only be opening the DAKBoard site and that’s pretty much all. No need for a big Raspberry Pi.

Then I installed Raspbian Jessie on it, mounted it so I could edit the WiFi settings thanks to David Maitland’s post. (I have no micro USB to USB adapter so no way of interacting with the Raspberry Pi other than via WiFi, which needs setting up manually).

Once connected to WiFi, I SSH’ed on it to setup the usual VPN (I use TightVNC, not the built in VNC server) and Samba.

Now it’s time to set up DAKBoard to open automatically at startup:

  1. Edit /home/pi/.config/lxsession/LXDE-pi/autostart and add this line. (replace ########### with the key from DAKBoard under Account):
    @chromium-browser --disable-session-crashed-bubble --disable-infobars --incognito --kiosk http://dakboard.com/?p=###########

     

  2. install unclutter to hide the mouse:
    sudo apt-get install unclutter

     

  3. Disable screen blanking so the TV always shows the dashboard:
    sudo nano /etc/lightdm/lightdm.conf

    insert the below line in the [SeatDefault] block:

    xserver-command=X -s 0 dpms

     

  4. Disable the screensaver
  5. I then use DomotiGa and one of my LightWaveRF sockets to switch the TV on and off based on motion detection on my PIR
DAKBoard

DAKBoard

In the future I might look into dismantling the TV to get it to fit into a custom frame as per this instructable

[17th March 2017]

If you also plan on using VNC, there’s a chance that DAKBoard launched on the VNC display and not the HDMI display. If that’s the case, stop VNC from starting automatically. With my setup I set:

sudo systemctl disable [email protected]

(see this post for more info on how to setup TightVNC)

Then I simply added a line in /home/pi/.config/lxsession/LXDE-pi/autostart :

@nohup vncserver :1

 




Syncing Home-Assistant.io and DomotiGa

Having tried Home-Assistant I can see how it can be really powerful once setup (and that’s probably where the issue lies, configuration is too much code driven with no UI at all).

However there are devices that are not yet supported by Home-Assistant (e.g. CurrentCost) and in addition, I can’t have both Home-Assistant and DomotiGa connected to my RFXTrx.

This means I’m looking to use both platforms and find a way to get them to talk to each other.
I already know how to send commands/updates to DomotiGa via JSON-RPC so that will be my first approach.

I’ve created a simple shell command that I use to update devices in DomotiGa:

shell_command:
  set_domotiga: curl -sS -X POST -H "Content-Type:application/json" -H "Accept:application/json" -d '{"jsonrpc":"2.0", "method":"device.set", "params":{"device_id":{{device_id}}, "valuenum":"{{valuenum}}", "value":"{{value}}"}, "id":122}' 192.168.0.24:9090

then in my automations, I call this function with the correct parameters. See below example for my Nest Thermostat (virtual) Device on DomotiGa:

- alias: Update Nest Status
  trigger:
    - platform: state
      entity_id: sensor.hallway_thermostat_hvac_state
  action:
    - service: shell_command.set_domotiga
      data_template:
        device_id: 122
        valuenum: 2
        value: '{{states.sensor.hallway_thermostat_temperature.state}}'

I’ve also tried to install Home-Assistant on my Raspberry Pi as I do like the Web interface, but it’s overkill and take too much overhead when I only need to monitor my GPIO ports. My own script is better in that effect.