Evohome HGI80 MQTT

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • StuartP
    Moderator
    • Feb 2004
    • 81

    Evohome HGI80 MQTT

    Is anyone aware of software that takes info from an HGI80 and publishes as MQTT, looking for logging only at this stage, although longer term MQTT control would be ideal
  • DanD
    Automated Home Ninja
    • Feb 2016
    • 250

    #2
    Hi Stuart.

    The only one that I've come across which links Evohome wireless message decoding to an MQTT broker is https://github.com/smar000/evohome-Listener. It look like a great piece of work which builds on the Evohome message interpretation logic within Domoticz to produce a standalone interpreter.

    Regards,

    Dan

    Comment

    • StuartP
      Moderator
      • Feb 2004
      • 81

      #3
      Thanks for the pointer Dan. Will take a look.

      Comment

      • dty
        Automated Home Ninja
        • Aug 2016
        • 489

        #4
        I have some NodeRed components that can read an HGI80 and decode it, but they're not as fully featured as the Domoticz stuff.

        Comment

        • StuartP
          Moderator
          • Feb 2004
          • 81

          #5
          Ok, so a quick test of the evohome-listener, and it's not as featured as domoticz. So I'm now wondering is there anyway to get the data from the HGI80 into both domoticz, and evohome-listener.

          dty: have you got any more info / code you could share ?

          Node-red would probably be an ideal way to bridge to MQTT amongst other things.

          Comment

          • DanD
            Automated Home Ninja
            • Feb 2016
            • 250

            #6
            If you're going to set-up Domoticz you'll probably not need the python stuff. Have you seen the Domoticz MQTT wiki https://www.domoticz.com/wiki/MQTT?

            Comment

            • dty
              Automated Home Ninja
              • Aug 2016
              • 489

              #7
              The components are here: https://github.com/codeaholics/node-red-contrib-evohome

              Unlike the Domoticz code, mine makes no attempt to learn about your config, so you probably already need to have identified all the things in your system, and their addresses, etc. in order to configure it.

              The "receiver" node connects to a TCP port to read HGI80 data - I did this because my radio is connected to a Pi that's remote to my server and I use ser2net to expose it over the network. It spits out lines. If you want to connect to a serial port, I think the are other NodeRED components that will do that. You will need to split your serial data into lines.

              Put the lines into an "HGI80 parser" node. Put the output of that into a "decoder" node.

              You now have decoded messages! If you want, you can run them through an "InfluxDB formatter", and then put them into InfluxDB, but the schema will be the one I use which might not work for you.

              There are some large gaps between my components and Dan's Domoticz code. Most notably, hot water stuff and controller mode. But it also has some things that it handles better - like battery info.

              You'll also need a site config node, which just takes a giant JSON blob for now, because I didn't know what I'd want in the final version. It looks like this:

              Code:
              {
                  "controllers": [
                      "01:080777"
                  ],
                  "zones": {
                      "1": "Basement",
                      "2": "Conservatory",
                      "3": "Master Bedrm",
                      "4": "Lounge",
                      "5": "Study",
                      "7": "Downstairs",
                      "8": "Bathroom"
                  },
                  "devices": {
                      "04:025896": {
                          "zone": 4,
                          "name": "Lounge Rad - Back Wall"
                      },
                      "04:025900": {
                          "zone": 7,
                          "name": "Downstairs Rad - Breakfast Room"
                      },
                      "22:167017": {
                          "zone": 3,
                          "name": "Master Bedrm Thermostat"
                      },
                      "34:011457": {
                          "zone": 4,
                          "name": "Lounge Thermostat"
                      },
                      "34:011469": {
                          "zone": 5,
                          "name": "Study Thermostat"
                      }
                  }
              }
              The config appears to support multiple controllers, but it doesn't really!

              The decoded messages look like this:

              Code:
              {
                "original": "---  I --- 04:025896 --:------ 04:025896 30C9 003 0006FA",
                "parsed": {
                  "unk0": "---",
                  "type": "I",
                  "unk1": "---",
                  "addr": [
                    "04: 025896",
                    "--:------",
                    "04: 025896"
                  ],
                  "cmd": "30C9",
                  "len": 3,
                  "payload": "0006FA"
                },
                "decoded": {
                  "type": "ZONE_TEMP",
                  "device": {
                    "addr": "04:025896",
                    "type": "zone",
                    "name": "Lounge Rad - Back Wall",
                    "zone": 4,
                    "zoneName": "Lounge"
                  },
                  "zone": 4,
                  "zoneName": "Lounge",
                  "temperature": 17.86
                }
              }

              Comment

              • StuartP
                Moderator
                • Feb 2004
                • 81

                #8
                Got it working, looks great, a bit more tweaking of config needed.

                Comment

                • DanD
                  Automated Home Ninja
                  • Feb 2016
                  • 250

                  #9
                  Excellent! I hope my suggestion to try out the Python listener stuff didn't waste too much of your time. I still haven't found time to have a look at the dty's Node-RED Evohome implementation. I'm interested to hear what you think.

                  Comment

                  • dty
                    Automated Home Ninja
                    • Aug 2016
                    • 489

                    #10
                    Originally posted by StuartP View Post
                    Got it working, looks great, a bit more tweaking of config needed.
                    My NodeRED components? That's good to hear! I'd be keen to hear your feedback. I'm re-envigorated to develop it further, so could look at adding things.

                    Comment

                    • StuartP
                      Moderator
                      • Feb 2004
                      • 81

                      #11
                      dty, yup your NodeRed components, took very little time to figure out, more time working out device ID's.

                      Would love to be able to start controlling from NodeRed, but getting stuff graphed is the next step for me.

                      Comment

                      • dty
                        Automated Home Ninja
                        • Aug 2016
                        • 489

                        #12
                        Originally posted by StuartP View Post
                        dty, yup your NodeRed components, took very little time to figure out, more time working out device ID's.

                        Would love to be able to start controlling from NodeRed, but getting stuff graphed is the next step for me.
                        That super cool news!

                        Just using my InfluxDB component and then feeding that into a regular InfluxDB writer will get you 95% of the way there. Just add graphing with, typically, Grafana.

                        Comment

                        • ukhauk
                          Automated Home Jr Member
                          • Apr 2006
                          • 22

                          #13
                          I found this flow that converts to MQTT kindly contributed by hwijers

                          Let’s look at what is needed: Code to interact with the serial port (async I presume) Code to decode and encode binary messages Logic to submit the decoded data into HA and to receive events to communicate back GUI elements to view and interact with the system The things we could eventually do with interface: View temperatures, heat demand (per zone, valve and resulting overall value) Control zone temperatures (temporary changes only?) Link an outside temp source to the Evohome I can look ...


                          See the file HGI80USB_EvoHome_node-red_flow.txt.yaml

                          ** import content as node-red flow

                          Comment

                          Working...
                          X