Aprilaire Thermostat 8800 any MODBUS experts?

nobody Knows how to use MODBUS?

1 Like

any updates on this? I have a 8920W and would love to be able to control this via HA!

1 Like

Nothing nobody is willing to step up even offered to give access to my thermostats got crickets toss a vote on this maybe if enough votes something might happen

1 Like

I know this is not MODBUS but i started trying to find a way to make a python api from methods on their website. It looks like they updated their app & Thermostats though and NOT the actual website. So u cant access ur thermostat via the web anymore.

Either way … wanted to post how far i got … I probably wont monitor to see when they actually update their stuff so if someone else sees the update and can continue kool!

## Import the neccesary tools
import sys
!{sys.executable} -m pip install requests
!{sys.executable} -m pip install beautifulsoup4

import re
import requests
from IPython.core.display import display, HTML
from pprint import pprint
from bs4 import BeautifulSoup

api_url = "https://web.aprilairestat.com/"
email = "ENTER EMAIL HERE"
password = "ENTER PASSWORD HERE"

post_vars = {'EmailAddress': email, 'Password': password}
response = requests.post(api_url, data = post_vars)

# parser
soup = BeautifulSoup(response.content, "html.parser")

if (response.text.find("Sign Out") > 0) :
    print("Logged In!")
else:
    err = soup.find("span", id="Error")
    print(err.text)

# Get location IDs
possible_locationIds = soup.find_all("a", onclick=True)
regex = r"(?<=locationId\(')\d+"

# join together in 1 string
possible_list = ' '.join([str(item) for item in possible_locationIds])

# find all sub strings
location_Id_strings = re.findall(regex, possible_list)

# convert to int
locationIds = [int(i) for i in location_Id_strings]
# print(locationIds)

# list all thermostats in each location
for i in locationIds:
    post_vars = {'locationId': i}
    response2 = requests.post(api_url + "/DashBoard/ViewThermostats", data = post_vars)
    display(HTML(response2.text))

Listing the thermostat’s doesn’t work. Their website redirects you to another website that says the app will be updated … so sad.

Hopefully someone can use this.

Also, Another observation. I did a Wireshark on mine (model 6003 i think) to try and see how it was controlled over the web. It looks like it connects to AWS IoT’s MQTT Server:

address: mqtt.aprilairestat.com (which links back to AWS)
Port: 8883
Protocol: TLSv1.2

Was hoping it might be Modbus over TCP but nope :frowning:

On another note: I got into installer mode and changed the connection type from Aprilaire Cloud to Automation System. When you do that, it does an mDNS broadcast of it’s IP. Looks like there has to be a way to use the IP in this mode to control the system but i’m not sure how exactly.

the 8800 uses the Serial connection 485\422 protocol I can go into a terminal window and control all the features of my Thermostats either individual or as a group so talking to them is not a problem being able to control them Via Home assistants thermostat card is the Hurdle I am at

Since u have it connected, I think you’d just need a custom thermostat integration. Thinking you’d just need to modify the methods in generic_thermostat to send the right commands through modbus using pyModBus or something like that.

I was looking for something a little more universal since most of us wont have the thermostat connected via usb.

  • like an arduino connected to modbus that allows control over wifi (or zigbee even) and then a Home assistant integration that sends the right commands to the arduino to control it.
  • or a custom python API that interacts with their website
  • or another custom python API that interacts with the thermostat directly through MQTT like Control4 (I think) does

Also, didnt mean to hi-jack post if that’s how it’s coming across, i think we all just want a way to control Aprilaire through HA

no worries, personally I think they all talk the same just the protocol to connect is different I looked at both of those links you posted and it is way out of my wheel house of skill I was hoping that someone that is skilled in writing would step up but it is become very apparent that I am going to have to figure this out on my own which as I have time I try poking a stick at it on occasion

if you have its IP address try using a terminal window like putty to connect to it and try this command to see if it responds type this into the window sn id? also in the advanced configuration menu make sure the responding to commands is enabled this is a PDF of all the commands Programming codes

Sorry I’m a complete layman here so apologies if this is a foolish suggestion. There is a working Aprilaire integration with Home Seer:

As a starting point is it possible to reverse engineer the integration?

you have to buy the intergration from the DEV and he is unwilling to share his work to try develop for Home Assistant people have asked him before, I can’t see buying something that won’t work, however you are welcome to buy it and see if you can do anything with it as it closer to working with the wireless ones like what you have then mine that is serial connected

I have the ethernet API spec for the Aprilaire automation thermostats, and have verified it works. I am a C# developer at my day job, but I don’t have a good python development environment to work in otherwise I would probably have this complete. If someone is serious about moving this forward, I can assist.

2 Likes

Just skimming through here, but if you guys need any assistance with modbus I can help you out. Just give me a hint.

For Modbus over RS485 (aka Modbus RTU) to Modbus over IP (aka Modbus TCP) gateways, there are plenty out there.

I’ve only every used ones that has an Ethernet port, but I found this cheap one that claims to do Modbus RTU to Modbus TCP with Wifi: Serial Port RS485 to WiFi Serial Device Server Elfin EW11 Support TCP/IP Telnet Modbus TCP Protocol IOT Data Transfer Converter|Building Automation| - AliExpress

1 Like

Talking to the thermostats is not the issue getting it to intergrate into home assistant is the hurdle, can you write a intergration to get a device to work in home assistant?

1 Like

I don’t own the device, so it’s not possible for me to write an intgration.

Skimming the thread I see mention of both Modbus RTU and some Ethernet API (I’m assuming this means an API over IP).

I’m assuming these are two different ways of talking to the device?

I’m asking, because if you do have access to a modbus interface, there is a high probability you could utilize the already existing Modbus climate platform in HA.

I don’t have this device, but have been playing around with Modbus to read the state of my boiler. I just read from it, not control it. I use a normal nest/ecobee for control.

For ESPHome, it seems you can make a thermostat by defining a temp sensor and the switches to turn the heat or cooling on/off. You could use the modbus component of esphome to form the “switches” to send your modbus commands.

I think you can do this without ESPHome and just pure homeassistant. You can use the “Generic Thermostat” integration and point it to a temperature sensor and a “switch”. You can use the homeassistant modbus to define the register writes for those switches. It looks like the switch must be a toggle, which could be complicated if you are not just writing a different payload to the same register. If you are, you can define a “template switch”, which then calls different switches for on or off.

Good luck.

https://www.home-assistant.io/integrations/generic_thermostat/
https://www.home-assistant.io/integrations/modbus/
https://www.home-assistant.io/integrations/switch.template/

Tried but the id protocol is different than the home assistant system will take, all the API stuff is available from April air including the commands. So very Doable to Wriite a intergration if the person knows that skill, which apparently I and most others lack that skill set

I see talk of this API, but does anyone have a link to the spec? I think you would increase the chances of someone jumping into it if the spec is readily available in the thread for people to check out.

fair enough the link to the instruction manual which includes all the commands and what the thermostat can do is here instruction manual and the Programming Manual

OK, the provided doc is for a proprietary serial protocol over RS485. This differs from the talk of Modbus and the talk of IP.

Right off the bat I can say if there aren’t any other API than this one, the probaility of getting the data into HA is slim. Tough sell to have someone implement a proprietary serial protocol, and a tough sell to convince people to interface with RS485 from their HA installations, which require extra hardware.