Central heating with underfloor heating and existing openhab integration advice required

Brilliant, I can’t wait to get started with the printing I’ve been looking forward to it since I saw the project, but now with the updated mk3 .stl files I’m really excited. Now I know what I will be doing tomorrow :wink:.
Well I’m very glad I asked the question now and saved myself a lot of agro. I will only comment out the sitemap entries I won’t need, save myself the pain of any update problems.
That’s a shame about the scheduling but I know these things can take a lot of time to get right . I’ll just have to do some more research about adding some rules and cronjobs of which I’m not overly experienced with but I have managed to achieve a few things with both.

Thanks again for all your help

Please read the notes and release notes under each file

Everything printed perfectly :sunglasses:


Now to reflash the SD card with the new image release.

Design globally, produce locally :wink:

@HestiaPi Ok so good news I have both thermostats up and running and I’ve made a few edits to the items and sitemaps but let me give you some feedback on what I’ve done and what I’ve noticed.

  1. So when I started the Pi’s for the first time at the same time I had a conflict with both Pi’s presenting the same ip address of HESTIAPI (new V10 Image with turnkey script ) which meant one I couldn’t work out immediately which Pi I was providing WIFI credentials too, but ultimately the other Pi rebooted till I managed to find its HESTIAPI network and add WIFI credentials to it . This is no major problem only what I found and obviously its only an issue should you have more than one HestiaPI.

2)I had a slight problem that I managed to mis-align an LCD display due to how it was positioned in the case and because I didn’t notice for about 10 minutes this somehow was short circuiting and cause the transformer to heat up to the point where you couldn’t touch it. Once I realised what I had done, rectified and restarted the Pi it cooled down. I thought I would mention this to help out anyone that might make this mistake, make sure that the connection block on the back of the LCD is perfectly in line with the PI GPios and make sure the LCD illuminates before moving on .

3)Ok so I have a few errors in the openhab log, I was wondering if you could shed some light on .

these are the errors I see often,

Validation issues found in configuration model 'default.rules', using it anyway:
The operator '!=' should be replaced by '!==' when null is one of the arguments.
2018-08-04 11:56:55.665 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type MAP
2018-08-04 11:56:55.739 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'HeatingPin23'
2018-08-04 14:46:15.275 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Heating Mode': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.BusEvent.sendCommand(org.eclipse.smarthome.core.items.Item,java.lang.String) on instance: null
2018-08-04 12:18:11.546 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'convertproxy': The name 'MyTempProxy' cannot be resolved to an item or type; line 48, column 3, length 11

now I did notice that the transform for the binary.map for the heating switch item was not present in the transform directory of the new image . I don’t know if there is a reason for this but I added the transform from the github pages .

  1. why do I receive this image when I boot the Pi ? is it something to do with the other HestiaPi or is it because the initial hostname on my router for that IP was Raspberry pi and now its HestiaPiUp /Down this wont change until the address lease runs out on the router if that makes any sense, any ideas ?

and finally I could do with some advice. I’m working with the Mqtt and as we discussed I changed the client name for each HestiaPi in the mqtt.cfg file but I couldn’t subscribe to a client id so I had to modify the items themselves to

<[mosquitto:hestiadownstairs/local/settempsetpoint:state:default]"}

for example .

and now I have the items showing on my existing sytem .:grinning:

my question is if I want to control the set point I will need to raise or lower the temp with switches like in the main menu (basic Ui) of the hestiaPi’s

as I understand it the switches change the target temp with rules, will I need to add these rules to my existing openhab to raise and lower the target temp ?
I have been successful in using Mqttspy to publish a temp to the HestiaPi on the topic I know its listening to but to increase and decrease incrementally using switches requires rules, right?

I also have a question regarding the Habpanel. How do I remove certain elements that are displayed ? I mean I don’t need the hot water boost or control to be displayed just Heating and the settings menu.

Thanks for all your efforts I cant believe I’ve made it this far and now can control my heating upstairs and downstairs using the Pi’s or my laptop

:+1:

Hey Tim,
let me dig into your post and reply one item at a time.

To be honest we haven’t thought about multiple HestiaPis boot at the same time for the first time. What happened is that you got 2 networks with the same SSID (HESTIAPI) and you couldn’t tell which was which. Of course one solution would be to power up one at a time. The other solution, and probably what you did, was to setup blindly whichever you connected to and see which restarts. Once they are connected to your actual home network they will get unique IPs which will also be displayed on the loading screen to help you identify.

We are changing the case design to minimise these situations. It needs indeed some extra care to align everything.

You are absolutely right. Well spotted. Replacing the download with a new image. Thank you!

Hmmm… never seen this. There may be a bug on Chromium. Try this suggested solution

rm -rf ~/.config/chromium/Singleton*

The switches change the item “TempSetpoint”. Then rules are used to control when to turn the heating on and off to reach these setpoints. So if you renamed the setpoints for each HestiaPi you will need to apply the same change in the rules file.

The setpoint entry in the sitemap file (/etc/openhab2/sitemaps/default.sitemap) is this:

Setpoint item=TempSetpoint minValue=0 maxValue=40 step=0.5 icon="temperature"

The “step” parameter shows the increment step. You then need to keep the bidirectional MQTT (read and write) for the item and it should work.

See the HABPanel section of my answer below and follow steps 1-8.

Then click the edit icon at the top, next to the title and you are in edit mode where you can move, remove and resize everything. I think HestiaPi’s screen only changes on reboot so once your screen looks ok on your laptop, reboot HestiaPi for the changes to take effect. Please keep in mind that you laptop’s resolution and aspect ratio may be different from the LCD so make sure you compensate accordingly.

Well done!!!

1 Like

@HestiaPi ahhhh! nightmare i came home from work to find one of my HestiaPi’s showing just a white screen. After some diagnosing I discovered my raspberry pi has died for some reason so I am hoping to get a replacement from where I bought it from, I de-soldered it and tried powering it from an official pi charger and nothing !!!. Anyway whilst trying to desolder I managed to strip one of the tracks on the PCB . Would it be possible to order a few PCB’s from you just so I have a few backups should this happen again ?

Anyway back on track , Thankyou for helping me to understand how the switches work I finally get it.

To be honest we haven’t thought about multiple HestiaPis boot at the same time for the first time. What happened is that you got 2 networks with the same SSID (HESTIAPI) and you couldn’t tell which was which. Of course one solution would be to power up one at a time. The other solution, and probably what you did, was to setup blindly whichever you connected to and see which restarts. Once they are connected to your actual home network they will get unique IPs which will also be displayed on the loading screen to help you identify.

That’s how I worked out which PI i had connected with via the IP assigned from the router but as you say starting one at a time would be better.

I think the chromium issue was due to a IP lease being initially set for the Hostname Raspberry PI but when I changed it to HestiPIDown this caused the issue since the lease has run out now and I have since restarted the HestiaPi and the issue didn’t show.

I will get to work now on the HABpanel following your steps I cant wait till I have it all set up how I want it.

have you had any thoughts on Number 3) above? the errors in the log I take it Null showing isn’t a problem as eventually it will be either assigned a state or just simply ignored ?

Thanks again

Sorry forgot to comment on it as I think it is the same error. It looks like it is caused by the missing transformation file leaving some variables as NULL. If its gone after adding the .map file, ignore them.

About your PCB issue… I think it will be much cheaper to order them from a local shop or even a chinese low volume shop (dirtypcbs are good) and you will get like 10 for the price I can ship you 1-2 (~15-20EUR with the SMD presoldered). Let me know your decision. Here are the latest PCB files:

About the problem you faced, I would advise to check with a multimeter the output of the provided power supply if it is ~5V DC in case it is damaged from that other issue you got from misaligning the LCD and post back here the results.

I thought that might be the case but I thought i would check with someone with much more experience.
I appreciate the honesty regarding the Price of the PCB’s but although I know I could get it cheaper locally i would much rather support a project than a manufacturer so If it helps you I would prefer to buy your pre- soldered PCB’s, 2 would be perfect.
I tested the output and it is exactly 5.11 volts DC, I’m hoping I bought a dud Pi and that was all it was. Nothing appears to have burnt out it just wont power up, the other HestiPi is going strong so fingers crossed.

Thanks for everything .

Have you swapped the SD from the working one as it is confirmed to be working? It doesn’t need to be soldered back on the PCB to test it. It just won’t have the temp readings. Basically once you see the LED blinking at least 5 seconds after you powered it, it means it boots ok (it should keep blinking for a few minutes actually).
We have had 0 failures on RasPis in the last years, so I am a bit suspicious something else is wrong.
PMing you about the PCBs. Appreciate your support.

Yeah I even tried a standard rasbian image to see if it was the SD card but all the logs on the HestiaPi image from the broken Pi stop at 13:35 , 5 August and I had power, as the LCD was still lit, but the Pi had no lights on it and as I say I couldn’t get it to boot even with the official power charger. If the transformer output is correct and the SD card seems ok and the Pi won’t power up from the power lead I can only hope that it can only be the Pi . I’ve got another coming now and I hope that when I get you PCB’s all will be well. I’ll keep you informed should anything suspicious happen again

Edit: I just booted the image from a raspberry pi 3 and it boots no problem.

@HestiaPi

Ok so I received the PCB’s and I’ve soldered all the components , flashed a fresh image (just in case anything was corrupted ), rechecked the DC Voltage coming out the transformer ( it’s exactly 5.14 Volts) and I’m now back up and running :grinning:
fingers crossed it stays working !!!

anyway I’ve configured the Habpanel as per your instructions and I figured out that one of my errors in the log

2018-08-15 13:07:50.454 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type MAP
2018-08-15 13:07:50.624 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'HeatingPin23'

was due to the MAP transformation not being being installed. I installed it via the Paper UI and all is working

Anyway I made the item

Number TempSetpoint "Temperature Setpoint Downstairs [%.1f °C]" { mqtt="<[mosquitto:hestiapidown/local/tempsetpoint:state:default],>[mosquitto:hestiapidown/local/settempsetpoint:state:*:default]"}

and sitemap

 /**CELSIUS*/ Setpoint item=TempSetpoint minValue=0 maxValue=40 step=0.5 icon="temperature"

on my existing openhab setup but when I increase the temp by one step I get hundreds of log messages as it continuously receives and send an mqtt message.

2018-08-15 14:26:15.177 [vent.ItemStateChangedEvent] - TempSetpoint changed from 28 to 28.5
2018-08-15 14:26:15.543 [vent.ItemStateChangedEvent] - TempSetpoint changed from 28.5 to 28
2018-08-15 14:26:15.859 [vent.ItemStateChangedEvent] - TempSetpoint changed from 28 to 28.5         
2018-08-15 14:26:16.320 [vent.ItemStateChangedEvent] - TempSetpoint changed from 28.5 to 28
2018-08-15 14:26:16.672 [vent.ItemStateChangedEvent] - TempSetpoint changed from 28 to 28.5
2018-08-15 14:26:17.291 [vent.ItemStateChangedEvent] - TempSetpoint changed from 28.5 to 28
2018-08-15 14:26:17.519 [vent.ItemStateChangedEvent] - TempSetpoint changed from 28 to 28.5

I think the loop is due to the item being updated on my existing setup and then receiving a mqtt message of what the temp was and then what it is due to the update from the existing setup this causes it to loop

any idea what I can do ?

I dont see anything wrong here. Maybe some other item or rule is reusing the same item or MQTT ID and causes a loop.
One test would be to remove the MQTT IDs from the item you pasted above and restart with

sudo reboot

(it is usually faster and safer than just restarting OpenHAB or simply waiting for the change to be picked up)
Then wait to confirm that there is no loop. If there is a loop, I would suspect the rules file.
Once confirmed, add only 1 MQTT ID (i.e only the outgoing >) and repeat.
Once confirmed too, repeat for the other MQTT.

@HestiaPi

Ok so I figured out what was wrong after alot of trial and error .

in the item I linked

I had it set up so that any state change would trigger the outbound message using the * option this created the loop as it would receive an updated state and then trigger the outbound mqtt message and thus a loop was formed .
I solved it by changing the outbound to command like this

OpenHab items

Number TempSetpoint "Temperature Setpoint Downstairs [%.1f °C]" { mqtt="<[mosquitto:hestiapidown/local/tempsetpoint:state:default],>[mosquitto:hestiapidown/local/settempsetpoint:command:*:default]", autoupdate="false" }

I added autoupdate=“false” as well so it only updates the value when the hestiaPI state is changed not the Openhab GUI change just in case this creates a loop in inbound and outbound messages.

Anyway I now can control the heating turning on and off as well but the only way I could do this was to change the items in HestiaPi to listen for a comand on an inbound Mqtt from my existing setup like this

HestiaPI items

Switch HeatingPin23 "Heating" { gpio="pin:23", mqtt="<[mosquitto:hestiapidown/local/heatingstate:command:ON:1],<[mosquitto:hestiapidown/local/heatingstate:command:OFF:0],<[mosquitto:hestiapidown/local/heatingstate:state:MAP(binary.map)]" }

I don’t know if this is correct but it allows me turn it on and off from the Openhab and also from the HestiaPi.
the only problem i have now is that the state of switches on both is not updated when I turn the other on or off. I cant seem to work out how to do it this is my openhab item for the on off switch

openhab item

Switch HeatingDown "Heating" { mqtt=">[mosquitto:hestiapidown/local/heatingstate:command:ON:1],>[mosquitto:hestiapidown/local/heatingstate:command:OFF:0],<[mosquitto:hestiapidown/local/heatingstate:state:MAP(binary.map)]" }

nightmare !!?! :disappointed: The second pi or rather new has died something is definitely up! what could keep killing the raspberry pi do you thing the transformer is possibly putting out too high a voltage and over powering the Pi? The DC voltage is saying 5.08 volts now
I’ve checked the upstairs setup and the voltage is 5.02VDC . I think the highest the downstairs one went was 5.14 VDC

Is that the same with the LCD that was plugged in incorrectly?
The pi will officially accept anything from 4.75 up to 5.25V so the voltage that you get to read is ok.
I believe there are 2 ways to fry a pi. Either overvoltage (like 6V) or shorting some pins passing current through a GPIO or other sensitive pin. Double check for the second otherwise I’ll suspect the first.

About your mqtt issue… Answer the 2 questions:

  1. Is the UI element not getting updated listening for incoming messages?
  2. Does your action produce this exact message (monitor all mqtt messages to troubleshoot correctly)? Paste your replies here

This was the same HestiaPi that died last time and as you say this was the one I misaligned the LCD . The PCB and Pi are new but all other components are the same from the last dead Pi.
I’ve ordered another Pi and 5 HI-link 240VAC to 5VDC step down Power supply modules.
None of the pins are touching and I was really careful soldering the GPIO’s is there any other way I can check ?

Anyway, yeah the UI isn’t changing on the other device when I switch the heating on or off.

When I had the hestiaPi item sending outbound commands instead of listening for inbound commands it did update the UI in openhab , however now I have switched it to listening i can control it now but the UI isn’t updated to show the new state. I’m sure it’s something to do the 3rd Mqtt message

<[mosquitto:hestiapidown/local/heatingstate:state:MAP(binary.map)]" }

This is what I have on both the Hestia and the openhab items

OpenHAB’s console log will tell you which messages got received so I would suggest monitoring this while you send a message to see if it was picked up. I am not sure but the mapping function may be case sensitive (ON may not be the same as on, so no match)

Ok so I think I have partly figured what the problem is, so when I turn the heating on or off from the openhab , the message is received on the HestiaPi and the state is indeed changed, however because the sitemap for the HestiaPI uses the item Heatingmode to control heatingpin23 via rules, I’m not sure updating the state of heatingpin23 will work in reverse and update the item Heatingmode and therefore the UI . I thought about adding the listening inbound message for heatingstate to the item heatingmode but I believe this would cause a loop again as it would trigger the rules to control the item heatingpin23 . Ill have a think about it a little more and see if I can solve the problem . I’ve made massive progress so far just a few hurdles left and I think I’ll have it just the way I need it .

I’ve had a little think about the killer Pi :wink:situation and I hoping its as simple as the step down power supply module being faulty but could it be the LCD ? I mean the LCD works but could it kill the PI via the GPIOs if something wasnt right could I have damaged it when I originally misaligned it ? I’m not sure what else it could be now it can only be the transformer or the LCD :thinking:

Hmmm… Why/How is the original UI working?
What is different?
As a solution I would suggest adding a rule listening to changes of the actual item and updating the UI item. Have a go with that.

It is possible, but I cannot know without measurements. Do you have a fairly good Amp meter with a miliAmp scale or an external PSU with miliAmp?

1 Like