Page 2 of 7

Re: BCS 4.0 .NET API

Posted: Thu Jul 16, 2015 9:41 pm
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.

Re: BCS 4.0 .NET API and BCS Temperature Logger

Posted: Mon Mar 14, 2016 9:50 am
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.

Re: BCS 4.0 .NET API and BCS Temperature Logger

Posted: Mon Mar 14, 2016 4:03 pm
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!

Re: BCS 4.0 .NET API and BCS Temperature Logger

Posted: Tue Mar 15, 2016 8:24 am
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?

Re: BCS 4.0 .NET API and BCS Temperature Logger

Posted: Tue Mar 15, 2016 9:08 am
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.

Re: BCS 4.0 .NET API and BCS Temperature Logger

Posted: Tue Mar 15, 2016 9:54 am
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

Re: BCS 4.0 .NET API and BCS Temperature Logger

Posted: Sun Mar 20, 2016 5:17 am
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?

Re: BCS 4.0 .NET API and BCS Temperature Logger

Posted: Mon Mar 21, 2016 10:08 am
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

Re: BCS 4.0 .NET API and BCS Temperature Logger

Posted: Wed Mar 23, 2016 11:30 pm
by MikeRussell
After a bit of debugging I have a new version available.

Major thanks to oakbarn for letting me test with his BCS.

Re: BCS 4.0 .NET API and BCS Temperature Logger

Posted: Thu Mar 24, 2016 5:41 am
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 18587 times