OpenZmeter on Raspberry Pi

I am a PhD student and would like to use your
power analyser in our lab monitoring system. I found your solution while
searching for open source projects and I was really amazed when I found
your project. It uses only low-cost components by making smart design

I would like to built three devices, but I would like to run the
openZmeter application on a Raspberry Pi since I am not constraint in
space and I know it quite well. Have you tried that? It is also an ARM
processor. Do you see any obvious deal-breakers?

Thanks in advance for your reply and also for the amazing work!


We have not try it on raspberry, but should be no problem. I assume you use debian on your raspeberry, you can git clone and build ozm natively. You can use make CONFIG=Configs/debian_native.

oZm software is ready to work on any platform, hardware act as usb device and if you need you can plug even multiple ozm to same host machine. Take care, it not isolated!

I finally assembled my first device and flashed the STM32. Now I am trying to build the openZmeter software.

Unfortunately while running “make CONFIG=Configs/linux_native” I am running into memory issues on the Raspberry Pi (1GB RAM).

FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory

I am wondering if I am doing something wrong or if it is not possible to compile directly on the Raspberry Pi. My nodejs version is v15.2.1 and npm is 7.0.8.

Have you seen similar issues?
Which nodejs version are you using?
Are you cross-compiling? Which cross-compiler are you using?

Thanks in advance!

I am now trying to first compile it at my normal linux workstation. Unfortunately I cannot compile it there either. It throws the following error at:

93% after chunk asset optimization SourceMapDevToolPlugin openZmeter.js generate SourceMap

ERROR in ./node_modules/swagger-ui/dist/swagger-ui.css (./node_modules/css-loader!./node_modules/swagger-ui/dist/swagger-ui.css)
Module build failed (from ./node_modules/css-loader/index.js):
TypeError: Cannot read property ‘toFixed’ of undefined

I tried it with nodejs 15 and also nodejs 13. I also tried “npm i --save node-sass@latest”.
It seems to be related to some package incompatibility which might be related to svgo.

Is this a known problem? Does anyone have any tip?

I finally managed to compile the program on native linux with the “devel” branch.

Additional packages on debian after installing nodejs are:

sudo apt-get install build-essentials
sudo apt-get install uuid-dev
sudo apt-get install libfftw3-dev
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install libz-dev
sudo apt-get install libssl-dev
sudo apt-get install libpq-dev
sudo apt-get install libdbus-1-dev

I can start the program and the VIRTUAL device works fine. It also sees the device with its serial number and created an entry in the config file automatically.

However the device appears offline. And the web interface appears much slower than with the VIRTUAL device. I do not see any data. In the command line interface it shows:

Capture started on DeviceV2 with serial ‘410083008034E47573935302’

What could be the problem?

Hi, in settings page, can you see Device V2 and the serial? if true, please open config dialog and enable it, you must to select analyzers mode too.

If it run slow please check Configs/linux_native and make sure DEBUG = false otherwise it run really slow.

Thank you for that hint. I actually missed the debug setting. :slight_smile:

Unfortunately it did not solve the problem. I was able to compile but only by removing the -fno-pic -fno-pie compile flags. Is there a reason why they are set?

I restarted the newly compiled version of openZmeter, but it still does not work with the device. Sometimes the device shows up in the settings page as an analyser, sometime there is only the virtual analyser that works and sometimes the analysers do not show up at all. After selecting/enabling the device the webpage hangs.

Adding ‘V2’ device driver instance with serial ‘410083008034E47573935302’
Claimed interface 0 for DeviceV2 with serial ‘410083008034E47573935302’
Capture started on DeviceV2 with serial ‘410083008034E47573935302’

I deleted the postgres database, changed the device and config file and used device with another serial number, but the old device still showed up. Does openZmeter store any data outside the postgres database?

Thanks for your help!

Hi, openZmeter store recorded samples in postgre database (each analyzer goes to their own schema).
Analyzer settings are saved to /etc/openZmeter.conf. Entries are created when service starts and enumerate avaliable devices.

Please try to use the last devel branch. If it dont work correctly try to see if some USB problem are shown in dmesg.