BCS 4.0 .NET API and BCS Temperature Logger

Applications that run on PC/Mac.
brahn
Posts: 543
Joined: Thu Dec 13, 2012 11:01 am
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by brahn »

I was about to comment that the best APIs to use for this purpose would be the datalog API, but realized that isn't in the published documentation either. I'll need take a look at why and get that published.
User avatar
Broph
Posts: 117
Joined: Fri Oct 16, 2009 1:19 am
Bot?: No
Location: Illinois
Contact:

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by Broph »

Interesting to see the datalog option: records up to 128 readings and then over writes with the 129th reading probably since the BCS was turned on or the datalog reset.

1st # is the sequence #(Frequency set by the Data Log Settings for each channel; options: 1 second; 1 minute, 2 minutes, 5 minutes, 10 minutes, 30 minutes, 1 hours)
2nd # is the temperature.

Data log Frequency setting = amount of data before rewriting happens:
1 second = 2 minutes 13 seconds
1 minute = 2 Hrs 8 minutes
2 minutes = 4 Hrs 16 minutes
5 minutes = 10 hrs
10 minutes = 21 hrs
30 minutes - 64 hours
1 hrs - 128 hrs

http://192.168.1.122/api/datalog/1
[[129,478],[130,478],[3,478],[4,478],[5,478],[6,478],[7,479],[8,479],[9,478],[10,478],[11,478],[12,478],[13,478],[14,478],[15,478],[16,478],[17,478],[18,478],[19,478],[20,479],[21,479],[22,478],[23,479],[24,479],[25,479],[26,479],[27,479],[28,479],[29,479],[30,478],[31,478],[32,479],[33,479],[34,478],[35,478],[36,478],[37,478],[38,478],[39,478],[40,479],[41,479],[42,479],[43,479],[44,478],[45,478],[46,478],[47,478],[48,478],[49,478],[50,478],[51,478],[52,478],[53,479],[54,479],[55,479],[56,479],[57,479],[58,479],[59,479],[60,479],[61,479],[62,478],[63,478],[64,478],[65,478],[66,478],[67,479],[68,479],[69,479],[70,479],[71,479],[72,479],[73,478],[74,478],[75,478],[76,479],[77,479],[78,478],[79,478],[80,478],[81,479],[82,479],[83,478],[84,479],[85,479],[86,479],[87,478],[88,479],[89,478],[90,478],[91,478],[92,478],[93,478],[94,478],[95,478],[96,478],[97,478],[98,478],[99,478],[100,478],[101,478],[102,478],[103,478],[104,477],[105,478],[106,478],[107,478],[108,478],[109,478],[110,478],[111,478],[112,478],[113,478],[114,478],[115,478],[116,478],[117,478],[118,478],[119,478],[120,478],[121,478],[122,477],[123,479],[124,478],[125,478],[126,477],[127,478],[128,478]]
Thomas Brophy
AleForce Homebrewery
brahn
Posts: 543
Joined: Thu Dec 13, 2012 11:01 am
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by brahn »

That's it. The nice thing is that you could, for instance, log the temperature every second while only querying the BCS every minute by keeping track of the last sequence number you read. Or handle a case where you failed to connect to the BCS like a momentary wireless network glitch.

You do have to configure the datalogs properly since you can use it to log things other than temperature. The default config is logging the temp probes.
User avatar
Broph
Posts: 117
Joined: Fri Oct 16, 2009 1:19 am
Bot?: No
Location: Illinois
Contact:

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by Broph »

I kind of like the option's Mike's app offers. Time & Date Stamp for each logged entry, name of the temp probe, and an external file that records the readings. It's like a black box for the BCS in case something happens.

I would love to try a version that works with the BCS-460.
Thomas Brophy
AleForce Homebrewery
User avatar
oakbarn
Posts: 846
Joined: Thu Jan 05, 2012 2:28 pm
Bot?: No
Location: Texas
Contact:

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by oakbarn »

I just tried the new version and I forgot to put in a csv file name:

Even after I did I get
csv.png
csv.png (24.8 KiB) Viewed 41094 times
Some more error handling. My BCS is still available to you for testing.

I did not overwrite the "corrected" exe but put the new one in a subfolder Logger2.
MikeRussell
Posts: 33
Joined: Thu Jun 18, 2015 7:58 pm
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by MikeRussell »

Here's another update which should get us a little closer.

Broph I added some error handling so when requesting probe info from the BCS460 which don't exist, it should just continue cruising along instead of logging the error.

Oakbarn I thought I found this the other day and fixed it but it clearly was not updated on my end.

You'll also notice the main form will display some awful automatically generated version number - at least this way I won't forget to update the version number between builds and generate more confusion.

Let's give this one a try and see what blows up this time, hahahaha. Thanks so much for providing constructive feedback and testing this out for me.

Just another tangent. It looks like my compressed zip is getting close to the 256kb limit for the forum. The biggest component in this app is the Json deserializer (500k decompressed) while the app itself is under 30k - if the app continues to grow we may need an alternate deployment strategy.
Attachments
BCSTempLogger.zip
(250.83 KiB) Downloaded 1350 times
User avatar
Broph
Posts: 117
Joined: Fri Oct 16, 2009 1:19 am
Bot?: No
Location: Illinois
Contact:

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by Broph »

Mike,

Thanks! It works fine on the BCS-460 now.
bcslog3.jpg
bcslog3.jpg (224.17 KiB) Viewed 41091 times
Thomas Brophy
AleForce Homebrewery
User avatar
Broph
Posts: 117
Joined: Fri Oct 16, 2009 1:19 am
Bot?: No
Location: Illinois
Contact:

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by Broph »

Just came back from an all-day errand trip. over 2300 entries since I left and the file is only 112 kb. I just need to not let my computer go to sleep or maybe find another computer to run the app with that will stay on all the time.
Thomas Brophy
AleForce Homebrewery
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by clearwaterbrewer »

my brain hurts, can someone put a writeup link as a sticky on page 1, in big bold font so I can implement this without reading 4 pages?
MikeRussell
Posts: 33
Joined: Thu Jun 18, 2015 7:58 pm
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by MikeRussell »

I updated the first post with the most recent logger.
Post Reply