Internet-radio player for Orange Pi Zero written in Python2.
Device use HD44780 display and sensor buttons to control it. Also, use build-in http server to handle request remotely via json-api, using https connection and basic http auth
- ds18b20 sensor
- 16*2 HD44780 display with i2c adapter
- 4 click buttons and resistor
- configured
spdifkernel module for audio output - configured
i2candw1_therm,w1gpio,wirekernel modules
- playing internet radio stations
- display time and date
- display temperature
- display cpu and mem load
- build-in python http-server to handle commands from remote
Python modules smbus, python-vlc, pyA20, pyyaml
Module pyA20 was wrote for Python version 2, so Python2 only
- Add stream radio sources to
stations.jsonfile - Change
temp_sensor_filevalue inconfig.yamlfile to your ds18b20 sensor w1 address - Change lcd i2c address in
devices/I2C_LCD_driver.pyfile from 0x3F to your address - Generate ssl key for build-in http-server with command
openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodesand putserver.pemfile tocertfiledirectory. Notice, that during of running openssl command, you should specify parametercommon nameas your device local ip address. - Change
server_user_nameandserver_user_passwordparams to yours for base http authentication
Source of the lcd driver was found here
To run app on system startup (systemd) edit WorkingDirectory and ExecStart params
in opimc.service and then copy file to /lib/systemd/system/ directory
chmod 644 opimc.service
sudo systemctl daemon-reload
sudo systemctl enable opimc.service
App will start on next reboot.
To run immediately type sudo systemctl start opimc.service
Tested on Orange Pi Zero H2+ 256Mb edition