Switching a server room split AC off and on from Hermetry with a 16 A plug relay
Sorry if this is the wrong sub-forum, it is half hardware and half “how do I do this in Hermetry”.
We have a small server room in our office with one wall-mounted split AC (inverter type, about 3.5 kW cooling). Twice this summer it tripped on a Friday evening and nobody noticed until Monday. I already have a temperature sensor in there on an ESP32 that sends room.temp to Hermetry every minute, and an alarm on it. What I want now is the other half: switch the AC from a board, and later from a rule.
My plan was cheap. I bought a 16 A plug with an ESP8266 inside, flashed my own firmware on it and gave its profile a plug.set command (param on, Yes/no). The plug subscribes to v1/rpc/req/+ and answers on v1/rpc/res/{id}. On my desk with a fan it works from a Switch card, I see “Done.” and the state comes back.
Before I plug the AC into it: is cutting mains to a split unit a sane way to control it? The plug says 16 A resistive. I have no idea what the inrush of the outdoor unit is, and I also do not know if the AC comes back by itself when power returns.
We tried this exact thing in a hotel back office. After the power came back the unit sat in standby with a beep and needed the remote. So for us cutting power only ever turned it off, never on.
Separate point from the HVAC side. That plug sits in your server room and can switch a load there, so treat it like any other device with access. Keep its profile TLS only, give it its own profile instead of sharing the sensor one, and put your office’s public range under Allowed networks so a copied token from that plug is useless anywhere else. Cheap plugs get opened up and dumped more often than people think.
Brian, done, it has its own profile now and the office range is pinned.
emily23 you are right and that kills my plan. I tested it at lunch: pulled the plug for 30 seconds, plugged back, the indoor unit beeped twice and stayed off. So the plug can only kill it, and killing an inverter compressor mid-cycle is probably not great either.
I am new to the IoT side but HVAC I know a bit from our buildings, and we had the same discussion with our installer.
Leave the mains alone. Most wall splits of that size have a connector on the indoor unit board for an external on/off contact (installers use it for key card switches in hotels and for fire panel shutdown). Some brands need a small interface adapter for it, the installer will know the part number for your model. A closed contact means run, open means stop, and the unit does its normal start and stop sequence, so the compressor is protected and it restarts after a power cut on its own logic.
So the plug relay does not switch the AC load any more, it only switches that low voltage contact. Your ESP8266 firmware and the plug.set command stay exactly as they are; I would rename it to something like ac.enable so nobody thinks it cuts power.
On the Hermetry side what we did:
- the command is Basic tier in the profile’s Commands tab, otherwise the board will not send it
- Switch card, Current state bound to a key the unit really reports (we read the indoor unit’s run status contact,
ac.running), not to the command - a rule:
room.temprises above 27 and stays so for 5 minutes, then Send a commandac.enablewithontrue, then Tell people
The control card page explains the tier and current value parts: Control cards. Reading back the real state is the part that saved us, a switch that shows “on” because you clicked it is worse than no switch.
Update for anyone finding this later. Our unit has the remote on/off terminal, the installer fitted a two wire cable to it on Thursday. The plug now just closes a dry contact, I took the relay output out of the plug housing into a small DIN box. The run status comes back on a spare GPIO as ac.running.
The rule fired for real yesterday when the room hit 27.4, the AC started and I got the notification. One thing I had wrong at first: I had turned off Ask before running on the switch, put it back on after Rachel’s comment about clicking things by accident.
- You must be logged in to reply to this topic.
Join the conversation
Sign in to ask and answer, like helpful posts and mark the reply that solved your problem. Every contribution earns points and levels.

