Cheap switch modules with REST API

Whilst it is an ideal scenario to always have budget for Crestron and Lutron hardware on every project; sometimes that is not the reality.

This is especially true when it comes to projects on my own house; whilst I do have both Lutron and Crestron lighting controls systems, there’s never enough money to do everything I want on the house! (to give me two separate systems for testing, I have Lutron Ra2 Select in the garden office and Crestron Home OS3 in the house (it does some stuff very well, but having worked with full Crestron for 20+ years, it is frustrating limited and lacking in functionality still!.)).

In building the new garden office, I have had to rethink my garden lighting as, normally, they would be no need for me to go up the garden at night, but now (especially in winter) I need to walk up a steep path with steps. So, I needed to improve the lighting along the path where I have now put festoon lighting along the pathway on tall stakes.

Turning it on and off via Lutron or Crestron is not cheap - a Crestron InfiNET switch module is over £200 end-user price.

I didn’t really fancy paying big bucks for a switch module, so I did some in-depth research (AKA opening Google) and came to find the Sonoff product range.

Sonoff make all sorts of modules for switching and sensing etc. and I had been vaguely aware of them for a while to be fair. Any of their units are able to be flashed with third party firmware called Tasmota - see here for details. Now, that’s all well and good but a bit too hacky for me to trust in production systems (I’d probably do it at home though!).

Some of their range can run natively in what they call DIY mode - this opens up their API (see here for details on the API). It’s quite simple to get them on your Wi-Fi (though I struggled with an SSID that is serving both 2.4 and 5 Ghz and had to create a new SSID with only 2.4 on) and from there, it’s a simple HTTP POST command to turn the switch on and off.

There’s really not too much more to say (until the best bit at the end), I’ve got it running on my Crestron with astronomical timing as well as over-rides from touchscreens etc. If you don’t want to get it on Crestron, you can even just hook it up to the eWeLink app and let that trigger events at sunset etc.

Great little box and perfect for projects, particularly at home etc. where you might not have the budget for Lutron/Crestron. The best thing about them is that they are under a tenner each - you can order them from Amazon here.

They also make a switch with a temperature sensor - this I haven’t integrated into Crestron at all; but for about 15 quid, I have a rack fan controller. In my new office, I have a rack with network switches and Crestron processors. That’s an acoustic rack to try and minimise the noise of switch fans etc. It does have exhaust fans on it, but I don’t want them running all the time; so one of the TH10 switches is configured to turn on when the internal temperature gets to 35 degrees and draw the air out of the rack - much cheaper than conventional fan controllers!