Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
livebox:pachube [2013/06/17 06:11] – Doing the xively shuffle brett | livebox:pachube [2014/11/08 09:35] – [feed attribute] brett | ||
---|---|---|---|
Line 10: | Line 10: | ||
{{: | {{: | ||
- | Once you have a XIVELY account you will get a unique KEY. This must entered into the interface so that trust is formed between the Livebox and the service. | + | Once you have a XIVELY account you will get a unique KEY. This must entered into the interface so that trust is formed between the Livebox and the service. |
The Max and Min values are used by xively to perform graph scaling along with the Unit field to annotate the datastream. | The Max and Min values are used by xively to perform graph scaling along with the Unit field to annotate the datastream. | ||
+ | |||
+ | ===== The operation of the xap-xively feeder ===== | ||
+ | |||
+ | Let's consider an example of pushing a 1wire temperature sensor data value to Xively. | ||
+ | |||
+ | The temperatures sensors are generating an event on every .1 degree of a change, however data to xively is only pushed, by default, every minute. | ||
+ | used. | ||
+ | |||
+ | If your temperature hovers from 15.5-> | ||
===== Sample mapping ===== | ===== Sample mapping ===== | ||
Line 69: | Line 78: | ||
Its internal cache of data to push to XIVELY can be updated by xAP messages being targeted at this service. | Its internal cache of data to push to XIVELY can be updated by xAP messages being targeted at this service. | ||
- | Messages sent to it are not immediately forwarded to the XIVELY service. They wait until the next update cycle. | + | Messages sent to it are not immediately forwarded to the XIVELY service. They wait until the next update cycle, unless the **now** attribute is supplied more on that later. |
A Xively update message looks like this: | A Xively update message looks like this: | ||
Line 91: | Line 100: | ||
In the message above | In the message above | ||
- | * The id= key matches that of the ID field in the datastream for the default Feed ID. | + | |
- | * The tag=key updates the tag value of the datastream identified by the ID key/field | + | * The tag=key updates the tag value of the datastream identified by the ID key/field |
- | * The value updates the value of the datastream identified by the ID key/field | + | * The value= updates the value of the datastream identified by the ID key/field |
The configuration page on the HAH xively tab is unaffected | The configuration page on the HAH xively tab is unaffected | ||
Note that the UID and source in the message above must either both have sub-addresses or neither have sub addresses | Note that the UID and source in the message above must either both have sub-addresses or neither have sub addresses | ||
+ | |||
+ | ==== now attribute ==== | ||
+ | |||
+ | This is an optional attribute. | ||
+ | |||
+ | If you require the manual feed to update xively immediately the xively.update is sent supply the attribute " | ||
+ | |||
+ | < | ||
+ | datastream | ||
+ | { | ||
+ | id=4 | ||
+ | tag=Outside light on | ||
+ | value=1 | ||
+ | now=1 | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | The **now** field was added to solve the use case where by a boolean value needs to be monitored and its state should not be cached as it may toggle before the next xively web service update occurs. | ||
+ | |||
+ | ==== feed attribute ==== | ||
+ | |||
+ | This is an optional attribute. | ||
+ | |||
+ | When feeding xap-xively manually you may supply a feed attribute to override the default feedid= setting obtained from the / | ||
+ | |||
+ | < | ||
+ | datastream | ||
+ | { | ||
+ | id=4 | ||
+ | tag=Humidity | ||
+ | value=60 | ||
+ | feed=1234 | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== min/max attribute ==== | ||
+ | |||
+ | These are optional attributes. | ||
+ | |||
+ | When feeding xap-xively manually you may supply a min/max attribute to specify to the xively backend the range of values to be expected. | ||
+ | |||
+ | < | ||
+ | datastream | ||
+ | { | ||
+ | id=4 | ||
+ | tag=Temperature | ||
+ | value=20 | ||
+ | min=-10 | ||
+ | max=40 | ||
+ | } | ||
+ | </ | ||
===== Graphing ===== | ===== Graphing ===== | ||