Touch screen very slow!

I have been playing with my Hestia Pi for a few months now, I’m not a programmer so learning how to customize OpenHab has been an interesting experience!

I’ve been using Node Red to control various light and blinds for a few years and find it much easier.

Anyway I’ve managed to setup daily timer/schedule for heating and hot water. Also have set a rule to automatically adjust the heating set-point depending on time of day. Although the only way to adjust the times or temperatures is via editing the rules files.
I have struggled to get OpenHab to display a graph of the temperature over the previous 24 hours so have used MQTT to get Node Red on another Pi to show a graph.

I’m sure I’ll work out these issues in the future.

Next on the list is the remote temperature sensors, planning on two of them, one upstairs and one downstairs. The idea being to set it up to use the downstairs one during the day and the upstairs one during the night.
Have just ordered a Sonoff TH16 to play with, seems to be a bit of info out there on how to set them up for this.

I have the OpenHab user interface working fine on my mobile etc. but I am having problems with the touch screen, it’s incredibly slow to respond! And often doesn’t respond at all.
The screen has picked up the touch on the screen as the icons change but takes an age for anything to happen, seems more of a problem when going to a different screen or waking it up from blank screen.
Any ideas how to get the screen more responsive?

Thanks
Liam

Hello Liam,

That would be the easiest way! Flash Tasmota firmware on it and use MQTT (HestiaPi being the broker-server) to communicate. Then set (a button on the UI and) a rule to decide which temp value is respected each time of the day.

It is still on our to do list.

The issue is in the Chromium application lacking rendering power. The CPU is fine as you can understand if you load the page from another machine or the App on a smartphone. It is very responsive. Its only (but big) problem is Chromium to actually draw on the screen. We have tried different browsers and different Chromium versions and startup params… Possibly a custom non HTML UI would solved this but we would lose the easy interface to create custom UI elements via HABPanel :frowning:
Any other ideas?

Hi Liam

I’d be interested in seeing how you are going about your event scheduling, if you don’t mind sharing? :slight_smile:

Cheers
Kevin

Hi,
As I havent done much programming before I started off using the graphic rule creator in HABmin but I couldn’t get the rules to function correctly so with a bit of trial and error I came up with something that works. There probably are better ways to do it but here are the rules that I use.
For hot water: to switch on at 06:00 off at 08:00 and on at 18:00 off at 23:45

rule "HotWaterTimer2"
when
	Time cron "0 * * * * ?" or
	Item HotWaterMode changed
then
  if (((HotWaterMode.state == "TIMER") && ((((new LocalTime().getLocalMillis()) >= (new LocalTime(6, 0, 0, 0).getLocalMillis())) && ((new LocalTime().getLocalMillis()) <= (new LocalTime(8, 0, 0, 0).getLocalMillis()))) || (((new LocalTime().getLocalMillis()) >= (new LocalTime(18, 0, 0, 0).getLocalMillis())) && ((new LocalTime().getLocalMillis()) <= (new LocalTime(23, 45, 0, 0).getLocalMillis())))))) {
	Raspi12.sendCommand(ON)
  }

  if (((HotWaterMode.state == "TIMER") && ! ((((new LocalTime().getLocalMillis()) >= (new LocalTime(6, 0, 0, 0).getLocalMillis())) && ((new LocalTime().getLocalMillis()) <= (new LocalTime(8, 0, 0, 0).getLocalMillis()))) || (((new LocalTime().getLocalMillis()) >= (new LocalTime(18, 0, 0, 0).getLocalMillis())) && ((new LocalTime().getLocalMillis()) <= (new LocalTime(23, 45, 0, 0).getLocalMillis())))))) {
	Raspi12.sendCommand(OFF)
  }
end

For heating : (similar times)

rule "HeatingTimer"
when
	Time cron "0 * * * * ?" or
	Item HeatingMode changed
then
  if (((HeatingMode.state == "TIMER") && ((((new LocalTime().getLocalMillis()) >= (new LocalTime(6, 0, 0, 0).getLocalMillis())) && ((new LocalTime().getLocalMillis()) <= (new LocalTime(8, 0, 0, 0).getLocalMillis()))) || (((new LocalTime().getLocalMillis()) >= (new LocalTime(18, 0, 0, 0).getLocalMillis())) && ((new LocalTime().getLocalMillis()) <= (new LocalTime(23, 55, 0, 0).getLocalMillis())))))) {
	HeatingTimer.sendCommand("ON")
  }

  if (((HeatingMode.state == "TIMER") && ! ((((new LocalTime().getLocalMillis()) >= (new LocalTime(6, 0, 0, 0).getLocalMillis())) && ((new LocalTime().getLocalMillis()) <= (new LocalTime(8, 0, 0, 0).getLocalMillis()))) || (((new LocalTime().getLocalMillis()) >= (new LocalTime(18, 0, 0, 0).getLocalMillis())) && ((new LocalTime().getLocalMillis()) <= (new LocalTime(23, 55, 0, 0).getLocalMillis())))))) {
	HeatingTimer.sendCommand("OFF")
  }
  
  if (HeatingMode.state == "ON") {
	HeatingTimer.sendCommand("OFF")
  }
  if (HeatingMode.state == "OFF") {
	HeatingTimer.sendCommand("OFF")
  }
  if (HeatingMode.state == "Boost") {
	HeatingTimer.sendCommand("OFF")
  }
  
end

rule "HeatingTimeronoff"
when
  Item HeatingTimer changed or
  Item HeatingMode changed or
  Item TempSetpoint changed or
  Item MyTempProxy changed
then
  if ((MyTempProxy.state < TempSetpoint.state) && (HeatingTimer.state == "ON")){
		  Raspi23.sendCommand(ON)
		}
	if ((HeatingTimer.state == "OFF") && (HeatingMode.state == "TIMER")) {
		Raspi23.sendCommand(OFF)
	}
end

And I edited the HestiaPi default rules:

rule "checkcurrtemp"
when
  Item TempSetpoint changed or
  Item MyTempProxy changed
then
  if (MyTempProxy.state > TempSetpoint.state){
	Raspi23.sendCommand(OFF)
  } else if ((MyTempProxy.state < TempSetpoint.state) &&
	  ((HeatingMode.state=="ON") || (HeatingMode.state=="Boost") || (HeatingTimer.state=="ON"))) {
	Raspi23.sendCommand(ON)
  }
end

rule "Heating Mode"
when
	Item HeatingMode changed
then
	switch(HeatingMode.state) {
	  case "ON": {
		if (MyTempProxy.state < TempSetpoint.state) {
		  Raspi23.sendCommand(ON)
		}
		HeatingTimer.sendCommand("OFF")
		HeatingPreviousMode="ON"
	  }
	  case "OFF": {
		  HeatingTimer.sendCommand("OFF")
		Raspi23.sendCommand(OFF)
		HeatingPreviousMode="OFF"
	  }
	  case "TIMER": {
		HeatingPreviousMode="TIMER"
	  }
	  case "Boost": {
		HeatingTimer.sendCommand("OFF")
		// See below more...
	  }
	}
end

rule "Hot Water Mode"
when
	Item HotWaterMode changed
then
	switch(HotWaterMode.state) {
	  case "ON": {
		Raspi12.sendCommand(ON)
		HotWaterPreviousMode="ON"
	  }
	  case "OFF": {
		Raspi12.sendCommand(OFF)
		HotWaterPreviousMode="OFF"
	  }
	  case "TIMER": {
		HotWaterPreviousMode="TIMER"
	  }
	  case "Boost": {
		
		// See below more...
	  }
	}
end

rule "MainSwitch"
when
	Item MainSwitch changed
then
	switch(MainSwitch.state) {
	  case ON:{
		AUTOTEMP.sendCommand("ON")
		HeatingMode.sendCommand("ON")
		HotWaterMode.sendCommand("TIMER")
		// Do nothing
	  }
	  case OFF:{
		if (HeatingMode.state == "ON") {
		  HeatingPreviousMode = "ON"
		  HeatingMode.sendCommand("OFF")
		} else if (HeatingMode.state == "TIMER") {
		  HeatingPreviousMode = "TIMER"
		  HeatingMode.sendCommand("OFF")
		} else if (HeatingMode.state == "Boost") {
		  //This should never execute
		  HeatingPreviousMode="Boost"
		  HeatingMode.sendCommand("OFF")
		}

		if (HotWaterMode.state == "ON") {
		  HotWaterPreviousMode="ON"
		  HotWaterMode.sendCommand("OFF")
		} else if (HotWaterMode.state == "TIMER") {
		  HotWaterPreviousMode="TIMER"
		  HotWaterMode.sendCommand("OFF")
		} else if (HotWaterMode.state == "Boost") {
		  //This should never execute
		  HotWaterPreviousMode="Boost"
		  HotWaterMode.sendCommand("OFF")
		}

		if (HeatingTimer.state == "ON") {
		  HeatingTimer.sendCommand("OFF")
		}

		if (AUTOTEMP.state == "ON") {
		  AUTOTEMP.sendCommand("OFF")
		}
	}
}
end

And the site map:

sitemap default label="Main Menu" 
{

  Frame label="Power" {
	Switch item=MainSwitch mappings=[ "ON"="ON", "OFF"="OFF"]
  }

  Frame label="Heating" {
	Switch item=Raspi23
	Switch item=HeatingMode mappings=[ "ON"="ON", "OFF"="OFF", "TIMER"="TIMER", "Boost"="BOOST"]
	Text item=MyTempProxy
	Setpoint item=HeatingBoostTime minValue=10 maxValue=1440 step=10 icon="clock"
	Setpoint item=TempSetpoint minValue=0 maxValue=40 step=0.5 icon="temperature"
	Switch item=AUTOTEMP mappings=[ "ON"="ON", "OFF"="OFF"]
  }

  Frame label="Hot Water" {
	Switch item=Raspi12
	Switch item=HotWaterMode mappings=[ "ON"="ON", "OFF"="OFF", "TIMER"="TIMER", "Boost"="BOOST"]
	Setpoint item=HotWaterBoostTime minValue=10 maxValue=120 step=10 icon="clock"
  }

  Frame label="Humidity" {
	Switch item=Raspi18
	Text item=MyHumiProxy
  }
}

You will also need to create an Item in PaperUI called HeatingTimer type, string.

Hope this helps.

Regards
Liam

1 Like

I have had a play around with different browsers but as you found there isn’t much difference.
The screen did seem to respond better when not in kiosk mode?
I have found that the responsiveness of the screen is acceptable if just staying on the first screen so I am going to try and create a single screen in HABpanel with all the essential buttons on it.
Hopefully it will make it more usable.
I had a quick look yesterday at creating a page but was getting a bit stuck with finding a selection switch to select between different modes ON, OFF, TIMER, BOOST I was hoping for something similar to how it displays in the openHAB mobile app.

Regards
Liam

Nice work Liam! :+1:
I’ll have a play with that and see what happens. Thanks for sharing

I’m a bit late to the party, but for the benefit of @TwoBobBit and @liamh I thought I’d mention that you can make those timers a little neater :slight_smile:

Here’s my rule for a timer interval between 5.30pm and 7pm - adjust as needed:

TStart = new DateTime(now.getYear(), now.getMonthOfYear(), now.getDayOfMonth(), 17, 30, 0)
TEnd   = new DateTime(now.getYear(), now.getMonthOfYear(), now.getDayOfMonth(), 19,  0, 0)

if(now.isBefore(TEnd) && (now.isAfter(TStart)) {
  logInfo("hestia", "test log output")
}

Thanks, that is neater.
I was trying to come up with something that could be edited via a UI to change the time settings.
However I realized that I had only ever changed the times on my existing timer twice in 8 years so decided not to bother.

Pretty much my conclusion as well - if my wife ever wants to alter it, I’ll reconsider that :stuck_out_tongue:

I didn’t know we have the possibility to draw custom interfaces and I don’t think I will never modify the standard one (I have to learn a lot about this project).
It will be possible to have a (fast) custom non HTML UI to be choosen instead of the HTML one?
Just to understand how difficult it will be…

I don’t believe it will be an OpenHAB UI but a third party communicating via MQTT or some API OpenHAB needs to support. This is just an idea. Haven’t invested any hours on this (yet).

Good news