Relay not activated, how to debug


My Hestiapi worked flawless from spring until now. Well i have not heat/cool/fan nor in normal/boost mode. I can confirm that the relay work fine if i bypass the GPIO pin directly. I checked with my logical probe and i have no state change on 3 GPIO pins.
What i’m trying to understand i how can i make sure that this is a hardware issue or software?
Is there some keypoint i can check to make sure the PI received the correct order?
For exemple: a file or a script i can edit/execute that will confirm that heat is occuring?


Hi there. As long as you are comfortable SSHing into the HestiaPi and running some commands, I can help you troubleshoot this.

Here are the GPIO mappings for the relays:

To flip a GPIO pin and turn the relay on, it should just be a matter of SSHing into the pi, running sudo su - to switch to root, and then echoing “1” to the GPIO value like so:

cat /sys/class/gpio/gpio12/value # see if it's on or off
sudo su -
echo 1 | /sys/class/gpio/gpio12/value # turn on
echo 0 | /sys/class/gpio/gpio12/value # turn off

The same process should work for the other relays as well.

It’s important that you turn any relays off (echo 0 | /sys/class/gpio/gpio12/value) that you enable manually otherwise your HVAC is going to run forever (well, OK only until you reboot the HestiaPi, but still probably longer than is a good idea).

If using /sys to flip the GPIO pin causes the HVAC to turn on, then the issue is a software issue. In that case, I’d suggest flashing the 1.4-dev image (which was just officially released today) to an SD card and I expect that will fix the issue.

Please do let us know if you get this resolved.

Thanks for the quick reply!

I never tough of checking for update and was running 1.2 dev.
I prepared a new SDcard with 1.4 and actually everything is working fine!
So it was some kind of software issue but i dont understand why?
No changes was made to the system and suddenly stoped working.
I remember sometimes that the temps was showing 0degree and a reboot fixed it.
Might it be some kind of weird issue caused by SdCard? (i’m using Sandisk SDHC 16gb)

I will continue to ran some tests and see how it goes after a while.

Yeah, I’ve seen weird issues before and reflashing the SD card does the trick. I’m not sure if SD cards are just a little flaky sometimes and files get corrupted or what. The SD cards I have been using in my test setups are kind of old, so that may be a contributing factor.

Next time I run into a weird problem, I’m going to take an image of the entire SD card so I will have an image that I can investigate later. Maybe there will be some clue if I dig deep enough. If it’s random files getting corrupted, that’d support the flaky hardware hypothesis. If it’s the same file every time, it might be something that can be addressed in software.

At any rate, I’m glad to hear that we were able to get you back up and running quickly. If you figure out any pattern to this, please do let us know.

If you want to share an image of the malfunctioning SD card with me, I can flash it onto a card I have here, change the wifi info to match my wireless network and see what I can find. Just DM me and we can coordinate.

All of a sudden the temperature went away from the LCD and OpenHab like if the sensor isn’t responding.

I did try this:

i2cdetect -y 1
the return is like this:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77

I tough i should see something like “–” everywhere and “76” indicating the I2C adresse 0x76

Do you have the SSH command that can be used to “pull the data” from the sensor?

There’s a script to pull the temperature at ~/scripts/ that might give you more info on what’s going on.

IIRC that’s the exact script that is called by OpenHAB to obtain the temperature, so if it’s not working in OpenHAB, I expect that it will not work there. Hopefully it will give you an error message that might help lead us to the answer.

Thanks i was able to poll the temp succesfully. I had to power cycle the PI in order to get my temp back.

It confirm the previous check i made running “i2cdetect -y 1”. It now confirm the BME I2C address: 0x76. So i really think i’m having some kind of weird hardware issue maybe. I previously lost GPIO control over relay and also the temps sensor stoped reporting.
I have a spare BME280 so i’ll be able to test. I’ll continue to play with on my bench to see how it goes.

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00: – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – 76 –

Hey its been a while since i updated this thread!

So i had been daily driving the v1.4 for a couple of weeks monitoring the BME280 sensor for issues.
I was calling the “” randomly and i found out that i often get errors while detecting the sensor. After a while the sensor came back and temp worked but it started failing again and again…

Then i ordered a Pi Zero2 W and started to run both Pi0 with v1.4. The issue never happened with the new one. I even gave a try with the same BME280 and no problem so far. Not to mention the big performance improvement! At same core temps(35) the CPU run’s very low on usage compare to std Pi and everything respond quicker!

So i think my previous Pi0 might have something bad hapening that caused me all the relay and temps issues.
The good news is that this issue led me to find the existance of V1.4 and the Pi02 support wich is way better in my own oppinion.

Thanks to all who work to improve the project and i can’t wait to see what the next phase will look like. :slight_smile:

Kind Regards

I’d love to build units that shipped with rPi Zero 2 W boards, but I can barely get enough of the original Pi Zeros. I can order two of the original Zeros at a time, which means paying a lot in shipping, and if I order too many too quickly, I expect they will ban me. But they are available as about $22 each after tax + shipping.

As for the Zero 2 boards, I can only find them from non-official sources. They go for about $40 each after shipping.

If anyone knows where I can buy 5 at a time for close-to-retail prices, please DM me!

Even after the Hestia32 is created, it’s still going to need an OpenHAB server, so the Hestia ONE may still be relevant for some time into the future.