-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
38 lines (21 loc) · 874 Bytes
/
Copy pathREADME
File metadata and controls
38 lines (21 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Script to read Kamstrup Multical 302/402 Heat Meter via MBUS interface into Domoticz
Original code from https://gathering.tweakers.net/forum/list_messages/1692881/4
Interfaced using https://www.packom.net/m-bus-master-hat/
Tested on Domoticz 2021.1 and 2023.1
Required libmbus, WiringPi and PHP
sudo apt install git libtool autoconf cmake build-essential php php-xml
git clone https://github.com/WiringPi/WiringPi.git
./build
git clone https://github.com/rscada/libmbus
cd libmbus
./build.sh
sudo make install
export LD_LIBRARY_PATH=/usr/local/lib
build/bin/mbus-serial-scan -b 2400 /dev/ttyAMA0
Add the following to /etc/rc.local
# Enable M-BUS power on HAT
gpio write 25 1
Crontab Entry
## Read Kamstrup Multical 403 via MBUS Crontab Entry
*/1 * * * * php /home/pi/domoticz/scripts/kamstrup.php
I hope this helps.