-
30 Days Without An Accident
01/27/2016 at 14:36 • 0 commentsThat's also a 'the walking dead' episode title :) I have another SD card for the PI Zero and I want to make the ESP12F or 12E work as a wifi board. Makes more sense to use the PI A (pia) as a home server that has nothing to do right now.
[Update] another stress test : "calling it 'stable' in public"
-
back from Christmas and 32C3
12/30/2015 at 20:15 • 0 commentsand the PI is down for a week now, couldn't write to the FS and now kernel panics and doesn't mount the FS. This is so annoying!
So I hooked up the raspberry PI A that I also have, in the hopes that this was a damage due to previous SDcard fails on the PI B rev2. Let's see how far PIA gets with a brand new card.
-
Backup to dropbox
12/11/2015 at 21:21 • 0 commentshttps://github.com/andreafabrizi/Dropbox-Uploader
Since I've upgraded my dropbox account I checked for the possibility to backup stuff to it from the raspberry PI. Somebody already has written a nice bash script that connects with the API. Looks easy enough. You have to add an App and get a secret key to get access to your whole dropbox or an app folder. Having a folder for the raspberry is enough for me, since I only want to upload the files.
It's quite slow, probably handshaking for every file, uploading it and closing transactions makes it not so fast, but doing this once a day won't hurt. It's not deleting stuff but it doesn't simply overwrite it, that's a plus. Probably makes sense to make a zip file and only upload that.
-
... with style
12/11/2015 at 20:38 • 0 commentsI was looking for a lightweight css library and thanks to http://www.purecss.io/ I now have a nice looking status monitor. This is still not switching anything :( Should have made a backup from my old stuff.
-
Sending status mails
12/10/2015 at 12:05 • 0 commentshttp://tombuntu.com/index.php/2008/10/21/sending-email-from-your-system-with-ssmtp/
sudo apt-get install ssmtp sudo nano /etc/ssmtp/ssmtp.conf root=myemailaddress@gmail.com
mailhub=smtp.gmail.com:587
AuthUser=mygmailusername
AuthPass=mypassword
UseSTARTTLS=YESIf you use your google account then you will have to add an app password instead of your user password.
ssmtp myemailaddress@gmail.com < msg.txt msg.txt is a simple text using the proper formatting for sSMTP: To: myemailaddress@gmail.com From: myemailaddress@gmail.com Subject: alert The server is down! Ctrl+D or printf "To: myemailaddress@gmail.com\nFrom: myemailaddress@gmail.com\nSubject: New IP address\n\n\nMessage\n" | ssmtp myemailaddress@gmail.com
-
all about that shield
12/09/2015 at 10:48 • 0 commentsbecause I asked myself what the price would be in case I use the PIzero and want to create a shield... tada:
This is a design for an arduino HAT that can feature an atmega328p as a cheap ADC and even more IOs I don't use. Arduino for real-timey-wimey stuff. I've completely done it the wrong way again, first designed, then checked. Still had some fun and assures me that it's doable.
Path to do:
- check how much current the 3.3V power converter on the raspi can deliver additionally for powering the arduino
- if needed, design a power supply based on the MCP1710 (shutdown input makes it interesting for arduino)
- add 5V micro/mini USB port and put ACS712 between
- add RGB LED for basic debugging (wsb2812 or plain rgb)
- add jumpers / soldering connections for different powering setups
- maybe replace the quartz for something SMDish
http://pi.gadgetoid.com/article/building-the-pico-piduino
https://projects.drogon.net/raspberry-pi/gertboard/arduino-ide-installation-isp/
http://pinout.xyz/pinout/arduino_spi
433MHz remote control
- check how much current the 3.3V power converter on the raspi can deliver additionally for powering the arduino
-
Bye Bye Mr. Raspberry Pi
12/08/2015 at 21:36 • 1 commentI'm gonna throw away that Raspberry PI B Rev2 - it gave me weird graphical glitches and didn't start up properly after the first shutdown. Makes me feel bad, but on the other hand I still have the B Rev1 and A Rev2 plus the new Raspi zero.
Headless raspberry PI A - aka 'pia' is running now. The power switch I used might be a bit dodgy, I've seen the lights going on again when switching the power off. That might not be healthy for the PI. The 8GB SD card looks good, 6GB are formatted to FAT32 and are meant to be storage.
For OOKing around with the 433MHz and the power monitoring stuff I need the correct pinout. The module was called "5A ACS712 Module Range Current Sensor For Arduino" on ebay. It's a hall effect based current measure thingy.
https://www.raspberrypi.org/documentation/usage/gpio/
Much Nice. Such wow.
-
Next problem up: D-Link dynDNS
12/08/2015 at 10:59 • 0 commentsMy router sets a wrong IP address when updating dynDNS, probably the one that my ISP gives me internally. So I had to write a little bash script for setting the IP address. Thanks to the api provided by dyn.com I was able to do just that.
#!/bin/bash IP_stored=$(cat IP.txt) IP_current=$(wget http://ipinfo.io/ip -qO -) HOST="somewhere.dlinkddns.com" USERNAME="username" //whaaaat PASSWORD="password" //why did I post this?? URL="members.dyndns.org/nic/update" URLEND="&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG" if [ "$IP_stored" != "$IP_current" ] then curl "http://${USERNAME}:${PASSWORD}@${URL}?hostname=${HOST}&myip=${IP_current}${URLEND}" echo "${IP_current}" > IP.txt fi
Cronjob
*/5 * * * * cd /home/pi/script/ && bash dynDNSupdate.sh
https://help.dyn.com/remote-access-api/perform-update/
http://askubuntu.com/questions/95910/command-for-determining-my-public-ip
-
raspberry pi zero running headless vs. ssh login
12/06/2015 at 19:12 • 5 commentsCase by pimoroni.com
oh dear. Seems like all the time when SSH got the hick-ups on my mac and I blamed the raspberry pi that I was wrong. SSH on my mac sometimes loses connection and tells me the host is down, but when I call top it tells a long uptime. That is weird. Not sure what happens.
I'm installing php and mysql right now, all over a ssh-client on my phone.
Change the names of your raspberryPIs if you have had more than one.
sudo service dhcpcd status
told me to do reload my daemons with
sudo systemctl daemon-reload
No clue and final thoughts for today:
whenever my ssh terminal or the browser tells me that the IP address is not reachable, my cellphone has no problems and likewise the browser, if I connect over dynamicDNS. Whenever I cannot connect over IP, the pizero.local address is also unreachable from my mac. If I then refresh or try to reconnect, it gets back again. Power supply is 1A and it is only the pizero with an OTG connected edimax usb wifi dongle. It must be something with routing in general. I've seen this at my grandmas place too. Gnargh. Is DHCP on jessy a bad thing? I have no idea. Just more questions than before.
This morning I had to wake it up with multiple requests, that made google a bit more. Found kbd settings to play with.
sudo nano /etc/kbd/config
Powersaving and monitor blank set to 0 now
Seems to be a valid thing turning the PI headless (that's what I want for all of them anyway, so, hurray!)
http://www.sbprojects.com/projects/raspberrypi/tweaks.php
https://www.bitpi.co/2015/02/14/prevent-raspberry-pi-from-sleeping/
I ran out of mojo again. Maybe it's the WiFi dongle.
sudo nano /etc/modprobe.d/8192cu.conf options 8192cu rtw_power_mgnt=0
http://raspberrypi.stackexchange.com/questions/1384/how-do-i-disable-suspend-mode
http://www.mikeslab.net/?p=178
http://electronut.in/preventing-raspberry-pi-wifi-from-going-into-sleep-mode/
-
USV PSU and stuff, link dropper
12/05/2015 at 15:24 • 0 comments