connect 2015 smoking salmon with splunk and raspberry pi
TRANSCRIPT
![Page 1: Connect 2015 Smoking Salmon with Splunk and Raspberry Pi](https://reader036.vdocuments.site/reader036/viewer/2022062515/55cf0e92bb61eb7c228b459b/html5/thumbnails/1.jpg)
Smoking Salmon with Splunk and Raspberry Pi
Greg Dostatni
![Page 2: Connect 2015 Smoking Salmon with Splunk and Raspberry Pi](https://reader036.vdocuments.site/reader036/viewer/2022062515/55cf0e92bb61eb7c228b459b/html5/thumbnails/2.jpg)
Assumptions
Cold Smoking
Requires temperatures between 20°C and 30°C
Raspberry Pi
Tiny computer used by hobbyists for just about anything
Splunk
Software used for searching, visualizing and analyzing machine generated data
![Page 3: Connect 2015 Smoking Salmon with Splunk and Raspberry Pi](https://reader036.vdocuments.site/reader036/viewer/2022062515/55cf0e92bb61eb7c228b459b/html5/thumbnails/3.jpg)
Equipment
![Page 4: Connect 2015 Smoking Salmon with Splunk and Raspberry Pi](https://reader036.vdocuments.site/reader036/viewer/2022062515/55cf0e92bb61eb7c228b459b/html5/thumbnails/4.jpg)
Electronics
![Page 5: Connect 2015 Smoking Salmon with Splunk and Raspberry Pi](https://reader036.vdocuments.site/reader036/viewer/2022062515/55cf0e92bb61eb7c228b459b/html5/thumbnails/5.jpg)
Connecting sensors
![Page 6: Connect 2015 Smoking Salmon with Splunk and Raspberry Pi](https://reader036.vdocuments.site/reader036/viewer/2022062515/55cf0e92bb61eb7c228b459b/html5/thumbnails/6.jpg)
Code*#!/usr/bin/pythonimport dhtreader, time, os, sys, os.path
type=22pins =(18,)
dhtreader.init()time.sleep(3)
for loop in range(SAMPLECOUNT): for pin in pins: time.sleep(0.5) val = dhtreader.read(type,pin) if val: temp, hum = val sensors[pin]["count"] += 1 sensors[pin]["temperature"] += temp sensors[pin]["humidity"] += hum time.sleep(0.5)
for pin in pins:if sensors[pin]["count"] > 0:
sensors[pin]["tempoutput"]=str(sensors[pin]["temperature"] / sensors[pin]["count"])
sensors[pin]["humoutput"]=str(sensors[pin]["humidity"] / sensors[pin]["count"])
else:
sensors[pin]["tempoutput"]="ERR"sensors[pin]["humoutput"]="ERR"
sensors[pin]["errors"]=str(SAMPLECOUNT-sensors[pin]["count"])
# output averagesfpw.write( "%s,"%time.ctime() + ','.join(["%s,%s"%(sensors[x]["tempoutput"],sensors[x]["humoutput"]) for x in pins])+"\n")sys.stderr.write("%s, samples=%d, "%(time.ctime(),SAMPLECOUNT)+','.join(["S%d_errorcount=%s"%(x,sensors[x]["errors"]) for x in pins])+"\n”)
*Complete source available in comments on this slide.
![Page 7: Connect 2015 Smoking Salmon with Splunk and Raspberry Pi](https://reader036.vdocuments.site/reader036/viewer/2022062515/55cf0e92bb61eb7c228b459b/html5/thumbnails/7.jpg)
Dry Cure
4 cups brown sugar1 cup saltSpices (optional)
Video instructions at http://youtu.be/Jk3xl6H9o94
![Page 8: Connect 2015 Smoking Salmon with Splunk and Raspberry Pi](https://reader036.vdocuments.site/reader036/viewer/2022062515/55cf0e92bb61eb7c228b459b/html5/thumbnails/8.jpg)
Smoking Salmon
![Page 9: Connect 2015 Smoking Salmon with Splunk and Raspberry Pi](https://reader036.vdocuments.site/reader036/viewer/2022062515/55cf0e92bb61eb7c228b459b/html5/thumbnails/9.jpg)
Delicious results
![Page 10: Connect 2015 Smoking Salmon with Splunk and Raspberry Pi](https://reader036.vdocuments.site/reader036/viewer/2022062515/55cf0e92bb61eb7c228b459b/html5/thumbnails/10.jpg)
MotivationSalmon economics
Salmon Filet $9 / lbs.Typical batch 4 lbs.Finished weight 2.8 lbs.C. Smoked Salmon $ 40 - 45 / lbs.Savings $ 70 - 85
CFO’s approval …
Priceless
![Page 11: Connect 2015 Smoking Salmon with Splunk and Raspberry Pi](https://reader036.vdocuments.site/reader036/viewer/2022062515/55cf0e92bb61eb7c228b459b/html5/thumbnails/11.jpg)
Future Plans
![Page 12: Connect 2015 Smoking Salmon with Splunk and Raspberry Pi](https://reader036.vdocuments.site/reader036/viewer/2022062515/55cf0e92bb61eb7c228b459b/html5/thumbnails/12.jpg)
Future Plans #2
![Page 13: Connect 2015 Smoking Salmon with Splunk and Raspberry Pi](https://reader036.vdocuments.site/reader036/viewer/2022062515/55cf0e92bb61eb7c228b459b/html5/thumbnails/13.jpg)
THANK YOU!Questions?