Datalogging / storing data

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

Re: Datalogging / storing data

Post by MikeRussell » Sun Jun 21, 2015 10:44 am

The app has been updated - you can download it at http://michael-arthur.com/BCSTempLogger.zip or find it attached. I wasn't sure if zipped executables would be allowed or not so I hosted it too.

I added a checkbox so the app will parse the v4 response. I haven't actually tested it with a real bcs so hopefully my assumptions about the request are correct. If you enter http://bcs:80/ into the bcs url textbox the request will be http://bcs:80/api/temp - I hope that is correct. Also it will write a header line if you're saving to a new file - just Date, Time and Temp0 to Temp7.

Feel free let me know if you have any other suggestions or comments on this. Hopefully I will find some free time this week to clean up the code so it can be a bit more modular or maybe update it to read the probe name and use that instead of temp0-7. Not sure if there is a ton of value in that or not.
Attachments
BCSTempLogger.zip
(7.77 KiB) Downloaded 198 times

Cyclops
Posts: 16
Joined: Tue Oct 07, 2014 2:17 am
Bot?: No

Re: Datalogging / storing data

Post by Cyclops » Sun Jun 28, 2015 5:32 am

Working for me, would it be possible to pull the names of the temp probes from the BCS and include these in the .csv file?

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

Re: Datalogging / storing data

Post by MikeRussell » Tue Jun 30, 2015 3:11 pm

Thanks for testing it out, Cyclops. Let's give this one a try; t's a bit of a hack but lets see what comes of it.

I've chosen to implement this by polling probes 0-7 on the first temperature read. The grid headers should get updated with whatever was returned in the 'name' for each probe - or unchanged if the BCS doesn't respond for a given probe. I know it should respond with a 404 if no probe exists but I don't have a piece of hardware to test with.

Also note the column headers are only written to the CSV if the file doesn't already exist. To test this, save your output to a new file and hit read. Then if you want to refresh the probe names on the UI, hit stop and read again.

Let me know if these changes crash the app. If it seems stable enough I will upload it to my website too.
Attachments
BCSTempLogger.zip
(8.29 KiB) Downloaded 204 times

Cyclops
Posts: 16
Joined: Tue Oct 07, 2014 2:17 am
Bot?: No

Re: Datalogging / storing data

Post by Cyclops » Wed Jul 08, 2015 11:11 am

MikeRussell wrote:Thanks for testing it out, Cyclops. Let's give this one a try; t's a bit of a hack but lets see what comes of it.

I've chosen to implement this by polling probes 0-7 on the first temperature read. The grid headers should get updated with whatever was returned in the 'name' for each probe - or unchanged if the BCS doesn't respond for a given probe. I know it should respond with a 404 if no probe exists but I don't have a piece of hardware to test with.

Also note the column headers are only written to the CSV if the file doesn't already exist. To test this, save your output to a new file and hit read. Then if you want to refresh the probe names on the UI, hit stop and read again.

Let me know if these changes crash the app. If it seems stable enough I will upload it to my website too.
The probes are now showing however it is only displaying the 1st 3 probes.

Just Noticed it has indeed pulled all the names but the 4th one is labeled Temp Probe 3 not what i named it, this name is in Temp Probe 7 position

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

Re: Datalogging / storing data

Post by MikeRussell » Mon Jul 13, 2015 2:09 pm

Thanks for taking the time to test it out and providing an update!

Regarding the names, all I'm doing in code to get the probe information is making a GET request to http://bcs:port/api/temp/X where X is 0-7 - then I take the response and grab the value after 'name=BBQ' and put it into the grid. It is very possible I've made a number of mistakes since much of this work has been done in a quick-and-dirty fashion.

I think the first thing we should do is save to a new file. Close the app, open it again, choose a new file location, verify the address and click read. That should create a new file and the headers should be read the first time it polls. Let it request a few times and then click stop.

Does the header row look correct or are they still out of order? Does the first line in the new file look the same as the headers?

Next, could you manually request the temperature probe information from your BCS using a browser and post the results? You can use this URL as a template but just change BCS to be the IP address or hostname of your BCS and change 80 to the correct port. First run it with 3 and then copy/paste the results into a reply, then run with 7:

http://BCS:80/api/temp/3

This should request the 4th probe, which previously said Temp Probe 3 - is this still the case? Then try the same with http://BCS:80/api/temp/7 and see if the probe has the name you expect.

If the web responses match what the application shows, you just need to move around your names in the BCS configuration; if the responses don't match the application I need to look into it again to see why the order would be weird.

Thanks again for your time, I look forward to seeing your reply.

Has anyone else had a chance to try the app?

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

Re: Datalogging / storing data

Post by brewstarke » Mon Aug 10, 2015 6:28 pm

As a disclaimer: I'm NO programmer but was able to toss this together using the R language's Shiny package, so it's pretty crude but does the job and relies very heavily on the work of others so I can take no credit.

With that said, I took this awesome tool that MikeRussell built and found a way to easily display the data:
The link will take you to a web app where you can load in your .csv file that the BCSTempLogger creates and shows some very basic stats about your temp log.

https://lifegumbo.shinyapps.io/BCS_BrewLog

Pretty simple, just click on the "Choose File" button and browse to your file.

JImram
Posts: 12
Joined: Fri Jan 02, 2015 8:03 am
Bot?: No

Re: Datalogging / storing data

Post by JImram » Sun Nov 22, 2015 9:27 am

BCSTempLogger is simple and nice. I would like to use it, but it is not working in authentication mode. I need authentication, is there any possibility to use BCSTempLogger with my BCS in authentication mode?

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

Re: Datalogging / storing data

Post by MikeRussell » Mon Mar 14, 2016 9:55 am

Hey guys!

I didn't want to keep hijacking this thread with updates to the temperature logger or API so I posted it here: http://forum.embeddedcc.com/viewtopic.php?f=13&t=2706

To paraphrase, I implemented some basic auth (hopefully it works for you JImram) - i need a little help testing so hopefully you can check it out for me

Also big thanks to brewstarke - i looked at your app, very nice!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest