Move img folder under static, update refs + drafts
|
@ -15,6 +15,6 @@ I ordered the [Butterfly Labs](https://en.bitcoinwiki.org/wiki/Butterfly_Labs) 5
|
|||
|
||||
<!-- more -->
|
||||
|
||||
{{ 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.
|
|
@ -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
|
|||
|
||||
<!-- more -->
|
||||
|
||||
{{ 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/).
|
9
content/nest-logger.md
Normal file
|
@ -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.
|
15
content/storage-wars.md
Normal file
|
@ -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") }}
|
||||
|
||||
<!-- more -->
|
|
@ -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/).
|
||||
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/).
|
||||
|
|
|
@ -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/)
|
||||
|
||||
---
|
||||
|
||||
<!-- more -->
|
||||
|
||||
{{ 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:
|
||||
|
||||
<iframe width='800' height='600' frameborder='0' scrolling='no' src='https://upverter.com/eda/embed/#designId=f24516375cfae8b9'></iframe>
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
<!-- more -->
|
||||
|
||||
{{ 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.
|
||||
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.
|
||||
|
|
|
@ -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:
|
|||
|
||||
<!-- more -->
|
||||
|
||||
{{ 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
|
||||
|
|
|
@ -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"
|
|
@ -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") }}
|
||||
|
|
|
@ -10,7 +10,7 @@ Since writing the first WiFi temperature monitor post, I’ve implemented retrie
|
|||
|
||||
<!-- more -->
|
||||
|
||||
{{ 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:
|
|||
|
||||
<iframe width="697" height="431" seamless frameborder="0" scrolling="no" style="margin: 0 auto" src="https://docs.google.com/spreadsheets/d/1ir8ENcChkleHsPGUWlmbGlXQQTnxPHI-o29nMX9jvO8/pubchart?oid=280457042&format=interactive"></iframe>
|
||||
|
||||
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.
|
||||
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.
|
||||
|
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 690 KiB After Width: | Height: | Size: 690 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
BIN
static/img/NASDeepArchive.drawio.png
Normal file
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 941 KiB After Width: | Height: | Size: 941 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 658 KiB After Width: | Height: | Size: 658 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |