Categories
node-red Raspberry Pi VSCP

Interesting phenomena

The picture above show readings from furnace in our house (the HULK). The first diagram show the boilers water temperature. One can see when the stove is active. As seen it failed to start this morning. Alarming me with SMS, email and telegram so I could handle it.

The second diagram show the temperature in the core of the warm water reservoir. This is the supply of hot water.

Third picture is hot water temperature measured on the pipe out to the house from the hot water reservoir. When no water is taped the temperature will fall. When hot water is taped the temperature will rise to the hot water temperature as expected.

The interesting part here is the sensor connected to the boiler container. It does not do aging very well and will go more an more of over time showing a higher temperature then it should. The sensor is a 10K NTC sensor. I have changed this sensor several times now over the years and I probably have done this twice a year.

I use many NTC sensors and this is the only one that behaves in this way. No idea why!?

The setup here is a Kelvin NTC 10K connected to a Raspberry Pi running the latest version of the VSCP Daemon which send the data to three MQTT brokers. This data is in one place handled by a node-red setup and the UI above is shown on that machine.

Investigation of this continues…

Categories
Raspberry Pi VSCP

Pi5

Raspberry Pi 5 controls the heat here in our house/office. Hard at work now with low temperatures outside. This is one of twelve Raspberry Pi’s here. All running VSCP in some form.

Categories
Raspberry Pi

Raspberry Pi Pico sample

Thank you!

Categories
Programming Raspberry Pi

Building #ARM #Raspbian packages on your #Intel PC

If you are a maintainer of a software project as I am, you probably spend a lot of time testing and deploying code. The more platforms you add the harder this gets and at some point you need to think carefully what you can do to minimize manual work.

I build things for Ubuntu/Debian/Raspian and Windows. In the beginning a lot of the deployment here was done on each platform. Hours spent on this for each release. Frustrating. I decided to do some scripts that would make it possible to do the first tree automatically. Saving time if I could get it to work.

I found Stein Magnus Jodal‘s excellent article Building ARM Debian packages with pbuilder and he is the only one that should take credit for the things I describe here. I am just a copy cat in this case, well more or less, just adding some vital things.

I had no major problem to get buildings for Ubuntu and Debian to work with pbuilder following Stein Magnis Jodal’s document. The ARM builds was another thing. What I got was this

...
 qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x60184bcc
 qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x600019f9
...

qemu (or rather pbuilder-satisfydepends) fails when checking dependencies. After a long struggle I found that replacing pbuilder-satisfydepends with pbuilder-satisfydepends-apt was a solution to this problem.

I repeat the steps from Stein Magnis Jodal’s document here with my changes and updates and comments to get things working. Again credit is to Stein Magnis Jodal.

Setup pbuilder environment

Add a file .pbuilderrc to your root acount with the following content

!/bin/sh
 set -e
 if [ "$OS" == "debian" ]; then
     MIRRORSITE="http://ftp.se.debian.org/debian/"
     COMPONENTS="main contrib non-free"
     DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}"
         "--keyring=/usr/share/keyrings/debian-archive-keyring.gpg")
     : ${DIST:="stretch"}
     : ${ARCH:="amd64"}
     if [ "$DIST" == "jessie" ]; then
         #EXTRAPACKAGES="$EXTRAPACKAGES debian-backports-keyring"
         OTHERMIRROR="$OTHERMIRROR | deb $MIRRORSITE jessie-backports $COMPONENTS"
     fi
 elif [ "$OS" == "raspbian" ]; then
     MIRRORSITE="http://ftp.acc.umu.se/mirror/raspbian/raspbian/"
     COMPONENTS="main contrib non-free"
     PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-apt"
     DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}"
         "--keyring=/usr/share/keyrings/raspbian-archive-keyring.gpg")
     : ${DIST:="stretch"}
     : ${ARCH:="armhf"}
 elif [ "$OS" == "ubuntu" ]; then
     MIRRORSITE="http://se.archive.ubuntu.com/ubuntu/"
     COMPONENTS="main restricted universe multiverse"
     DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}"
         "--keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg")
 else
     echo "Unknown OS: $OS"
     exit 1
 fi
 if [ "$DIST" == "" ]; then
     echo "DIST is not set"
     exit 1
 fi

Note the PBUILDERSATISFYDEPENDSCMD under the Raspbian section.

Now pbuilder will require three environment variables (in upper case) for it’s use

OS

The os you build for.It can be set to ubuntu, debian or raspbian

ARCH

The arcitecture you are builing for. It can be any of amd64, i386, armel, or armhf. Yes som eother supported arcitecure also of course.

DIST

Distribution of the os. For Debian/Raspbian buster, stretch, jessie. For Ubuntu eoan, disco, bionic, xenial, trusty. Well others shoudl work to.

If you are on a PC qemu-debootstrap is used for the ARM builds. So you have to install it with

sudo apt install pbuilder qemu-user-static

We also need the keyrings. For Ubuntu and Debian install them with

sudo apt install ubuntu-keyring debian-archive-keyring

If that for some reason does not work you can fetch the keyring fro Debian at https://packages.debian.org/sid/all/ubuntu-keyring/download and for Ubuntu keyring can be fetched here https://launchpad.net/ubuntu/+source/ubuntu-keyring

The keyring for Raspbian you can get here

 wget http://archive.raspbian.org/raspbian/pool/main/r/raspbian-archive-keyring/raspbian-archive-keyring_20120528.2_all.deb  
sudo dpkg -i raspbian-archive-keyring_20120528.2_all.deb

Now you need to build the chroots. You do this with steps like

sudo mkdir -p /var/cache/pbuilder/debian-stretch-amd64/aptcache/  
sudo OS=debian DIST=stretch ARCH=amd64 pbuilder --create

Replace OS/DIST/ARCH for your needs.

All you need now is the Debian source package for the code you want to work with. Go to the folder where it is and issue

sudo OS=debian DIST=stretch ARCH=armhf pbuilder build *.dsc

Replace OS/DIST/ARCH for your needs.

If all goes well you find the resulting package in

/var/cache/pbuilder//var/cache/pbuilder/debian-stretch-amd64/result/

replace ‘stretch’, ‘amd64’ and ‘debian’ as to you settings for DIST, ARCH and OS.

If you rather want you can go into an unpacked source folder and issu

tar xvf ../src-pkg.debian.tar.xz
tar xvf ../src-pkg.orig.tar.gz
sudo OS=debian DIST=stretch ARCH=amd64 pdebuild

Again replace OS/DIST/ARCH for your needs.

Thats it really.

I experienced situation when dh-autoreconf was not available in the chroot and when it did not get installed. This was for Ubuntu. If this happens you can instll it manually with

sudo OS=ubuntu DIST=xenial ARCH=amd64 pbuilder --login --save-after-exec 
apt install dh-autoreconf 
exit

Hope this can save some time for someone. And again thanks to Stein Magnis Jodal for his work.

Lazy section

Below is some code you can use if you think typing on a keyboard is tiresome…

Ubuntu

sudo mkdir -p /var/cache/pbuilder/ubuntu-trusty-amd64/aptcache/
sudo OS=ubuntu DIST=trusty ARCH=amd64 pbuilder --create
sudo OS=ubuntu DIST=trusty ARCH=amd64 pbuilder build vscpl2drv-automation1_1.1.0-1.dsc

sudo mkdir -p /var/cache/pbuilder/ubuntu-xenial-amd64/aptcache/
sudo OS=ubuntu DIST=xenial ARCH=amd64 pbuilder --create
sudo OS=ubuntu DIST=xenial ARCH=amd64 pbuilder build vscpl2drv-automation1_1.1.0-1.dsc

sudo mkdir -p /var/cache/pbuilder/ubuntu-bionic-amd64/aptcache/
sudo OS=ubuntu DIST=bionic ARCH=amd64 pbuilder --create
sudo OS=ubuntu DIST=bionic ARCH=amd64 pbuilder build vscpl2drv-automation1_1.1.0-1.dsc

sudo mkdir -p /var/cache/pbuilder/ubuntu-disco-amd64/aptcache/
sudo OS=ubuntu DIST=disco ARCH=amd64 pbuilder --create
sudo OS=ubuntu DIST=disco ARCH=amd64 pbuilder build vscpl2drv-automation1_1.1.0-1.dsc

sudo mkdir -p /var/cache/pbuilder/ubuntu-eoan-amd64/aptcache/
sudo OS=ubuntu DIST=eoan ARCH=amd64 pbuilder --create
sudo OS=ubuntu DIST=eoan ARCH=amd64 pbuilder build vscpl2drv-automation1_1.1.0-1.dsc

Debian

For the arm builds you may need to add the line

PBUILDERSATISFYDEPENDSCMD="/usr/lib/pbuilder/pbuilder-satisfydepends-apt"

to your pbuilder configuration (.pbuilderrc) file.

sudo mkdir -p /var/cache/pbuilder/raspbian-jessie-amd64/aptcache/
sudo OS=raspbian DIST=jessie ARCH=amd64 pbuilder --create
sudo OS=raspbian DIST=jessie ARCH=amd64 pbuilder build *.dsc

sudo mkdir -p /var/cache/pbuilder/raspbian-stretch-amd64/aptcache/
sudo OS=raspbian DIST=stretch ARCH=amd64 pbuilder --create
sudo OS=raspbian DIST=stretch ARCH=amd64 pbuilder build *.dsc

sudo mkdir -p /var/cache/pbuilder/raspbian-buster-amd64/aptcache/
sudo OS=raspbian DIST=buster ARCH=amd64 pbuilder --create
sudo OS=raspbian DIST=buster ARCH=amd64 pbuilder build *.dsc


sudo mkdir -p /var/cache/pbuilder/raspbian-jessie-i385/aptcache/
sudo OS=raspbian DIST=jessie ARCH=i385 pbuilder --create
sudo OS=raspbian DIST=jessie ARCH=i385 pbuilder build *.dsc

sudo mkdir -p /var/cache/pbuilder/raspbian-stretch-i385/aptcache/
sudo OS=raspbian DIST=stretch ARCH=i385 pbuilder --create
sudo OS=raspbian DIST=stretch ARCH=i385 pbuilder build *.dsc

sudo mkdir -p /var/cache/pbuilder/raspbian-buster-i385/aptcache/
sudo OS=raspbian DIST=buster ARCH=i385 pbuilder --create
sudo OS=raspbian DIST=buster ARCH=i385 pbuilder build *.dsc


sudo mkdir -p /var/cache/pbuilder/raspbian-jessie-armle/aptcache/
sudo OS=raspbian DIST=jessie ARCH=armle pbuilder --create
sudo OS=raspbian DIST=jessie ARCH=armle pbuilder build *.dsc

sudo mkdir -p /var/cache/pbuilder/raspbian-stretch-armle/aptcache/
sudo OS=raspbian DIST=stretch ARCH=armle pbuilder --create
sudo OS=raspbian DIST=stretch ARCH=armle pbuilder build *.dsc

sudo mkdir -p /var/cache/pbuilder/raspbian-buster-armle/aptcache/
sudo OS=raspbian DIST=buster ARCH=armle pbuilder --create
sudo OS=raspbian DIST=buster ARCH=armle pbuilder build *.dsc


sudo mkdir -p /var/cache/pbuilder/raspbian-jessie-armhf/aptcache/
sudo OS=raspbian DIST=jessie ARCH=armhf pbuilder --create
sudo OS=raspbian DIST=jessie ARCH=armhf pbuilder build *.dsc

sudo mkdir -p /var/cache/pbuilder/raspbian-stretch-armhf/aptcache/
sudo OS=raspbian DIST=stretch ARCH=armhf pbuilder --create
sudo OS=raspbian DIST=stretch ARCH=armhf pbuilder build *.dsc

sudo mkdir -p /var/cache/pbuilder/raspbian-buster-armhf/aptcache/
sudo OS=raspbian DIST=buster ARCH=armhf pbuilder --create
sudo OS=raspbian DIST=buster ARCH=armhf pbuilder build *.dsc

Raspbian

Use armle for Raspberry Pi 1

sudo mkdir -p /var/cache/pbuilder/raspbian-jessie-armhf/aptcache/
sudo OS=raspbian DIST=jessie ARCH=armhf pbuilder --create
sudo OS=raspbian DIST=jessie ARCH=armhf pbuilder build *.dsc

sudo mkdir -p /var/cache/pbuilder/raspbian-stretch-armhf/aptcache/
sudo OS=raspbian DIST=stretch ARCH=armhf pbuilder --create
sudo OS=raspbian DIST=stretch ARCH=armhf pbuilder build *.dsc

sudo mkdir -p /var/cache/pbuilder/raspbian-buster-armhf/aptcache/
sudo OS=raspbian DIST=buster ARCH=armhf pbuilder --create
sudo OS=raspbian DIST=buster ARCH=armhf pbuilder build *.dsc

This info is current when this is written but may not be when you read it.

Categories
Linux Programming Raspberry Pi

dh_autoreconf problem

If you want to make a debian package on a Raspberry Pi with Stretch installed or another machine with an older debian version installed the debhelper build process may complain about multiple runs of dh_autoreconf and abort. This is due to a bug in dh_autoreconf which just warns for this in later versions.

Solution

Get the latest version of dh_autoreconf

wget http://sourcearchive.raspbian.org/main/d/dh-autoreconf/dh-autoreconf_19.tar.xz

Unpack

tar xvf dh-autoreconf_19.tar.xz

Save a copy of the old sh_autoreconf

sudo mv /usr/bin/dh_autoreconf /usr/bin/dh_autoreconf.save

Copy the new file

copy dh_autoreconf to /usr/bin

Problem should be solved.

Categories
Raspberry Pi

Using old laptop screens on #RaspberryPi

Categories
Raspberry Pi

Raspberry Pi GPIO Pinout

VERY good site for Raspberry Pi pinouts

Source: Raspberry Pi GPIO Pinout

Categories
Raspberry Pi

RPI3-MODBP-POE – RASPBERRY-PI – Tilläggskort, PoE (Power over Etherne) HAT för Raspberry Pi 3 Model B+

Buy RPI3-MODBP-POE – RASPBERRY-PI – Tilläggskort, PoE (Power over Etherne) HAT för Raspberry Pi 3 Model B+ at Farnell element14 Sverige. order RPI3-MODBP-POE now! great prices with fast delivery on RASPBERRY-PI products.

Source: RPI3-MODBP-POE – RASPBERRY-PI – Tilläggskort, PoE (Power over Etherne) HAT för Raspberry Pi 3 Model B+

Categories
Raspberry Pi

THE RASPBERRY PI PISERVER TOOL

I Like!

https://www.raspberrypi.org/blog/piserver/

Categories
IoT Raspberry Pi

Raspberry Pi Zero W clone offers quad-core power for $15

SinoVoip’s Linux-friendly, 60 x 30mm Banana Pi M2 Zero (BPI-M2 Zero) SBC closely mimics the Raspberry Pi Zero W, but has a faster Allwinner H2+.

Source: Raspberry Pi Zero W clone offers quad-core power for $15