Is Xively fully functional

12 replies [Last post]
kema01
Offline
MAIDSTONE, United Kingdom
Joined: 8 Jul 2013

I would be very grateful if someone could confirm Xively is fully functional. I have read on the forum that there have been some issues with Feed ID number of 10 digits and graphs not working. I have just set up Xively for the first time and run into a problem.

Please note I am a relative novice to HAH.

My problem is once the data is up loaded to Xively (5 different 1 wire temperatures) they are registered and seen on Xively, but after a while, all uploaded data is the same as the first. i.e. same temperature straight line graphs. Each Xively Graph says “Last updated a few seconds ago”, so one would assume with the latest data, but it’s not. Bizarrely if there is a major change in temperature this is then uploaded ok, but again after a while this gets stuck on the same value.

I have observed the following:-

If you are issued with a 10 digit Feed ID and enter this into the Xively Web interface and “save” the configuration, only 9 digits are visible. The LSD is missing and HAH WEB I/F Graphs do not populate. If you are issued with a 9 digit Feed ID all appears to be OK including graphs.

I have to reboot the HAH to get the uploading process started. Saving then Restarting do not have this affect.

Also while configuring the Xively my HAH configuration has been corrupted a number of times. I have seen on the forum, that I am not the only one to have experienced this.

HAH ver 310/3.4

 

Many thanks. 

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
FeedIDs need some attention

Thanks for the detailed info.

I've been a Pachube/Cosm/Xively user, so my experience (as a 'legacy' user) might be different from yours.

As you mention, there is an issue with the 10digit FeedID. I created a new FeedID and was assigned a 10 digit one. The ID was entered on the HAH UI and correctly stored to the xap-livebox.ini file.

However, subsequent display on the HAH web UI was truncated to 9 digits. Also, the HAH graphing was broken for the same reason. 

All looks good on the xively site. Graph updating and data points as expected.

I've raised a code issue https://code.google.com/p/livebox-hah/issues/detail?id=50 for the 9/10 digit piece.

Do keep a backup of your xap-livebox.ini - it's a textfile, so easy to work with.

Less sure of the 'not the latest data' issue that you report. You might run the xively service in debug mode (-d6 is a reasonable level) to see what it's actually posting to the xively service.

Cheers,
Derek.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
I've pushed a beta to see if

I've pushed a beta to see if this will fix the xively issue.  Try 310.1

Brett

kema01
Offline
MAIDSTONE, United Kingdom
Joined: 8 Jul 2013
Xively fully functional update

Derek / Brett

Many thanks for your quick responses to my post.

I have loaded 310.1 and have found the following:-

10 digit Xively Feed ID and HAH WEB I/F Graphs seem to be OK now.

 

My problem with the plotted temperature staying the same, if there is no significant rise or fall at the temperature sensor is still an issue.

I would be very grateful if someone could explain how I set up debug 6 mode for Xively and where I find the subsequent data. I will then be able post this back to the forum.

Many thanks.

garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
Have you set a large

Have you set a large hysteresis on the temp sensors?. Do you see xap messages showing different temps than on xively?  If it says updated on web then hah is sending data, need to understand if it's missing data or data not generated in first place. 

 

Garry

brett
Offline
Providence, United States
Joined: 9 Jan 2010
A little background on the

A little background on the operation of the xap-xively feeder.
The temperatures sensors are generating an event on every .1 of a change, however data to xively is only pushed every 1 minute.  The way this timing difference is resolve is for xap-xively to monitor all the events and constantly update its internal cache to record the value.  When the time comes to push a new reading to xively the last value from each sensor is pushed up.

If you temperature hovers from 15.5->15.8->15.5 its possible that 15.8 won't be see if this wasn't the latest value.   You're temperatures reading have to change and hold  for at least a minute before you'll see something different being reported to xively.

If this isn't your issue then at least are know aware of the way in which is must operate.

Possibly xively should monitor all readings between its reporting cycles and push the average of all value seen in that time. So in my example (15.5+15.+15.5)/3 = 15.6

How to run in debug mode.

At the command line you can manually start a process but first you must stop the process so you can restart it.

# kill xap-xively
# xap-xively -i br0 -d 6

For example you will see a 1-wire sensor constantly reporting in until such time as xively determines it time to push the latest value up.  For me I see this.

[inf][dscache.c:87:addFeed] Adding Feed 1970985268
[inf][dscache.c:109:updateDatastream] feed=1970985268, id=0, tag=Office - Temp, value=28.40
[inf][dscache.c:109:updateDatastream] feed=1970985268, id=0, tag=Office - Temp, value=28.30
[inf][dscache.c:109:updateDatastream] feed=1970985268, id=0, tag=Office - Temp, value=28.40
[inf][dscache.c:109:updateDatastream] feed=1970985268, id=0, tag=Office - Temp, value=28.30

kema01
Offline
MAIDSTONE, United Kingdom
Joined: 8 Jul 2013
Update 2

Garry I think you have cracked it. I had the 1 wire hysteresis set to 1.0. I have now set it to 0.0 and Xively is being updated continuously as expected, fantastic.

Brett thank you for the explanation on the Xively process and debug procedure.

Should the 1 wire temperature hysteresis have any affect on how Xively is updated?  

 

In the future I hope to use one of the 1 wire sensors to control my central heating and was going to use a hysteresis of 1.0. This may not be possible if the above is the correct operation of how Xively is updated. 

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
How xap-xively feeds

The xap-xively service watches out for xAP messages that conform to the 'source' and 'class' filters that you setup on the 'Xively' tab on the HAH UI. When it finds a match, it pushes up the data as described by Brett.

If you specify a hysteresis on the 1-wire setup, you are effectively asking for the suppression of xAP messages that represent a smaller increase/decrease than the hysteresis value. No messages = nothing for xap-xively to catch. You can see the code for this at https://code.google.com/p/livebox-hah/source/browse/trunk/userapps/hah/xap-livebox/ini.c#84

If you want xively to be updated with 0.1C changes, then don't specify a hysteresis on the 1-wire setup. You can develop your own Plugboard script that applies your own hystersis value (or some sort of moving average) as part of the overall control for your heating.

Also, remember that the DS18B20 parts have an accuracy of +/- 0.5C  Two DS18B20s, sitting side by side, will often give different readings.

Cheers,
Derek.

kema01
Offline
MAIDSTONE, United Kingdom
Joined: 8 Jul 2013
This make’s sense now

Derek

Many thanks for your explanation, this make’s sense now.

While I have been experimenting with Xively, I decided to try the Xively Relay on/off (1/0) option, but could not get this to work. I followed the wiki as below but to no avail. I would be very grateful if someone could confirm this is working.

xap-xively can also handle a ON/OFF value and this will be automatically convert to a 1/0 so the numeric value can be logged, this is handy for relays, rf, and other boolean input/output devices. 

The xively parameters 

§  source - dbzoo.livebox.Controller:relay.3

§  class - xAPBSC.event

§  section - output.state

§  key - state

 

 

Many thanks

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
ON/OFF works, but with a slight quirk

I setup a feed to monitor a relay, just as you described. Restarted the xap-xively service. Didn't see any sign of the relay state in the messages being posted to xively.

Then, I used the HAH UI to toggle the relay. After doing this, the relay state was included in the xml feed to xively. 0.00 for off and 1.00 for on.

This behaviour is consistent with the 'data cache' (that is used to track endpoint values) being empty. We are, after all, filtering on 'events' and until the relay changes state there are no xAP events to catch.

However, it might be better if the cache was initially populated via a query.

I'll have a chat with Brett & see where we want to go on this one.

Cheers,
Derek.

kema01
Offline
MAIDSTONE, United Kingdom
Joined: 8 Jul 2013
My Mistake

Hi Derek

Many thanks for spending the time looking into this for me. Now you have confirmed it is fully functional. I have rechecked my configuration and now it is working.

I had two problems one was a corrupted INI file while I was testing and the other was finger trouble I had an upper case “R” in relay.

Even though I have made some silly mistakes, in my quest to understand the functionality of the HAH, I am very pleased with the knowledge I have built up in the few months of having the Hub. I now have my central heating being turned on and off google calendar, my Burglar and Fire alarm systems able to send me a text via twitter, I even have Android app. As discussed, in the near future I would like to add a adjustable thermostat (I will probably need some help in writing the applet) followed by a Boost button to turn heating/water. Currently waiting for Currentcost EnviR to arrive.

I am thinking of purchasing a Jeenode and experiment with this. I may get my children to buy this as a Christmas present for me.

Many thanks again to you, Garry and Brett for helping me with this.

 

 

garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
Glad your getting on well

Glad your getting on well with it all.

i also use a script for thermostat setting so can send you my implementation for examination if you'd like.

when you say your purchasing a jeenode, I assume you meant HAHnode from the shop ;)

On a serious note though, these are great when you get into them, I use them now for switching relays on my heating and water. Very reliable, wireless and remote. Perfect.

Brett and Derek really have built a do everything box here, just needs some dedication to understand it all!

 

G.

kema01
Offline
MAIDSTONE, United Kingdom
Joined: 8 Jul 2013
Yes please

Garry many thanks for the message, yes I would be very grateful if you could send me your script/applet regarding the thermostat. Any help in getting me started would be much appreciated. My programming skills are still very much in their infancy. I have looked on the forum but have not seen a demo applet for a thermostat.

I’m sure that everyone who has a thermostat will have a different way of implementing it.

 

Many thanks

Hardware Info