-
Platform information:
- Hardware: PRI3 model b
- OS: openhabian
-
Java Runtime Environment: which java platform is used and what version
- openHAB version: openHAB 2.5.1-2
-
Issue of the topic:
Please let me know what type should be the proxy variable that should display a calibrated value of temperature. You can find below my configuration and the error that I got:
proxy Item:
Number p_ESP8266_Antreu_TempValue “Temperatura actuala: [%.1f °C]”
Rule:
rule “Heating system - Birouri”
when
Item SetPointBirouri changed or
Item ESP8266_Antreu_TempValue changedthen
var tempIn_Birouri = (ESP8266_Antreu_TempValue.state as QuantityType).doubleValue
var Number setpoint_Birouri = SetPointBirouri.state as DecimalTypevar Number hysteresis = 0.2
tempIn_Birouri=tempIn_Birouri-3;
p_ESP8266_Antreu_TempValue.postUpdate(((ESP8266_Antreu_TempValue.state as QuantityType).doubleValue)-3);if (tempIn_Birouri < (setpoint_Birouri - hysteresis)) {
LED5_Birouri.sendCommand(ON);
StareIncalzireBirouri.postUpdate(“ON”);
}
else if (tempIn_Birouri >= setpoint_Birouri) {
LED5_Birouri.sendCommand(OFF);
StareIncalzireBirouri.postUpdate(“OFF”);
}
end
Log (error):
2020-03-08 23:40:40.540 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Heating system - Birouri’: Could not cast 22.00 to org.eclipse.smarthome.core.library.types.QuantityType; line 94, column 23, length 54
[org.eclipse.jetty.server.HttpChannel] - www.baidu.com:443java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967) ~[?:1.8.0_222]
at org.ops4j.pax.web.service.spi.model.ServerModel.matchPathToContext(ServerModel.java:365) ~[?:?]
at org.ops4j.pax.web.service.spi.model.ServerModel.matchPathToContext(ServerModel.java:305) ~[?:?]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:65) ~[?:?]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.Server.handle(Server.java:494) ~[bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [bundleFile:9.4.20.v20190813]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
Thank you in advance!