I got a hold of a USB outlet from ebay, and I wanted to use it basically as a hub for charging. I sourced a 3A 12V plug-type power supply which I figured would work well with the ‘UBEC‘ 5V buck converter I got made for RC plane receivers, changed the UBEC cables to DC barrel jacks and. hmm doesn’t work.. :/
Monitoring RPi Temp and CPU with Thingspeak
I made the following python script to update CPU Temperature and 5 minute average CPU load of my RPi to Thingspeak:
#!/usr/bin/env python import subprocess import httplib, urllib GetTempCommand = "cat /sys/class/thermal/thermal_zone0/temp" GetCPUCommand = "cat /proc/loadavg" GetTempProcess = subprocess.Popen(GetTempCommand.split(), stdout=subprocess.PIPE) GetTempOutput = GetTempProcess.communicate()[0] Temp = float(GetTempOutput) / 1000 #print Temp GetCPUProcess = subprocess.Popen(GetCPUCommand.split(), stdout=subprocess.PIPE) GetCPUOutput = GetCPUProcess.communicate()[0] CPU = GetCPUOutput.split() #print CPU[1] params = urllib.urlencode({'field1': CPU[1],'field2': Temp, 'key':'######'}) # use your API key generated in the thingspeak channels for the value of 'key' # temp is the data you will be sending to the thingspeak channel for plotting the graph. You can add more than one channel and plot more graphs headers = {"Content-typZZe": "application/x-www-form-urlencoded","Accept": "text/plain"} conn = httplib.HTTPConnection("api.thingspeak.com:80") try: conn.request("POST", "/update", params, headers) response = conn.getresponse() data = response.read() conn.close() except: print "connection failed"
The script is run every 5 mins using cron ($ crontab -e):
*/5 * * * * python "/home/ubuntu/logging/TempCPUtoThingspeak.py"
Running DC++ on my RPI3
MicroDC2 Seems to be a good client to use for a headless server. It is configured by command line and there appears to be an update released just recently (first update in 5 years). The package installs using apt-get in Debian (I’m using Debian since there isn’t a proper Ubuntu release for the RPI3 yet).
sudo apt-get install microdc2