[SOLVED] Heater thermostat control

If that’s not the whole rule, may we see it all?

If it is the whole thing, you are missing rule name, when trigger then section, and an end.
You would most likely trigger the rule to run whenever the temperature changes.

Yeap, my rules was posted incomplete.
I have redone it slightly but still is not working as expected.

rule "Heater Control"
when
    (Temperature_GF_Bath.state <= Temperature_Setpoint.state) 
then {
    Heating_GF_Bath.sendCommand(ON)
} else {
    Heating_GF_Bath.sendCommand(OFF) 
	}
end
rule "Heater Control"
when
  Item Temperature_GF_Bath changed
then
  if (Temperature_GF_Bath.state <= Temperature_Setpoint.state)
  {
    Heating_GF_Bath.sendCommand(ON)
  }
  else
  {
    Heating_GF_Bath.sendCommand(OFF)
  }
end

Try this way…

and even set up some logging to the ruel, e.g. when the rule is triggered (above the if-clause) and in the if and else part…

If it is turning on and off correctly you should set up a hysteresis for the setpoint value.
If the temperature is at the setpoint, the heater will turn on and off very quickly. You should allow a difference of 1 or 0.5 K for this…

@imhofa

Modified rule accordingly as per your suggestion above and seems to be working now :grinning:
I can start and stop heater by increasing or decreasing temperature setpoint.
I will need to test it well over the next few days to see if this setup is reliable.

Looking in the log I can see the following warning stating NULL value…

2019-01-31 22:17:27.445 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'Temperature_Setpoint'
2019-01-31 22:18:27.520 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'Temperature_Setpoint'
2019-01-31 22:19:27.420 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'Temperature_Setpoint'
2019-01-31 22:20:27.439 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'Temperature_Setpoint'
2019-01-31 22:21:27.534 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'Temperature_Setpoint'
2019-01-31 22:22:27.504 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'Temperature_Setpoint'
2019-01-31 22:23:27.538 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'Temperature_Setpoint'
2019-01-31 22:24:27.533 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'Temperature_Setpoint'
2019-01-31 22:25:27.619 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'Temperature_Setpoint'

This Item is not updated in the rule that you have shown us, so the source of the warning is elsewhere.
Perhaps another rule, perhaps your UI, perhaps a binding.
How are you expecting that Item to get updated?

@rossko57 You are right - I had another “Temperature_Setpoint” in my demo code which was causing this error - removed now.

I need to improve my rule slightly to prevent some failure scenarios.

  1. I noticed that when my temperature sensor gets disconnected from the system (for any reason) it showing reading -5C. If that ever happens my heater will be continuously working. So would like to add condition to my rule to only execute when temperature reading is above 0C. Temperature in the bath never drops below 13C when heating is off.
    Would this work ?
rule "Heater Control"
when
  Item Temperature_GF_Bath changed
  (Temperature_GF_Bath >0)
then
  if (Temperature_GF_Bath.state <= Temperature_Setpoint.state)
  {
    Heating_GF_Bath.sendCommand(ON)
  }
  else
  {
    Heating_GF_Bath.sendCommand(OFF)
  }
end
  1. Additionally I would like to add switch to sitemap in order to enable/disable (ON?OFF) temperature setpoint control. At the moment my system doesnt know if Im at home (presence is not implemented yet - on the list to do). So when I`m not at home this rule should be disabled.
Switch item=Temperature_Setpoint_Mode       mappings=[0="OFF", 1="ON"]  

Is that the best way of doing it ?

Just a warning! If for some reason your sensor will fail or doesn’t give the correct you value (like always give the same value back) you might still have the heater continuously working. So be careful what you implement and add some extra safeguards. For example don’t run the heater for longer than x or don’t run the heater when the temperature doesn’t change even while the heater is on. But these are far more complex rules than a simple on/off.

Thanks, yes my scenario number 1 should cover the event of failure the temperature sensor at any time.
I like the idea of limiting heater run to x minutes or if the heater is running for x minutes and temperature hasn`t changed. How would you implement these conditions into working rule please?

when
  Item Temperature_GF_Bath changed
  (Temperature_GF_Bath >0)
then

Best will be to read the documentation for triggers:

The trigger is for events to start the rule. The other things (to check for values) has to be done within the “then” part of the rule…

Thanks @imhofa

With regards to number 2 from my list I added switch to sitemap & items to enable heater setpoint control is needed.

Sitemap

Switch item=Temperature_Setpoint_Mode  label="Control ON" mappings=[1="OFF", 2="ON", 3="SHOWER"]

Items

Number Temperature_Setpoint_Mode  

Also modified the rule above to include this switch which woulld be used to enable/disable heater control. Third mode “Shower” will be used when there is request to warm up bathroom to certain fixed temperature - lets say 24C for younger generation.
But some reason when flicking switch from OFF to ON position heater is not starting anymore.
Any ideas where is the mistake ?

rule "Bathroom Heater Control"
when
    Item Temperature_Setpoint_Mode changed from OFF to ON
   (Temperature_GF_Bath >0)
then
    if (Temperature_GF_Bath.state <= Temperature_Setpoint_Bath.state)
   {
    Heating_GF_Bath.sendCommand(ON)
   }
else
   {
    Heating_GF_Bath.sendCommand(OFF)
   }
end

Tried the following rule but there seems to be a problem switching on heater after adding these news conditions (Temperature_GF_Bath>0 & Temperature_Setpoint_Mode)

rule "Bathroom Heater Control ON"
when
    Item Temperature_GF_Bath changed
   (Temperature_GF_Bath >0)
   (Temperature_Setpoint_Mode changed to ON)
then
    if (Temperature_GF_Bath.state <= Temperature_Setpoint_Bath.state)
	{
    Heating_GF_Bath.sendCommand(ON)
	}
else
   {
    Heating_GF_Bath.sendCommand(OFF)
   }
end

Any idea how to cure it ?

You should be seeing error report for your rules file in openhab.log

You can’t have conditions in rule triggers. They’re not suggested in the documentation already pointed to. Rule triggers are just events.
If you want to evaluate conditions, you do it inside the rule body.

rule "Bathroom Heater Control ON"
when
    Item Temperature_GF_Bath changed or 
    Item Temperature_Setpoint_Mode changed to ON
then
   if ( (Temperature_GF_Bath.state as Number) > 0) {
       if (Temperature_GF_Bath.state <= Temperature_Setpoint_Bath.state)	{
           Heating_GF_Bath.sendCommand(ON)
       } else {
           Heating_GF_Bath.sendCommand(OFF)
       }
    }
end

I’m not sure if you wanted Temperature_Setpoint_Mode as a trigger, a condition, or both.

Thanks @rossko57 I prefer to set Temperature_Setpoint_Mode as trigger (when set to 1=Heat).
Temperature_Setpoint_Mode generally will be switched ON during day when someone is at home to maintain requested temperature in the bathroom.

I have removed the temperature change condition from rule leaving only setpoint_mode as trigger.
But it works to the degree. When Temperature_Setpoint_Mode is set to 1, heater is turning ON but not stopping after reaching requested temperature - it`s constantly running till heater is switched off manually.

rule "Bathroom Heater Control ON"
when
    Item Temperature_Setpoint_Mode changed to 1
then
   if ( (Temperature_GF_Bath.state as Number) > 0) {
       if (Temperature_GF_Bath.state <= Temperature_Setpoint_Bath.state)	{
           Heating_GF_Bath.sendCommand(ON)
	} else {
           Heating_GF_Bath.sendCommand(OFF)
        }
    }
end

Not sure why is not stopping after hitting requested temperature ?

All I really want is to turn on this setpoint_mode in the morning and let it run to maintain temperature as per setpoint.

Why would it? It’s doing just what you told it to. Triggers are events. The rule in its last iteration runs once only, when you change Temperature_Setpoint_Mode to 1. The rule then exits, and that’s the end of that.
It’s like a script. “When I say Go, read the script”. You’d only read it once and then put it back on the table.

I think what you want to do is trigger the rule whenever the temperature changes, so that you can do the comparison/thermostat action.

If you only want it to do that when the mode is 1, then you need to do the mode comparison within the rule. The rule will still run at every temperature change, but you set it up so that it does nothing useful if the mode is wrong.

If you do only that much, then changing the mode won’t have any immediate effect. It’ll get taken into account the next time the temperature changes and causes the rule to run.

If you want something to happen immediately you change mode, then you will need to trigger on a mode change as well.

You probably want to think about what you want to happen if you set the mode “off” while heater is on. That could determine where you do comparisons and what you have in ‘else’ parts.

Fair point my friend, its probably better to trigger on temperature change if I can add Temperature_Setpoint_Mode to then section.Modified the following rule so now have three if conditions before heater can be started:

  1. Temperature_GF_Bath greater than 0 C.

  2. Temperature_GF_Bath.state <= Temperature_Setpoint_Bath.state

  3. Temperature_Setpoint_Mode changed to 1 (Heat)

rule "Bathroom Heater Control ON"
when
    Item Temperature_GF_Bath changed
then
       if ( (Temperature_GF_Bath.state as Number) > 0) {
       if (Temperature_GF_Bath.state <= Temperature_Setpoint_Bath.state)	{
	   } if (Temperature_Setpoint_Mode changed to 1) {
           Heating_GF_Bath.sendCommand(ON)
	}
} else {
           Heating_GF_Bath.sendCommand(OFF)
        }
end

As a result of the above modification heater is starting as expected but again is just carry on running exceeding setup temperature till heater is manually switched off. What am I doing wrong again?

You still should be seeing errors in your openhab.log for this rules file.

That’s a nonsense condition, looking for an event to happen just as you test it in the middle of a rule.

Because this rule is broken as it stands, I suspect you’ve got something else hanging around that also switches the heater on.

I do not like “writing code for people” because you don’t learn from it, but offer up a solution in the hope you can figure out why it is this way. It’s not the only way, or the most elegant way.

rule "Bathroom Heater Control"
when
   Item Temperature_GF_Bath changed or
      // triggers whenever temp changes
   Item Temperature_Setpoint_Mode changed
      // also triggers when mode changes for immediate action
      // else nothing would happen until temp changed, if it ever did
then
      // first we check if the temp reading is valid
   if ( Temperature_GF_Bath.state != NULL &&
        Temperature_GF_Bath.state != UNDEF &&
        Temperature_GF_Bath.state > 0) {
             // that != means "not equal" in an if(condition)
             // while the && means "and"

        // temp sensor is valid, so
        // let's set up a target temperature
      var Number tempMax = 0
      if (Temperature_Setpoint_Mode.state == 2) {
           // shower mode
         tempMax = 24
      } else if (Temperature_Setpoint_Mode.state == 1) {
            // normal mode
         tempMax = Temperature_Setpoint_Bath.state
      }
         // if the mode is anything else, the target stays 0 i.e. off

         // now let's check against upper limit
      if (Temperature_GF_Bath.state < (tempMax - 1)) {
            // we allow 1 degree hysteresis
            // It's colder than target
            // so turn heater on if it isn't already
         if (Heating_GF_Bath.state != ON) {
            Heating_GF_Bath.sendCommand(ON)
         }

         // else lets check if we're at the target
      } else if (Temperature_GF_Bath.state > tempMax) {
            // reached target temp
            // (our target could be 0 if mode is off)
            // so turn heater off if it isn't already
         if (Heating_GF_Bath.state != OFF) {
            Heating_GF_Bath.sendCommand(OFF)
         }
      }  // else we do nothing here
         // temp could be within 1 degree of target
         // and the heater will continue doing what it is doing
         // That's the hysteresis

   } else {   // this else belongs to the valid temp reading check
      Heating_GF_Bath.sendCommand(OFF)
          // temp sensor broken, turn off heater for safety
   }
end
2 Likes

@rossko57
I really appreciate your help. This rule works beautifully. Code is very well commented - I can learn a lot from it. Many many thanks for helping out again :grinning: :grinning::grinning:

Hi,

So far the rule to control heater been working very well, really glad with it.
Couple days ago I added two text items to my sitemap to display message about two control states for other members of my household:

Mode 0 (OFF) no description was needed :wink:
Mode 1 (Control ON) - “Control ON - Keeping Target Temp”
Mode 2 (Bath) - “Bath - Keeping 24°C”

Sitemap

Text item=Temperature_Setpoint_Bath_Mode2_Info label="Bath - Keeping 24°C" labelcolor=["red"] visibility=[Temperature_Setpoint_Mode==2] icon="my_info"
Text item=Temperature_Setpoint_Bath_Mode1_Info label="Control ON - Keeping Target Temp" labelcolor=["red"] visibility=[Temperature_Setpoint_Mode==1] icon="my_info"

Everything was done in sitemap so no items been placed in items

Today I was reviewing logs and discovered errors regarding both text items from above.
Everything works as expected, both text messages will appear on sitemap when switch is in either mode so not really sure why seeing those errors ?
I hope someone with more experience can spot a problem somewhere.

2019-02-16 17:47:25.038 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'Temperature_Setpoint_Bath'
2019-02-16 17:47:25.210 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:25.213 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:25.215 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:25.523 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:25.526 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:25.528 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:30.986 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:30.988 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:30.991 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:31.432 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:31.436 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:31.439 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:42.906 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:42.909 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:42.911 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:43.225 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:43.228 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:43.230 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:51.407 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:51.416 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:51.419 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:51.942 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:51.946 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:47:51.949 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:48:05.421 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:48:05.424 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:48:05.426 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:48:05.755 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:48:05.758 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode2_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:48:05.760 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:48:08.146 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'Temperature_Setpoint_Bath'
2019-02-16 17:48:09.678 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode1_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:48:09.681 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode1_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:48:09.684 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:48:09.869 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode1_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:48:09.872 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperature_Setpoint_Bath_Mode1_Info' for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:48:09.874 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2019-02-16 17:48:43.141 [ERROR] [ersey.server.ServerRuntime$Responder] - An I/O error has occurred while writing a response message entity to the container output stream.
org.glassfish.jersey.server.internal.process.MappableException: org.eclipse.jetty.io.EofException
	at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:92) [170:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1130) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:711) [170:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:444) [170:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:434) [170:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329) [170:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [169:org.glassfish.jersey.core.jersey-common:2.22.2]
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [170:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [170:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76) [15:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [82:org.eclipse.jetty.security:9.3.21.v20170918]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.Server.handle(Server.java:534) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) [76:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) [76:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [76:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [87:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [87:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [87:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [87:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [87:org.eclipse.jetty.util:9.3.21.v20170918]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: org.eclipse.jetty.io.EofException
	at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:199) ~[76:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[76:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[76:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:147) ~[76:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:731) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[87:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[87:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:519) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:745) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:235) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:219) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:496) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at java.io.OutputStream.write(OutputStream.java:75) ~[?:?]
	at org.glassfish.jersey.servlet.internal.ResponseWriter$NonCloseableOutputStreamWrapper.write(ResponseWriter.java:320) ~[?:?]
	at org.glassfish.jersey.message.internal.CommittingOutputStream.write(CommittingOutputStream.java:218) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$UnCloseableOutputStream.write(WriterInterceptorExecutor.java:294) ~[?:?]
	at org.eclipse.smarthome.io.rest.core.internal.GsonProvider.writeTo(GsonProvider.java:71) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) ~[?:?]
	at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) ~[?:?]
	at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:86) ~[?:?]
	... 46 more
Caused by: java.io.IOException: Broken pipe
	at sun.nio.ch.FileDispatcherImpl.writev0(Native Method) ~[?:?]
	at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51) ~[?:?]
	at sun.nio.ch.IOUtil.write(IOUtil.java:148) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) ~[?:?]
	at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:179) ~[76:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[76:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[76:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:147) ~[76:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:731) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[87:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[87:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:519) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:745) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:235) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:219) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:496) ~[84:org.eclipse.jetty.server:9.3.21.v20170918]
	at java.io.OutputStream.write(OutputStream.java:75) ~[?:?]
	at org.glassfish.jersey.servlet.internal.ResponseWriter$NonCloseableOutputStreamWrapper.write(ResponseWriter.java:320) ~[?:?]
	at org.glassfish.jersey.message.internal.CommittingOutputStream.write(CommittingOutputStream.java:218) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$UnCloseableOutputStream.write(WriterInterceptorExecutor.java:294) ~[?:?]
	at org.eclipse.smarthome.io.rest.core.internal.GsonProvider.writeTo(GsonProvider.java:71) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) ~[?:?]
	at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106) ~[?:?]
	at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) ~[?:?]
	at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:86) ~[?:?]
	... 46 more

Always worth peeking in the logs from time to time :smiley:

Because … you specified in the sitemap entries for those Text lines to go and look for non-existent Items. The UI has no way to know you didn’t really want it to look for an Item, when you specified an Item.

The quick fix is simply - don’t specify an item. Just leave the item=xxx part out of your sitemap line altogether.

But do consider instead making your line fancier. Maybe have a meaningful item, actual temperature say. The sitemap label="xxx" custom message will override the item’s usual label. You can put a [%.1f] or similar format into your custom label to display the chosen item’s value.

The item that you use for selection in visibility=xxx need not be the same one as in any item=zzz