cweitkamp:
But to be honest, I have no ides what went wrong. Sry.
Neither do I. Maybe some channel gets overwritten / redefined. I define my Items in home.items as I find Paper UI very cumbersome to work with.
For what it’s worth, I have the same problem on an Ubuntu laptop and on a Pi 3B+ running Openhabian, both with 2.5.0.M1 milestone build.
cweitkamp
(Christoph Weitkamp)
March 3, 2019, 1:57pm
22
Do you like to added a full example from your configuration for the TradfriRemoteControl1BatteryLevel_Low
item and the corresponding TradfriRemoteControl1BatteryLevel
item?
Only a feeling: Did you try to remove the whitespaces inside the visibility
condition?
visibility=[TradfriRemoteControl1BatteryLevel_Low==ON]
What happens if you change Default
element to Switch
element?
cweitkamp:
Do you like to added a full example from your configuration for the TradfriRemoteControl1BatteryLevel_Low
item and the corresponding TradfriRemoteControl1BatteryLevel
item?
Here you are - home.items :
// Dimmers:
Number TradfriDimmer1BatteryLevel "Dimmer 1 - Kitchen [%.0f %%]" (BatteryOperated, gBattery) {
channel="tradfri:0820:GATEWAY_ID:65559:battery_level"
}
Switch TradfriDimmer1BatteryLevel_Low "Dimmer 1 - Kitchen" <lowbattery> (gBattery) {
channel="tradfri:0820:GATEWAY_ID:65559:battery_low"
}
// TRADFRI 5-button Remotes:
Number TradfriRemoteControl1BatteryLevel "Remote 1 - Uplighters [%.0f %%]" (BatteryOperated, gBattery) {
channel="tradfri:0830:GATEWAY_ID:65536:battery_level"
}
Switch TradfriRemoteControl1BatteryLevel_Low "Remote 1 - Uplighters" <lowbattery> (gBattery) {
channel="tradfri:0830:GATEWAY_ID:65536:battery_level"
}
// Group items:
Group Home "Our Home" <house> ["Building"]
Group BatteryOperated "Battery operated" <battery> (Home, gBattery)
Group gBattery
There are 5 TRADFRI 5-button switch items, all defined in an identical manner.
Maybe I should define the BatteryLevel items as Number:Dimensionless
?
cweitkamp:
Only a feeling: Did you try to remove the whitespaces inside the visibility
condition?
visibility=[TradfriRemoteControl1BatteryLevel_Low==ON]
I tested it and the whitespace makes no difference.
cweitkamp:
What happens if you change Default
element to Switch
element?
I get exactly the same output if I use Switch
, Default
or Text
Item rendering in the sitemap :
Switch item=TradfriDimmer1BatteryLevel_Low label="Low battery indicator [%s]"
Default item=TradfriDimmer1BatteryLevel_Low label="Low battery indicator [%s]"
Text item=TradfriDimmer1BatteryLevel_Low label="Low battery indicator [%s]"
I could also try to see if I can recover the 2 “battery low” events in my events.log file.
cweitkamp
(Christoph Weitkamp)
March 3, 2019, 7:08pm
24
Take a close look. Can you see the mistake?
cweitkamp:
Take a close look. Can you see the mistake?
Thanks!!!
Apparently I had two Items where I used battery_level
instead of battery_low
, and guess what… those were reporting battery_low
. So it could make sense that if you use battery_level
as a trigger, that it will tip when the level value drops below 50% (natural rounding behaviour).
Case closed.
cweitkamp
(Christoph Weitkamp)
March 3, 2019, 7:21pm
26
Nice. I am glad we got it solved.
cweitkamp:
Yes, of course. To enable logging do the following steps:
My tradfri.log
file remains empty.
Here’s the Trädfri log info in /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg
(running openHAB 2.5.0.M1 Milestone Build):
# tradfri
# IKEA TRADFRI logger:
log4j2.logger.tradfri.name = org.openhab.binding.tradfri
log4j2.logger.tradfri.level = TRACE
log4j2.logger.tradfri.additivity = false
log4j2.logger.tradfri.appenderRefs = tradfri
log4j2.logger.tradfri.appenderRef.tradfri.ref = tradfri
# IKEA TRADFRI appender:
log4j2.appender.tradfri.name = tradfri
log4j2.appender.tradfri.type = RollingRandomAccessFile
log4j2.appender.tradfri.fileName = /var/log/openhab2/tradfri.log
log4j2.appender.tradfri.filePattern = /var/log/openhab2/tradfri.log.%i
log4j2.appender.tradfri.immediateFlush = true
log4j2.appender.tradfri.append = true
log4j2.appender.tradfri.layout.type = PatternLayout
log4j2.appender.tradfri.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-50.50c] - %m%n
log4j2.appender.tradfri.policies.type = Policies
log4j2.appender.tradfri.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.tradfri.policies.size.size = 1000MB
log4j2.appender.tradfri.strategy.type = DefaultRolloverStrategy
I have the very same log definition for the zwave
binding, and that one is working.
cweitkamp
(Christoph Weitkamp)
March 21, 2019, 10:18am
28
Did you try the old bundle name org.eclipse.smarthome.binding.tradfri
?
1 Like