Announcement

Collapse
No announcement yet.

Sense Energy Integration

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Sense Energy Integration

    I have been working with jindala to integrate Sense Energy data with Homeseer via mcsMQTT plugin. I have confirmed that I have access to all the data on the Sense Energy server but it not clear to me what data may be of interest to users for exposure to HS. There is way too much data to expose everything. Of course things can be changed later, but it is best if inputs and discussion exist early in the development rather than after it has been released.

    #2
    Michael,

    Following, that would be great. I have a Sense and while I'm not sure exactly what might be available, I'd be interested in things like the top 5, the total average and current home load, the 'Always On' category as I have a lot of UPS connected devices and Sense can't see past the UPS so it just classifies it as Always On. In my case, it's a combination of home servers, the HA wall, the AVR and entertainment center and I'm sure some vampire loads. I sit around 1HWH of Always On or about 25KW/Day with everything that's manual turned off.

    Triggers based on thresholds would be great so one can monitor or record high usage or even failed loads.

    Comment


      #3
      Known availability from the Sense server are feeds for realtime, devices, status, usage history, trends, and timeline. When one of each type is enabled I obtain more than 1000 decoded JSON items. If you would like to observe for yourself, the file http://mcsSprinklers.com/MCSMQTTHS4_52000.zip contains the delta from mcsMQTT Updater release of 5.19.1.0. One goes in the \html\mcsMQTT folder. The other two go in \bin\mcsMQTT folder. The mcsMQTT Cloud page, Sense tab has the setup where email and password are setup and polling rate (milliseconds) are entered. I used 60000 for my testing. There is a radio to enable/disable and checkboxes to select the specific feed that should be included. Returned data is parsed on the Association tab and raw JSON is available in the mcsMQTT debug log when debug is enabled.

      I envision that the plugin will do some number crunching to get something more usable than the raw data. This is where discussion is needed as to what data is useful and what is not. The 5.20.0.0 version is preliminary as a means to download data. I do not expect the table of feeds to exist in the completed sense integration. All data download is managed under the pseudo topic of "sense/". After testing this data can be removed from mcsMQTT from the General tab, obsolete row using sense/# in the text box. Of course backups before updating should be done. This version also contains a new technique for managing concurrent use of data that should be transparent to the user.

      Click image for larger version

Name:	Capture.JPG
Views:	360
Size:	41.3 KB
ID:	1495070

      Comment


        #4
        Triggers based on thresholds would be great so one can monitor or record high usage or even failed loads.
        If devices are created for "high usage" then it is per sense device or is it for the wattage overall? When do the high values get reset so the next peak will be able to be recorded? I can see where the reset may want to be tied into being controlled via HS so that after a trigger & report occur the device is reset. The subsequent question is then how long after the peak is detected is the reset prohibited so that the same peak period will not retrigger the event?

        How is a "failed load" identified?

        What are reasonable polling rates to get the data for the monitoring that is desired?

        I sit around 1HWH of Always On or about 25KW/Day with everything that's manual turned off.
        Does Sense provide Watt-Hr data. mcsMQTT can already direct data identified as watt-hrs to be put in the HS energy database. The JSON fields from Sense are names "w" and assume this is watt and not watt-hr. The general question is what is the "unit" of the "w" reported by Sense?






        It seems like the only things of interest are some form of the Wattage being reported and this is from the realtime feed. I extracted just the wattage readings and repacked so the real time feed looks like the following with name and the wattage being the only entries.


        Click image for larger version

Name:	Capture.JPG
Views:	337
Size:	92.2 KB
ID:	1495220

        Comment


          #5
          This is great.. I also have some TP link devices which are able to report to sense. Sense can't identify everything. So for example I want to identify my living room usage for TV and entertainment system, I attached a TP link HS110, and now that is getting recorded as a named device. So sense identifies many items, and then what I really wanted to be recorded, I had those items connect through TP HS110. Ultimately you would like to know the just in time stuff, like what is currently consuming power, then if I click on a device then it tells me what it has consumed over a period of time.

          One question, does this have changes you made for WaterFurnace also? Or If I update this then the WaterFurance changes (increasing the # of topics) will go away?

          Comment


            #6
            One question, does this have changes you made for WaterFurnace also? Or If I update this then the WaterFurance changes (increasing the # of topics) will go away?
            Sense Energy integration is an addition to all prior integrations so something like WaterFurnace would not be affected.

            Ultimately you would like to know the just in time stuff, like what is currently consuming power, then if I click on a device then it tells me what it has consumed over a period of time.
            Post #4 above shows on a device by device basis what is being reported in the set of "w" fields that comes from the realtime feed. I can see that there is redundant information such as d_solar_w, solar_w and solar watts reports at 4086. A further reduction of data is needed so that only one of each type is shown.

            The usage-over-time feed can be requested with various resolutions (e.g. hour, day, etc.) and it is possible to specify the length of time over which usage data will be provided. When clicking on the device I suspect that the same resolution and period of time will be used each time. The user can setup what these parameters will be.

            Data is returned from the Sense server as a 4-tuple for each point in time such as [1211,8767,-12618,21]. I do not understand (yet) how to use this data. I suspect it represents the total usage over all devices rather than a specific device. I do not know (yet) how to change the usage request to the server to ask for a specific device. Somebody that uses the Sense Energy smartphone App may be able to provide some insights into what the 4-tuple means and what kind of parameters involved in requesting different charting options with the App.

            Comment


              #7
              I do have sense app, how can I know what data is being sent and received from my app?

              Comment


                #8
                You will not be able to see it directly and if a network packet capture is used the data will be encrypted since it is a https communication. If it not obvious of what the 4-tuple could be based upon looking at the app then likely the App will not help much.

                Comment


                  #9
                  Good news. The trends feed rather than the history usage feed has the data that can be used to show total and individual device usage. No longer need to worry about the 4-tuple data. I believe I have what I need for the plugin. It will use the realtime feed for current utilization and the trend feed based upon a user selection option for the period of interest.

                  Comment


                    #10
                    Look at this thread..

                    https://community.sense.com/t/official-api/2848/101


                    In the attached pic I could see the wattage and the name of the device. But I am not sure why sometimes it comes directly under Sub: sense/usasge/42569:03:sd:w (this is for my Rig1) , the name is Sub: sense/usasge/42569:03:name=Rig1. Then other one is Sub: sense/usasge/42569:02:name=Other and its wattage is Sub: sense/usasge/42569:02:w=1173.xxx

                    Second picture for the sense/usasge/42569:03:sd:w is the correct one, don't know the difference between the sense/usasge/42569:03:a0_w and sense/usasge/42569:03:sd:w.
                    Attached Files

                    Comment


                      #11
                      One more thing I noticed is that when I go to MQTT and associations page, I do see sense data, but I don't see anything to filter Sense only data on that page.

                      Comment


                        #12
                        The 5.20.0.0 version of the pluign was only made available so that users of Sense could see the data that is available and participate in a more informed way in this thread. Now that I know what data is useful and what is not there will no longer be the raw data visible on the Association tab. The only data that will be provided is the wattage consumption for each sense-detected device and some other selected devices that users find useful such as perhaps the % solar.

                        I would not do any more with 5.20.0.0 and wait for the next update which will closer to a releasable version of the plugin.

                        To answer the question about the filter ...

                        The Association Filter table has two buttons at the top. One to clear and one to rebuild. If new topics have been received they can be included in the filter list by using the Rebuild button.

                        Comment


                          #13
                          Originally posted by Michael McSharry View Post
                          The 5.20.0.0 version of the pluign was only made available so that users of Sense could see the data that is available and participate in a more informed way in this thread. Now that I know what data is useful and what is not there will no longer be the raw data visible on the Association tab. The only data that will be provided is the wattage consumption for each sense-detected device and some other selected devices that users find useful such as perhaps the % solar.
                          Is this only for HS4? I can't see it on any of the HS3 sections. If not, then I'm sure there are a certain amount of people that will be left out in the cold.

                          Comment


                            #14
                            I need to first develop the plugin integration with one version and when it appears to be working then I port to the other. Since I thought @jindala was using HS4 I started with the HS4 version. I did not want to do interim HS3 version. Now that I believe I have broken the code on what data feeds contain data of interest there is not too much need for users to see the raw data that is available. I can leave the ability to get the devices, status and timeline feeds as user option, but I do not intend to customize these as I am doing for realtime and trend data. Of course if there is something in these that could benefit from additional logic then they can be discussed later.

                            I have questions in post #4 based upon your prior input and it would be nice to get your thoughts.

                            Comment


                              #15
                              Discussion for both HS3 and HS4 is continued at mcsMQTT 5.20.0.1 [HS3 & HS4] Sense Energy , GW100 derived sensors, Concurrency Mgmt - HomeSeer Message Board

                              Comment

                              Working...
                              X