]> git.basschouten.com Git - openhab-addons.git/commitdiff
[airq] Add Hydrogen Sulfide (H₂S) (#16696)
authorFabian Wolter <github@fabian-wolter.de>
Wed, 1 May 2024 09:41:03 +0000 (11:41 +0200)
committerGitHub <noreply@github.com>
Wed, 1 May 2024 09:41:03 +0000 (11:41 +0200)
* [airq] Add Hydrogen Sulfide (H₂S)

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
bundles/org.openhab.binding.airq/README.md
bundles/org.openhab.binding.airq/src/main/java/org/openhab/binding/airq/internal/AirqHandler.java
bundles/org.openhab.binding.airq/src/main/resources/OH-INF/i18n/airq.properties
bundles/org.openhab.binding.airq/src/main/resources/OH-INF/thing/thing-types.xml
bundles/org.openhab.binding.airq/src/main/resources/OH-INF/update/update.xml [new file with mode: 0644]

index 1ae3c69b2b3a56f50ce361a56ec227c89b9dee78..82dc2fb3311244c24cff0983563d03e92924f12a 100644 (file)
@@ -59,6 +59,7 @@ The rw column is empty if the channel is only readable, w if the channel can be
 | dHdt                      | Number               |    | Change of Humidity                                                  |
 | dewpt                     | Number:Temperature   |    | Dew Point                                                           |
 | doorEvent                 | Number               |    | Door Event (experimental, might not work reliably)                  |
+| h2s                       | Number:Density       |    | Hydrogen sulfide (H₂S)                                              |
 | health                    | Number:Dimensionless |    | Health Index (0 to 1000, -200 for gas alarm, -800 for fire alarm)   |
 | humidityRelative          | Number:Dimensionless |    | Humidity in percent                                                 |
 | 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
 | performance               | Number:Dimensionless |    | Performance Index (0 to 1000)                                       |
 | fineDustConc01            | Number               |    | Fine Dust concentration >1 µm                                       |
 | fineDustConc02_5          | Number               |    | Fine Dust concentration >2.5 µm                                     |
-| fineDustConc10            | Number               |    | Fine Dust concentration >10 µm             fni                      |
+| fineDustConc10            | Number               |    | Fine Dust concentration >10 µm                                      |
 | pressure                  | Number:Pressure      |    | Pressure                                                            |
 | so2                       | Number               |    | SO₂ concentration                                                   |
 | sound                     | Number:Dimensionless |    | Noise                                                               |
index 75fc397c13856c2cd186ae7cdc2e45cdb647a67d..e4334788abd5662efa09767a06921327005d5b32 100644 (file)
@@ -464,6 +464,7 @@ public class AirqHandler extends BaseThingHandler {
             processType(decObj, "co", "co", "pair");
             processType(decObj, "co2", "co2", "pairPPM");
             processType(decObj, "dewpt", "dewpt", "pair");
+            processType(decObj, "h2s", "h2s", "pair");
             processType(decObj, "humidity", "humidityRelative", "pair");
             processType(decObj, "humidity_abs", "humidityAbsolute", "pair");
             processType(decObj, "no2", "no2", "pair");
index 4061cddd05ef4cf002fc41fcacb60c89909005ab..69266f327f0257d719da6e11fa7c453d8bd1aaad 100644 (file)
@@ -67,6 +67,8 @@ channel-type.airq.dewpt_maxerr.label = Max. Error Dew Point
 channel-type.airq.dhdt.label = Change of Humidity
 channel-type.airq.door.label = Door Event (exp)
 channel-type.airq.geopos.label = Location of air-Q Device
+channel-type.airq.h2s.label = Hydrogen Sulfide (H₂S)
+channel-type.airq.h2s_maxerr.label = Max. Error H₂S Conc.
 channel-type.airq.health.label = Health Index
 channel-type.airq.humidity.label = Humidity
 channel-type.airq.humidity_abs.label = Absolute Humidity
index 426a7d38c29c3511b8cff0b84ae1a90df3b6a5c1..8ecda458a2bcbbe7445005368f77fc66000fbb2e 100644 (file)
@@ -24,6 +24,7 @@
                        <channel id="dHdt" typeId="dhdt"/>
                        <channel id="dewpt" typeId="dewpt"/>
                        <channel id="doorEvent" typeId="door"/>
+                       <channel id="h2s" typeId="h2s"/>
                        <channel id="health" typeId="health"/>
                        <channel id="humidityRelative" typeId="humidity"/>
                        <channel id="humidityAbsolute" typeId="humidity_abs"/>
@@ -53,6 +54,7 @@
                        <channel id="co_maxerr" typeId="co_maxerr"/>
                        <channel id="co2_maxerr" typeId="co2_maxerr"/>
                        <channel id="dewpt_maxerr" typeId="dewpt_maxerr"/>
+                       <channel id="h2s_maxerr" typeId="h2s_maxerr"/>
                        <channel id="humidityRelative_maxerr" typeId="humidity_maxerr"/>
                        <channel id="humidityAbsolute_maxerr" typeId="humidity_abs_maxerr"/>
                        <channel id="no2_maxerr" typeId="no2_maxerr"/>
                        <property name="sensorList">Unknown sensor list</property>
                        <property name="sensorInfo">No info about sensors</property>
                        <property name="industry">No industry info</property>
+                       <property name="thingTypeVersion">1</property>
                </properties>
 
                <config-description>
                <state readOnly="true"></state>
        </channel-type>
 
+       <channel-type id="h2s" advanced="false">
+               <item-type unitHint="µg/m³">Number:Density</item-type>
+               <label>Hydrogen Sulfide (H₂S)</label>
+               <state readOnly="true" pattern="%.2f %unit%"></state>
+       </channel-type>
+
        <channel-type id="health" advanced="false">
                <item-type>Number:Dimensionless</item-type>
                <label>Health Index</label>
                <state readOnly="true" pattern="± %.2f %%"></state>
        </channel-type>
 
+       <channel-type id="h2s_maxerr" advanced="true">
+               <item-type>Number:Dimensionless</item-type>
+               <label>Max. Error H₂S Conc.</label>
+               <state readOnly="true" pattern="± %.2f %%"></state>
+       </channel-type>
+
        <channel-type id="humidity_maxerr" advanced="true">
                <item-type unitHint="%">Number:Dimensionless</item-type>
                <label>Max. Error Humidity</label>
diff --git a/bundles/org.openhab.binding.airq/src/main/resources/OH-INF/update/update.xml b/bundles/org.openhab.binding.airq/src/main/resources/OH-INF/update/update.xml
new file mode 100644 (file)
index 0000000..17176bd
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<update:update-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:update="https://openhab.org/schemas/update-description/v1.0.0"
+       xsi:schemaLocation="https://openhab.org/schemas/update-description/v1.0.0 https://openhab.org/schemas/update-description-1.0.0.xsd">
+
+       <thing-type uid="airq:airq">
+               <instruction-set targetVersion="1">
+                       <add-channel id="h2s">
+                               <type>airq:h2s</type>
+                               <label>Hydrogen Sulfide (H₂S)</label>
+                       </add-channel>
+                       <add-channel id="h2s_maxerr">
+                               <type>airq:h2s_maxerr</type>
+                               <label>Max. Error H₂S Conc.</label>
+                       </add-channel>
+               </instruction-set>
+       </thing-type>
+
+</update:update-descriptions>