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?
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?
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.
Another thing i found is that the node does not update except when I restart the mote...but still no metrics.
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 (https://github.com/LowPowerLab/RFM69/blob/master/Examples/WeatherNode/WeatherNode.ino).
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.
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.
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.
Can you try this sketch (https://github.com/LowPowerLab/WeatherShield/blob/master/WeatherShield.ino) 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
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.
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.
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.
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.
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
Vin + gnd 4.2v
3.3v + gnd =3.3v
Connections look good.
I didn't see a code attachment. Was code attached?
Sorry. Thought I pasted it.
https://github.com/LowPowerLab/WeatherShield/blob/master/WeatherShield.ino
There's a little leftover solder flux on that side. Now when I plug it in, it's hot enough that the flux smokes. Seems like the WS is where it's warm at the 3.3v pin.
Do you think the WS is trashed?
If I have to replace it, just want to know if both are trashed or just the WS. I did notice for the few seconds I had it plugged in to check voltages that it send readings to the gateway so I'm assuming the Moteino is fine. As far as the connections:
VIN to VIN and ground to ground. Counting VIN as 1, solder 1,2,3, skip 4&5, solder 6, skip 7, solder 8,9,10. Is that correct?
I'm ordering a couple more since I think this one is fried. Want to make sure I have it perfect. Thanks
Warm or hot and low power don't go together. It means there is some short or some damage to one of the boards. It's actually pretty hard to damage them unless you hammer them.
See my comments in this post (https://lowpowerlab.com/forum/index.php/topic,1601.msg11470.html#msg11470) for some details on low power.
I'm including that photo here for reference as well:
(http://i.imgur.com/YERx1ia.png)
Let me know if it's not clear about the soldering.
If the moteino can be reprogrammed with any other sketch (try blinky first) that's a great sign. If you can load the sample node sketch (https://github.com/LowPowerLab/RFM69/blob/master/Examples/Node/Node.ino) and you can receive that from it (even if the WS is still attached) then that's even better, it would indicate the Moteino is good.
Otherwise I would desolder the shield and debug the moteino by itself, if it still can't send or upload, i'd deem it failed, the last chance would be trying to re-bootload it assuming something could have gone wrong with that part of it.
So looking at the pic, all of the header connections appear to be soldered except the last three on the right. I didn't have them all soldered. Could that be it? They didn't all appear to be soldered in another pic I saw. Maybe I'm just half blind. The mote must be good because in the few seconds I had it powered up to test voltages, it sent metrics to the gateway. I can assure you that I didn't hammer it. I know better than that. I'm thinking of running it off of a 3xAA since I can get pretty much unlimited AA that are practically brand new for free at work
Actually the only connections required are GND, VIN, 3.3, A7 & A3 for the battery reader circuit, and SCL - SDA.
Ok. I gotcha. Just clarifying that. Thanks
I think I'll give a new ws a shot when it arrives
Felix I ordered a moteino, 2 WS and a dc jack. What would it cost to have you solder a mote and WS together so I don't screw it up. That is if it hasn't already shipped. Ordered on Feb 8th.
I'm afraid it's already picked up.
No problem. I have your photo. It's fine. Just found where you do some of that after I ordered. Thanks for getting back to me
Yup, I would just solder female headers to the Moteino then some males to the WShield. Mate them that way, this allows you to better control what's going on until you have a handle on things.
When you are confident you can sandwich them together if that's required for saving some space.
Do you know if radio shack has female headers? I don't have any lying around
I don't know... but overall not a great place to shop for components in my experience.
Ebay or the common online retailers are a better place. Even my store stocks some common headers used in electronics.
Got the new ones and works perfect. I access my gateway on an iPhone.
@Kilo95 if you are looking for female headers suitable for stacking see https://lowpowerlab.com/forum/index.php/topic,1459.msg10165.html , they can be a bit hard to track down in longer lengths.
Great. Thanks
one more question, if i want the pressure calculated for my elevation/altitude instead of the constant that is set, where do i locate that in the sketch? i'm at 667 feet. i've noticed both of my WS are off from the National Weather Service office here by 0.4-0.4 inches
Quote from: Kilo95 on February 16, 2016, 06:50:17 PM
if i want the pressure calculated for my elevation/altitude instead of the constant that is set, where do i locate that in the sketch? i'm at 667 feet. i've noticed both of my WS are off from the National Weather Service office here by 0.4-0.4 inches
I guess I don't really understand that question.
The metric value comes directly from the sketch running on the Moteino. If you need that converted to something else, I think that's where you would do it. Also if the sensor absolute value is off compared to something else, that I cannot comment on.
If you are using the stock sketch, just change the #define for ALTITUDE from 218.3 (meters) to 203.3 meters (equivalent to 667 feet).
Awesome. Thx
I'm using the weathershield node sketch. Not the plain WS one. The plain one doesn't have all of the radio code in it. The one I'm using does but doesn't have a #define altitude. I'll have to play with it more later
ok, so i looked at the WS sketch (https://github.com/LowPowerLab/WeatherShield) and i see where to change the altitude. I'm using the WeatherNode.ino sketch to transmit to my gateway. I couldn't locate where to change the altitude in the WN sketch (https://github.com/LowPowerLab/RFM69/blob/master/Examples/WeatherNode/WeatherNode.ino). I see all the comments about changing it but there's nothing to change that I saw. I compared my readings to the NWS today and my nodes are showing 0.8inHg lower than the NWS office. I'd just like to get them close :)
If you follow the trail, it leads to these lines:
#define ALTITUDE 218.3 // Altitude in meters
...
p0 = pressure.sealevel(P,ALTITUDE); // we're at 1655 meters (Boulder, CO)
Serial.print("relative (sea-level) pressure: ");
Serial.print(p0,2);
Serial.print(" mb, ");
Serial.print(p0*0.0295333727,2);
Serial.println(" inHg");
// On the other hand, if you want to determine your altitude from the pressure reading,
// use the altitude function along with a baseline pressure (sea-level or other).
// Parameters: P = absolute pressure in mb, p0 = baseline pressure in mb.
// Result: a = altitude in m.
a = pressure.altitude(P,p0);
I removed these in the WShield wireless sketch. I guess you'd have to call pressure.sealevel(P,ALTITUDE); to set the sea level or relative to your altitude.
So I can just add those lines back into the WS sketch where you took them out? I thought I'd tried that. I can give it a shot again though
I'm just guessing :)
If you look at the library (https://github.com/LowPowerLab/SFE_BMP180):
double sealevel(double P, double A);
// convert absolute pressure to sea-level pressure (as used in weather data)
// P: absolute pressure (mbar)
// A: current altitude (meters)
// returns sealevel pressure in mbar
i'm going to have to play with it a bit. i'm looking through the link to the bmp180 library
I've gotten the correction factor (-0.7229). I still can't figure out where to put that. Maybe where the pressure reading gets returned from the BMP180? I thought that was return P but i tried return P-0.7229 but that didn't work. any suggestions? my inexperience is showing
I think this is being addressed in this topic (https://lowpowerlab.com/forum/index.php/topic,1640.msg11778.html#msg11778).