Sunday, July 4, 2021

Cloudberry Live - listen your rig from everywhere with Web UI using Raspberry Pi

Overview 

I wanted to have a fully open source solution to listen my radio(s) from my mobile phone and laptop over the web using a low cost Raspberry Pi as the rig control server.  While there are many different remote station solutions out there I could not find one that would just work with a normal web browser (Chrome, Safari, etc) and without doing complicated network configurations exposing your internal  WiFi network via a router.  Also,  I wanted to have the solution that is really easy to install to Raspberry Pi and update new versions as new features get added to the software.  

I revisited the KX3 remote control project I did in Feb 2016 and started a new Cloudberry Live project. Cloudberry Live has several new improvements, such as no need to install Mumble client on your devices - you can just listen your radio(s) using a regular web browser.  I did also upgrade my Amazon Alexa skill to leverage the ability to stream audio to Amazon Echo devices and control the frequency using voice commands. 

Here is a short demo video how Cloudberry.live works: 






Features 

  • Listen your radio using web streaming from anywhere.
  • Web UI that works with mobile,  tablet and laptop browsers (Chrome and Safari tested) 
  • View top 10 DX cluster spots, switch the radio to the frequency with one click. 
The software is currently at alpha stage - all the parts are working as shown in the demo above but need refactoring and general clean-up.   The cloudberry.live proxy service is currently using a 3rd party open source proxy provider jprq.  My plan is to host a reverse proxy myself in order to simplify the installation process.  

The software is written using Python Flask framework and bash scripts. The deployment to Raspberry Pi is done using Ansible playbook that configures the environment correctly.  I am using NGINX webserver to serve the web application.  

The audio streaming portion is using HTTP Live Streaming (HLS) protocol and ffmpeg is used to stream audio from ALSA port and encode it using AAC format. There is a python http.server on port 8000 serving HLS traffic.  I have tested Safari and Chrome browsers to be able to stream HLS audio.  Chrome requires Play HLS M3u8 extension to be installed.

The home screen is shown below.  This gives you the top 10 spots and a link to open audio streaming window.  By clicking the frequency link on the freq column the server sends hamlib commands to the radio to set the frequency and mode.  Only USB and LSB modes are supported in the current software version.



The Tune screen is shown below.  This is still works-in-progress and needs some polishing.  The Select Frequency allows to enter the frequency using numbers. The VFO range bar allows to change the radio frequency by dragging the green selection bar.   The band selection buttons don't do anything at the moment. 



The Configure Rig screen allows you to select your rig from the list of hamblib supported radios. I am using ICOM IC-7300 that is currently the default setting. 


The Search button on the menu bar allows to check call sign from hamdb.org database. A pop-up window will show the station details:




Amazon Alexa Skill

I created a new Alexa Skill  Cloudberry Live  (not published yet) that uses the web API interface for selecting the frequency based on DX cluster spots and the HLS streaming to listen your radio.  While the skill is currently using only my station,  my goal would be to implement some sort of registration process so that Alexa users  would have more choice to listen ham radio traffic from DX stations around the world using Cloudberry.live software. 

This would give an opportunity also for people with disabilities to enjoy listening HF bands using voice controlled, low cost ($20 - $35) smart speakers.  By keeping your radio (Raspberry Pi server) online you could help to grow the ham community. 

Installation

I have posted the software to Github in a private repo.  The software will have the following key features
  • One step software installation to Raspberry Pi using Ansible playbooks.
  • Configure your radio using Hamlib 
  • Get your personalized Cloudberry.live weblink
I have been developing cloudberry.live  on my Macbook Pro and pushing new versions to RaspBerry Pi server downstairs where my IC-7300 is located. Typical  Ansible playbook update takes about 32 seconds (this includes restarting the services).  I can see the access and error logs on the server using SSH consoles - this makes debugging quite easy.  

Questions? 

I am looking for collaborators to work with me on this project.  If you are interested in open source web development using Python Flask framework let me know by posting a comment below. 


73  de 
Mauri AG1LE


Popular Posts