Node-Red and Alexa with Big Timer

tmp96D4I’ve recently updated my setup at home, finally doing away with HA-Bridge and I thought you might like to see this simple setup.

So for beginners, HA-Bridge is a piece of software (a very nice piece of software) that runs on for example a Raspberry Pi, who’s job (in my case) is to talk to Amazon’s Alexa and send off MQTT commands to control things.  In reality I’ve always had it return commands to Node-Red – because many of my controlled items are on timers and I need the two put together.

The reason I need manual input and timers connected, is to turn things off automatically if I forget. For example – a night-light outside might be on a timer from dusk until midnight.  I have an early night and decide to turn off the light manually. It is important that the light then goes back into auto timing mode the next day and doesn’t just stay off permanently.

As developer of Big Timer (node-red-contrib-bigtimer) you’d expect me to make big use of this Node-Red node – and I do – dozens of them. Some time ago I added manual override controls for this node and I’ve usually had Ha-Bridge send an MQTT command which is then picked up by Node-Red and injected into the timer.

Well, some time ago when messing around looking for alternatives to Ha-Bridge, I tested node-red-contrib-alexa-local and it had all sorts of issues – but now I check again they’ve all gone! It truly is lovely though as it stands it can’t handle colour control directly (but then neither does Ha-Bridge) – it will handle numbers from 0 to 100 so you could use your imagination… 

Hence last night I took the plunge and stripped out Ha-Bridge and inserted alexa-local… and it is working a TREAT. Accordingly I’ve added that node to “the script”.

So – assuming you are using Node-Red and big-timer and can or have installed alexa-local – it is all this simple.


Here is a tiny, tiny part of my home control setup. On the left the dark cyan node-red-contrib-alexa local nodes, on the right the lime green node-red-contrib-bigtimer nodes.

In a couple of cases, office and house heat, things work another way and I keep the current manual heat offset (which gets reset on every change of program) in global variables – in this case alexa-local simply updates the local variables in those orange function nodes.

By and large however the nodes feed straight into bigtimer – could not be easier. Give the node a name you will use by voice, like “shed green light” and plug it into bigtimer, which, here, is controlling the light via MQTT.

Saying “Alexa, turn shed green light on” will result in one of two things.. either the light will turn on – temporarily overwriting the normal timed sequence, or, Alexa will respond with “I’m sorry I can’t find a device called shit green timer”.  Well, I can’t do much about Alexa’s accuracy I’m afraid.

Enjoy – and if you’re still wondering why I keep banging on about Node-Red – read all about it. As for where to get the nodes… here.


14 thoughts on “Node-Red and Alexa with Big Timer

  1. I Installed Alexa Local in node red but get error

    "Error: EACCES: permission denied, mkdir '/nodered'"

    I installed node red via Pete's script and don't know which user it has.

    1. Well, if you installed Node-Red via my script - you certainly should not be having this issue as I've put the node on two of my machines and of course I always use the script. That error message doesn't even make sense.

      I suggest, go to the GIT where the node came from and raise an issue. Last time I did that I got a reply within a couple of hours.

  2. I get
    pi@atticPI:~ $ sudo netstat -lntpe|grep node
    Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
    tcp 0 0* LISTEN 1000 14657 426/node-red

    Is 1000 the number I'm looking for because
    grep 1000/etc/passwd
    made no difference.

    1. Erm, no... the script works with the older Debian and also Xenial and others - compatible boards and software is listed at the top of the script.

      But if you're putting a board together, you may as well use the latest software - so Stretch works a treat - download the full version.

Leave a Reply

Your email address will not be published. Required fields are marked *