Skip to content

Commit e812d2d

Browse files
authored
[airq] Add Hydrogen Sulfide (H₂S) (openhab#16696)
* [airq] Add Hydrogen Sulfide (H₂S) Signed-off-by: Fabian Wolter <[email protected]>
1 parent 94b4639 commit e812d2d

File tree

5 files changed

+39
-1
lines changed

5 files changed

+39
-1
lines changed

bundles/org.openhab.binding.airq/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ The rw column is empty if the channel is only readable, w if the channel can be
5959
| dHdt | Number | | Change of Humidity |
6060
| dewpt | Number:Temperature | | Dew Point |
6161
| doorEvent | Number | | Door Event (experimental, might not work reliably) |
62+
| h2s | Number:Density | | Hydrogen sulfide (H₂S) |
6263
| health | Number:Dimensionless | | Health Index (0 to 1000, -200 for gas alarm, -800 for fire alarm) |
6364
| humidityRelative | Number:Dimensionless | | Humidity in percent |
6465
| humidityAbsolute | Number | | Absolute Humidity |
@@ -69,7 +70,7 @@ The rw column is empty if the channel is only readable, w if the channel can be
6970
| performance | Number:Dimensionless | | Performance Index (0 to 1000) |
7071
| fineDustConc01 | Number | | Fine Dust concentration >1 µm |
7172
| fineDustConc02_5 | Number | | Fine Dust concentration >2.5 µm |
72-
| fineDustConc10 | Number | | Fine Dust concentration >10 µm fni |
73+
| fineDustConc10 | Number | | Fine Dust concentration >10 µm |
7374
| pressure | Number:Pressure | | Pressure |
7475
| so2 | Number | | SO₂ concentration |
7576
| sound | Number:Dimensionless | | Noise |

bundles/org.openhab.binding.airq/src/main/java/org/openhab/binding/airq/internal/AirqHandler.java

+1
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ public void pollData() {
464464
processType(decObj, "co", "co", "pair");
465465
processType(decObj, "co2", "co2", "pairPPM");
466466
processType(decObj, "dewpt", "dewpt", "pair");
467+
processType(decObj, "h2s", "h2s", "pair");
467468
processType(decObj, "humidity", "humidityRelative", "pair");
468469
processType(decObj, "humidity_abs", "humidityAbsolute", "pair");
469470
processType(decObj, "no2", "no2", "pair");

bundles/org.openhab.binding.airq/src/main/resources/OH-INF/i18n/airq.properties

+2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ channel-type.airq.dewpt_maxerr.label = Max. Error Dew Point
6767
channel-type.airq.dhdt.label = Change of Humidity
6868
channel-type.airq.door.label = Door Event (exp)
6969
channel-type.airq.geopos.label = Location of air-Q Device
70+
channel-type.airq.h2s.label = Hydrogen Sulfide (H₂S)
71+
channel-type.airq.h2s_maxerr.label = Max. Error H₂S Conc.
7072
channel-type.airq.health.label = Health Index
7173
channel-type.airq.humidity.label = Humidity
7274
channel-type.airq.humidity_abs.label = Absolute Humidity

bundles/org.openhab.binding.airq/src/main/resources/OH-INF/thing/thing-types.xml

+15
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<channel id="dHdt" typeId="dhdt"/>
2525
<channel id="dewpt" typeId="dewpt"/>
2626
<channel id="doorEvent" typeId="door"/>
27+
<channel id="h2s" typeId="h2s"/>
2728
<channel id="health" typeId="health"/>
2829
<channel id="humidityRelative" typeId="humidity"/>
2930
<channel id="humidityAbsolute" typeId="humidity_abs"/>
@@ -53,6 +54,7 @@
5354
<channel id="co_maxerr" typeId="co_maxerr"/>
5455
<channel id="co2_maxerr" typeId="co2_maxerr"/>
5556
<channel id="dewpt_maxerr" typeId="dewpt_maxerr"/>
57+
<channel id="h2s_maxerr" typeId="h2s_maxerr"/>
5658
<channel id="humidityRelative_maxerr" typeId="humidity_maxerr"/>
5759
<channel id="humidityAbsolute_maxerr" typeId="humidity_abs_maxerr"/>
5860
<channel id="no2_maxerr" typeId="no2_maxerr"/>
@@ -115,6 +117,7 @@
115117
<property name="sensorList">Unknown sensor list</property>
116118
<property name="sensorInfo">No info about sensors</property>
117119
<property name="industry">No industry info</property>
120+
<property name="thingTypeVersion">1</property>
118121
</properties>
119122

120123
<config-description>
@@ -216,6 +219,12 @@
216219
<state readOnly="true"></state>
217220
</channel-type>
218221

222+
<channel-type id="h2s" advanced="false">
223+
<item-type unitHint="µg/m³">Number:Density</item-type>
224+
<label>Hydrogen Sulfide (H₂S)</label>
225+
<state readOnly="true" pattern="%.2f %unit%"></state>
226+
</channel-type>
227+
219228
<channel-type id="health" advanced="false">
220229
<item-type>Number:Dimensionless</item-type>
221230
<label>Health Index</label>
@@ -379,6 +388,12 @@
379388
<state readOnly="true" pattern="± %.2f %%"></state>
380389
</channel-type>
381390

391+
<channel-type id="h2s_maxerr" advanced="true">
392+
<item-type>Number:Dimensionless</item-type>
393+
<label>Max. Error H₂S Conc.</label>
394+
<state readOnly="true" pattern="± %.2f %%"></state>
395+
</channel-type>
396+
382397
<channel-type id="humidity_maxerr" advanced="true">
383398
<item-type unitHint="%">Number:Dimensionless</item-type>
384399
<label>Max. Error Humidity</label>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2+
<update:update-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns:update="https://openhab.org/schemas/update-description/v1.0.0"
4+
xsi:schemaLocation="https://openhab.org/schemas/update-description/v1.0.0 https://openhab.org/schemas/update-description-1.0.0.xsd">
5+
6+
<thing-type uid="airq:airq">
7+
<instruction-set targetVersion="1">
8+
<add-channel id="h2s">
9+
<type>airq:h2s</type>
10+
<label>Hydrogen Sulfide (H₂S)</label>
11+
</add-channel>
12+
<add-channel id="h2s_maxerr">
13+
<type>airq:h2s_maxerr</type>
14+
<label>Max. Error H₂S Conc.</label>
15+
</add-channel>
16+
</instruction-set>
17+
</thing-type>
18+
19+
</update:update-descriptions>

0 commit comments

Comments
 (0)