Weathershield Metrics

Started by peckcj, January 16, 2016, 03:16:09 AM

peckcj

I have a WeatherShield and it's coming up on my gateway, but there are no metrics. Do I need to manually add the metrics somewhere, or should they automatically populate in the gateway?

Felix

If you look in metrics.js there is a section for weather mote, the definitions are the following:

  //WeatherShield metrics
  F : { name:'F', regexp:/F\:(-?\d+\.\d+)/i, value:'', unit:'°', pin:1, graph:1, graphValSuffix:'F', graphOptions:{ legendLbl:'Temperature', lines: { lineWidth:1 } }},
  FH : { name:'F', regexp:/F\:(-?\d+)/i, value:'', valuation:function(value) {return value/100;}, unit:'°', pin:1, graph:1, graphValSuffix:'F', graphOptions:{ legendLbl:'Temperature', lines: { lineWidth:1 }}},
  C : { name:'C', regexp:/C\:([-\d\.]+)/i, value:'', unit:'°', pin:1, graph:1, graphValSuffix:'C', graphOptions:{ legendLbl:'Temperature' }},
  H : { name:'H', regexp:/H\:([\d\.]+)/i, value:'', unit:'%', pin:1, graph:1, graphOptions:{ legendLbl:'Humidity', lines: { lineWidth:1 }}},
  P : { name:'P', regexp:/P\:([\d\.]+)/i, value:'', unit:'"', pin:1, },


Are you using the stock sketch to send to the readings to your gateway?

peckcj

Yes, I'm using the stock sketch. One thing I notice is when I go into serial monitor, the BMP180 succeeds initiation, but then it sticks on WAKEUP. No other readings appear on the serial monitor.

peckcj

Another thing i found is that the node does not update except when I restart the mote...but still no metrics.

Felix

Can you post a sample packet received at the gateway from the WeatherShield node?
You could sudo stop gateway then open minicom on the serial port where your gateway moteino is attached to see the serial stream.
The sketch I use is here.

peckcj

This is the packet I'm getting by using minicom:

[164] START   [RSSI:-44][ACK-sent]
[ACK-sent]

I used the sketch you referenced, with the only changes being that I uncommented #define IS_RFM69HW, because I am using the HW and also changed up the ENCRYPTKEY to my specs.

It looks like the WeatherShield is working as well, because I loaded just the WeatherShield sketch from GitHub and I was getting info via the serial monitor.

Thanks for your patience and help. This is all rather new to me.

Felix

If all is setup correctly I would expect to see a string like the following:

BAT:X.XXv F:XXXX H:XX P:XX.XX

Where Xes are digits.
The sketch will wake up the Moteino every 8sec*SEND_LOOPS.
There is a line in the sketch like this:

#define SEND_LOOPS   15

So it will send the readings every ~120sec (2 min). Do you see this data coming to your gateway Moteino?

FWIW the "START" string is sent when the WeatherNode is powered up or reset. It looks like the gateway is receiving that first package but not others. Please wait at least 2 minutes for a first valid package to come in.

FWIW#2 It's crucial that you give your node the right settings otherwise it will not be able to transmit (frequency, node/network ids, isHW setting). But I think you're doing it right if you receive the "START" packet.

peckcj

I waited quite some time, with no packets being sent. I'll try another mote once I get some stacking headers in from China. Maybe there's some sort of connection problem that I can't see.

Felix

Can you try this sketch and report what you see in the serial monitor?
This is not using the radio, just reporting the readings in the serial monitor. You should see something like the following:

//        ************ Si7021 *********************************
//        C: 2389   F: 7500   H: 36%   DID: 21  BATT: 1015
//        ************ BMP180 *********************************
//        provided altitude: 218 meters, 716 feet
//        C: 24.14    F:75.44
//        abs pressure: 992.23 mb, 29.30 inHg
//        relative (sea-level) pressure: 1018.31 mb, 30.07 inHg
//        computed altitude: 218 meters, 716 feet

peckcj

The WeatherShield Example works fine, as I receive the following code:

BMP180 init success
************ Si7021 *********************************
C: 2529   F: 7746   H: 49%   DID: 21  BATT: 710
************ BMP180 *********************************
provided altitude: 218 meters, 716 feet
C: 24.59    F:76.25
abs pressure: 968.61 mb, 28.61 inHg
relative (sea-level) pressure: 994.06 mb, 29.36 inHg
computed altitude: 218 meters, 716 feet
*****************************************************

I also swapped Moteinos, but still no go.

Is there a way to send packets to the Gateway directly, without transmitting via radio? It would be nice to "trick" the gateway into seeing the metrics, to eliminate the problem being the gateway. Just a thought.

Felix

Quote from: peckcj on January 20, 2016, 09:51:10 PM
The WeatherShield Example works fine. I also swapped Moteinos, but still no go.
Is there a way to send packets to the Gateway directly, without transmitting via radio? It would be nice to "trick" the gateway into seeing the metrics, to eliminate the problem being the gateway. Just a thought.
I don't follow. You mean faking some readings? I guess you could but what's the point if you got a perfectly good WShield?
I think your problem is with getting the 2 Moteinos to talk. The stock WS sender node sketch works, you just gotta figure out what you're missing, probably a setting mismatch.

I know you said the START packet is sent at the beginning but anyway ... : verify the network ID and frequency and encryption key matches with your gateway, assign a unique node ID, ensure the HW setting is properly matching the radio type.

Maybe add some debugging serial.prints to see where and why the sketch gets stuck if it still does. If the barebones sketch can read the weathershield data, then there's no reason why it should not be able to read the WS and send the data via radio to your gateway.

Kilo95

#11
I got my weather mote up and going but my shows 0.8v. but the battery on a fully charged lipo it should be well over 4. I know if it was truly a voltage of 0.6 it wouldn't be working. So what's up and how can I fix it?

I'm using the sketch off the weathershield page in your store.

at first I could only get a reading the first couple of cycles, then it started working all the time. after about an hour, i noticed the temp in the 90s. it wasnt where the ambient temp was too warm. i made sure there was no solder joints overlapping when i noticed that the WS seemed warm around the 3.3v pin.

Felix

Please, let's see your connections, your voltage reading on the battery, and the exact code you're running, attached here. For images you can use imgur.com and paste then in IMG tags.

Kilo95

#13
http://imgur.com/lTDAqzJ
http://imgur.com/cyqjG0X

This is the sketch I'm using. Will take voltage measurements when I get home in a little while

Kilo95

Vin + gnd 4.2v
3.3v + gnd =3.3v