10. Legacy Installation Help - larry-athey/rpi-smart-still GitHub Wiki
The reason that you're at this page is likely because you used the ./install.sh legacy
installation command and the end of the install run told you to refer to this page for the necessary completion steps.
It would appear that my efforts to eliminate the dependency on WiringPi have failed, thanks to the Armbian developers completely dropping the ball on creating a working w1-gpio
kernel overlay for all of the RPi clones that they have put together an Armbian build for. Even though the steps I provide here are what I used on an old Banana Pi M2 Zero, they will actually work on most any older RPi clone. The trick is to find a ported version of WiringPi for your processor (which really isn't that tricky).
Even after the installation script correctly configures your RPi clone and you reboot it, your DS18B20 temperature sensors likely still won't show up in the /sys/bus/w1/devices
directory like they do on a Raspberry Pi. So I have to read them at the raw data level right off the GPIO pin, rather than having the kernel conveniently do this for me. I don't understand why they can't just do this while they're building the Armbian distribution for the various RPi clones.
I used https://github.com/BPI-SINOVOIP/BPI-WiringPi and lied to it by saying I had a Banana Pi M2 Plus (see the git clone URL options on the GitHub page). So, while still in the ~/rpi-smart-still/Undercarriage
directory, I performed the following steps.
git clone https://github.com/BPI-SINOVOIP/BPI-WiringPi.git -b BPI_M2P
cd BPI-WiringPi
chmod +x ./build
sudo ./build
cd ..
You should be able to run gpio readall
and see a full representation of your GPIO bus. If not, or you encountered errors while compiling, you will need to try one of the other clone options on that page, or try searching for a different WiringPi for your system. Until the gpio readall
command works on your system, my project will not work for you. We need WiringPi fully functional before my code can read the temperature sensors.
Once WiringPi is working, we can proceed with compiling the ds18b20.c
program which will take the place of the w1-gpio
kernel overlay. Again, while still in the ~/rpi-smart-still/Undercarriage
directory, perform the following steps.
BusPin=$(gpio readall | head -n7 | tail -n1 | tr -d '|' | awk '{print $2}')
sed -i "s/#define DS18B20_PIN_NUMBER 7/#define DS18B20_PIN_NUMBER $BusPin/g" ./ds18b20.c
sudo gcc -Wall -o /usr/share/rpi-smart-still/ds18b20 ./ds18b20.c -lwiringPi -lpthread
If you have the RPi Hat plugged in with DS18B20 temperature sensors connected, run the following command
sudo /usr/share/rpi-smart-still/ds18b20
And you will see it output something similar to this.
28-3CE10457EF32:22.12
28-3CE104572467:21.88
28-3CE10457A05E:21.65
These are the addresses and temperature readings from the boiler, column, and dephlegmator temperature sensors. If you have created the CRON job as instructed at the end of the installation script, you can reboot your system and when you log in, you can run cat /tmp/rss_ds18b20
to see the results demonstrated in the above updated every 10 seconds. Your legacy software installation is now complete and you can delete the git clone with sudo rm -rf ~/rpi-smart-still
and continue building your RPi Smart Still controller system.
Additional Tips:
Depending on the CPU speed of your legacy device, Python may have problems pulsing the GPIO pins fast enough to run the heating stepper motor. In which case, you will want to compile the original heating stepper motor driver and replace the Python script with it. This and the original valve driver C program can be found in the /Undercarriage/C-Drivers/
directory of your git clone.
These original C drivers predate the existence of the config.ini
file, so you will need to edit the constants at to top of each C source code file to point to the WiringPi port numbers (not the CPU's GPIO port numbers) and compile them using the compile command shown in the comments at the top of these files. Move the compiled executable to /usr/share/rpi-smart-still
to overwrite the Python script(s) by the same name.