Cool Music

I purchased some Klipsch AW-400 outdoor speakers for a good price and mounted them on my garage (which is a separate building.) To drive them, I bought a HifiBerry AMP+ and a Raspberry Pi 3B+. I’d been using Max2Play for music streaming but came across Volumio and I prefer it. The web interface is so much better. Also, it makes it really easy to share the USB hard drive I use as a media server on another Raspberry Pi.

Volumio works fine right out of the box and the set up instructions on their site are very easy to follow. The problem I have is that since I live in the desert and have my Raspberry Pi on a shelf high in my garage, it overheats occasionally. I bought heat sinks for it but that didn’t solve the heat problem.

My solution was that I bought a USB powered fan on a goose neck. I got this one but any USB-powered fan, NOT one that charges a battery via USB, will work. I suppose I could just let the fan blow in the Raspberry Pi constantly, but where’s the fun in that? I figured that if I can read the temp, I turn the fan on and off as needed. Yes I can. Yes I did and here’s how.

I found that the CPU temperature is stored in /sys/class/thermal/thermal_zone0/temp as milidegrees Celsius, which means 45000 is 45° C.

I found uhubctl at GitHub which allows Linux in some applications to control some smart USB hubs. Fortunately, a RPi 3B+ is the right application and its USB ports are the right kind of smart USB hubs. To get it to work, it has to be download and compile first.

Volumio ships as a fairly stripped down version of Debian. To add the missing standard software, run:

sudo apt-get update && sudo apt-get -y upgrade

Next, install gcc, make, and a USB library:

sudo apt-get install gcc
sudo apt-get install make
sudo apt-get install libusb-1.0

To download the uhubctl command, we need to install git:

sudo apt-get install git

At this point we should be able to download and compile uhubctl:

git clone git://github.com/mvp/uhubctl
cd uhubctl
make

uhubctl is now ready to use. Next we need to find which port the fan is plugged in to. To list the ports run:

sudo ./uhubctl

You should see an output something like:

Current status for hub 1-1.1
  Port 1: 0503 power highspeed enable connect [0424:7800]
  Port 2: 0100 power
  Port 3: 0100 power
Current status for hub 1-1 [0424:2514]
  Port 1: 0503 power highspeed enable connect [0424:2514]
  Port 2: 0100 power
  Port 3: 0100 power
  Port 4: 0100 power
Current status for hub 1 [1d6b:0002 Linux 4.19.118-v7+ dwc_otg_hcd DWC OTG Controller 3f980000.usb]

In this case, my fan is plugged into hub 1-1 port 2 but it doesn’t show up.

To turn the right port off, you need to be specific about which hub and which port. Plug in the fan, and hunt for it by turning ports off one at a time till the fan stops.

The command to turn off my fan is:

sudo ./uhubctl -l 1-1 -p 2 -a off

To turn it back on:

sudo ./uhubctl -l 1-1 -p 2 -a on

And to get the current status:

sudo ./uhubctl -l 1-1 -p 2

Experiment with it and make sure you can control your fan. Next, we’ll create a script to switch the port on or off depending on the temperature of the CPU:

sudo nano coolme.sh

Copy and paste this code:

#!/bin/bash
# This is where the raw cpu temp is stored
# Could use vcgencmd measure_temp but it returns
#   a formatted string. Messy.
cpu=$(</sys/class/thermal/thermal_zone0/temp)
# This is the limit I set. Change as necessary
limit=70000
# To find which port your fan is plugged in run:
#  sudo ./uhubctl May need to experiment turning
#  them off to find it.
port_state=$(sudo /home/volumio/uhubctl/uhubctl -l 1-1 -p 2)
if [ $cpu -gt $limit ]; then
# We're overtemp. Turn on fan if necessary
  if [ $(expr substr + "$port_state" 79 6) == "off" ]
  then
  # Port was off, turn it on
    echo "Overtemp: CPU raw temp is $cpu 'C at $(date)"
    /home/volumio/uhubctl/uhubctl -l 1-1 -p 2 -a on
    printf " -----\n"
  fi
else
# We're undertemp. Turn fan off if necessary
  if [ $(expr substr + "$port_state" 79 6) == "power" ]
  # Fan is on, turn that baby off
  then
     echo "Undertemp: CPU raw temp is $cpu 'C at $(date)"
     /home/volumio/uhubctl/uhubctl -l 1-1 -p 2 -a off
    printf " -----\n"
  fi
fi

If you’re using a different hub, you may need to change

  if [ $(expr substr + "$port_state" 55 6) == "off" ]

What it is saying is to start at character 55 and read the following 6 characters. If you use hub 1-1.1, that will throw that number off. To find it, I used the following command and adjusted the first number till I got “power” or “off” with no space in front of it.

port_state=$(sudo /home/volumio/uhubctl/uhubctl -l 1-1 -p 2) && echo $(expr substr + "$port_state" 55 6)

I set the limit to 70° C because the overtemp warning happens at 80° C. Adjust the limit as you see fit.

To make the script executable, run

sudo chmod 755 coolme.sh

Now test the script. Change the limit to make it turn on the fan and then change it back to turn it off. Make sure it works. To run the script:

sudo ./coolme.sh

If you don’t use sudo, uhubctl won’t work correctly. Once you’re satisfied with the script, we need to add a cron job to execute it every five minutes. Like I said, Volumio is pretty stripped down, so we need to install cron:

sudo apt-get install cron

Add the script to the cron jobs:

sudo crontab -e

If you don’t use sudo, you’ll only add the script for the user and we need root access for this thing to work.

Add the following line to the bottom of the file:

*/5 * * * * /home/volumio/uhubctl/coolme.sh >> /home/volumio/log.txt

I included the log file because I want to see that it works. The way the script is written, it will only produce output when it turns the fan on or off so the log file won’t fill up too quickly.

If you want to make sure the cron jobs are working, you can also add:

* * * * * echo “crontest $(date) $(whoami)” >> /tmp/crontest.txt

Don’t forget to remove it or it will create a pretty big log file in a few days.

That should do it. My experience has been that the fan cools the RPI down pretty quickly. Here’s an example of my log file:

Overtemp: CPU raw temp is 70370 'C at Sun Jun 24 22:45:01 PDT 2018
Current status for hub 1-1 [0424:2514, USB 2.00, 4 ports]
  Port 2: 0000 off
Sent power on request
New status for hub 1-1 [0424:2514, USB 2.00, 4 ports]
  Port 2: 0100 power
 -----
Undertemp: CPU raw temp is 49388 'C at Sun Jun 24 22:50:01 PDT 2018
Current status for hub 1-1 [0424:2514, USB 2.00, 4 ports]
  Port 2: 0100 power
Sent power off request
New status for hub 1-1 [0424:2514, USB 2.00, 4 ports]
  Port 2: 0000 off
 ------
Overtemp: CPU raw temp is 70370 'C at Mon Jun 25 15:40:01 PDT 2018
Current status for hub 1-1 [0424:2514, USB 2.00, 4 ports]
  Port 2: 0000 off
Sent power on request
New status for hub 1-1 [0424:2514, USB 2.00, 4 ports]
  Port 2: 0100 power
 -----
Undertemp: CPU raw temp is 52616 'C at Mon Jun 25 15:45:01 PDT 2018
Current status for hub 1-1 [0424:2514, USB 2.00, 4 ports]
  Port 2: 0100 power
Sent power off request
New status for hub 1-1 [0424:2514, USB 2.00, 4 ports]
  Port 2: 0000 off
 -----

You can see that it overheated at 70.3° C, kicked the fan on and in 5 minutes when it ran again, the temperature was down to 49.3° C so it turned it back off. While the outside temp remains high, it does oscillate on and off but we’re doing that well below the overheat limit so we should be good.

Son of God

And whenever the unclean spirits saw him, they fell down before him and cried out, “You are the Son of God.” (Mark 3:11)

In the Bible, the title “son” or “sons of God” can refer to angels (Job 1:6), kings (2 Sam. 7:14), or people (Acts 17:28) but what did the gospel writers mean by it when it applied to Jesus?

When demons met Jesus, they announced he was the Son of God and then they did whatever he told them to do. Demons wrestle with angels (Dan. 10:13), they deceive kings (1 Kings 22:22-23), and they beat up people (Acts 19:16), but they obey God (Job 1:6-12, 2:1-5). In the gospels, they did the same thing with Jesus (Matt. 8:31-32) and those who speak in his name (Luke 10:17).

So demons can resist or defeat other “sons of God” but when it comes to the Son of God, their reaction is the same as it is to God. The Son of God is greater than kings and angels.

Away in a Tower?

I recently heard an account of Jesus’ birth I that found fascinating. The story goes like this:

Migdal Eder?Angels appeared to shepherds in the field and told them to go to Bethlehem and they’d find a baby wrapped in swaddling clothes, laying in the manger. How did the shepherds know which manger to look in? Because these were Levitical shepherds who tended the flocks that would be used for sacrifices in the temple. And in Bethlehem there was a special place for those sheep, the Tower of the Flock or Migdal Eder in Hebrew. During lambing season, the bottom level of this tower was used for birthing the sacrificial sheep and when a perfect lamb was born, it was wrapped in swaddling clothes and placed in a manger so it couldn’t be harmed. So the shepherds went and found the Lamb of God who takes away the sins of the world just as Micah 4:8 promised.

Not familiar with this version of the Christmas-time story? Neither was I so I investigated. This story turns up on a handful of websites, and in a few self-published books. One site had a PDF of a paper with footnotes showing some sources so that’s the one I used to try to track this down.

The Flocks

The paper said “Migdal Eder was a watchtower located in the northern part of Bethlehem built to protect the Temple flocks” and the footnote referred to Alfred Edersheim’s 1883 book, The Life and Times of Jesus the Messiah, book 2, page 131. The book can be found here and this is the relevant part:

That the Messiah was to be born in Bethlehem, was a settled conviction. Equally so was the belief, that He was to be revealed from Migdal Eder, ‘the tower of the flock.’ This Migdal Eder was not the watchtower for the ordinary flocks which pastured on the barren sheepground beyond Bethlehem, but lay close to the town, on the road to Jerusalem. A passage in the Mishnah (Shek.7:4) leads to the conclusion, that the flocks, which pastured there, were destined for Temple-sacrifices, and, accordingly, that the shepherds, who watched over them, were not ordinary shepherds.

Edersheim’s claim that the sacrificial flocks were pastured there is based on his inference from the Mishnah, so lets see what Shekalim 7.4 says:

An animal that was found between Jerusalem and Migdal Eder, or a similar distance in any direction, the males are [considered] burnt offerings. The females are [considered] peace offerings. Rabbi Yehuda says, those which are fitting as a Pesach offering are [considered] Pesach offerings if it is thirty days before the festival.

Does that lead to Edersheim’s conclusion? The Shekalim is in the section of the Mishnah that deals with festivals. Shekalim 7 sets rules for handling things found during festivals. For example, Shekalim 7.1 stipulates that money found between two offering chests belongs in the chest it is nearest. Shekalim 7.4 says that an animal found within a certain radius of Jerusalem may used for a burnt offering or a peace offering depending on its sex. Migdal Eder is used to establish that boundary but the Mishnah says nothing about shepherding flocks there. It seems to be reporting the opposite of shepherding flocks, it is talking about lost animals and how they may be used in sacrifice.

Levitical Shepherds?

What of Edersheim’s claim that these were no ordinary shepherds?  He makes his case:

The latter [ordinary shepherds] were under the ban of Rabbinism, on account of their necessary isolation from religious ordinances, and their manner of life, which rendered strict legal observance unlikely, if not absolutely impossible.

This argument works only if the sheep under discussion were herded specifically for the sacrificial system but as we’ve seen above, that’s far from certain. If these are ordinary sheep then ordinary shepherds are not a problem.

The next curious quote in the paper follows from its first, “During lambing season the sheep were brought there from the fields, as the lower level functioned as the birthing room for sacrificial lambs.”

The citation for this pointed to an article that cites Edersheim for the location of Migdal Eder, but Edersheim doesn’t make this claim. If Migdal Eder was used as Edersheim said, then this seems a reasonable conclusion but it cannot be verified as fact.

Lambs in Swaddling Clothes

The next annotated claim really caught my attention: “Priestly shepherds ‘would wrap the newborn lambs in swaddling clothes’ and place them in a manger ‘until they calmed down.'”

This is something I’d never heard before. The source cited was Jimmy DeYoung’s newsletter, “Jimmy’s Prophetic Perspective on the News,” December 23, 2005. Here’s the quote:

The shepherds would wrap the newborn lambs in swaddling clothes to protect the body of the lambs which would be offered as sacrifice at the Temple just four miles away in Jerusalem. Wrapped in swaddling clothes to keep the new lambs without spot or blemish, they would be laid in a manger until they had calmed down.

DeYoung offers no reference for this so I wasn’t able to find a source. I emailed two ministries that DeYoung seems to be closely associated with and am waiting to hear from either of them. Every other description of this practice, when a reference was provided, pointed to DeYoung’s email.  For DeYoung’s claim to be credible, “priestly shepherds” would have to exist which is a claim that remains unsubstantiated. I also looked at a few books on first century Jewish shepherding and found nothing about “priestly shepherd” or any practice of wrapping lambs. Since DeYoung gives us no references, we again cannot verify this claim.

In or Under?

The final statement that is footnoted says:

In fact the angels did not have to tell the shepherds precisely where to go in Bethlehem to find Jesus, because there was only one manger where sacrificial lambs were birthed, the cave under the watch tower of Migdal Edar.

The reference for this is a web post by Cooper P. Abrams III titled, “Where was the Birth Place of the Lord Jesus?” Abrams says pretty much what is quoted above and cites Edersheim’s book. But Edersheim never offers this argument. Notice, too, that the location for birthing the lambs has changed from the “lower level” to a cave beneath the tower. Cooper says, “It is entirely possible that this cave or grotto…is where the tower of the flock was located, but it has not been proved.” It could be that the cave and tower are the same thing but it doesn’t sound like it. It sounds like inconsistent stories.

And that inconsistency makes sense because as Cooper says, “The tower of the flock…does not exist today and archaeology has not found its ruins.” We don’t know where the tower was nor, I might add, do we know if the tower stood in the days of Jesus’ birth.

This leads me to the conclusion that there is very little support for this story. It originates from a nineteenth century book that makes a weak inference from an third century Jewish book that records an oral tradition. An additional detail originates from an unsubstantiated statement in a 2005 email.

Compared to Scripture

How does this story compare to the scriptures? The best way to examine that is by looking at the Biblical evidence offered in support of it: two verses in Micah.

There should be no dispute that Micah 5:2 is about Jesus’ birth in Bethlehem. Edersheim claimed that the Messiah’s birth in Bethlehem was a “settled conviction,” and, he said, “Equally so was the belief, that He was to be revealed from Migdal Eder, ‘the tower of the flock.'” In a footnote, Edersheim cites the Targum of Jonathan on Genesis 35:21 as support. That Targum says, “the place from whence, it is to be, the King Meshiha will be revealed at the end of the days.” Is any of that speaking of Jesus’ birth being at Migdal Eder? Edersheim and those who cite him assume it is. I’m not so sure.

Micah 4 is Hebrew poetry so the first phrase of 4:8, “O tower of the flock,” is related to the second phrase, “hill of the daughter of Zion.” The tower is parallel to the hill and the flock is parallel to the daughter of Zion. The daughter of Zion is another name for Israel and the hill would be Jerusalem. That could mean that “tower of the flock” in Micah 4 isn’t a site in Bethlehem but rather a description of Jerusalem as the place where God gathers and protects his flock. Numerous commentaries support this interpretation.

And then there is the New Testament telling of Jesus’ birth. Luke 2 says there was no place for them at the inn or guest room. Luke doesn’t tell us where he was born, simply where he wasn’t; Jesus wasn’t born in a house or inn. In Matthew 2, when the Magi arrive, the chief priests and scribes say the Christ was to be born is Bethlehem because of Micah 5. Yet if Edersheim is correct, Micah 4 would have given them not just the town, but the very street address if “revealed from Migdal Eder” meant “born at” and “tower of the flock” was a location in Bethlehem rather than a metaphor to describe Jerusalem under God’s care. Which they don’t.

As interesting as the story of Migdal Eder is, support for it seems threadbare.

Update 12/17/2021

A friend linked to a brief article written a four years before this one and it included a link to a video. The link was broke but I found the video. Here is Jimmy DeYoung in “Bethlehem: Beyond the Christmas Story” telling his story of Migdal Eder.

If Not The Tower, Then Where?

If Jesus wasn’t born in a tower for sheep, then where was he born? Our traditional crèches place his birth in an animal shed, away from the comforts of the city. Dr. Ian Paul, Adjunct Professor of New Testament at Fuller Theological Seminary makes a very good case that it was neither in a shepherds’ tower nor in a stable but in a house in Bethlehem. He builds his case on actual history of first century Palestine rather than speculation about it. His analysis also rests on how homes were really built and used, not on the supposed use of a tower whose location and function is currently unknown. The article is worth reading but here is Dr. Paul’s summary:

It means that many, like Joseph and Mary, have travelled to Bethlehem, and the family guest room is already full, probably with other relatives who arrived earlier. So Joseph and Mary must stay with the family itself, in the main room of the house, and there Mary gives birth. The most natural place to lay the baby is in the hay-filled depressions at the lower end of the house where the animals are fed.

Neither the tower, nor the stable, nor the family home really answer the question of how the shepherds knew where to find the baby in Bethlehem. In Luke 2:11-12, the angel only told them that the baby had been born in Bethlehem and would be found in a manger. Actually, this question needn’t be answered because it is demands more of Luke 2:8-20 than the text offers. We don’t necessarily have a transcript of every word the angel uttered to the shepherds so they might have told them where to find the newborn Savior and Lord. Or, perhaps, like the magi, the shepherds were lead to the location supernaturally. Or maybe they went in to town and asked where a baby had just been born. We don’t know and we don’t need to know or God would have told us.

Where’s The Harm?

And in the end, I think that’s what bothered me enough to dig into the tale of the tower. It seemed to go beyond what the scriptures tell us to try to make the story more interesting. But the scriptures are sufficient, the Bible tells us what we need to know for life and godliness (2 Peter 1:3). Finding these fanciful tales to fill in some of the gaps doesn’t help us understand the Bible better, it borders on devoting ourselves “to myths and endless genealogies, which promote speculations rather than the stewardship from God that is by faith” (1 Tim. 1:4).

Update 12/10/2024

The claim that the shepherds would know which manger the angels were talking about because “there was only one manger where sacrificial lambs were birthed” assumes too much for the time it happened. The angels didn’t say that the child born would be a sacrificial lamb; they told the shepherds that “a Savior, who is Christ the Lord” (Luke 2:11) would be found in a manger. ‘Christ’ and ‘Lord’ are kingly titles (Mark 15:35, Luke 23:2), not titles associated with Isaiah’s suffering servant. We know that Jesus was the “Lamb of God who takes away the sins of the world” because we’re on this side of John the Baptist’s announcement. We live after Jesus’ death and resurrection. The shepherds did not. Even Peter misunderstood and rebuked Jesus when he spoke about dying (Mark 8:31-33) and the shepherds before Jesus’ brith had less instruction on who Jesus would be.

Revelatory Fear

Samuel said, “What have you done?”

And Saul said,… “I forced myself, and offered the burnt offering.”

And Samuel said to Saul, “You have done foolishly… But now your kingdom shall not continue. The LORD has sought out a man after his own heart, and the LORD has commanded him to be prince over his people, because you have not kept what the LORD commanded you.” (1 Sam. 13:11-14)

Saul was religious. He didn’t say, “Forget this offering stuff, the old man is too late. Charge!” He knew he needed God’s favor and he knew the people knew it too. And Saul didn’t violate the religious rules lightly but forced himself. He was desperate. He knew he needed God’s favor if he had a chance in the upcoming battle.

The problem was Saul’s heart, his desires. He believed God, he believed God’s prophet, he trusted the religious ceremonies. Where he failed was in seeing all of those things as a way to get more of God. Instead, he saw all of them as a way to make sure God got him what he was after. And so God replaced him not with a man who knew the rules better, but with a man who sought God first.

It was fear of the Philistine army that uncovered where his heart really was. What do you fear that might uncover your heart?

In Church For The City

It’s not a matter of choosing between worship or mission; nor are we faced with a false dichotomy of church or world, cathedral or city. To the contrary, we worship for mission; we gather for sending; we center ourselves in the practices of the body of Christ for the sake of the world; we are reformed in the cathedral to undertake our image-bearing commission to reform the city. – James K. A. Smith, Imagining the Kingdom: How Worship Works, 154

Consuming Liturgy

Every liturgy, we’ve said, is oriented toward a telos–an implicit vision of flourishing that is loaded into its rituals. Those formed by such liturgies then become the kind of people who pursue and desire that end. So if we are unreflectively immersed in the liturgies of consumerism, we will, over time, “learn” that the end goal of human life is acquisition and consumption. “What is the chief end of man?” the consumerist catechism asks “To acquire stuff with the illusion that I can enjoy it forever.” – James K. A. Smith, You Are What You Love, 86

Where He Is Found

The great care of our souls is to find God, that he may direct, comfort, strengthen, sanctify, and teach us to sweetly enjoy his grace. If we are to find him, we will find him where he is to be found: in his Word, prayer, and in the assembly of his people. Enjoying fellowship with Christ is the goal of all our effort. – Thomas Manton, Psalm 119, 1:16-18

On Lookin’ Good

Carnal motives [to resist sin] have the fear of man more than God: ‘How shall I do this and anger man, displease my master, provoke my parents, and lose the good opinion of my minister?’ It should be ‘How can I do this and sin against God?’… When a Christian sins, he hates it, and not like Esau; he wept because he lost the blessing, not because he sold it. – William Gurnall, The Christian in Complete Armour