It is currently Fri Jul 21, 2017 12:40 pm



Welcome
Welcome to britishgashive

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!





 Page 1 of 2 [ 14 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: JSON feeds
PostPosted: Sat Oct 26, 2013 9:25 pm 
Site Admin

Joined: Thu Oct 24, 2013 11:28 am
Posts: 80
Has thanked: 1 time
Have thanks: 7 time
Ok, so I've started looking at how the hivehome website hangs together and discovered a few usefull json feeds.

All of these only work once you're authenticated to the hive app:

https://www.hivehome.com/myhive/heating/controls
https://www.hivehome.com/myhive/heating/target
https://www.hivehome.com/myhive/hotwater/controls
https://www.hivehome.com/myhive/hotwater/schedule
https://www.hivehome.com/myhive/history/today
https://www.hivehome.com/myhive/history/yesterday
https://www.hivehome.com/myhive/history/thisWeek
https://www.hivehome.com/myhive/history/lastWeek
https://www.hivehome.com/myhive/history/thisMonth
https://www.hivehome.com/myhive/history/lastMonth
https://www.hivehome.com/myhive/history/thisYear

The primary one I've been looking at is the last one which show todays history of temperature readings on an hourly basis all returned in json format similar to the following:

{"data":[{"date":"2013-10-25T23:00:00.000Z","temperature":21.55},{"date":"2013-10-25T23:30:00.000Z","temperature":21.45},{"date":"2013-10-26T00:00:00.000Z","temperature":21.35}



_________________
Installation Type: Hive Active Heating
Installation Date: 25/10/2013
Offline
 Profile  
 
 Post subject: Re: JSON feeds
PostPosted: Sun Nov 17, 2013 10:22 pm 

Joined: Sun Nov 17, 2013 10:21 pm
Posts: 13
Has thanked: 0 time
Have thanks: 0 time
now get this message?
Oops!
Thanks for your patience – something went wrong, please go to our homepage


Offline
 Profile  
 
 Post subject: Re: JSON feeds
PostPosted: Sun Nov 17, 2013 10:28 pm 
Site Admin

Joined: Thu Oct 24, 2013 11:28 am
Posts: 80
Has thanked: 1 time
Have thanks: 7 time
bladerunner wrote:
now get this message?
Oops!
Thanks for your patience – something went wrong, please go to our homepage


Ok, can you give me some more information on this and I'll see what I can help you with.

Has this ever worked for you?
What URL's are you trying?
Which browser are you using?
etc,etc,



_________________
Installation Type: Hive Active Heating
Installation Date: 25/10/2013
Offline
 Profile  
 
 Post subject: Re: JSON feeds
PostPosted: Mon Nov 18, 2013 9:43 am 

Joined: Sun Nov 17, 2013 10:21 pm
Posts: 13
Has thanked: 0 time
Have thanks: 0 time
hi,

oops error code 406

https://www.hivehome.com/myhive/heating/controls
https://www.hivehome.com/myhive/heating/target


all history links work though.

I don't have hot water controls.

Those links never worked- I just got my Hive last week

Using Debian/Chrome


Offline
 Profile  
 
 Post subject: Re: JSON feeds
PostPosted: Mon Nov 18, 2013 9:44 am 

Joined: Sun Nov 17, 2013 10:21 pm
Posts: 13
Has thanked: 0 time
Have thanks: 0 time
which link can show whether heating on or not?


Offline
 Profile  
 
 Post subject: Re: JSON feeds
PostPosted: Mon Nov 18, 2013 10:59 am 

Joined: Mon Oct 28, 2013 12:52 pm
Posts: 3
Has thanked: 0 time
Have thanks: 0 time
Hi bladerunner,

You'll need to add a header of "X-Requested-With: XMLHttpRequest" to those requests in order to get the JSON. If you hit them directly in the browser then you'll see an error page as you report.

Also, if you hit /myhive/heating/controls then you will get a control property of "OFF|MANUAL*|SCHEDULE" depending on the current state of your heating. (* MANUAL = always on). If you are looking to find out whether your boiler is firing at that exact moment, then we don't provide access to that information at the moment.


Offline
 Profile  
 
 Post subject: Re: JSON feeds
PostPosted: Mon Nov 18, 2013 12:23 pm 

Joined: Sun Nov 17, 2013 10:21 pm
Posts: 13
Has thanked: 0 time
Have thanks: 0 time
thanks for the reply ahivedev.

but isn't there a way to read whether the flame symbol is being displayed on the interface?

surely that's an indicator of whether the boiler is on ??


Offline
 Profile  
 
 Post subject: Re: JSON feeds
PostPosted: Mon Nov 18, 2013 8:39 pm 
Site Admin

Joined: Thu Oct 24, 2013 11:28 am
Posts: 80
Has thanked: 1 time
Have thanks: 7 time
bladerunner wrote:
thanks for the reply ahivedev.

but isn't there a way to read whether the flame symbol is being displayed on the interface?

surely that's an indicator of whether the boiler is on ??


I've been doing some final tweaks to my apps and I must agree, it would be good to have a HW/CH on/off status in there. Question to the Hive Dev's, any chance of exposing a JSON endpoint with this information at all?

{"heating":"ON","hotwater":"OFF"}


Any future plans for this, or some alternative way of getting this status?



_________________
Installation Type: Hive Active Heating
Installation Date: 25/10/2013
Offline
 Profile  
 
 Post subject: Re: JSON feeds
PostPosted: Mon Nov 18, 2013 9:04 pm 

Joined: Sun Nov 17, 2013 10:21 pm
Posts: 13
Has thanked: 0 time
Have thanks: 0 time
So I can successfully capture and store the target temperature in a database now - thanks for the tips..

How can I retrieve the current temperature though??


Offline
 Profile  
 
 Post subject: Re: JSON feeds
PostPosted: Mon Nov 18, 2013 9:54 pm 
Site Admin

Joined: Thu Oct 24, 2013 11:28 am
Posts: 80
Has thanked: 1 time
Have thanks: 7 time
bladerunner wrote:
So I can successfully capture and store the target temperature in a database now - thanks for the tips..

How can I retrieve the current temperature though??


Ok, what are you using to retrieve the target temperature? and does it cater for manual changes at the thermostat itself?

As for current temp, you can use the following URL:

https://www.hivehome.com/myhive/weather

returns in JSON format again.



_________________
Installation Type: Hive Active Heating
Installation Date: 25/10/2013
Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 2 [ 14 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

cron

suspicion-preferred