Closed ggzengel closed 5 years ago
I can't find neither humiditytype
nor humidityconf
as channel in your sourcecode.
Depending on the sensor, a
humidity
orhumidityconf
channel may be added.
humidityconf
is not a channel, it's a channeltype and humidity
is still the channel.
Depending on the sensor, the
humidity
channel may have thehumiditytype
parameter.
The humidity channel
for the channel type
humidityconf
has the type parameter
humidity
.
You really have to put good exaples to your docu, because nothing is self explaining without an example:
Thing ms-th Ow_MSTH_KG_DG_HR [ id="26.D1B17F010000", refresh=60 ] {
Type humidityconf : humidity [ humidity="/HIH4000/humidity" ]
}
channel="onewire:ms-th:server1:Ow_MSTH_KG_KWL_AA:humidity"
Please note that I don‘t „have to“ do anything.
For me it is working:
Thing bms mybms [
id="26.CD497C010000",
id1="28.D3E45A040000",
lightsensor=true,
temperaturesensor="DS18B20",
refresh=60
] {
Channels:
Type temperature-por-res : temperature [
resolution="9"
]
}
But to have the configuration options for channels working, please use this fixed version. It includes the multisensor-refactoring, the fix for bridge initialization and the direct access channels.
@J-N-K I like how you work and I know how much work you put into this code. I didn't say you "have to". I meant you did the first step and wrote a good and flexible binding with a lot of feature. Now if you wan't that other people use it and you don't waste your work, you "have to" bring examples for understanding it. Sorry, I can't use English in a diplomatic way. leo.org is my friend.
Does that mean auto detection does not work with BMS? But the data is there.
Not implemented for textual configuration. Auto-detection works for thing discovery.
Is this a feature for the future or by design?
I'm using the latest version. On reload I get this:
17:08:50.481 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
at java.lang.Integer.parseInt(Integer.java:592) ~[?:?]
at java.lang.Integer.valueOf(Integer.java:766) ~[?:?]
at org.eclipse.smarthome.binding.onewire.internal.handler.AdvancedMultisensorThingHandler.initialize(AdvancedMultisensorThingHandler.java:102) ~[?:?]
at org.eclipse.smarthome.binding.onewire.internal.handler.AdvancedMultisensorThingHandler.updateSensorProperties(AdvancedMultisensorThingHandler.java:330) ~[?:?]
at org.eclipse.smarthome.binding.onewire.internal.handler.AdvancedMultisensorThingHandler.lambda$0(AdvancedMultisensorThingHandler.java:97) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
My sensors are from KW 12/2013.
Now I changed to BMS and it's always INITIALIZING
:
Thing bms Ow_BMS_KG_KWL_AA [ id="26.22AE7F010000", id1="28.D6EC5A040000", temperaturesensor="DS18B20", refresh=60 ] {
}
Number Ow_H_KG_KWL_AA "KWL Feuchtigkeit Abluft außen [%.1f %%]" <humidity> (OWIRE) { channel="onewire:bms:server1:Ow_BMS_KG_KWL_AA:humidity" }
Number:Temperature Ow_T_KG_KWL_AA "KWL Temperatur Abluft außen [%.1f %unit%]" (OWIRE) { channel="onewire:bms:server1:Ow_BMS_KG_KWL_AA:temperature" }
The log starts at reboot:
17:16:23.180 [DEBUG] [org.eclipse.smarthome.binding.onewire] - BundleEvent STARTING - org.eclipse.smarthome.binding.onewire
17:16:23.185 [DEBUG] [org.eclipse.smarthome.binding.onewire] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.type.DynamicStateDescriptionProvider, org.eclipse.smarthome.binding.onewire.internal.OwDynamicStateDescriptionProvider}={service.id=394, service.bundleid=236, service.scope=bundle, component.name=org.eclipse.smarthome.binding.onewire.internal.OwDynamicStateDescriptionProvider, component.id=249} - org.eclipse.smarthome.binding.onewire
17:16:23.197 [DEBUG] [org.eclipse.smarthome.binding.onewire] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=395, service.bundleid=236, service.scope=bundle, component.name=binding.onewire, component.id=250} - org.eclipse.smarthome.binding.onewire
17:16:23.200 [DEBUG] [org.eclipse.smarthome.binding.onewire] - BundleEvent STARTED - org.eclipse.smarthome.binding.onewire
17:16:23.278 [DEBUG] [internal.discovery.OwDiscoveryService] - registering discovery service for org.eclipse.smarthome.binding.onewire.internal.handler.OwserverBridgeHandler@3375ed47
17:16:23.280 [DEBUG] [org.eclipse.smarthome.binding.onewire] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=396, service.bundleid=236, service.scope=singleton} - org.eclipse.smarthome.binding.onewire
17:16:23.292 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'onewire:owserver:server1' changed from UNINITIALIZED to INITIALIZING
17:16:23.292 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'onewire:owserver:server1' changed from INITIALIZING to UNKNOWN
17:16:23.293 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'onewire:owserver:server1' changed from UNKNOWN to ONLINE
17:16:23.293 [DEBUG] [.internal.owserver.OwserverConnection] - opened OwServerConnection to 127.0.0.1:4304
17:16:23.299 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'onewire:bms:server1:Ow_BMS_KG_KWL_AA' changed from UNINITIALIZED to INITIALIZING
17:16:23.300 [DEBUG] [ndler.AdvancedMultisensorThingHandler] - updating sensor properties of Multisensor BMS
17:16:23.303 [TRACE] [.internal.owserver.OwserverConnection] - owServerConnection already open, skipping input buffer
17:16:23.304 [TRACE] [.internal.owserver.OwserverConnection] - wrote: messageType READ, size 55, controlFlags 0x00000104, payload '26.22AE7F010000/pages/page.ALL'
17:16:23.548 [TRACE] [.internal.owserver.OwserverConnection] - read: return code -1, size 24, controlFlags 0x00000104, payload ''
<multiple>
17:16:24.276 [TRACE] [.internal.handler.OwBaseBridgeHandler] - called owRefresher at 1546103784276, 1 childs
17:16:24.277 [TRACE] [.internal.handler.OwBaseBridgeHandler] - getting handler for Multisensor BMS (1 to go)
17:16:24.278 [TRACE] [.internal.handler.OwBaseBridgeHandler] - Multisensor BMS not initialized, skipping refresh
</multiple>
17:16:26.283 [TRACE] [.internal.handler.OwBaseBridgeHandler] - called owRefresher at 1546103786283, 1 childs
17:16:26.283 [TRACE] [.internal.handler.OwBaseBridgeHandler] - getting handler for Multisensor BMS (1 to go)
17:16:26.284 [TRACE] [.internal.handler.OwBaseBridgeHandler] - Multisensor BMS not initialized, skipping refresh
17:16:26.550 [DEBUG] [.internal.owserver.OwserverConnection] - closed connection
17:16:26.551 [DEBUG] [.internal.owserver.OwserverConnection] - failed requesting messageType READ, size 55, controlFlags 0x00000104, payload '26.22AE7F010000/pages/page.ALL'->return code -1, size 24, controlFlags 0x00000104, payload '' [I/O error: exception while reading packet - Read timed out]
17:16:26.552 [DEBUG] [ndler.AdvancedMultisensorThingHandler] - updating thing properties for onewire:bms:server1:Ow_BMS_KG_KWL_AA failed: I/O error: exception while reading packet - Read timed out
17:16:31.553 [DEBUG] [ndler.AdvancedMultisensorThingHandler] - updating sensor properties of Multisensor BMS
17:16:31.554 [DEBUG] [.internal.owserver.OwserverConnection] - opened OwServerConnection to 127.0.0.1:4304
17:16:31.555 [TRACE] [.internal.owserver.OwserverConnection] - wrote: messageType READ, size 55, controlFlags 0x00000104, payload '26.22AE7F010000/pages/page.ALL'
17:16:32.283 [TRACE] [.internal.owserver.OwserverConnection] - read: return code 64, size 88, controlFlags 0x00000104, payload '?0??????��??�??�??????????????????????????�?????(��Z???????????'
17:16:32.288 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
at java.lang.Integer.parseInt(Integer.java:592) ~[?:?]
at java.lang.Integer.valueOf(Integer.java:766) ~[?:?]
at org.eclipse.smarthome.binding.onewire.internal.handler.AdvancedMultisensorThingHandler.initialize(AdvancedMultisensorThingHandler.java:102) ~[?:?]
at org.eclipse.smarthome.binding.onewire.internal.handler.AdvancedMultisensorThingHandler.updateSensorProperties(AdvancedMultisensorThingHandler.java:330) ~[?:?]
at org.eclipse.smarthome.binding.onewire.internal.handler.AdvancedMultisensorThingHandler.lambda$3(AdvancedMultisensorThingHandler.java:322) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
17:16:32.292 [TRACE] [.internal.handler.OwBaseBridgeHandler] - called owRefresher at 1546103792292, 1 childs
17:16:32.292 [TRACE] [.internal.handler.OwBaseBridgeHandler] - getting handler for Multisensor BMS (1 to go)
17:16:32.293 [TRACE] [.internal.handler.OwBaseBridgeHandler] - Multisensor BMS not initialized, skipping refresh
17:16:32.300 [INFO ] [smarthome.event.ThingUpdatedEvent ] - Thing 'onewire:bms:server1:Ow_BMS_KG_KWL_AA' has been updated.
<always the same for minutes>
17:21:53.848 [TRACE] [.internal.handler.OwBaseBridgeHandler] - called owRefresher at 1546104113848, 1 childs
17:21:53.849 [TRACE] [.internal.handler.OwBaseBridgeHandler] - getting handler for Multisensor BMS (1 to go)
17:21:53.849 [TRACE] [.internal.handler.OwBaseBridgeHandler] - Multisensor BMS not initialized, skipping refresh
</always the same for minutes>
That's intersting. None of my BMS has "19" as sensor identifier, "19" is usually used by iButtonLink. My BMS all have "F1", "F2" or "F3".
I have updated the jar above to account for this.
Regarding the requested feature: can be done, but not high priority.
@J-N-K Thanks for your work. I forget to mention this often.
It show MS-TH but is a BMS-THS.
I have found this code from wiregate. It's part of edit_owsensorconf.cgi from https://repo.wiregate.de/wiregate/pool/wiregate-1.0/main/w/webmin-wiregate_0.38_all.deb
There is no copyright header on this file:
if ($owserver) {
my @a_owdir_all = split( ',', $owserver->dir("/") );
foreach (@a_owdir_all) {
my $senskey = substr( $_, 1 );
if ( !$conf{$senskey}{'type'} ) {
$conf{$senskey}{'newsensor'} = 1;
} else {
#addType($senskey, $conf{$senskey}{'type'});
}
$conf{$senskey}{'present'} = 1;
#print "DEBUG: " . $senskey . "=" . $conf{$senskey}{'type'} . "<br>";
if ( ( $senskey =~ /^28/ or $senskey =~ /^10/ ) and !$conf{$senskey}{'type'} ) {
# Temperatursensor DS18B20 oder DS18S20
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "DS1820";
$conf{$senskey}{'eib_ga_temp'} = "";
$conf{$senskey}{'graph'} = "1";
$conf{$senskey}{'cycle'} = "";
$conf{$senskey}{'resolution'} = $senskey =~ /^28/ ? "10" : "";
}
if ( ( $senskey =~ /^23/ ) and !$conf{$senskey}{'type'} ) {
my %memoryhash = &readidchip($senskey);
if ( $memoryhash{'00'} eq '1W-TVOC2IO-26-B' || $memoryhash{'00'} eq '1W-TVOC-30-B' ) {
# 1W-TVOC2IO-26-B
# create config-entry
#print "A".$memoryhash{"20"}{"02"}{"id"};
my $i26 = '02';
if ($memoryhash{'00'} eq '1W-TVOC-30-B') {
$i26 = '01';
}
$conf{ $memoryhash{"20"}{$i26}{"id"} }{'name'} = "$text{'new'}_" . getISODateStamp();
if ($memoryhash{'00'} eq '1W-TVOC2IO-26-B') {
$conf{ $memoryhash{"20"}{$i26}{"id"} }{'type'} = "DS2438TVOC2IO";
$conf{ $memoryhash{"20"}{$i26}{"id"} }{'2413'} = $memoryhash{"20"}{"01"}{"id"};
} else {
$conf{ $memoryhash{"20"}{$i26}{"id"} }{'type'} = 'DS2438TVOC';
}
$conf{ $memoryhash{"20"}{$i26}{"id"} }{'eib_ga_temp'} = "";
$conf{ $memoryhash{"20"}{$i26}{"id"} }{'eib_ga_voc'} = "";
$conf{ $memoryhash{"20"}{$i26}{"id"} }{'eib_ga_volt'} = "";
$conf{ $memoryhash{"20"}{$i26}{"id"} }{'graph'} = "1";
$conf{ $memoryhash{"20"}{$i26}{"id"} }{'cycle'} = "";
$conf{ $memoryhash{"20"}{$i26}{"id"} }{'idchip'} = $memoryhash{"20"}{"00"}{"id"};
if ( $conf{$senskey}{'newsensor'} == 1 ) { $conf{ $memoryhash{"20"}{$i26}{"id"} }{'newsensor'} = 1; }
} elsif ( $memoryhash{"00"} eq "LEDACTORVAD" || $memoryhash{"00"} eq "LEDACTOR" ) {
# LEDACTOR
my $mainkey = $memoryhash{"20"}{"02"}{"id"};
$conf{$mainkey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$mainkey}{'type'} = "DS24088LED4REL";
for ( my $i = 0 ; $i <= 7 ; $i++ ) {
$conf{$mainkey}{ 'type_ch' . $i } = 0; # 0=input, 1=output
$conf{$mainkey}{ 'eib_ga_ch' . $i } = "";
}
my $ds2413 = $memoryhash{"20"}{"01"}{"id"};
$conf{$mainkey}{'idchip'} = $memoryhash{"20"}{"00"}{"id"};
$conf{$mainkey}{'2413'} = $ds2413;
$conf{$ds2413}{'skip'} = 1;
if ( $conf{$senskey}{'newsensor'} == 1 ) { $conf{$mainkey}{'newsensor'} = 1; }
} elsif ( isKoppler($memoryhash{"00"}) ) {
initTerminal($senskey, \%memoryhash);
}
}
if ( ( $senskey =~ /^26/ ) and !$conf{$senskey}{'type'} ) {
my $page3 = trim( $owserver->read("$senskey/pages/page.3") );
my $page3id = unpack( "C2*", $page3 ) if $page3;
# F1 = 241, F2 = 242 F3=243=AMSv2 F4=244=AMSv2 zweiter 2438 0-10V
# 247 (0xF7)=Umgebungslicht aktiv (WG-TU1)
# 249 (0xF9)=VOC
if ( trim( $owserver->read("$senskey/MultiSensor/type") ) =~ /MS-TH/ or $page3id == 241 or $page3id == 243 )
{ # 243=AMSv2 - wird ggfs. auf 242 (THS) umgeschossen, keine Unterscheidung (nur Licht ueber rev in page.5
# Temp/Luftfeuchte
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "DS2438Hum";
$conf{$senskey}{'eib_ga_temp'} = "";
$conf{$senskey}{'eib_ga_hum'} = "";
$conf{$senskey}{'eib_ga_dewPoint'} = "";
$conf{$senskey}{'eib_ga_hum_abs'} = "";
$conf{$senskey}{'graph'} = "1";
$conf{$senskey}{'cycle'} = "";
$conf{$senskey}{'resolution'} = "";
}
if ( trim( $owserver->read("$senskey/MultiSensor/type") ) =~ /MS-THS/ or $page3id == 242 ) {
# Temp/Luftfeuchte/Solar MS-THS-v1 und v2.11 - unterschidung ueber $rev
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "DS2438THS";
$conf{$senskey}{'eib_ga_temp'} = "";
$conf{$senskey}{'eib_ga_hum'} = "";
$conf{$senskey}{'eib_ga_dewPoint'} = "";
$conf{$senskey}{'eib_ga_hum_abs'} = "";
$conf{$senskey}{'eib_ga_light'} = "";
$conf{$senskey}{'graph'} = "1";
$conf{$senskey}{'cycle'} = "";
$conf{$senskey}{'resolution'} = "";
$conf{$senskey}{'curr_low'} = "0";
$conf{$senskey}{'curr_high'} = "0.24";
}
if ( trim( $owserver->read("$senskey/DATANAB") ) =~ /DATANAB/ ) {
# Temp/Luftfeuchte Datanab hum/temp
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "DS2438Datanab";
$conf{$senskey}{'eib_ga_temp'} = "";
$conf{$senskey}{'eib_ga_hum'} = "";
$conf{$senskey}{'eib_ga_dewPoint'} = "";
$conf{$senskey}{'eib_ga_hum_abs'} = "";
$conf{$senskey}{'eib_ga_light'} = "";
$conf{$senskey}{'graph'} = "1";
$conf{$senskey}{'cycle'} = "";
$conf{$senskey}{'resolution'} = "";
}
if ( trim( $owserver->read("$senskey/MultiSensor/type") ) =~ /MS-TL/ ) {
# iButtonlink Temp/Licht
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "DS2438TL";
$conf{$senskey}{'eib_ga_temp'} = "";
$conf{$senskey}{'eib_ga_light'} = "";
$conf{$senskey}{'graph'} = "1";
$conf{$senskey}{'cycle'} = "";
$conf{$senskey}{'resolution'} = "";
}
if ( $page3id == 247 ) {
# WG-TU1 Temp/Licht
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "DS2438TU1";
$conf{$senskey}{'eib_ga_temp'} = "";
$conf{$senskey}{'eib_ga_light'} = "";
$conf{$senskey}{'graph'} = "1";
$conf{$senskey}{'cycle'} = "";
$conf{$senskey}{'resolution'} = "";
}
if ( $page3id == 800 ) {
# 1W-TVOC2IO-26-B
# create config-entry
my $page5 = $owserver->read("$senskey/pages/page.5");
my ( $wk, $yr, $rev, $dummy ) = unpack( "C S> CC", $page5 ) if $page5;
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
if ($rev < 30) {
$conf{$senskey}{'type'} = "DS2438TVOC2IO";
} else {
$conf{$senskey}{'type'} = "DS2438TVOC";
}
$conf{$senskey}{'eib_ga_temp'} = "";
$conf{$senskey}{'eib_ga_voc'} = "";
$conf{$senskey}{'eib_ga_volt'} = "";
$conf{$senskey}{'graph'} = "1";
$conf{$senskey}{'cycle'} = "";
$conf{$senskey}{'resolution'} = "";
}
if ( trim( $owserver->read("$senskey/MultiSensor/type") ) =~ /MS-TV/ or $page3id == 244 ) {
# iButtonlink / AMSv2 Temp/Volt
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "DS2438TV";
$conf{$senskey}{'eib_ga_volt'} = "";
$conf{$senskey}{'graph'} = "1";
$conf{$senskey}{'cycle'} = "";
$conf{$senskey}{'resolution'} = "";
}
if ( trim( $owserver->read("$senskey/MultiSensor/type") ) =~ /MS-TVS/ or $page3id == 246 ) {
# iButtonlink / AMSv2 Temp/Volt
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "DS2438TVS";
$conf{$senskey}{'eib_ga_light'} = "";
$conf{$senskey}{'eib_ga_volt'} = "";
$conf{$senskey}{'graph'} = "1";
$conf{$senskey}{'cycle'} = "";
$conf{$senskey}{'resolution'} = "";
}
if ( trim( $owserver->read("$senskey/MultiSensor/type") ) =~ /MS-TC/ ) {
# iButtonlink Temp/Current
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "DS2438TC";
$conf{$senskey}{'eib_ga_temp'} = "";
$conf{$senskey}{'eib_ga_curr'} = "";
$conf{$senskey}{'graph'} = "1";
$conf{$senskey}{'cycle'} = "";
$conf{$senskey}{'resolution'} = "";
}
}
if ( $senskey =~ /^30/ and !$conf{$senskey}{'type'} ) {
# Moisture DS2760 -> check page.1 = 0x03 ?
#my (@page) = unpack("H2H2H2H2H2H2H2H2H2H2H2H2H2H2H2H2",$owserver->read("$senskey/pages/page.1"));
#if ($page[0]== 3) {
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "DS2760MO";
$conf{$senskey}{'eib_ga_moisthum'} = "";
$conf{$senskey}{'graph'} = "1";
$conf{$senskey}{'cycle'} = "";
$conf{$senskey}{'curr_low'} = "0.14";
$conf{$senskey}{'curr_high'} = "1.72";
}
if ( $senskey =~ /^01/ and !$conf{$senskey}{'type'} ) {
# ROM iButton
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "DS1990";
$conf{$senskey}{'eib_ga_present'} = "";
$conf{$senskey}{'delay'} = 0;
}
if ( $senskey =~ /^12/ and !$conf{$senskey}{'type'} ) {
# DS2406 dual switch / IO
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "DS2406";
$conf{$senskey}{'type_ch0'} = 0; # 0=input, 1=output
$conf{$senskey}{'type_ch1'} = 0; # 0=input, 1=output
$conf{$senskey}{'eib_ga_ch0'} = "";
$conf{$senskey}{'eib_ga_ch1'} = "";
}
if ( $senskey =~ /^29/ and !$conf{$senskey}{'type'} ) {
# DS2408 7ch pio
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "DS2408";
for ( my $i = 0 ; $i <= 7 ; $i++ ) {
$conf{$senskey}{ 'type_ch' . $i } = 0; # 0=input, 1=output
$conf{$senskey}{ 'eib_ga_ch' . $i } = "";
}
}
#and !grep(/^$senskey$/o, @ds2413array)
if ( $senskey =~ /^3A/ and !$conf{$senskey}{'type'} ) {
initDS2413($senskey);
}
if ( $senskey =~ /^1D/ and !$conf{$senskey}{'type'} ) {
# DS2423 dual counter
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "DS2423";
$conf{$senskey}{'eib_ga_countA'} = "";
$conf{$senskey}{'eib_ga_countB'} = "";
}
if ( $senskey =~ /^81/ and !$conf{$senskey}{'type'} ) {
# DS9490 Busmaster
# create config-entry
$conf{$senskey}{'name'} = "Busmaster";
#$conf{$senskey}{'name'} = "DS9490 USB Busmaster";
$conf{$senskey}{'type'} = "DS9490";
$conf{$senskey}{'graph'} = "1";
}
if ( $senskey =~ /^2D/ and !$conf{$senskey}{'type'} ) {
# PBM01 Busmaster
# create config-entry
$conf{$senskey}{'name'} = "$text{'new'}_" . getISODateStamp();
$conf{$senskey}{'type'} = "PBM01";
$conf{$senskey}{'graph'} = "1";
}
}
} else {
print "<table id='uebersicht_header'><tr><td class='sensorheader_text'>$text{'owsensorconf_error_owserver'}</td></tr></table>";
}
Thanks for your update. I didn't install it yet but changed back to MS-TH config. And they don't work anymore.
I use your first jar from today (0.11.0.201812291318). I hope there is nothing broken for real MS-TH users.
My next step is to test your last jar.
Thing ms-th Ow_MSTH_KG_KWL_AA [ id="26.22AE7F010000", refresh=60 ] {
Type humidityconf : humidity [ humidity="/HIH4000/humidity" ]
}
18:54:16.323 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating sensor properties of Multisensor TH
18:54:16.323 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating thing properties for onewire:ms-th:server1:Ow_MSTH_KG_KWL_AA failed, no bridge available
After removing all MS-TH I still get:
19:11:32.615 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating sensor properties of Multisensor TH
19:11:32.616 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating sensor properties of Multisensor TH
19:11:32.616 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating thing properties for onewire:ms-th:server1:Ow_MSTH_KG_KWL_AA failed, no bridge available
19:11:32.616 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating thing properties for onewire:ms-th:server1:Ow_MSTH_KG_KWL_KA failed, no bridge available
19:11:32.616 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating sensor properties of Multisensor TH
19:11:32.617 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating sensor properties of Multisensor TH
19:11:32.617 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating thing properties for onewire:ms-th:server1:Ow_MSTH_KG_KWL_AI failed, no bridge available
19:11:32.617 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating thing properties for onewire:ms-th:server1:Ow_MSTH_KG_DG_HR failed, no bridge available
19:11:32.618 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating sensor properties of Multisensor TH
19:11:32.619 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating thing properties for onewire:ms-th:server1:Ow_MSTH_KG_KWL_FI failed, no bridge available
19:11:32.619 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating sensor properties of Multisensor TH
19:11:32.620 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating thing properties for onewire:ms-th:server1:Ow_MSTH_KG_KWL_KA failed, no bridge available
19:11:32.882 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating sensor properties of Multisensor TH
19:11:32.882 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating thing properties for onewire:ms-th:server1:Ow_MSTH_KG_KWL_AI failed, no bridge available
19:11:32.882 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating sensor properties of Multisensor TH
19:11:32.883 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating thing properties for onewire:ms-th:server1:Ow_MSTH_KG_KWL_FI failed, no bridge available
19:11:32.883 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating sensor properties of Multisensor TH
19:11:32.883 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating thing properties for onewire:ms-th:server1:Ow_MSTH_KG_DG_HR failed, no bridge available
19:11:32.884 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating sensor properties of Multisensor TH
19:11:32.884 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating sensor properties of Multisensor TH
19:11:32.884 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating thing properties for onewire:ms-th:server1:Ow_MSTH_KG_KWL_KA failed, no bridge available
19:11:32.884 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating thing properties for onewire:ms-th:server1:Ow_MSTH_KG_DG_HR failed, no bridge available
19:11:32.885 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating sensor properties of Multisensor TH
19:11:32.885 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating sensor properties of Multisensor TH
19:11:32.885 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating thing properties for onewire:ms-th:server1:Ow_MSTH_KG_KWL_KA failed, no bridge available
19:11:32.885 [DEBUG] [.handler.BasicMultisensorThingHandler] - updating thing properties for onewire:ms-th:server1:Ow_MSTH_KG_KWL_AA failed, no bridge available
It's reading the wrong humidity channel:
19:15:48.982 [TRACE] [.internal.owserver.OwserverConnection] - wrote: messageType READ, size 50, controlFlags 0x00000104, payload '/26.F3987F010000/humidity'
It's humiditytype="/HIH4000/humidity"
.
Do you get the error messages once or more than once? Edit: Seen already. That's strange. I'll investigate.
Depending on the sensor, a humidity or humidityconf channel may be added. This is only relevant for DS2438-based sensors of thing-type ms-tx.
Every 5 sec.
In <thing-type id="ms-th" listed="false">
there is <channel id="humidity" typeId="humidityconf" />
.
But in thing-type id="bms">
there is <channel id="humidity" typeId="humidity" />
.
And I guess
public static final String CONFIG_HUMIDITY = "humidity";
should be
public static final String CONFIG_HUMIDITY = "humiditytype";
Because of: if (channelConfiguration.get(CONFIG_HUMIDITY) != null) { HUMIDITY_PARAMETER.set(THING_TYPE_OWSERVER, new OwserverDeviceParameter((String) channelConfiguration.get(CONFIG_HUMIDITY))); } else { HUMIDITY_PARAMETER.set(THING_TYPE_OWSERVER, new OwserverDeviceParameter("/humidity")); }
That's why only this worked, but only with MS-TH:
Type humidityconf : humidity [ humidity="/HIH4000/humidity" ]
Please use ms-tx
instead of ms-th
. ms-th
and ms-tv
are deprecated. The thing handler takes care of the rest. For BMS and AMS /humidity
is correct.
I don't understand why the update task is not removed. It works here for me.
I fixed the bug with the config. Thanks. Updated the jar.
@kaikreuzer I think there is to much string handling for developing bindings. Or there is less syntax checking in things files. You put strings to xml and have to put them again in constants (hopefully the same). I think things, bridges and channels should be well defined in xml and checked by ESH. There you can define default values and don't have to define them inside the code (channelConfiguration.get(CONFIG_HUMIDITY) != null). Second you can check if CONFIG_HUMIDITY is defined in xml while calling channelConfiguration.get(CONFIG_HUMIDITY).
I hope you can imagine what I want to say.
@J-N-K Thanks. Now it's working.
Thing bms Ow_BMS_KG_KWL_AA [ id="26.22AE7F010000", id1="28.D6EC5A040000", temperaturesensor="DS18B20", refresh=60 ] {
Type humidity : humidity [ humidity="/HIH4000/humidity" ]
}
You can select the type with humidity=...? That should not work.
I still got: 0.11.0.201812291958
This should be the latest. The timestamp is UTC, not local time.
I use this config (every sensor has an other path):
Thing bms Ow_BMS_KG_KWL_AA [ id="26.22AE7F010000", id1="28.D6EC5A040000", temperaturesensor="DS18B20", refresh=60 ] {
Type humidity : humidity [ humidityy="/HIH4000/humiditya" ]
}
Thing bms Ow_BMS_KG_KWL_AI [ id="26.47B37C010000", id1="28.1D7E8B020000", temperaturesensor="DS18B20", refresh=60 ] {
Type humidity : humidity [ humidity="/HIH4000/humidityb" ]
}
Thing bms Ow_BMS_KG_KWL_FI [ id="26.41C67F010000", id1="28.89D41B030000", temperaturesensor="DS18B20", refresh=60 ] {
Type humidity : humidity [ humidity="/HIH4000/humidityc" ]
}
Thing bms Ow_BMS_KG_KWL_KA [ id="26.F3987F010000", id1="28.6EE85A040000", temperaturesensor="DS18B20", refresh=60 ] {
Type humidity : humidity [ humidity="/HIH4000/humidityd" ]
}
Thing bms Ow_BMS_KG_DG_HR [ id="26.D1B17F010000", id1="28.17DC5A040000", temperaturesensor="DS18B20", refresh=60 ] {
Type humidity : humidity [ humidity="/HIH4000/humiditye" ]
}
The first time I save I get this:
21:30:54.086 [TRACE] [.internal.owserver.OwserverConnection] - wrote: messageType READ, size 59, controlFlags 0x00000104, payload '/26.22AE7F010000/HIH4000/humiditye'
21:30:57.191 [TRACE] [.internal.owserver.OwserverConnection] - wrote: messageType READ, size 59, controlFlags 0x00000104, payload '/26.F3987F010000/HIH4000/humiditye'
21:31:01.296 [TRACE] [.internal.owserver.OwserverConnection] - wrote: messageType READ, size 59, controlFlags 0x00000104, payload '/26.41C67F010000/HIH4000/humiditye'
21:31:04.400 [TRACE] [.internal.owserver.OwserverConnection] - wrote: messageType READ, size 59, controlFlags 0x00000104, payload '/26.47B37C010000/HIH4000/humiditye'
21:31:07.503 [TRACE] [.internal.owserver.OwserverConnection] - wrote: messageType READ, size 59, controlFlags 0x00000104, payload '/26.D1B17F010000/HIH4000/humiditye'
The next time I get this:
21:32:59.193 [TRACE] [.internal.owserver.OwserverConnection] - wrote: messageType READ, size 59, controlFlags 0x00000104, payload '/26.41C67F010000/HIH4000/humidityd'
21:33:02.297 [TRACE] [.internal.owserver.OwserverConnection] - wrote: messageType READ, size 59, controlFlags 0x00000104, payload '/26.47B37C010000/HIH4000/humidityd'
21:33:05.402 [TRACE] [.internal.owserver.OwserverConnection] - wrote: messageType READ, size 59, controlFlags 0x00000104, payload '/26.D1B17F010000/HIH4000/humidityd'
21:33:08.507 [TRACE] [.internal.owserver.OwserverConnection] - wrote: messageType READ, size 59, controlFlags 0x00000104, payload '/26.F3987F010000/HIH4000/humidityd'
and so on ...
And always humidity=
.
humiditytype=
won't work.
That makes debuging really hard, because I configured each sensor different and expected changes between them.
I think I have found the last one. Interesting that no one ever noticed that. Will fix that.
Confirmed. Updated the jar. Will be fixed with #6626. Also confirmed that humiditytype
is working as expected. I guess that was a build-problem.
The last thing which is left over, that on auto detection the BMS use the wrong HIH. You neither have an option to change the HIH nor set it fix to HIH4000.
Might be, that my short instructions help someone to change the sensor identification.
@J-N-K I have BMS-THS-211 from Elab. If I discover them it get BMS sensors at inbox. I didn't add them. If I configure them manually I get
UNINITIALIZED - HANDLER_CONFIGURATION_PENDING
If I configure them as MS-TH they will work. Which HIH is the default if nothing is configured?This multi sensor has an HIH-4031 which should be compatible with HIH-4000. Can you give a note to this (BMS-THS and HIH-4031) in your bindings docu?
I think they give you the right values for an auto config. Here are some more infos: