This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

[TUT] How to get data from your Homewizard and use it in Homey, also the 868 sensors!

RocodamelsheRocodamelshe Member
edited March 2017 in Ideas & Suggestions
Here is how to get data from ur Homewizard, also 868!
Needed for this setup is: Homey, Homewizard, the HTTP app and the Better Logic app, from the appstore.

First we make a Number variable in the Better Logic app. In this case it is called "Buitentemp" but call it whatever u like.



Then we make a flow to get the data from the Homewizard.



In the right colom card we put this on the left side:
http://IPHOMEWIZARD:PORT/PASSWORDHOMEWIZARD/get-sensors
In the middle we put:
$.response.thermometers[2].te
And to the right we put the name of the number variable u just made in the Better Logic app, in this case "BuitenTemp"
BuitenTemp

Now we get the outside temperature from the Homewizard every 10 minutes and u can use tags to make flows like:



We can also do this with other data like maximum outside temperature, minumum outside temperature and even the time it was the coldest.
Make sure to make a number variable for every data thingie u want.
To achieve this we make the same flow as stated above but with other things in the right colom.

For maximum outside temperature we use in the middle:
$.response.thermometers[2].te+
------------------
For the minumum temp we use in the middle:
$.response.thermometers[2].te-
----------------
For the time it was minumum temperature we use in the middle:
$.response.thermometers[2].te-t
---------------
And guess what: for the time it was max temperature we use in the middle:
$.response.thermometers[2].te+t
-------------
Don't forget to make a number variable for each data thingie !!!

We can also find windspeed (Guess i don't have to tell u will need a windmeter for this):
$.response.windmeters[0].ws
-----------------
Or windchill (gevoelstemperatuur):
$.response.windmeters[0].wc
-----------------

Ok, one catch: For the peeps that was making flows alr and it didn't work:
u will have to put the http://IPHOMEWIZARD:PORT/PASSWORDHOMEWIZARD/get-sensors  in ur browser to find the number of ur temp sensor. In my case this is the [2] in the above lines. BUT!! When we have 3 thermometers in Homewizard, we start with 0. Then 1. then 2. When u put this line in ur browser and look for "Thermometers"  they have an "ID". This is NOT the number we are using!!! We use the counting as i just told u. So when it is the 2nd thermometer we call it 1!!
As stated: first is called 0, 2nd is called 1, 3th is called 2. No matter what ID they have!!

Now we can also make some flows (With the use of the tags)  like asking if it was below 0 last night and get the answer with yes but also with the minimum temp AND the time it was that low:



Plz have fun with this and ask away if i did not make myself clear. No offence to the guys from the Homewizard app, they are doin a very good job!
This is just a way i do it and want to share with u guys.


Comments

  • EternityEternity Member
    edited March 2017
    @Rocodamelshe

    Great tutorial, that I am using to get data from my Domoticz setup into Homey!

    Could you help me. What do I put in the 'middle' to get the value "CounterToday" : "5.475 m3" ?


    The data I see in a web browser looks like this:

    {
       "ActTime" : 1490604488,
       "ServerTime" : "2017-03-27 10:48:08",
       "Sunrise" : "07:27",
       "Sunset" : "20:05",
       "result" : [
          {
             "AddjMulti" : 1.0,
             "AddjMulti2" : 1.0,
             "AddjValue" : 0.0,
             "AddjValue2" : 0.0,
             "BatteryLevel" : 255,
             "Counter" : "4337.835",
             "CounterToday" : "5.475 m3",
             "CustomImage" : 0,
             "Data" : "4337.835",
             "Description" : "",
             "Favorite" : 1,
             "HardwareID" : 11,
             "HardwareName" : "P1 Smart meter",
             "HardwareType" : "P1 Smart Meter USB",
             "HardwareTypeVal" : 4,
             "HaveTimeout" : false,
             "ID" : "1",
             "LastUpdate" : "2017-03-27 10:45:49",
             "Name" : "Gas verbruik",
             "Notifications" : "false",
             "PlanID" : "0",
             "PlanIDs" : [ 0 ],
             "Protected" : false,
             "ShowNotifications" : true,
             "SignalLevel" : "-",
             "SubType" : "Gas",
             "SwitchTypeVal" : 1,
             "Timers" : "false",
             "Type" : "P1 Smart Meter",
             "TypeImg" : "counter",
             "Unit" : 2,
             "Used" : 1,
             "XOffset" : "0",
             "YOffset" : "0",
             "idx" : "60"
          }
       ],
       "status" : "OK",
       "title" : "Devices"
    }
    
  • In this thread @Phuturist gave the answer :-)

    I entered $.[result][0][CounterToday] and that updated my Better Logic variable
  • Very nice!
  • mbalik79mbalik79 Member
    edited March 2017
    @Rocodamelshe

    Can I use this also with the readings of the "meterstanden" out of the homewizard-energylink? To store these in a betterlogic variable?

    http://x.x.x.x:x/password/el/get/0/readings
  • RocodamelsheRocodamelshe Member
    edited March 2017
    Don't have that myself but my guess is that will work also. Cannot provide u the lines tho but maybe some1 with the enrgylink can? Maybe u can post a screenie of the data u get when u put that url in ur browser? Maybe the line @Eternity is using will also fit urs

  • Ok..thanks..I only don't get the right json path ..The get part is working. I can post the output file of the result overhere, maybe you can help to create the json-path?
  • Edited my post above urs
  • mbalik79mbalik79 Member
    edited March 2017

    This is the output I get when typed in the browser
  • @Rocodamelshe

    Could you help me with this one?

    "response":
     [{"type":"electricity","tariff":1,"consumed":3990.171,"produced":931.571},{"type":"electricity","tariff":2,"consumed":3869.331,"produced":2125.495},

    with the JSONPath expression below I get the consumed data from tariff 1 and 2. How can I only get it from tariff 1?

    $.response[?(@.type=='electricity')].consumed

  • RocodamelsheRocodamelshe Member
    edited March 2017
    Maybe something like:   $.response[?(@.type=='electricity')][2].consumed     ?
    Somehow u have to tell him he needs to use 1 or 2

  • Yes I know..but could not find the method yet...  :)
  • Small remark: You'll also need the HTTP app for this <span>:wink:</span>

  • Have it working... @ErikVanDongen (app was already in use)  ;)

  • Small remark: You'll also need the HTTP app for this <span>:wink:</span>

    Added to the main post, very sharp!

    mbalik79 said:
    Have it working... @ErikVanDongen (app was already in use)  ;)

    Can u share the lines u used to make it work?
  • @Rocodamelshe

    Here are the lines which are reading out the "meterstanden" from the slimme meter thru the homewizard-energylink.

    I used flowcard A22 of the http-app:


    Left columhttp://homewizard-ip:portnr/homewizardpw/el/get/0/readings 


    In the middle:

    $.response[?(@.type=='gas')].consumed -> gas-meter

    $.response[?(@.tariff==2)].consumed → meter verbruik HOOG

    $.response[?(@.tariff==1)].consumed → meter verbruik LAAG

    $.response[?(@.tariff==1)].produced → teruggeleverd LAAG

    $.response[?(@.tariff==2)].produced → teruggeleverd HOOG


    Right colum:

    the betterlogic number variable in which the data must been stored

  • Thnx for sharing @mbalik79
  • rsomers61rsomers61 Member
    edited June 2018
    I can't connect to homewizard.

    HomeWizard Configuration:

    IP:192.168.1.100
    Port:80
    Serial Number:
    Firmware:3.403-3.50C
    Update available:no
    Time Information:2018-6-26 13:47 
    (7069)
    Tried it with and without port#

    Error: no response

    I get a reply while I place a ping
  • So what happens when u put http://IPHOMEWIZARD:PORT/PASSWORDHOMEWIZARD/get-sensors
    in ur browser?
Sign In or Register to comment.