Skip to content

Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110)

In one of my earlier blog posts I reported that occasionally the HABpanel will disconnect from the server. Turns out it's not HABpanel, but it's the Pi itself which is causing the trouble. Part of the problem why it took me so long to investigate is that the display is in the kitchen, and someone had to have a look and spot the small red error message. To work around that problem, I hooked the device up in the network monitoring, and had an alarm triggered when the device is not reachable. Sure enough, that happens occasionally.

Because I moved /var/log to a small RAM disk to avoid wearing out the SDcard, all logs are lost once the device is rebooted. Had to bring keyboard and mouse to the kitchen in order to save the logfiles once the device was no longer reachable over the network.

 

Continue reading "Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110)"
  • Twitter
  • Bookmark Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110)
  • Bloglines Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110)
  • Technorati Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110)
  • Fark this: Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110)
  • Bookmark Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110) at YahooMyWeb
  • Bookmark Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110) at Furl.net
  • Bookmark Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110) at reddit.com
  • Bookmark Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110) at blinklist.com
  • Bookmark Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110) at Spurl.net
  • Bookmark Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110) at Simpy.com
  • Bookmark Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110) at blogmarks
  • Bookmark Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110) with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Dim the Raspberry Pi screen

The new Raspberry display works nice, but the screen is too bright. At night in the kitchen it enlightens the entire room - unnecessarily. Since I'm using the original Raspberry Pi 7" touch display, the brightness can be controlled in /sys/class/backlight/rpi_backlight/brightness. This "file" can hold a value from 0 (display off) to 255 (full bright).

 

Continue reading "Dim the Raspberry Pi screen"
  • Twitter
  • Bookmark Dim the Raspberry Pi screen at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Dim the Raspberry Pi screen
  • Bloglines Dim the Raspberry Pi screen
  • Technorati Dim the Raspberry Pi screen
  • Fark this: Dim the Raspberry Pi screen
  • Bookmark Dim the Raspberry Pi screen at YahooMyWeb
  • Bookmark Dim the Raspberry Pi screen at Furl.net
  • Bookmark Dim the Raspberry Pi screen at reddit.com
  • Bookmark Dim the Raspberry Pi screen at blinklist.com
  • Bookmark Dim the Raspberry Pi screen at Spurl.net
  • Bookmark Dim the Raspberry Pi screen at Simpy.com
  • Bookmark Dim the Raspberry Pi screen at blogmarks
  • Bookmark Dim the Raspberry Pi screen with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

webhook service with TLS and Let's Encrypt certificate

For a number of services, I need a system/service which can receive web hooks, and act when such a trigger is received.

Just a few examples:

  • GitHub can send web hooks when something changes in a repo (in any repository you administer, go to "Settings" -> "Webhooks", and add your own hook)
  • Tasker for Android can send HTTP(s) requests
  • JIRA can send web hooks when certain events occur
  • openHAB can send messages to other services

Now it would be useful to have your own receiver for web hooks, and run any task you want. There are a number of tools out there, which can solve this problem. I settled with "webhook". In addition, I deploy everything using Ansible, therefore I had to write a bit of code in order to automate this process.

 

Continue reading "webhook service with TLS and Let's Encrypt certificate"
  • Twitter
  • Bookmark webhook service with TLS and Let's Encrypt certificate at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg webhook service with TLS and Let's Encrypt certificate
  • Bloglines webhook service with TLS and Let's Encrypt certificate
  • Technorati webhook service with TLS and Let's Encrypt certificate
  • Fark this: webhook service with TLS and Let's Encrypt certificate
  • Bookmark webhook service with TLS and Let's Encrypt certificate at YahooMyWeb
  • Bookmark webhook service with TLS and Let's Encrypt certificate at Furl.net
  • Bookmark webhook service with TLS and Let's Encrypt certificate at reddit.com
  • Bookmark webhook service with TLS and Let's Encrypt certificate at blinklist.com
  • Bookmark webhook service with TLS and Let's Encrypt certificate at Spurl.net
  • Bookmark webhook service with TLS and Let's Encrypt certificate at Simpy.com
  • Bookmark webhook service with TLS and Let's Encrypt certificate at blogmarks
  • Bookmark webhook service with TLS and Let's Encrypt certificate with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Avoid "wear out" of SSD-cards in an openHAB system

You might know that problem: the brand new SSD in your system is super fast, but after a good time using it, the card is dead. Unlike spinning disks, which usually fail over time, and show I/O errors by blocks, SSD cards are prone to a problem called "Wear leveling". Blocks which are written more often will "wear out", and become unresponsible. More writes increase this risk. And a typical openHAB system does a number of writes all the time: every time an external status changes, it's written to the event log. By default the syslog is written to disk as well, and then there is a myriad of systemd services, writing status information into files.

 

Continue reading "Avoid "wear out" of SSD-cards in an openHAB system"
  • Twitter
  • Bookmark Avoid "wear out" of SSD-cards in an openHAB system at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Avoid "wear out" of SSD-cards in an openHAB system
  • Bloglines Avoid "wear out" of SSD-cards in an openHAB system
  • Technorati Avoid "wear out" of SSD-cards in an openHAB system
  • Fark this: Avoid "wear out" of SSD-cards in an openHAB system
  • Bookmark Avoid "wear out" of SSD-cards in an openHAB system at YahooMyWeb
  • Bookmark Avoid "wear out" of SSD-cards in an openHAB system at Furl.net
  • Bookmark Avoid "wear out" of SSD-cards in an openHAB system at reddit.com
  • Bookmark Avoid "wear out" of SSD-cards in an openHAB system at blinklist.com
  • Bookmark Avoid "wear out" of SSD-cards in an openHAB system at Spurl.net
  • Bookmark Avoid "wear out" of SSD-cards in an openHAB system at Simpy.com
  • Bookmark Avoid "wear out" of SSD-cards in an openHAB system at blogmarks
  • Bookmark Avoid "wear out" of SSD-cards in an openHAB system with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

if-up and if-down scripts with systemd

Everybody likes systemd, right? Well, not everybody. Who thought it might be a good idea to replace existing init systems with something which is big, monolithic, and not even feature complete?

A simple task: execute a script when an interface comes up, or goes down.

In the old days, on Debian or Ubuntu, one just added pre-up and post-down scripts in /etc/network/interfaces. But now, that file is gone, or empty. Ubuntu comes with netplan, which nobody else seems to use - luckily. NetworkManager is not used all the time, so one can't depend on that either. And systemd does not have an option to do something simple like taking care of interfaces coming up and down. You can write yourself a target, but that only fires for the first time, not every time.

In the end, you have to listen to D-Bus messages. And suddenly the simple task of running a simple script turns into developing a full-featured daemon with D-Bus capabilities.

Someone else already took the stab, and developed networkd-dispatcher.

 

Continue reading "if-up and if-down scripts with systemd"
  • Twitter
  • Bookmark if-up and if-down scripts with systemd at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg if-up and if-down scripts with systemd
  • Bloglines if-up and if-down scripts with systemd
  • Technorati if-up and if-down scripts with systemd
  • Fark this: if-up and if-down scripts with systemd
  • Bookmark if-up and if-down scripts with systemd at YahooMyWeb
  • Bookmark if-up and if-down scripts with systemd at Furl.net
  • Bookmark if-up and if-down scripts with systemd at reddit.com
  • Bookmark if-up and if-down scripts with systemd at blinklist.com
  • Bookmark if-up and if-down scripts with systemd at Spurl.net
  • Bookmark if-up and if-down scripts with systemd at Simpy.com
  • Bookmark if-up and if-down scripts with systemd at blogmarks
  • Bookmark if-up and if-down scripts with systemd with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

openHAB: redirect port 8080 to port 80

The openHAB Raspberry image, by default, listens on port 8080. After using the image for a while, it became quite boring to always add the port to the URL. Quickly I decided to redirect port 80 to port 8080, and make my life easier.

Not sure how much work that is in the openHAB settings, I settled with redirecting or forwarding the port 80 to port 8080.

 

 

Continue reading "openHAB: redirect port 8080 to port 80"
  • Twitter
  • Bookmark openHAB: redirect port 8080 to port 80 at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg openHAB: redirect port 8080 to port 80
  • Bloglines openHAB: redirect port 8080 to port 80
  • Technorati openHAB: redirect port 8080 to port 80
  • Fark this: openHAB: redirect port 8080 to port 80
  • Bookmark openHAB: redirect port 8080 to port 80 at YahooMyWeb
  • Bookmark openHAB: redirect port 8080 to port 80 at Furl.net
  • Bookmark openHAB: redirect port 8080 to port 80 at reddit.com
  • Bookmark openHAB: redirect port 8080 to port 80 at blinklist.com
  • Bookmark openHAB: redirect port 8080 to port 80 at Spurl.net
  • Bookmark openHAB: redirect port 8080 to port 80 at Simpy.com
  • Bookmark openHAB: redirect port 8080 to port 80 at blogmarks
  • Bookmark openHAB: redirect port 8080 to port 80 with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca