Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
InfluxDB push from RaspPi - I'm confused
08-27-2016, 09:37 AM (This post was last modified: 08-27-2016 04:52 PM by enviroeye.)
Post: #1
Sad InfluxDB push from RaspPi - I'm confused
Hi All,

Greetings from Melbourne, Australia; we're working with some Panstamps in agriculture to monitor crops etc. I've got a couple of minibats up and running and am slowly wrapping my head around the ecosystem.

Just a little confused on one aspect; we'd like to push data to InfuxDB. Influx has a python library to allow the scripting of data pushes, but I'm trying to work out the best way to relay Panstamp sensor data to the DB.

I understand there's Lagarto MAX and SWAP, and from what I can tell SWAP talks to the Panstamp network and maintains the logical view of each motes' registers and the MAX can be used for event based actions (time or network) to call custom scripts.

However the documentation here (https://github.com/panStamp/panstamp/wiki/lagarto-max) seems to suggest MAX and the HTTP / TCP/IP methods have been depreciated, in favour of MQTT, but we'd rather push straight to Influx and not use MQTT.

I also see that my custom scripts could query Lagarto-SWAP on 8001 and get JSON data for all motes, but we'd rather the push to Influx be based on an event for a mote sending through its sensor data.


I'm further confused, as we're going to be deploying Raspberry Pis out into the fields to act as gateways, the RaspPi doco here (https://code.google.com/archive/p/pansta...ryPi.wiki) still talks about Lagarto SWAP and MAX, and I assume the associated image for RaspPi has them included.

I guess I'm keen to understand the most efficient way to have the Panstamp sensor data sent to our InfuxDB, using python and a RaspPi gateway, any help would be greatly appreciated.

Mark

UPDATE:

Okay so I see now in the lagarto-swap there's the swapmanager.py and in this script there is registerValueChanged(), so perhaps I can add my push to Influx here?
Find all posts by this user
Quote this message in a reply
08-28-2016, 01:44 AM (This post was last modified: 08-28-2016 01:44 AM by dberenguer.)
Post: #2
RE: InfluxDB push from RaspPi - I'm confused
Hi Mark,

Indeed lagarto is now monopolized by a single process (lagarto-swap). YOu can of course push data from swapmanager.py but never understimate the power of MQTT. I don't know whether InfuxDB supports MQTT but you can use an intermediate solution such as Node-RED to interface between MQTT and your database and provide other functionalities (notifications, GUI, ...) at the same time.

Daniel Berenguer
http://www.panstamp.com
Visit this user's website Find all posts by this user
Quote this message in a reply
08-30-2016, 03:56 PM
Post: #3
RE: InfluxDB push from RaspPi - I'm confused
Thanks Daniel,

Appreciate the reply. I guess if you were risk adverse you might look the need to use MQTT as not ideal, i.e. another process which needs to be relied upon to get data from the sensor into the database. But then MQTT does offer a lot of flexibility.

Reading up over at Influx, looks like they're actively looking to integrate an MQTT broker into their platform so all might be well :-)

https://influxdata.com/blog/mqtt-surgemq...of-things/

I'll keep you posted as to how we go.

Mark
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)