BCS 4.0 .NET API and BCS Temperature Logger

Applications that run on PC/Mac.
User avatar
SamIam
Posts: 51
Joined: Fri Aug 19, 2011 1:34 pm
Bot?: No

Re: BCS 4.0 .NET API

Post by SamIam »

I wrote it for an early alpha version of 4.0. I don't think much has changed and if it did it's easy enough to update.
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 received a few messages this weekend and found a spare moment on sunday - so it is about time for another update.

One request was for a 'clear' button to make the UI a little cleaner. This button is disabled along with the rest while the app is probing for temperatures. Maybe disabling this is a bad idea and maybe it will be changed later.

Another request was to take a look at the code. Both the API and the example UI (Temperature Logger) are available here: https://bitbucket.org/ransidmeat/bcsnet

Also quite a while back, someone mentioned they need authentication to work with their BCS. I have implemented this in such a way that BOTH username and password on the UI need to be non-empty to attempt authorization. Also it is just using ISO-8859-1 encoding in the Authorization header - hopefully this works. I still have no BCS to test this with so I'm depending on outside QA to make it work :)

If this method does not work, just enter no username or password - it will skip attempts at auth. I saw SamIAm's post about an alternative method which can be investigated later.

Another bit of housekeeping. Has anyone successfully tested this on a Mac via wine or mono?

Let's keep the good beers flowing.
bighefty
Posts: 42
Joined: Tue Feb 28, 2012 5:05 pm
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by bighefty »

Mike,

I like this and it works great! However, is there a way to increase the port larger than 100? I currently have my BCS on port 8081 so in order for the temp logger to work for me, I had to temporarily change it.

Thanks!
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 »

*facepalm* wow I never changed the default maximum on that control *facepalm*

Here you go!

Just out of curiosity has anyone tested the authentication?
bighefty
Posts: 42
Joined: Tue Feb 28, 2012 5:05 pm
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by bighefty »

MikeRussell wrote:*facepalm* wow I never changed the default maximum on that control *facepalm*

Here you go!

Just out of curiosity has anyone tested the authentication?

Thanks! I'll check it out shortly. BTW, Yes, I used the authentication. Worked fine.

Oh, one other thing. The very first time I tried to use it. I mistakenly left the interval at zero. This caused the program to crash. I had to restart and change that to a non-zero number. You may want to change that one too so that there is no way for it to be zero.
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 »

Argh! I thought I fixed that previously but must have slipped my mind. I set the default value and minimum to 1 - should be closer now.

EDITED - removed attachment as the included config file causes the application to crash immediately on launch
Last edited by MikeRussell on Mon Mar 21, 2016 10:09 am, edited 1 time in total.
akschaub
Posts: 4
Joined: Tue Sep 01, 2015 4:39 pm
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by akschaub »

I can get the file you recently updated in the first post in this thread to work (though it doesn't pull in the temp probe names). The one attached to the latest post crashes when I try to open it.

Any idea what's wrong?
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 do indeed have an idea! I set the minimum value for delay to be 1 but in the default config it is still set at 0.

Here's the same release except with a fixed config file - alternatively you can change the 'delay' setting to 1 in the BCSNetExampleUI.exe.config file
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 »

After a bit of debugging I have a new version available.

Major thanks to oakbarn for letting me test with his BCS.
Last edited by MikeRussell on Sat Mar 26, 2016 8:29 am, edited 1 time in total.
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 just tried the new version (never tried the previous one). The App does get the temp probes names from the BCS (they show up in your app and the log file), but when I hit the stop button and review the file created it shows a 404 error for each entry. Other than the temp probe names from the BCS nothing else appears during the Read process. I did some network scanning using Avast Network security and it shows the BCS in on port 80, and also in the BCS settings section is configured for port 80. I've also tried disabling all security apps so that they don't cause any issues. When I launched the app I tried using "Run as Administrator" and normally. Also I tried setting the delay to 1 and 5 seconds. I've tried it with processes on and off...Hopefully it's something stupid that I am doing that is causing the problem, because the capability of saving the temps to a log file would be greatly appreciated and something to record for each brew session to help figure what went right and wrong.
bcslog2.jpg
bcslog2.jpg (107.5 KiB) Viewed 16695 times
Thomas Brophy
AleForce Homebrewery
Post Reply