Help on setup for transmitting testing data

17 posts / 0 new
Last post
wwfoste
Help on setup for transmitting testing data

I've got the Pi and PCB put together and was working on getting the instrumentation up and running for testing.

I’ve got the scale and TEMPerHUM plugged in. I started doing the scale testing described here: http://hivetool.org/w/index.php?title=Interface_the_HX711_to_Pi

I put the 1/slope in the Hivetool configuration section. What about the intercept? Also, what should be in the device/gpio/parameters section?

What about the TEMPerHUM? How do I get it to start taking data?

To get the system to start taking data regularly, do I run a cron? I see details here: http://hivetool.org/w/index.php?title=Cron but is this what I need to do and where do I do this at?

Sorry if I missed the instructions on the website. And sorry if these are simplistic questions, I'm not familiar with Linux or similar systems.

When I go to my hive’s location on hivetool.net, the drop down on the top is for Now_then1 and when I switch it to Oconee2 I get an Internal Service Error. I see this data at the bottom:

Weight Temp Humidity Temp Humidity Temp Humidity Wind Gusts Direction Dewpoint Pressure Rain
Last lb. °F % 70 °F 27 % 27 °F 60 % 5 mph 15 mph 295 15 °F 976 mb 0.00 in.
Max 0 lb. °F % 74 °F 37 % 38 °F 94 % 15 mph 31 mph 345 29 °F 978 mb 0.01 in.
Min 0 lb. °F % 67 °F 26 % 26 °F 36 % 0 mph 3 mph 6 11 °F 967 mb 0.00 in.
Avg 0 lb. °F % 71 °F 30 % 31 °F 62 % 5 mph 12 mph 225 18 °F 973 mb 0.00 in.
Inside Hive Outside Hive Weather conditions at Wunderground at 2016-04-02 23:59:59

But I’m not sure if it’s mine or someone elses. The weather underground data looks somewhat right, but the temperature didn’t get as low as it says, so I’m not sure if that’s for me or not. Plus the date isn't changing.

Any help would be greatly appreciated.

Emil
Emil's picture
Startup

Hi first of all are you using Temperhum or temperhum2?
Second it don't seems that your scale is sending anyting. I have seen that you don't get graph output on hivetool.net before the scale has sendt data for about 24 hours.
I think you should start checking local Pi first here
go to
cd /home/hivetool
cat hivetool.log is this updated recent?
The cron page you refer to seems to be outdated. do the following if you are using the 0.7.3 image
crontab -l
check that all the last lines are commented out, if not
crontab -e and comment out with # all the last 5 lines
copy the last 5 lines
sudo crontab -e
copy in the last 5 lines in the bottom here and remove # in the hive.sh line
After a few minutes check the hivetool.log again, and also your log file oconee2.log (tail -f oconee2.log - show the updates of the file)
Try this first and come back with more question

wwfoste
Startup

I just have the Temperhum.

I believe I have the Temperhum up and running now using what Paul suggested:

Run: ls /dev

I saw the temperhum mapped in as hidraw1. In the config.pl form, I entered enter the full path for the device: /dev/hidraw1. It now seems to be transmitting the right data.

For the weight sensors, "crontab -l" already had the proper lines.

I added these lines to the bottom of "sudo crontab -e":
# Check hive instruments every 5 minutes. Kill process after 3 1/2 minutes.
0,5,10,15,20,25,30,35,40,45,50,55 * * * * timeout -s KILL 3.5m /home/hivetool/hive.sh
#
# Check the server status. Kill process after 1 minute.
0,5,10,15,20,25,30,35,40,45,50,55 * * * * timeout -s KILL 1m /home/hivetool/server_status.sh > /var/www/html/server_status.txt

I also determined the intercept with sudo hx711 --> -316807, then I put the returned number in and ran sudo hx711 -316807 --> returned 34, which I entered as the intercept on the config.pl form.

Then I stood on the scale with sudo hx711 34 --> 210808 and divided by my weight to get 897, which I put as the slope in the config.pl form.

The scale is now returning a high weight value of -389217236.

This is what cat hivetool.log reports:

Oconee2 2016-04-05 21:15:01
Reading Sensors
Hive weight: -389436104
Hive temperature: 23.6
Hive humidity: 41.2
Ambient temperature: NULL
Ambient humidity: NULL
Ambient light NULL
Rain NULL

Downloading weather data from KSCWESTM5
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2276 100 2276 0 0 3490 0 --:--:-- --:--:-- --:--:-- 3496

Date-time 2016-04-05 21:15:01
Hive Weight -389436104.00 Sensor: HX711 Slope: 897.00 Intercept: 34.00 Device: 5
Hive Temp 23.60 (TEMPerHUM at /dev/hidraw1 m=1.00 b=0.00)
Hive Humidity 41.2
Ambient Temp NULL (none at 3 m=1.00 b=0.00)
Ambient Humidity NULL
Ambient Light NULL
Ambient Rain NULL
WS Station ID KSCWESTM5
WS Temperature 51.4
WS Wind Direction E
WS Wind Speed 0.0
WS Wind Gust 0.0
WS Dewpoint 35.4
WS Humidity 54
WS Pressure 1022.9
WS Precip Today 0.00

Logging to Oconee2.log
2016-04-05 21:15:01,-389436104,23.6,41.2,NULL,NULL,NULL,NULL,51.4,E,0.0,0.0,35.4,54,1022.9,0.00

Inserting row in database
4, 2016-04-05 21:15:01, -389436104, 23.6, 41.2, , NULL, NULL, NULL, NULL, 51.4, 10.8, 54, E, 0.0, 0.0, 1022.9, 35.4, 0.00, 0.00
Error: near ",": syntax error

Uploading data to hivetool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3001 0 89 100 2912 90 2952 --:--:-- --:--:-- --:--:-- 2953

Checking for hive command
/home/hivetool/hive.sh: line 341: /home/hivetool/hive_command.pl: Permission denied

Adrian
weight calibration without the math

I first connect all my load cells configured for force in the direction of arrow.
Then I enter starting calibration values of: intercept = 2.5, slope = .0000985 if your cells are properly installed this should get you within 5%
With no weight I set the intercept so that after doing a read sensors it displays near zero
To easily verify or correct the the weight readings I place my scale near a desk where I can make config.pl entries.
Weigh myself holding a hive bottom board or cover on a reference bathroom scale.
Place a hive cover on top of the Hivescale frame to spread the weight
Stand in the center and press read while being still
Your Hivetool weight reading should nearly match your reference reading.
If off by more than a few pounds I nudge the LSB up or down to get the reading I want, pressing read each time to verify.
If it's off by allot something is mis-wired or you have a bad solder joint on the sensor board, swapping load cells you can determine what is at fault.

One day well get a calibration wizard to do all this for us.
Adrian

Adrian Ogden

wwfoste
Additional help needed

My two issues remaining are the calibration and cat hivetool.log returns an error where it is trying to upload to the database.

For calibration, this is how I’ve been reading the calibration instructions.

1. I ran sudo hx711. It returned -345252. I put this number as the intercept in the config.pl.

2. I ran sudo hx711 -345252. It returned 762.

3. I then ran sudo hx711 762 and stood on the scale after weighing myself (235.2 lbs). This returned 1160045.

4. I divided 1160045 by 235.2 lbs to get 4932.164116, which is 1/slope.

5. The output of the scale is divided by the 1/slope to give you the lbs? If i do this with the scale unloaded, it returns a number of 70 lbs (345252/4932). Is this right or did I misinterpret it.

6. In the config.pl, should slope be the 4932 number or 1/4932?

I’m assuming once the errors in the hivetool log are fixed, I should start seeing my numbers on hivetool.net? My last question is when I click on the Oconee2 on the webpage, it takes me to a hive titled Nowthen_01, not the one titled Oconee2. Is this correct?

Here is the cat hivetool.log with the errors:

Oconee2 2016-04-10 09:40:01
Reading Sensors
Hive weight: 345184.009074158
Hive temperature: 19.9
Hive humidity: 39.0
Ambient temperature: NULL
Ambient humidity: NULL
Ambient light NULL
Rain NULL

Downloading weather data from KSCWESTM5
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2277 100 2277 0 0 4408 0 --:--:-- --:--:-- --:--:-- 4412

Date-time 2016-04-10 09:40:01
Hive Weight 345184.01 Sensor: HX711 Slope: 0.00 Intercept: 345252.00 Device: 5
Hive Temp 19.90 (TEMPerHUM at /dev/hidraw1 m=1.00 b=0.00)
Hive Humidity 39.0
Ambient Temp NULL (none at 3 m=1.00 b=0.00)
Ambient Humidity NULL
Ambient Light NULL
Ambient Rain NULL
WS Station ID KSCWESTM5
WS Temperature 44.1
WS Wind Direction SSW
WS Wind Speed 0.0
WS Wind Gust 2.0
WS Dewpoint 26.1
WS Humidity 49
WS Pressure 1029.3
WS Precip Today 0.00

Logging to Oconee2.log
2016-04-10 09:40:01,345184.009074158,19.9,39.0,NULL,NULL,NULL,NULL,44.1,SSW,0.0,2.0,26.1,49,1029.3,0.00

Inserting row in database
1, 2016-04-10 09:40:01, 345184.009074158, 19.9, 39.0, , NULL, NULL, NULL, NULL, 44.1, 6.7, 49, SSW, 0.0, 2.0, 1029.3, 26.1, 0.00, 0.00
Error: near ",": syntax error

Uploading data to hivetool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3008 0 89 100 2919 70 2312 0:00:01 0:00:01 --:--:-- 2316

Checking for hive command
/home/hivetool/hive.sh: line 341: /home/hivetool/hive_command.pl: Permission denied

Emil
Emil's picture
Here is my answer to the

Here is my answer to the errors in 0.7.3, try this out, and you will get local graph working I think

Maybe I'm not understanding the sloop and Intercept , but I had to change the Intercept to 0 in config.pl and change the 0 in the end of COUNT to my Intercept in hx711.sh (line 19).

It seems that the local database import fails because the BATTERY_VOLTAGE is not set (maybe unless using hive2.sh?)
After putting in the following line in hive.sh (new line 26) it seems to add the entrys in local database
BATTERY_VOLTAGE=0
The error message "The local database dont work, In hivetool.log I get the message "Error: near ",": syntax error" when inserting to local database" disappear

wwfoste
That mostly worked

I did the BATTERY_VOLTAGE update and gave me the local graph and the "," error disappeared. I still get this error at the bottom:

Checking for hive command
/home/hivetool/hive.sh: line 342: /home/hivetool/hive_command.pl: Permission denied

I assume this is saying I don't have the correct Hivetool login and password. I've put the one in that I was sent, so I'm not sure why it's not working. Anyways, I don't see any updates on the hivetool.net website, so it appears this is keeping it from updating to the site. Or it may just take a while for the data to show up.

I also did the intercept to 0 in config.pl and changed the end of COUNT to my previous intercept. This made the weight closer to realistic, but it still reads -14 or so. Is the goal to have the weight read 0 when nothing is on the frame?

Thanks for the help.

Paul
Paul's picture
/home/hivetool/hive_command.pl: Permission denied

Don't worry about this error. That is OK. hive_command.pl allows commands to be passed down from the server to the hive computer. It is used to turn on video streaming and can allow remote access without enabling port forwarding in the router by using reverse IP tunneling. It is turned off by default.

wwfoste
new error

Edit: it fixed itself, ghost in the machine I guess

Now I've started getting a new error. This is all that comes up for cat hivetool.log

Reading Sensors
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
Hive weight:

The reading before this one included this error again too:

Logging to Oconee2.log
2016-04-10 21:10:05,,21.2,38.1,NULL,NULL,NULL,NULL,46.8,WSW,0.0,0.0,38.3,72,1026.3,0.00

Inserting row in database
1, 2016-04-10 21:10:05, , 21.2, 38.1, 0, NULL, NULL, NULL, NULL, 46.8, 8.2, 72, WSW, 0.0, 0.0, 1026.3, 38.3, 0.00, 0.00
Error: near ",": syntax error

Adrian
Null value for elevation = syntax error in 0.7.3

I don't know if it's been corrected but 0.7.3 had an issue with null values for elevation

Adrian Ogden

Paul
Paul's picture
Blank elevation field in config.pl

This has nothing to do with the error that Bill is experiencing. When you set up the hive configuration, to save the hive parameters to the hive_parameters table, this field must not be blank. This is only used on the local hive and not on hivetool.net

I have put this in bug list for 0.7.4:
http://hivetool.org/w/index.php?title=Create_SD_Image_Version_0.7.4#Bug_...

wwfoste
Blank elevation

I had the elevation filled in on the configuration table, so that wasn't it. But it was just a temporary issue that fixed itself.

wwfoste
Used Paul's updated calibration

I used Paul's updated calibration instructions and now have an empty weight of .401729656 lbs.

The instructions are here http://hivetool.org/w/index.php?title=How_To_Calibrate_a_Sensor for the 0.7.3.

Also went back in to the hx711.sh file (line 19) and changed the number that had been my intercept in the end of COUNT back to 0.

Dennis
Overload limits

A rather pedestrian question, but are you still recommending a gap of .002" for overload limits? I was able to get an accurate weight at 110lbs. But when I loaded the system to 306 lbs, I get a reading of 200 lbs. Am I bumping up against the overload stops?

Dennis
On the other hand...

It's possible the one of my load cells is wonky. When I disconnect the suspicious load cell, the weight actually goes up instead of down.

Nate
Nate's picture
Overload protection

I had trouble with the suggested gap as well, I ended up completely removing the overload protection and I just make sure I don't drop entire supers on the hive. I had no problems with my scale all year.

Paul
Paul's picture
Overload protection

Yes. I agree. I back off the feet so there is no thread showing at the top (maximum gap). Probably need to change the instructions on that page. The load cells we are using are spec'd to 150% overload (many cells are only spec'd to 120% overload). According to Dr. Esaias, the problem is not with dropping a full super of honey or trying to force a frame back in. The problem is when the scale gets knocked off a table and one foot hits the concrete floor or poor packaging when shipped - there is no telling what the shipping companies do with the packages. Dr. Esaias said when the USDA ships their scales around, about 10% per year are damaged by poor packaging.

Another problem with the small gap is dirt buildup. Also, since everything but the bolt is aluminum, once it takes a hit, it will probably dent the aluminum frame and render the overload protection useless.

Log in to post comments