diff --git a/content/mining-btc-with-pi-part1.md b/content/mining-btc-with-pi-part1.md index 79c7990..361427c 100644 --- a/content/mining-btc-with-pi-part1.md +++ b/content/mining-btc-with-pi-part1.md @@ -15,6 +15,6 @@ I ordered the [Butterfly Labs](https://en.bitcoinwiki.org/wiki/Butterfly_Labs) 5 -{{ image(src="https://raw.githubusercontent.com/kylejcarlton/zola-theme-terminimal/master/img/ButterflyLabsMinerAndPi.png", position="left") }} +{{ image(src="/img/ButterflyLabsMinerAndPi.png", position="left") }} Hardware in place, I decided to join a mining pool since my hash rate would be contributing such a small percentage of the entire Bitcoin network’s computing power. I joined BTC Guild, which has since shut down due to security and regulatory concerns. [P2Pool](http://p2pool.org/), [Eligius](http://eligius.st/~gateway/) and [BitMinter](https://bitminter.com/) are some mining pools still in existence. [This CoinDesk article](https://www.coindesk.com/information/get-started-mining-pools/) provides more information about mining pools. At this point I just sat back and let the miner burn electricity. Was I making a profit? Only time would tell. Next update I’ll summarize the profitability of mining with this hardware from December 2013 - July 2015. \ No newline at end of file diff --git a/content/mining-btc-with-pi-part2.md b/content/mining-btc-with-pi-part2.md index b6c6735..36833b3 100644 --- a/content/mining-btc-with-pi-part2.md +++ b/content/mining-btc-with-pi-part2.md @@ -6,9 +6,9 @@ date = 2015-10-16 tags = ["RaspberryPi", "BTC"] +++ -I mined a total of 0.24359921 Bitcoin (BTC) with the Raspberry Pi and Butterfly Labs 5 GH/s miner from December 17, 2013 - July 29, 2015. +I mined a total of 0.24359921 Bitcoin (BTC) with the Raspberry Pi and Butterfly Labs 5 GH/s miner from December 17, 2013 - July 29, 2015. -Here’s a breakdown of costs: +Here’s a breakdown of costs: - Hardware = $390 - Electricity = $571 @@ -18,10 +18,10 @@ Total cost of power over that period of approximately 14,136 hours was calculate -{{ image(src="https://raw.githubusercontent.com/kylejcarlton/zola-theme-terminimal/master/img/BTCMinerPowerUsage.png", position="left") }} +{{ image(src="/img/BTCMinerPowerUsage.png", position="left") }} Thanks to the technology behind Bitcoin, you can see the full contents of the wallet where mining profits were deposited on [BlockChain.info](https://www.blockchain.com/explorer) @ [1BsWqHJh5kwLNHZzj6Q6DGaxRZVTK9U9A6](https://blockchain.info/address/1BsWqHJh5kwLNHZzj6Q6DGaxRZVTK9U9A6) and a graph over time. -{{ image(src="https://raw.githubusercontent.com/kylejcarlton/zola-theme-terminimal/master/img/BTCMinerProfitability.png", position="left") }} +{{ image(src="/img/BTCMinerProfitability.png", position="left") }} With the exchange rate of Bitcoins to USD at the time of writing this, the Return on Investment (ROI) with a balance of 0.24359921 BTC is about negative (-) $896. Breaking even would require the exchange rate to reach $3,844 USD / BTC; historically speaking the highest was around $1,100 in late 2013. Never say never though, here’s the [current price from CoinDesk](https://www.coindesk.com/price/bitcoin/). \ No newline at end of file diff --git a/content/nest-logger.md b/content/nest-logger.md new file mode 100644 index 0000000..57343b6 --- /dev/null +++ b/content/nest-logger.md @@ -0,0 +1,9 @@ ++++ +title = "Nest Logger" +date = 2022-12-24 +draft = true +[taxonomies] +tags = ["Nest", "Google", "API", "DeviceAccess", "Temperature", "Humidity", "Weather"] ++++ + +Since [Works with Nest (WWN)](https://developers.nest.com/) is retiring, I decided to get set up on [Device Access](https://developers.google.com/nest/device-access/get-started). There is a lot in these tutorials but I interested in a really functional method of getting data from my Nest thermostat. diff --git a/content/storage-wars.md b/content/storage-wars.md new file mode 100644 index 0000000..dbbc9d4 --- /dev/null +++ b/content/storage-wars.md @@ -0,0 +1,15 @@ ++++ +title = "Storage Wars" +date = 2022-03-24 +draft = true + +[taxonomies] +tags = ["Synology", "NAS", "AWS", "S3GlacierDeepArchive", "DataBackup", "DisasterRecovery"] ++++ + +An overwhelming choice of cloud based storage these days, and all the marketing around them can make it seem like an overly complicated endeavor to keep data safe. +I decided to take some control back from the cloud and host as much as possible on my home network. I went with a [Synology DS220+ NAS](https://www.synology.com/en-us/products/DS220+), a [Seagate 5TB External Drive](https://www.amazon.com/gp/product/B07VS8QCXC/) and [Amazon Web Services (AWS) S3 Glacier Deep Archive](https://aws.amazon.com/s3/storage-classes/?nc=sn&loc=3#____) for a low-cost off-site backup location. I also added an [APC Back-UPS 600VA](https://www.apc.com/us/en/product/BE600M1/apc-backups-600va-120v-1-usb-charging-port-7-nema-outlets-2-surge/) and used a [Raspberry Pi 2 Model B Rev 1.1](https://learn.adafruit.com/introducing-the-raspberry-pi-2-model-b) to connect and orchestrate everything. + +{{ image(src="/img/NASDeepArchive.drawio.png", position="left") }} + + diff --git a/content/universal-remote-part1.md b/content/universal-remote-part1.md index 3f90a90..bafc1ab 100644 --- a/content/universal-remote-part1.md +++ b/content/universal-remote-part1.md @@ -6,4 +6,4 @@ date = 2014-11-06 tags = ["RaspberryPi", "UniversalRemote"] +++ -I’ve ordered all the parts to build a DIY universal remote - [opensourceuniversalremote.com](http://opensourceuniversalremote.com/), following [these directions from Alex Bain](http://alexba.in/blog/2013/06/08/open-source-universal-remote-parts-and-pictures/). \ No newline at end of file +I’ve ordered all the parts to build a DIY universal remote - [opensourceuniversalremote.com](http://opensourceuniversalremote.com/), following [these directions from Alex Bain](http://alexba.in/blog/2013/06/08/open-source-universal-remote-parts-and-pictures/). diff --git a/content/universal-remote-part2.md b/content/universal-remote-part2.md index d7208c0..f8239c7 100644 --- a/content/universal-remote-part2.md +++ b/content/universal-remote-part2.md @@ -11,6 +11,7 @@ I purchased the [Prototyping Pi Plate directly from adafruit](https://www.adafru Parts List: --- + - 1 x [Adafruit Industries ADA801](https://octopart.com/801-adafruit+industries-24605284) - 1 x [Raspberry Pi Model B 756-8308 Motherboard](https://en.wikipedia.org/wiki/Raspberry_Pi) - 2 x [Everlight IR333C](https://octopart.com/ir333c-everlight-17677690) @@ -19,13 +20,14 @@ Parts List: - 1 x [Ohmite OD103JE](https://octopart.com/od103je-ohmite-133027) - 1 x [Vishay Semiconductor TSOP38238 IR Receiver](https://octopart.com/tsop38238-vishay-5517697) - 1 x 22 [AWG Solid Core Wire](http://www.frys.com/product/7716148/) + --- -{{ image(src="https://raw.githubusercontent.com/kylejcarlton/zola-theme-terminimal/master/img/OpensourceRemoteParts.png", position="left") }} +{{ image(src="/img/OpensourceRemoteParts.png", position="left") }} -Here's [the circuit](https://upverter.com/alexbain/f24516375cfae8b9/Open-Source-Universal-Remote/#/) I’ll be building: +Here's [the circuit](https://upverter.com/alexbain/f24516375cfae8b9/Open-Source-Universal-Remote/#/) I’ll be building: diff --git a/content/universal-remote-part3.md b/content/universal-remote-part3.md index e419d90..a836906 100644 --- a/content/universal-remote-part3.md +++ b/content/universal-remote-part3.md @@ -8,12 +8,12 @@ tags = ["RaspberryPi", "UniversalRemote"] The only items I didn’t purchase online were the supplies for soldering and wiring. I went with the ECG 20 Watt Miniature Corded Soldering Iron, Sn60/Pb40 Solder and 22AWG Solid Copper Wire. -With all the components and tools needed, the first step was assembling the Adafruit Prototyping Pi Plate Kit following [these instructions](https://learn.adafruit.com/adafruit-prototyping-pi-plate/solder-it). Once complete I built [the circuit for the IR receiver and transmitter](https://upverter.com/design/alexbain/f24516375cfae8b9/open-source-universal-remote/#/). With the assembly complete the Prototyping Pi Plate connects to the Raspberry Pi via the GPIO pins. In addition to referencing the circuit diagram [these high resolution pictures from alexba.in](http://alexba.in/blog/2013/06/08/open-source-universal-remote-parts-and-pictures/) were very useful. +With all the components and tools needed, the first step was assembling the Adafruit Prototyping Pi Plate Kit following [these instructions](https://learn.adafruit.com/adafruit-prototyping-pi-plate/solder-it). Once complete I built [the circuit for the IR receiver and transmitter](https://upverter.com/design/alexbain/f24516375cfae8b9/open-source-universal-remote/#/). With the assembly complete the Prototyping Pi Plate connects to the Raspberry Pi via the GPIO pins. In addition to referencing the circuit diagram [these high resolution pictures from alexba.in](http://alexba.in/blog/2013/06/08/open-source-universal-remote-parts-and-pictures/) were very useful. -{{ image(src="https://raw.githubusercontent.com/kylejcarlton/zola-theme-terminimal/master/img/SolderingSupplies.png", position="left") }} +{{ image(src="/img/SolderingSupplies.png", position="left") }} -{{ image(src="https://raw.githubusercontent.com/kylejcarlton/zola-theme-terminimal/master/img/UniversalRemoteHardwareAssembled.png", position="left") }} +{{ image(src="/img/UniversalRemoteHardwareAssembled.png", position="left") }} -With the hardware assembled the next step is to install [Raspbian](https://www.raspberrypi.com/software/) as the OS on the SD card and the application [LIRC](http://www.lirc.org/) for controlling the hardware to test functionality. \ No newline at end of file +With the hardware assembled the next step is to install [Raspbian](https://www.raspberrypi.com/software/) as the OS on the SD card and the application [LIRC](http://www.lirc.org/) for controlling the hardware to test functionality. diff --git a/content/universal-remote-part4.md b/content/universal-remote-part4.md index e7fc6f2..6ce5999 100644 --- a/content/universal-remote-part4.md +++ b/content/universal-remote-part4.md @@ -8,7 +8,7 @@ tags = ["RaspberryPi", "UniversalRemote"] -With the hardware built the next step is getting the Raspberry Pi up and running and installing [LIRC](http://www.lirc.org/). [Alexba.in](http://alexba.in/) has a comprehensive post for both of these things: [RaspberryPi Quickstart](http://alexba.in/blog/2013/01/04/raspberrypi-quickstart/) and [Setting Up LIRC on the RaspberryPi](http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/). +With the hardware built the next step is getting the Raspberry Pi up and running and installing [LIRC](http://www.lirc.org/). [Alexba.in](http://alexba.in/) has a comprehensive post for both of these things: [RaspberryPi Quickstart](http://alexba.in/blog/2013/01/04/raspberrypi-quickstart/) and [Setting Up LIRC on the RaspberryPi](http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/). I discovered and modified a few things along the way, so here’s what I did: @@ -20,7 +20,7 @@ Since I’d like to connect over WiFi I’ve added a [Belkin USB F7D2101](https: -{{ image(src="https://raw.githubusercontent.com/kylejcarlton/zola-theme-terminimal/master/img/RemoteBuildWirelessBT.jpg", position="left") }} +{{ image(src="/img/RemoteBuildWirelessBT.jpg", position="left") }} - With the Pi temporarily connected by Ethernet cable, I [set up the wireless connection via the command line](https://www.raspberrypi.com/documentation/computers/configuration.html) over SSH. @@ -39,19 +39,22 @@ sudo ntpdate -u ntp.ubuntu.com ``` - Next install [LIRC](http://www.lirc.org/) + ```bash sudo apt-get install lirc ``` + - Modify **/etc/modules** and **/etc/lirc/hardware.conf** for the specific hardware being used: - _**/etc/modules**_ + ```bash lirc_dev lirc_rpi gpio_in_pin=23 gpio_out_pin=22 ``` _**/etc/lirc/hardware.conf**_ + ```bash ###################### # /etc/lirc/hardware.conf @@ -74,6 +77,7 @@ LIRCD_CONF="" LIRCMD_CONF="" ``` - Restart LIRC to pick up these changes: + ```bash sudo /etc/init.d/lirc stop mode2 -d /dev/lirc0 diff --git a/content/universal-remote-part5.md b/content/universal-remote-part5.md index 1836eed..9d25089 100644 --- a/content/universal-remote-part5.md +++ b/content/universal-remote-part5.md @@ -45,6 +45,7 @@ node app.js ```bash sudo nano /etc/init.d/URemote ``` + ```bash #! /bin/sh # /etc/init.d/lirc_web @@ -77,37 +78,50 @@ case "$1" in esac exit 0 ``` + - Make the script executable: + ```bash sudo chmod 755 /etc/init.d/URemote ``` + - Test starting and stopping lirc_web with the script: + ```bash sudo /etc/init.d/URemote start sudo /etc/init.d/URemote stop ``` + - Register the script to be run at start-up: + ```bash sudo update-rc.d URemote defaults ``` + If your remotes aren’t in the [available index](http://lirc.sourceforge.net/remotes/) or those config files don’t work, [irrecord](http://www.lirc.org/html/irrecord.html) can be used. + - Stop lirc to free up _/dev/lirc0_: + ```bash sudo /etc/init.d/lirc stop ``` + - Create a new remote control configuration file using _/dev/lirc0_ and save the output to _~/lircd.conf_. Once a file is generated for each remote it can be compiled into a single lircd.conf, this is much easier with FTP access. A list of namespace values for buttons is available @ [ocinside.de/modding_en/linux_ir_irrecord_list](http://www.ocinside.de/modding_en/linux_ir_irrecord_list/). + ```bash irrecord -d /dev/lirc0 ~/lircd.conf ``` + - After all the remotes are recorded and compiled, the lircd.conf file can be placed @ _/etc/lirc/_ and then restart LIRC to pick up the new configuration: + ```bash sudo /etc/init.d/lirc stop sudo /etc/init.d/lirc start ``` -To finish of the hardware build I made a case out of Lego bricks, so it stays oriented vertically and has some protection. -{{ image(src="https://raw.githubusercontent.com/kylejcarlton/zola-theme-terminimal/master/img/UniversalRemoteLegoCase.png", position="left") }} + +To finish of the hardware build I made a case out of Lego bricks, so it stays oriented vertically and has some protection. +{{ image(src="/img/UniversalRemoteLegoCase.png", position="left") }} Now control of IR devices is possible from a website, next up controlling Bluetooth devices the same way using [GIMX](http://gimx.fr/wiki/index.php?title=Command_line). -{{ image(src="https://raw.githubusercontent.com/kylejcarlton/zola-theme-terminimal/master/img/UniversalRemoteWebsite.png", position="left") }} - +{{ image(src="https://raw.githubusercontent.com/kylejcarlton/zola-theme-terminimal/master/img/UniversalRemoteWebsite.png", position="left" \ No newline at end of file diff --git a/content/wifi-temperature-monitor-part1 .md b/content/wifi-temperature-monitor-part1 .md index 7d51089..af462d9 100644 --- a/content/wifi-temperature-monitor-part1 .md +++ b/content/wifi-temperature-monitor-part1 .md @@ -30,9 +30,8 @@ For my first project with the Photon, I created a wireless temperature monitor t Then the temperature can be calculated based on the voltage output from the TMP36 using _Temp °C = 100*(reading in V) - 50_. -{{ image(src="https://raw.githubusercontent.com/kylejcarlton/zola-theme-terminimal/master/img/TMP36_Graph.png", position="left") }} +{{ image(src="/img/TMP36_Graph.png", position="left") }} After importing I also converted to Fahrenheit using _T(°F) = T(°C) × 1.8 + 32_. Here’s the final output in the Google Sheet using _ImportJSON(https://api.particle.io/v1/devices/UNIQUE_ID/analogvalue?access_token=UNIQUE_TOKEN)_: - -{{ image(src="https://raw.githubusercontent.com/kylejcarlton/zola-theme-terminimal/master/img/TMP36_Gsheet.png", position="left") }} +{{ image(src="/img/TMP36_Gsheet.png", position="left") }} diff --git a/content/wifi-temperature-monitor-part2.md b/content/wifi-temperature-monitor-part2.md index f417f58..2bb78b8 100644 --- a/content/wifi-temperature-monitor-part2.md +++ b/content/wifi-temperature-monitor-part2.md @@ -10,7 +10,7 @@ Since writing the first WiFi temperature monitor post, I’ve implemented retrie -{{ image(src="https://raw.githubusercontent.com/kylejcarlton/zola-theme-terminimal/master/img/Google_Apps_Script_Temp.png", position="left") }} +{{ image(src="/img/Google_Apps_Script_Temp.png", position="left") }} For communication with my Nest Thermostat, I didn’t implement the [OAuth2.0](https://oauth.net/2/) standard completely inside the Apps Script; although this would be possible using [apps-script-oauth2](https://github.com/googlesamples/apps-script-oauth2). Following the [REST Quick Guide](https://developers.nest.com/documentation/cloud/how-to-auth), I generated a [PIN for my Nest](https://developers.nest.com/documentation/cloud/authorization-overview#pin-based-authorization) and then used [Postman](https://www.getpostman.com/) to initiate the POST call for the Access Token to be used in the script. @@ -18,4 +18,4 @@ Here are the results after a few days: -The [Google Sheet](https://docs.google.com/spreadsheets/d/1ir8ENcChkleHsPGUWlmbGlXQQTnxPHI-o29nMX9jvO8/edit) is here (create a copy to view Script Editor and make changes) and I also posted the code as a [Gist here](https://gist.github.com/kylejcarlton/12a85c4a5b375eaff62ee509d76a6720). API keys, device ID’s etc. are all variables to be defined at the beginning of the Script. \ No newline at end of file +The [Google Sheet](https://docs.google.com/spreadsheets/d/1ir8ENcChkleHsPGUWlmbGlXQQTnxPHI-o29nMX9jvO8/edit) is here (create a copy to view Script Editor and make changes) and I also posted the code as a [Gist here](https://gist.github.com/kylejcarlton/12a85c4a5b375eaff62ee509d76a6720). API keys, device ID’s etc. are all variables to be defined at the beginning of the Script. diff --git a/img/BTCMinerPowerUsage.png b/static/img/BTCMinerPowerUsage.png similarity index 100% rename from img/BTCMinerPowerUsage.png rename to static/img/BTCMinerPowerUsage.png diff --git a/img/BTCMinerProfitability.png b/static/img/BTCMinerProfitability.png similarity index 100% rename from img/BTCMinerProfitability.png rename to static/img/BTCMinerProfitability.png diff --git a/img/ButterflyLabsMinerAndPi.png b/static/img/ButterflyLabsMinerAndPi.png similarity index 100% rename from img/ButterflyLabsMinerAndPi.png rename to static/img/ButterflyLabsMinerAndPi.png diff --git a/img/Google_Apps_Script_Temp.png b/static/img/Google_Apps_Script_Temp.png similarity index 100% rename from img/Google_Apps_Script_Temp.png rename to static/img/Google_Apps_Script_Temp.png diff --git a/static/img/NASDeepArchive.drawio.png b/static/img/NASDeepArchive.drawio.png new file mode 100644 index 0000000..06b7821 Binary files /dev/null and b/static/img/NASDeepArchive.drawio.png differ diff --git a/img/OpensourceRemoteParts.png b/static/img/OpensourceRemoteParts.png similarity index 100% rename from img/OpensourceRemoteParts.png rename to static/img/OpensourceRemoteParts.png diff --git a/img/RemoteBuildWirelessBT.jpg b/static/img/RemoteBuildWirelessBT.jpg similarity index 100% rename from img/RemoteBuildWirelessBT.jpg rename to static/img/RemoteBuildWirelessBT.jpg diff --git a/img/SolderingSupplies.png b/static/img/SolderingSupplies.png similarity index 100% rename from img/SolderingSupplies.png rename to static/img/SolderingSupplies.png diff --git a/img/TMP36_Graph.png b/static/img/TMP36_Graph.png similarity index 100% rename from img/TMP36_Graph.png rename to static/img/TMP36_Graph.png diff --git a/img/TMP36_Gsheet.png b/static/img/TMP36_Gsheet.png similarity index 100% rename from img/TMP36_Gsheet.png rename to static/img/TMP36_Gsheet.png diff --git a/img/UniversalRemoteHardwareAssembled.png b/static/img/UniversalRemoteHardwareAssembled.png similarity index 100% rename from img/UniversalRemoteHardwareAssembled.png rename to static/img/UniversalRemoteHardwareAssembled.png diff --git a/img/UniversalRemoteLegoCase.png b/static/img/UniversalRemoteLegoCase.png similarity index 100% rename from img/UniversalRemoteLegoCase.png rename to static/img/UniversalRemoteLegoCase.png diff --git a/img/UniversalRemoteWebsite.png b/static/img/UniversalRemoteWebsite.png similarity index 100% rename from img/UniversalRemoteWebsite.png rename to static/img/UniversalRemoteWebsite.png diff --git a/img/apple-touch-icon.png b/static/img/apple-touch-icon.png similarity index 100% rename from img/apple-touch-icon.png rename to static/img/apple-touch-icon.png diff --git a/img/favicon.ico b/static/img/favicon.ico similarity index 100% rename from img/favicon.ico rename to static/img/favicon.ico diff --git a/img/favicon.png b/static/img/favicon.png similarity index 100% rename from img/favicon.png rename to static/img/favicon.png diff --git a/img/favicon_io.zip b/static/img/favicon_io.zip similarity index 100% rename from img/favicon_io.zip rename to static/img/favicon_io.zip diff --git a/img/profile.jpeg b/static/img/profile.jpeg similarity index 100% rename from img/profile.jpeg rename to static/img/profile.jpeg