Honeywell Evohome Monitoring

Built a new display so that I can see what my Honeywell Evohome system and Gas Boiler is up to.

1 Like

Hi Mike,

I’d be interested to know how you are getting the info from Honeywell - when I looked admittedly a few years ago, there was no way to get at the data.

Simon

Hi Simon

I would never want to go through the pain again of getting this to work. Too many bits to go wrong and if it ever stops working then I’ll abandon the data I won’t be fixing it. However, here’s what makes it work.

So, the hardware is a Rasberry Pi I had doing nothing and a NanoCUL nanoCUL 868MHz board.

There is firmware available to load into the NanoCUL which catches all the Evohome Packets and presents them on the Serial port as text strings which can then be decoded.

This is connected to a USB port on the Raspberry PI which runs some software called Evogateway which decodes the text strings and makes all the individual bits of data available via MQTT.

Now, this created a huge amount of MQTT tags which I could have passed straight to the EmonPI, but it was about 300 individual tags of data and they all showed up as inputs in the EmonPI when I set it up. So I decided not to go straight from Evogateway to the EmonPI.
Since I already have a Home Assistant Node, I’ve passed the MQTT through Home Assistant, and using NodeRed I can do some clever automation stuff at that level, then only pass the data I want to be recorded in EmonPI through further MQTT tags.

Using MQTT Explorer and looking at my Home Assistant node, this is an example of the level of data being sent over from Evogateway.

A few pages of NodeRed transfer the tags on to the EmonPI

Now, I’m no expert on Home Assistant, MQTT, and NodeRed. But it worked and I’m reluctant to fiddle with it. The end result is I end up with the Data showing up as a feed in EmonPI.

The other way I thought of was to only use the NanoCUL and try and decode the data into tags within the Arduino. If I could do that, I would use an Arduino with Wifi and code it as a Modbus slave providing the data in registers to be read by the EmonPI. A lot less hardware, but I’m not sure if I’m willing to put the time into trying to code the Arduino.

There was one other thing. You could plug the NanoCUL into a Home Assistant Node directly and install Evogateway there, then pass the data on the EmonPI. I wasn’t willing to do that because I have a Home Assistant node with a standard install that runs rock solid and I’m keeping it that way. There is a thread on the home assist forums on this that seems fairly successful.

Mike

Wow!!!

That sounds as if it was a right pain!

Thanks for setting things out so clearly - sounds like HA would be the way to go but I’m not intending to run that. I’ll have to give this some serious thought before deciding whether to try it out.

Simon

I’m not seeing what HA adds over Node-red in the above setup. If @Mike_Henderson wasn’t already using it, I don’t see a reason to start for this. Node-red could use Mqtt-in nodes instead of the blue ones shown above.

@mjr as I said earlier I’m no expert on Node-red.

But am I correct in assuming that I would only get a new value from the mqtt-in block when a new value is available? I’d already tried something like that and showed up some issues with how Graphs are created in EMONCMS with data that has infrequent changes of value over long periods of time, essentially I was getting trends with long initial parts of trends lines missing as the trend lines would only start to be drawn from a data point within the time range which was worse than useless.
I used the Poll block to pass regular values whether unchanged or not over to the EmonPI giving the graphs I want.

Feel free to throw alternative solutions at me :slight_smile:

Mike

@Bramco Driving way off-topic here. But I like HA for the simple home automation it allows me, simple things like turning on electric heating in the winter when there is enough spare solar. I can do this with a £10 Tp-link plug-in smart switch :slight_smile:

And things like its energy tracking feature which is using data it’s reading from the EmonPI.

Which is something I’m going to have to get into with our new build - I’m up to my eyes though with the basics of ordering sanitaryware etc…

Got to decide soon whether to relocate our emoncms system on a Pi with a home brew diverter, or whether to purchase a new emonPi and replace all the old kit.

I’ll take a look at HA again when we move in - found it very confusing a few years ago, so didn’t bother. I understand it’s moved on since then.

Simon

I’m no expert either. I’ve only been using it since Monday! But I think you could create feedback loops to publish regular values whether changed or not. Here’s an example for one input and sending it every 5 seconds, using the inject button and debug msg display:

The “delay 1s” both allows the buffer reset message to arrive before a new input value and makes the feedback loop look more obvious.

I expect something neater can be done for multiple values by someone who knows node-red better.

You might want to check out this thread: Script for feeding Honeywell Evohome data into Emoncms

I’m successfully using the Python script that was provided to get the Evohome data.

I made a few modifications, I think mainly to stop the script exiting when the connection timed out:

#!/usr/bin/python
import requests
import json
import time
import math
from sys import exit

USERNAME = 'username'
PASSWORD = 'password'

while True:
    # Initial JSON POST to the website to return your userdata
    url = 'https://tccna.honeywell.com/WebAPI/api/Session'
    postdata = {'Username': USERNAME, 'Password': PASSWORD, 'ApplicationId': '91db1612-73fd-4500-91b2-e63b069b185c'}
    header = {'content-type': 'application/json'}
    # get sessionID
    data = json.dumps(postdata)
    
    error = 0
    
    try:
        response = requests.post(url, data=data, headers=header)
    except:
        print("Couldn't get data")
        error = 1
        time.sleep(60)
        
    if error == 0:
        str_response = response.content.decode("utf-8")

       # print(str_response)
        
        try:
            userinfo = json.loads(str_response)
        except:
            print("Couldn't decode data")
            error = 1
            time.sleep(60)

        if error == 0:
            if 'userInfo' not in userinfo: 
                #print "not allowed - header"
                # sleep for 5 minutes
                time.sleep(300)
                continue

            # here havea  connection so can get data
            userid = userinfo['userInfo']['userID']
            sessionId = userinfo["sessionId"]

            # setup and receive data then loop and extract temperature for each device
            params = ""
            paramsSet = ""
            url = 'https://tccna.honeywell.com/WebAPI/api/locations?userId=%s&allData=True' % userid
            header['sessionId'] = sessionId
            try:
                response = requests.get(url, data=json.dumps(postdata), headers=header)
            except:
                print("Timed out")
                error = 1
                time.sleep(60)
                
            if error == 0:
                str_response = response.content.decode("utf-8")
               # print(str_response)
                
                try:
                    fullData = json.loads(str_response)[0]
                except: 
                    print("couldn't decode data")
                    error = 1
                    time.sleep(60)

                if error == 0:
                    if 'devices' not in fullData: 
                        print("not allowed - data")
                        time.sleep(300)
                        continue


                    for device in fullData['devices']:
                        stemp = ""
                        if params != "": params += ","
                        # Add device current temperature
                        if device['thermostatModelType'] == "DOMESTIC_HOT_WATER": params += "hot_water_temp:"
                        else:  params += device['name'] + "_temp:"
                        stemp = str(round(device['thermostat']['indoorTemperature'],1))
                        #stemp = str(math.ceil((device['thermostat']['indoorTemperature'])*10)/10)
                        params += stemp

                    for deviceSetTemp in fullData['devices']:
                        if params != "": params += ","
                        params += deviceSetTemp['name'] + "_set_temp:"
                        stemp = str(round(deviceSetTemp['thermostat']['changeableValues']['heatSetpoint']['value'],1))
                        params += stemp


                    #now generate the insert into emoncms
                    url = "http://localhost/emoncms/input/post.json?node=evohome&apikey=PUT_API_KEY_HERE&json={"
                    url += params + "}"
                    print(url)
                    response = requests.get(url, headers=header)

                    # debug - read the response and print it
                    str_response = response.content.decode("utf-8")
                    # print(str_response)

                    del params

                    time.sleep(300)

I really like your system, I’m trying to do a similar thing with evohome thermostatic valves, but do you also use the Honeywell concentrator / display to intercept RF messages? Because I’m doing tests with nanoCul and ramses_rf but it doesn’t see anything from TRV. Thanks anyway.

Hi @VitAngelo

I also use a NanoCUl and Ramses_fr, but then use these along with EvoGateway running on the PI which provides the data on an MQTT Interface.

I’m picking up data from eight HR92 TRVs, a T87 remote thermostat, and the Evohome base station.

This is the data I can see in the Events.log

Mike

Thanks for your collaboration, I have installed evogateway and also put the concentrator, but in any case no messages are received, I also tried to change the setpoints from the TRV and the display updates, but nothing is shown from evogateway :frowning:


I have the latest model of kit evohome, this one:
evo

Can you help me understand what the problem may be?
I’m testing from a VM running Ubuntu 20.04.4
and bviously on the nanocut I have already loaded the evofw3.

Thanks again