M-Bus – Thermostaat – SyxthSense CDR-MBUS SN1.420
Info
CDR-MBUS M-Bus CO2 sensors are designed to detect CO2 (carbon dioxide) concentration and temperature in the room spaces and have built-in M-Bus (Meter Bus) EN1434-3 communication interface. The M-Bus CO2 sensor calibrates automatically its measurement using statistical analysis. The sensors have programmable linear 0..10V signals outputs. The CDR-MBUS M-Bus CO2 sensors have also a built-in digital and a resistive input (e.g. for external temperature measurement), and two additional digital outputs as standard, so the modules can be also used as intelligent I/Os.
The CDR-MBUS M-Bus CO2 sensors can be installed on wall surface or on a wall mounting box in dry indoor environment. The CDR M-Bus CO2 sensors come with a number of additional options such as display, relative humidity, alarm LEDs, active setpoint using two push buttons, push buttons for extensions and additional digital and resistive inputs.
The CDR -MBUS M-Bus CO2 sensors can also operate as CO2, temperature or humidity controllers modulating analogue outputs, or switching the digital output on based on the setpoints making them ideal for advanced control applications. With push button option the users can override the control output fully open e.g. in demand based applications.
Features:
- M-Bus EN1434-3 Slave Device (Meter Bus communication)
- Attractive Wall Mounted Room Enclosure (for UK/European/US mounting)
- Adaptive CO2 Measurement Logic, Self-Calibrating
- Large Range of Options to Suit Any Applications
- Built-In Controller Functionality for CO2, Temperature and Humidity Control
- Can act as a M-Bus Network IO-Module as well as M-Bus CO2 Sensor and M-Bus Controller
Chips
ATSAM4S2B AU
Microchip’s ARM®-based SAM4S2B microcontroller builds on the high-performance 32-bit Cortex®-M4 core.
LM358A (2x)
LMx58-N Low-Power, Dual-Operational Amplifiers
MC34063
Inverting Regulator – Buck, Boost, Switching
9784 X70C
Unknown
Mbus addon card:
NCN5150
Wired M-BUS Slave Transceiver
Co2 sensor:
32F10066
TFBGA64 arm-based 32-bit MCU
Uitlezen via Raspberry Pi (libmbus)
Hardware nodig: MBUS naar USB of RS232/TTL converter
Software nodig: libmbus
Boudrate: 2400
Adres: 1
Commando voor XML telegram:Â mbus-serial-request-data -b 2400 /dev/ttyUSB0 1
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
<?xml version="1.0" encoding="ISO-8859-1"?> <MBusData> <SlaveInformation> <Id>98521224</Id> <Manufacturer>SYX</Manufacturer> <Version>1</Version> <ProductName></ProductName> <Medium>Other</Medium> <AccessNumber>3</AccessNumber> <Status>00</Status> <Signature>0000</Signature> </SlaveInformation> <DataRecord id="0"> <Function>Instantaneous value</Function> <StorageNumber>0</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>Digital output (binary)</Unit> <Value>4</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="1"> <Function>Instantaneous value</Function> <StorageNumber>2</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>dimensionless / no VIF</Unit> <Value>613</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="2"> <Function>Instantaneous value</Function> <StorageNumber>4</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>dimensionless / no VIF</Unit> <Value>506</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="3"> <Function>Instantaneous value</Function> <StorageNumber>6</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>dimensionless / no VIF</Unit> <Value>515</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="4"> <Function>Instantaneous value</Function> <StorageNumber>8</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>dimensionless / no VIF</Unit> <Value>0</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="5"> <Function>Instantaneous value</Function> <StorageNumber>10</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>dimensionless / no VIF</Unit> <Value>0</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="6"> <Function>Instantaneous value</Function> <StorageNumber>10</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>dimensionless / no VIF</Unit> <Value>0</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="7"> <Function>Instantaneous value</Function> <StorageNumber>14</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>Digital input (binary)</Unit> <Value>0</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="8"> <Function>Instantaneous value</Function> <StorageNumber>16</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>External temperature (1e-1 deg C)</Unit> <Value>252</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="9"> <Function>Instantaneous value</Function> <StorageNumber>18</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>dimensionless / no VIF</Unit> <Value>515</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="10"> <Function>Instantaneous value</Function> <StorageNumber>20</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>dimensionless / no VIF</Unit> <Value>1225</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="11"> <Function>Instantaneous value</Function> <StorageNumber>22</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>External temperature (1e-1 deg C)</Unit> <Value>-499</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="12"> <Function>Instantaneous value</Function> <StorageNumber>24</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>dimensionless / no VIF</Unit> <Value>0</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="13"> <Function>Instantaneous value</Function> <StorageNumber>26</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>External temperature (1e-1 deg C)</Unit> <Value>0</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="14"> <Function>Instantaneous value</Function> <StorageNumber>28</StorageNumber> <Tariff>0</Tariff> <Device>0</Device> <Unit>dimensionless / no VIF</Unit> <Value>0</Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> <DataRecord id="15"> <Function>Manufacturer specific</Function> <Value></Value> <Timestamp>2020-09-08T17:50:49Z</Timestamp> </DataRecord> </MBusData> |
Python Libmbus XML parse directly
This is our script to parse the output from libmbus directly into the XML parser and fetch the data:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
from __future__ import division import subprocess try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET process = subprocess.Popen("mbus-serial-request-data -b 2400 /dev/ttyUSB0 1", shell=True, stdout=subprocess.PIPE) process.wait() if process.returncode == 0: #Output is OK xml = ET.parse(process.stdout) temp = xml.find("DataRecord[9]/Value").text hum = xml.find("DataRecord[10]/Value").text co2 = xml.find("DataRecord[11]/Value").text print "Temp C: " + str(int(temp) / 10) print "HUM %: " + str(int(hum) / 10) print "CO2 PPM: " + co2 else: print("ERROR!") |
result:
1 2 3 4 |
pi@raspberrypi:~ $ sudo python test.py Temp C: 24.9 HUM %: 51.9 CO2 PPM: 1220 |
Downloads: