Using EmonPi to control AC units

I am looking for a way to control 20 or more AC units using an emonPi to manage power demand. Our customer is charged for power based on 15 minute demand peaks for 3 different time of use periods. We are looking for a way to control the AC units using an infrared link. There are several commercially available modules that bridge WiFi to IR, one of these companies has offered the API information so that we could use any device capable of sending TCP over WiFi to control the AC units.

Has anyone tried to use an emonPi in this type of an application? emonPi >> Wifi >> IR

Any help is much appreciated.

It looks like a ‘no’, I’m afraid. I can’t remember anyone ever mentioning IR, other than for reading energy meters.

Robert, Thank you for your reply. I have been working on a system to control multiple air conditioning units the Sparkfun WiFi IR Blaster with an Emonpi. The IR Blaster is an ESP-12S based development board.

I can send AC unit commands to the WiFi IR Blaster using a simple http GET:

http:///ir?code=284139615
(sends 0x10EFA05F out the IR transmitter)

Is there a simple way to have the emonpi send calendar scheduled http GET requests to these modules? A friend suggested setting up cron jobs that call Python scripts. Any help is much appreciated.

I’m not the one to ask questions about the RPi - I’ll leave that to my colleagues who know.

That would work.

cron has a minimum interval of one minute. So if that’s not a problem,
(since it’s air conditioning units you’re controlling, I’d guess it isn’t)
a cron job is one way to get it done.

Firstly I’d say that anything done like this on a Raspberry Pi has risks so should not be critical to the business and there should always be an alternative if the Pi goes down.

Secondly, this is not really the OEM/Emoncms part of the EmonPi, it is more that you intend to use the inbuilt Raspberry Pi for something else. You could just as easily (and this may be a better solution) get a second Raspberry Pi and do the control system on that.

I think possibly what you should use is Node-Red for the controlling part of this. It can easily generate the HTTP calls, there may be an IR node already created, there are timer nodes available and you can create a dashboard. The power information is readily available from the EmonPi/Emoncms for you to make the control decisions on.

My suggestion is to get a new RPi, install Node-Red and take it from there. The Node-Red forum is very good so specific questions are probably better directed there.

Brian and Bill, Thank you for the feedback. Our application is not critical. It is a small school with 20 or so AC units. The units get left on over the weekend, or turned off or on at the wrong time. The IR Blasters can act as autonomous “smart” wifi connected remote controls. We intend on spinning our own version of the IR Blaster to harden the power input and use rechargeable batteries.

We want to use the emonpi to have a centralized monitor page with the ability to update the AC usage calendar in each IR Blaster.

The main goals of this system are to provide a live teaching lab and save a few dollars. The school is located in a region with very high electric rates.

We will look closely at Node-Red. The school already has an emonpi that will go online in about one month.

I do something similar ( not with Ir) but I think it might be easier using domoticz automation software on the pi and espeasy on your esp ir device then node red. personally not a fan of Node red so much all that overhead to do simple things . once you have it set up you should beable to setup automation and other function easier then node red. using domoticz’s “blocky” and timer function