BCS 4.0 .NET API and BCS Temperature Logger

Applications that run on PC/Mac.
MikeRussell
Posts: 28
Joined: Thu Jun 18, 2015 7:58 pm
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by MikeRussell » Tue Apr 05, 2016 2:30 pm

Well I managed to take a little break from this project and finished quite a bit of work on my shop. If all goes well this week I may be able to brew next weekend!

Has anyone else had a chance to test it or does anyone have additional feedback on this?

I reviewed the prior messages regarding poll and datalog.

poll appears to send more data than I need (for temperature logging purposes anyways) but seems like the best way to get the current status in a relatively clean manner.
datalog looks like I would have to reverse engineer the date/time for each index - unless i missed something simple there, i have a tendency to bypass the obvious.

for solving the original problem (store the current temperatue of the probes at a configurable interval) it looks like /temp/index will be the simplest way to get the probe names and initial values and then /temp will provide just the temperature values without names for subsequent requests. let me know if other calls or a different approach comes to mind. I'm not sure if overhead is really anything to worry about here, but i figure less is more, especially if the delay between requests is short.

brewstarke
Posts: 61
Joined: Thu Dec 27, 2012 7:19 am
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by brewstarke » Wed Apr 06, 2016 3:55 am

Good to hear you're getting your brewhouse running!

It seems to not be picking up my Temp3 name and values- the others are getting picked up. This is definitely a handy handy tool!
Thanks Mike-

MikeRussell
Posts: 28
Joined: Thu Jun 18, 2015 7:58 pm
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by MikeRussell » Wed Apr 06, 2016 8:37 am

very interesting! Could you run the following requests, then reply with responses, making sure to change 'BCS' in the url to your actual BCS's IP address or name:

http://BCS:80/api/temp/0
http://BCS:80/api/temp/1
http://BCS:80/api/temp/2
http://BCS:80/api/temp/3
http://BCS:80/api/temp/4

Perhaps I've mishandled something in the app - I need to see the actual response to get an idea of what's happening.

brewstarke
Posts: 61
Joined: Thu Dec 27, 2012 7:19 am
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by brewstarke » Thu Apr 07, 2016 4:14 am

I get responses for all my temps 0-3 (BCS-460) below is 2 and 3- When I go to ~/temp/4 (or greater) I get a blank page as you expect with the 460

Temp2:
{"name":"Mash Tun","temp":467,"setpoint":null,"resistance":19446,"enabled":true,"coefficients":[0.0007749767,0.0002815044,-8.5359321134e-10]}
Temp3:
{"name":"Boil Kettle ","temp":501,"setpoint":null,"resistance":17793,"enabled":true,"coefficients":[0.0011339109,0.000224046,2.1767880184e-7]}

Wish I was more handy with this stuff to help you out--
Good luck with the brewhouse--

MikeRussell
Posts: 28
Joined: Thu Jun 18, 2015 7:58 pm
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by MikeRussell » Thu Apr 07, 2016 8:33 am

No problem at all! It is hard to troubleshoot remotely but your responses look as I would expect.

Just to make sure we are looking at the same program, you are using the v4 app linked in the first post which has the long weird version number on top, right?

brewstarke
Posts: 61
Joined: Thu Dec 27, 2012 7:19 am
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by brewstarke » Thu Apr 07, 2016 5:27 pm

I just re-downloaded the v4 version to confirm and I'm getting a different issue now. It's freezing up a bit- by that I mean it's hanging up every few seconds and not updating at the intervals set in the Delay menu and it also doesn't seem to be picking up the connection to the BCS- (reading 00's and not returning the temp names as it did before).
I imagine this is an issue on my end- since it was working (at least mostly) this morning.
I should make a note that I had no problems running your earlier versions- just that the names of the temp probes weren't updating which I was fine with.

brewstarke
Posts: 61
Joined: Thu Dec 27, 2012 7:19 am
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by brewstarke » Thu Apr 07, 2016 5:42 pm

Ah hah!!
I dropped the 'http://' and it ran just like this morning- temp 0:2 were included fine, and running at the rate set in the delay window- but temp3 still is not returning any values other than 0.0

MikeRussell
Posts: 28
Joined: Thu Jun 18, 2015 7:58 pm
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by MikeRussell » Thu Apr 07, 2016 10:02 pm

Ahh I had been meaning to fix that - the address box assumes you just enter the hostname/ip without http or the port but it isn't very clear. I will update the UI later to handle it better.

Also I found a silly mistake on my end that caused the temp3 probe responses to fail. Should be working now!

I am attaching it here for now, and if it works for you without any other major issues i'll update the first post with this new file.
Attachments
BCSTempLogger (v4).zip
(240.16 KiB) Downloaded 61 times

User avatar
oakbarn
Posts: 761
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 » Fri Apr 08, 2016 6:59 pm

Great program. May I humbly suggest that you change the Delay format to match that of the BCS where the format is HHHH:MM:SS where each are in a separate spinner box. For example, you could enter 3600 in your current program for every hour, but the BCS you would enter 01:00:00 . Also a few format changes to comply more with the “standard” BCS format and resizing of the boxes to corresponds with the data from the BCS. I wish I could program as good as you!!! I love this additional utility as it was “missing” from the BCS. The fact that it is a standard csv file is fantastic!
logger1.png
logger1.png (44.43 KiB) Viewed 1317 times

brewstarke
Posts: 61
Joined: Thu Dec 27, 2012 7:19 am
Bot?: No

Re: BCS 4.0 .NET API and BCS Temperature Logger

Post by brewstarke » Sat Apr 09, 2016 5:03 am

Its working fine on my BCS460- Thanks again Mike. Very helpful tool indeed.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest