The voice of some ghost animal floated to the office “Song God, your speaker is good, come to a song bai, I want to listen to Zhou Jie’s double cut lun” Song God “ok, I will play the complete works of Jay Chou for you, remember to invite me to dinner” Ghost animal “this…” Wang gong said, “You always play Jay Chou, have you ever considered the feelings of the old people? Listen to our village people” Xiao Zhao “and listen to TFBoys” song god “Don’t talk, I listen to myself”.

At this point, Goliath is not happy, so we need to solve this problem. In a Hackathon of Waterfall IM, we solved this problem perfectly.




The final result

The preparatory work




Hardware devices

  • Speaker a
  • Raspberry PI one (optional: USB wireless card)
  • Waterfall IM open source song on-demand system GitHub
  • Waterfall IM WebHook (Documentation)

Implementation steps

Install raspberry pie

There are plenty of tutorials online. I use Raspbian, the official Raspberry PI system (which is very similar to Ubuntu). I won’t go into details on how to install Raspbian on a MAC.

Install wireless card (if required)

Speakers need to move back and forth, not necessarily with a network cable next to them, but with a wireless network card, it will be much more convenient. We bought a small USB network card on universal Taobao for 30 yuan, and after plugging it in, we need to install a driver in the system. I recommend an article on the installation of network card entitled setting wireless Internet Access for Raspberry Pi.

Install and start the program

Installing the Node environment is relatively simple. It can be done basically through apt-get. After installing the Node, you can deploy the open source program.

The router is configured with port forwarding and DDNS

This is a tricky step, but I use the Asus RT-AC3200 router as an example:

  • Open “External Network” -> “Port Forwarding” and configure an external port to raspberry PI IP:3000
  • Open Dynamic Domain name to configure a dynamic domain name resolution

Finally got an external access to address, such as: http://pi.ddns.com:3000, you can visit http://pi.ddns.com:3000/songs to see if you can access.

Configuring waterfall Command

Sign up for a waterfall account, create a team, and add a service to the channel, as described in the Waterfall IM Command Development documentation.




  • Command name: play (can be called in the chat box by typing /play)
  • Command description: Speaker to sing
  • Requested address:http://pi.ddns.com:3000/hook_receive

At this point, we’re done.

Write in the back

With some automated information processing, we can keep things simple, minimize labor costs, and spend time on important things like thinking. This is also a habit that I have been adhering to personally. There’s a lot to play for in a startup office, and a little imagination adds a lot of color to the team.