Smart Dometic Thermostat

Cooling and heating are probably amongst the most important functions in any RV. After all, most RVs, including Beastie, are badly insulated and temperatures inside will rise and fall quickly with changes in the outdoor conditions (cloudy vs. sunny, temperature). Sadly, RV-focused thermostats haven’t really evolved much in the last couple of decennia and do little besides turning on the right appliance based on temperature. Trying to find a thermostat that could integrate with Home Assistant proved to be quite a challenge.

Beastie has 2 Dometic air conditioning units as well has an Alde hydronic heating system. This article will focus on the air conditioning issue. We will deal with heating another time. Here are a few options we considered:

1. Standard Dometic Thermostat

Our air conditioners came with a simple Dometic CT thermostat. It can control both cooling and heating (provided the AC has a heat strip), and has a built-in temperature sensor. Pretty basic. It does have bluetooth functionality which allows for nearby control using the Dometic Climate Control app. But not external integrations possible.

2. EasyTouch RV Thermostat

Micro-air’s EasyTouch RV thermostat for Dometic is a plug-and-play replacement for Dometic’s full range of thermostats. Besides looking more modern than the Dometic versions, EasyTouch allows users to control their ACs remotely through WiFi, using EasyTouch’s proprietary app. So, one step forward, but still no integration with HA possible.

And that’s pretty much it for out-of-the-box solutions. And then, we came across this solution by Sloopdog. He figured out a way to install a Nest thermostat in his RV and control a Dometic AC from the Nest. In order to do so, he reverse engineered the serial communication protocol between the CT thermostat and the Dometic. However, his solution is quite bulky and requires a bunch of different components. Because the Nest operates at 24V it needs a transformer, and 4 bulky relays to drive the right output. It also required a dedicated Arduino board to power all the logic.

We wanted something with the simplicity of the EasyTouch, but the flexibility and integration capabilities of a Nest thermostat. So, in the end, we decided to build our own from scratch.

Our first attempt was to use an M5Stack Core2 display. It’s a pretty cool unit, quite powerful, and very affordable (~$50). M5Stack has a very cool visual development environment, called UIFlow, that enables developers to quickly prototype applications without writing any code. We pretty much developed the entire thermostat logic using UIFlow, while communicating with Home Assistant over MQTT. Unfortunately, we couldn’t get the code working quite right as we felt we reached the limits of what UIFlow could do. So, we switched to micro-python and rewrote everything in code. But then, we got close to running out of memory and the device’s behavior became erratic. The M5Stack support team and community weren’t able to help and we got stuck.

The code can be found on Github.

M5Stack Core2

Then, we came across this device: the Sonoff NSPanel. It has a bigger screen than the Core2, also features an ESP processor, and has a built-in temperature sensor. We felt this screen could be our all-in-one RV Home Assistant touchscreen panel, controlling all core functions of the RV, not just the air conditioning units. Instead of using the built-in software, we decided to flash the unit with ESPHome and write our own.

Here’s a step by step guide of how we did this:

Sonoff NSPanel

1. Prepping the hardware

Unfortunately, we couldn’t use the NSPanel out-of-the-box, for two reasons:

  1. 110V Power. We need the NSPanel to be powered by 12V, not 110V.
  2. Serial out. The box doesn’t have direct access to GPIO ports that would allow us to implement Dometic’s serial protocol.

Luckily, after removing the cover (the bulky box on the photo), we found out that the display connects to the cover with a fairly standard 8 pin connector. The role of the board inside the cover is to transform power from 110V to 5V and to provide relay output, which we don’t need. Of the 8 pins, 2 pins provide power (5V) to the main board, and 3 other pins provide direct GPIO access, used to drive the relays. So we replaced the cover board with our own. Our board does two things:

  1. Transform incoming power from 12V to 5V
  2. Uplevel GPIO pin output from 3.3V (the ESP standard) to 5V (expected by Dometic)

This is the schematic:

Front side of the cover board
Back side of the cover board with the 8 pin connecter that connects to the display.

HARDWARE NOTES:

  1. Take the 4×6 board and cut it at the ‘P’ line.
  2. Cut one corner off the board slightly to make it easier to fit into the cover.
  3. We weren’t able to find the right 2x4pin female connectors with the right pitch. So instead, we got the 2x5pin version and cut 2 pins from it (easy to do).
  4. The trickiest piece is to position the connector so that it will fit perfectly into the screen, while still allowing the screen to snap into the cover. This took a few attempts to get right.
  5. Our soldering skills are not great, but sufficient to get this board to function correctly.

2 Comments

    • I reverse engineered the binary sequence the Dometic AC is expecting and mimicked it in my esphome code that is running on the NSPanel. I’m working on cleaning up the code so I can share it on GitHub.

Leave a Reply

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