No announcement yet.

Emporia Vue Energy Monitor and mqtt and Homeseer

  • Filter
  • Time
  • Show
Clear All
new posts

    Emporia Vue Energy Monitor and mqtt and Homeseer

    I have this monitor running now in my house and was looking for a way to get the data into Homeseer. The company says an API will be out sometime this year .

    We can start with the reverse engineered API. I feel this would be better than trying to use the Java app designed to import into InfluxDb


      Just came here looking for the exact same thing! Decent little energy monitor, but really awkwardly designed when you have to put it in your panel. Would be much better if you could change the length of the wires and if you could mount the unit outside the panel.


        When I did my energy monitoring many years ago I ran the wires from the clamps through the panel using the same technique as all other wires going into the panel. I mounted an Orbit irrigation box above the panel that received these wires. This box then was integrated with HS. It was my understanding in my jurisdiction that the panel was very limited as to the connections and electronics that could be placed inside the panel.


          I have added support for Emporia in The files are at the bottom of the change log at The complete description and step-by-step process is contain in Section 12.7.3

          I had difficulty trying to reverse engineer the AWS login so elected to use the Python code that was able to perform this function. When Emporia releases an official API then a direct login from the plugin should be able to be accomplished. The only additional burden with using the Python code is the package needs to be installed. It is described at From the command line/terminal windows the command "pip install pyemvue" is used to install the package.

          There is also a Python glue program AWSlogin that is attached where version is located. Unzip into the same location as pyemvue was installed. In my case it is C:\Python37-32\site-packages

          Click image for larger version

Name:	Capture2.JPG
Views:	0
Size:	0
ID:	1529988

          Click image for larger version

Name:	x.png
Views:	1467
Size:	128.1 KB
ID:	1529989


            Since the Emporia support at this time needs Python the install process is more involved. Confirmation that the install is correct can be done with the following test procedure. The need to confirm the correct install will be indicated as a 401 unauthorized error reported when trying to access Emporia cloud server.

            1. Confirm keys.json in the HS subfolder \data\mcsMQTT exists and updated with your account login info

            2. Open a command window and issue the following two commands. The first to navigate to where keys.json is located. The second to execute the pyemvue Python module.

            cd c:\Program Files (x86)\Homeseer HS4\data\mcsMQTT
            Python -m pyemvue keys.json

            There should be no errors reported on the command window and some positive feedback obtained such as
            Click image for larger version

Name:	x1.jpg
Views:	1454
Size:	20.7 KB
ID:	1530015

            3. If failure then revisit the install of pyemvue

            4. If success then do the same thing, but use the AWSLogin rather than pyemvue. This is what mcsMQTT is trying to execute.

            Click image for larger version

Name:	x2.jpg
Views:	1408
Size:	8.1 KB
ID:	1530016
            5. If failure then revisit the download and expansion of

            6. If success then confirm the path to python.exe is known by mcsMQTT. The default is C:\Python37-32\python.exe. Other locations are made know to mcsMQTT via \config\mcsMQTT.ini in the [General] section with key PythonPath=X:\Y\Z\python.exe where X, Y, Z and any other subfolder structure is specified. For Linux it will use the Linux file path convention.

            This interim method to login to the Emporia server is expected to be replaced in the future when the official API is released and the methodology for login is documented.


              Thanks Great work. I am getting devices now and they are changing. I do still get an error with the pyemvue keys.son command Click image for larger version

Name:	pyemvue.jpg
Views:	1433
Size:	52.8 KB
ID:	1530019

              but no error with the awslogin keys.json command


                I do still get an error with the pyemvue keys.son command
                I noticed the same error with pyemvue. In my development I had commented-out the offending line in the pyemvue project. Good you mentioned it here so others will know what to expect. Also congratulations on getting the Python environment setup to support this.

                You should be aware that the AWS tokens are valid for about an hour. The test procedure generates valid tokens that will be good for the first hour. mcsMQTT will need to regenerate them so pay attention after an hour to confirm that the integration is complete. If 401 returns then the most likely cause is the mcsMQTT.ini need for the path to python.exe (test step 6 above).

                Let me know if there is something else you would like in the integration. I was on the fence for reporting KwH, KW or W. During testing I found the 10 second update of the 1 Minute bucket to be the most useful, but others may want to use the data to show long term consumption of a circuit rather than a real time measure. I found the scale=1S to be too small for what I would use. If something is only ON for a few seconds then it cannot consume that much energy, but if one was going to trigger on some unusual condition then I can see where scale=1S would be appropriate.

                There are other types of information that is available from Emporia server such as their smart plugs. The full set of reverse-engineered API is at Additional features can be added by the user by using a publist for the endpoint rather than the actual endpoint in the Local Page, URL endpoint setup. This would allow multiple endpoints to be queried at each polling interval. The user would then need to select specific items of interest from the MQTT Page, Association Tab with the "A"ssociate column checkbox. With Emporia's use of JSON array notation there will be redundant entries in the Association table, but only one is needed to associate with HS Device Feature.


                  The 401 error did not return even though the pyemvue keys.json error remains and the devices are updating just like the phone app.
                  This is a great system. Much better than Sense and much cheaper than Brultech. I will purchase another unit for my other panel at this house and probably add it
                  with a different email address as the user. Thanks again for your hard work.


                    You will want to keep the same account for both installations since only one unique URL is used to access data for all Emporia customers and installations. The endpoint will need to be edited to include two deviceGid. I will also need to provide an update to the plugin where the deviceGid becomes part of the identification of the HS Device so each deviceGid will be a Device and the circuit names the Features of the Device.

                    The endpoint format for multiple deviceGid is ...deviceGids={deviceGid1}+{deviceGid2} ... while the template you have been using is ...deviceGids={deviceGid1} ...


                      So I should use the same username and password for the second panel at this house ? but I am not sure how Emporia handles two panels on the same login.
                      Also I will need two more at another home when I change to that location.


                        I imagine that Emporia has an App and that App likely shows multiple grids on the same login. This is based upon the reverse-engineered "deviceGids={deviceGid1}+{deviceGid2}" that I see. This would seem more natural for a user rather than having multiple logins. It may be appropriate to contact Emporia to clear this up.

                        From the plugin perspective, the URL is the method by which unique access is managed. It does not now have provisions with the same URL and different login credentials. I can accommodate whatever Emporia uses, but a single login is preferred.


                          Today the wattage numbers are not the same as in the phone app. Here is a screenshot. The Awslogin is till ok. The keys.json file has changed by itself.
                          I specifically noticed the towel warmer which should usually be around 224 watts on low. Any thoughts ? Click image for larger version

Name:	Newemporia.jpg
Views:	1419
Size:	50.9 KB
ID:	1530486


                            keys.json will change every hour or so as the access token expires and needs to be refreshed.

                            The KwH reading provided by Emporia can be viewed on the MQTT Page, Association tab. It will update every 10 seconds if 10000 is the URL page setting for polling rate. It is converted to Watts based upon the scale which by default is 1MIN so the conversion is 60,000 Watts/KwH (60 minutes/hour * 1000 Watts/KiloWatt). If the towel warmer is being shown in HS as 4 watts then the KwH reading from Emporia should be 6.667E-5.

                            The scale=1MIN is part of the URL tab Endpoint. The 60,000 conversion is on the Edit tab of the device in the Expression text box (click on the Ref for the device on the Association tab to view the Edit tab)

                            If the towel warmer should be around 240 watts then Emporia should be showing over the past 1 minute a KwH value of 240 watts / 60 minutes / 1000 W/KW = 0.04 KwH on the MQTT Association table.

                            What are you seeing on the Association Table for the towel warmer?


                              Click image for larger version

Name:	tow.jpg
Views:	1398
Size:	12.0 KB
ID:	1530510 The first 2 days it was set up the Association Table was the same as the phone app displayed as watts