[SOLVED] (Example) Broken relay in my pre-assembled HestiaPi

(This is a sample post based on some of my history with the HestiaPi team, intended as an example of a good help request :P)

Hi Hestia,

It seems like I’ve got a broken relay module on my HestiaPi - the water control makes a satisfying click when I boost it from the UI, but the heating control does not. I’ve taken the HestiaPi apart, and using a multi-meter I can confirm the voltage shifts correctly on the GPIO pins when I boost the heating, so I think the relay is broken.

Is it possible to get a new relay module?

As stated, this is an example post - but for the record, the relay was indeed broken, and a replacement part fixed it - thanks guys!

hi guys,
this is a great example … as one of the two relays on my HestiaPi touch seems to be broken. :slight_smile:
as far as I can tell it acts exactly as described above: water clicks, heating does nothing.
is there anything I could try myself or do I need a replacement?
thanks,
ren

Hey @auch1 - welcome to the community! :smiley:

So I can’t comment on the Touch since I have an Original, but here’s what I was testing, maybe some of it’s applicable:

  • Checked the LEDs under the LCD display were coming on
    • This confirmed the software was working and trying to switch on the relay
  • Noticed that both “minor” LEDs on the relay were on at boot, but that the water LED went out after boot.
    • This implied power was not being sent to the heating relay and setting it’s state
  • Disassembled the components and used a multimeter to check voltages across the relay connector on the LCD boad

As you may guess, the voltages were correct across the water relay and ground, but they were also correct across the heating relay and ground. This meant the LCD was supplying power to the relay board, but the relay wasn’t activating.

With all that tested, it seemed pretty likely it was the relay board - and it was :slight_smile:
Hope it helps!

Can you SSH to RasPi ? Some of the instruction of @gwmngilfen are not applicable here as the schematics are totally different.

Is the target temperature higher than current? Are you using the LCD or the web interface?

allright, let’s dig into this…

temperature is shown as 24.8°C whereas the temperature setpoint is at 18.0 °C.
setting the setpoint to above 24.8° does not show any effect.
the three “power mode” switches show no effect.

the “onboard” touch panel shows the “HestiaPi loading screen” … even hours after booting.
to be exact the boot process is

  1. linux boot messages, on the touch display
  2. hestiapi status screen with logo, ip and mac address, and “starting in 222 seconds”, counting down.
  3. chromium tab over that, saying “Restore pages? Chromium didn’t shut down correctly. [Restore]”
  4. hestiapi status screen “Loading …”

SOMETIMES it gets past that, I cannot say exactly when or how so far. actually, I have seen it once in numerous reboots.
then the normal touch screen (i guess built with HABPanel) is shown and slowly, veeeerrrry slowly takes my touch commands (but no relay click either).
the HABPanel portion of the GUI does not work in my browser, but actually I don’t really know if that should be the case or if I am holding it wrong. :wink:

yes, I can ssh to the pi.

the load is quite high for my taste. well above 1.0 that is, and most of the time.
also I wonder: is it me or is this memory shown a bit low, even for the pi zero?

 total       used       free     shared    buffers     cached
Mem:        380120     334716      45404       5304      10504     131496
-/+ buffers/cache:     192716     187404
Swap:            0          0          0

it should be 512megs minus the part for graphics memory. is there really this much reserved for graphics? is this intentional?

most of the sweet cpu cycles are consumed by openhab, what might be okay I guess. no worries here. I have some experience with openhab and were quite exited to see that hestiapi uses it.

second is chromium:

pi@raspberrypi:~ $ ps auxwww | grep chromi
root      1337  0.0  0.4   7224  1864 ?        S    14:28   0:00 sudo -u pi /usr/bin/chromium-browser --disable-restore-session-state --disable-web-security --user-data-dir --noerordialogs --disable-session-crashed-bubble --disable-infobars --kiosk /home/pi/scripts/openhabloader.html
pi        1351  2.4 12.3 436872 47020 ?        Sl   14:28   1:51 /usr/lib/chromium-browser/chromium-browser --enable-pinch --disable-restore-session-state --disable-web-security --user-data-dir --noerordialogs --disable-session-crashed-bubble --disable-infobars --kiosk /home/pi/scripts/openhabloader.html
pi        1398  0.0  0.3   2148  1160 ?        S    14:28   0:00 /usr/lib/chromium-browser/chrome-sandbox /usr/lib/chromium-browser/chromium-browser --type=zygote --user-data-dir
pi        1399  0.0  2.3 170364  9008 ?        S    14:28   0:00 /usr/lib/chromium-browser/chromium-browser --type=zygote --user-data-dir
pi        1417  0.0  1.4 170364  5360 ?        S    14:28   0:00 /usr/lib/chromium-browser/chromium-browser --type=zygote --user-data-dir
pi        1458  0.4  7.6 282676 29180 ?        Sl   14:29   0:18 /usr/lib/chromium-browser/chromium-browser --type=renderer --enable-pinch --enable-features=AutofillCreditCardSigninPromo<AutofillCreditCardSigninPromo,AutofillProfileCleanup<AutofillProfileCleanup,DocumentWriteEvaluator<DisallowFetchForDocWrittenScriptsInMainFrame,ExpectCTReporting<ExpectCTReporting,IncidentReportingDisableUpload<SafeBrowsingIncidentReportingService,IncidentReportingModuleLoadAnalysis<SafeBrowsingIncidentReportingServiceFeatures,IncidentReportingSuspiciousModuleReporting<SafeBrowsingIncidentReportingServiceFeatures,MaterialDesignUserManager<MaterialDesignUserManager,NegotiateTLS13<TLS13Negotiation,NetworkTimeServiceQuerying<NetworkTimeQueries,NewAudioRenderingMixingStrategy<NewAudioRenderingMixingStrategy,NonValidatingReloadOnNormalReload<NonValidatingReloadOnNormalReload,ParseHTMLOnMainThread<ParseHTMLOnMainThread,PassiveDocumentEventListeners<PassiveDocumentEventListeners,PassiveEventListenersDueToFling<PassiveEventListenersDueToFlin
pi        1616  5.1 11.7 331440 44532 ?        Sl   14:33   3:43 /usr/lib/chromium-browser/chromium-browser --type=renderer --enable-pinch --enable-features=AutofillCreditCardSigninPromo<AutofillCreditCardSigninPromo,AutofillProfileCleanup<AutofillProfileCleanup,DocumentWriteEvaluator<DisallowFetchForDocWrittenScriptsInMainFrame,ExpectCTReporting<ExpectCTReporting,IncidentReportingDisableUpload<SafeBrowsingIncidentReportingService,IncidentReportingModuleLoadAnalysis<SafeBrowsingIncidentReportingServiceFeatures,IncidentReportingSuspiciousModuleReporting<SafeBrowsingIncidentReportingServiceFeatures,MaterialDesignUserManager<MaterialDesignUserManager,NegotiateTLS13<TLS13Negotiation,NetworkTimeServiceQuerying<NetworkTimeQueries,NewAudioRenderingMixingStrategy<NewAudioRenderingMixingStrategy,NonValidatingReloadOnNormalReload<NonValidatingReloadOnNormalReload,ParseHTMLOnMainThread<ParseHTMLOnMainThread,PassiveDocumentEventListeners<PassiveDocumentEventListeners,PassiveEventListenersDueToFling<PassiveEventListenersDueToFlin
pi        1626  4.7 11.2 321748 42840 ?        Sl   14:33   3:25 /usr/lib/chromium-browser/chromium-browser --type=renderer --enable-pinch --enable-features=AutofillCreditCardSigninPromo<AutofillCreditCardSigninPromo,AutofillProfileCleanup<AutofillProfileCleanup,DocumentWriteEvaluator<DisallowFetchForDocWrittenScriptsInMainFrame,ExpectCTReporting<ExpectCTReporting,IncidentReportingDisableUpload<SafeBrowsingIncidentReportingService,IncidentReportingModuleLoadAnalysis<SafeBrowsingIncidentReportingServiceFeatures,IncidentReportingSuspiciousModuleReporting<SafeBrowsingIncidentReportingServiceFeatures,MaterialDesignUserManager<MaterialDesignUserManager,NegotiateTLS13<TLS13Negotiation,NetworkTimeServiceQuerying<NetworkTimeQueries,NewAudioRenderingMixingStrategy<NewAudioRenderingMixingStrategy,NonValidatingReloadOnNormalReload<NonValidatingReloadOnNormalReload,ParseHTMLOnMainThread<ParseHTMLOnMainThread,PassiveDocumentEventListeners<PassiveDocumentEventListeners,PassiveEventListenersDueToFling<PassiveEventListenersDueToFlin
pi        7287  0.0  0.5   4244  1916 pts/0    S+   15:44   0:00 grep --color=auto chromi
pi@raspberrypi:~ $ 

on the first peek, that seems to be a bit much of chromium, but well … I’m not that deep into your configuration so far … it may be that those are some leftover tabs?

i’ve tried to kill them all and restart chromium via the icon on the lxde desktop, but am not quite able to do that. maybe my smartphone-multitouch-spoiled fingers are just not made for this kind of display :wink:

from ~/scripts/openhabloader.sh I get how to intentionally start chromium … aaand the touch-input i guess. okay. so far so good. but that I should have been doing from the right display … because trying to start it via ssh fails with:

pi@raspberrypi:~/scripts $ sudo -u pi /usr/bin/chromium-browser --disable-restore-session-state --disable-web-security --user-data-dir --noerordialogs --disable-session-crashed-bubble --disable-infobars --kiosk /home/pi/scripts/openhabloader.html &
[1] 8170
pi@raspberrypi:~/scripts $ xinput --set-prop 'ADS7846 Touchscreen' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1
Unable to connect to X server
pi@raspberrypi:~/scripts $ 
pi@raspberrypi:~/scripts $ bootstrap_helper: /usr/lib/chromium-browser/nacl_helper: Cannot open ELF file!  errno=2
[1:1:0425/155533.625190:ERROR:nacl_fork_delegate_linux.cc(315)] Bad NaCl helper startup ack (0 bytes)
[8175:8175:0425/155533.663250:ERROR:browser_main_loop.cc(495)] Failed to put Xlib into threaded mode.
[8175:8175:0425/155533.674912:ERROR:browser_main_loop.cc(272)] Gtk: Locale not supported by C library.
        Using the fallback 'C' locale.
[8175:8175:0425/155533.730079:ERROR:browser_main_loop.cc(272)] Gtk: cannot open display: 
pi@raspberrypi:~/scripts $ 
[1]+  Exit 1                  sudo -u pi /usr/bin/chromium-browser --disable-restore-session-state --disable-web-security --user-data-dir --noerordialogs --disable-session-crashed-bubble --disable-infobars --kiosk /home/pi/scripts/openhabloader.html
pi@raspberrypi:~/scripts $ 

damn, I really suck at troubleshooting X I’m afraid :-/

back to the web interface:

when I flip the switch for “Hot Water” in the web interface (basicui, sitemap default ) the relay clicks. the “Heating” one does not.

when I tail openhab.log and events.log I see the corresponding log lines:

 ==> /var/log/openhab2/events.log <==
2017-04-25 16:16:39.953 [ItemCommandEvent          ] - Item 'Raspi12' received command ON
2017-04-25 16:16:39.990 [ItemStateChangedEvent     ] - Raspi12 changed from OFF to ON
2017-04-25 16:16:41.006 [ItemCommandEvent          ] - Item 'Raspi12' received command OFF
2017-04-25 16:16:41.067 [ItemStateChangedEvent     ] - Raspi12 changed from ON to OFF
2017-04-25 16:16:42.054 [ItemCommandEvent          ] - Item 'Raspi23' received command ON
2017-04-25 16:16:42.079 [ItemStateChangedEvent     ] - Raspi23 changed from OFF to ON
2017-04-25 16:16:43.026 [ItemCommandEvent          ] - Item 'Raspi23' received command OFF
2017-04-25 16:16:43.052 [ItemStateChangedEvent     ] - Raspi23 changed from ON to OFF

I managed to check the working relay with my multimeter, and that confirmes that the “hot water” one works. “heating” does nothing.

(I have yet to check via the gpio pins.)

Hello @auch1 and welcome to the forum :wink:
That does not sound fun at all so lets dig right into it and find whats wrong:

The HTML loader is working in the following way:

  1. The HTML is using one DIV to show the graphics, countdown etc and another hidden DIV that is trying to load the HABPanel URL (http://localhost:8080/habpanel/index.html#/view/HestiaPi) every x seconds.
  2. Every y seconds its checking if the hidden DIV loaded the HABPanel which means that OpenHAB finally finished loading. This does take a long time in RasPi Zero indeed.
  3. If this happens, it redirects to it and once this is done, you should see that on the LCD

We have seen sometimes this to take even longer for the first time, causing Chromium to freeze, so we increased the x and y times. Your 222 sounds like an old value. Can you please update openhabloader.blank.html (very important!), openhabloader.html and openhabloader.sh and try again? This should at least solve the problem that the UI is not loaded at the end of the loading script.

What you are missing is that HABPanel by default is looking at your browser cookies to see what it should load and your computer’s browser knows nothing. RasPi’s browser loading the LCD UI knows more :wink:
In order to load on your computer the same UI, even though it is not supposed to be used outside the LCD, follow these steps:

  1. Visit http://[RasPi_IP]:8080
  2. Click on HABPANEL
  3. Click on the burger menu (the three dashes) on the top left corner
  4. Click on the gear icon bottom left next to the clock
  5. Select “Panel configuration: Server Storage”
  6. Press OK on the popup
  7. Click on the burger menu again on the top left corner
  8. Choose HESTIAPI

The resistive LCDs are generally less fancy than our SmartPhones’ :unamused: We have tested in the past capacitive touchscreens which rock indeed but come in much larger sizes and almost double the total cost of BOM so we left it there.
Right now there is even another extra issue with a misscalibration that we haven’t shorted. Your actual pressing point is about 4-5mm further from the point you actually touch in the direction towards the centre of the screen, making small icons at the edges of the screen hard to select, but the way the UI is designed should not cause any trouble with this issue as the buttons are big enough to compensate on the misscalibration until we fix it. You found first :wink: Use the cap of a pen or anything pointy but not sharp to double tap on the Chromium icon on the desktop.

Try that:

DISPLAY=:0.0 sudo -u pi /usr/bin/chromium-browser --disable-restore-session-state --disable-web-security --user-data-dir --noerordialogs --disable-session-crashed-bubble --disable-infobars --kiosk /home/pi/scripts/openhabloader.html &

Can you check the voltage on the “good” relay while it is activated and while it deactivated and compare it to the “bad” relay while it is supposed to be activated and while it is supposed to be deactivated.

I may be off-base here since I don’t have a Touch, but HABPanel usually stores it’s config in the local storage of the browser - opening it in a separate browser (such as on your laptop), I would expect the configuration to be blank. I think you can make it store that server-side (and maybe @HestiaPi has!) but by default it doesn’t.

Indeed :wink: I kept editing my answer with more info as I was writing it.

dear HestiaPi,

I checked the voltage on the relays now.
when turned on, I measure 4,90V between the two coil-pins on the good one, and nothing on the bad one.
interesting. so I guess … the heating relay does not even get the voltage to be able to switch?

with your help HABPanel now works when called from my remote browser.

I downloaded the scripts from github and mv’ed the old ones (from the image) to “_orig”.
hmmmm.
did I miss something? are there any scripts newer than that?

pi@raspberrypi:~/scripts $ diff openhabloader.blank.html openhabloader.blank.html_orig
10a11
> 
13a15
> 
14a17
> 
16a20
> 
28a33
> 
39a45
> 
pi@raspberrypi:~/scripts $

nothing to see here apart from some blank lines …

pi@raspberrypi:~/scripts $ diff openhabloader.html openhabloader.html_orig
10a11
> 
13a15
> 
14a17
> 
16a20
> 
28a33
> 
39a45
> 
78,79c84,85
<   <div id="WiFi_IP"  style="overflow:hidden;position: absolute; top: 210px; left: 149px; color:#ccc">WiFi IP address: Not available</div>
<   <div id="WiFi_MAC"  style="overflow:hidden;position: absolute; top: 230px; left: 149px; color:#ccc">WiFi MAC address: Not available</div>
---
>   <div id="WiFi_IP"  style="overflow:hidden;position: absolute; top: 210px; left: 149px; color:#ccc">WiFi IP address: 192.168.1.xx</div>
>   <div id="WiFi_MAC"  style="overflow:hidden;position: absolute; top: 230px; left: 149px; color:#ccc">WiFi MAC address: 84:16:f9:xx:xx:xx</div>
pi@raspberrypi:~/scripts $

… and a little bit of mac address-foo
(edited for paranoid privacy concerns ;))

pi@raspberrypi:~/scripts $ diff openhabloader.sh openhabloader.sh_orig
pi@raspberrypi:~/scripts $ 

thanks for your patience.

OK, so you have the latest files. That’s good.
If you have a multimeter, everything is much easier.
With both functions (heating, hot water) activated from HABPanel and the PCB flipped upside-down (be careful while plugged in on mains!!!) check the voltage between point 1 (sorry they are very little on the image - this is the ground so plenty alternative points if it is too tight there) and the following points: 2, 3, 4, 5 and 6. That is between 1 and 2, between 1 and 3 etc. Write those down and then measure and compare between 1 and: 7, 8, 9, 10 and 11. Please repeat with both functions deactivated.
Last but not least, swap point 1 with point 12, repeat above steps and report here.
By the way, do you have a soldering iron?

first run. both switches to ON.
you should add that “heating” tries to turn itself to OFF constantly, if you dont set the temp setpoint to above temperature. sure, I could have known that.

Hot Water
1 and 2 = 3.24 V
1 and 3 = 3.24 V
1 and 4 = 0.76 V
1 and 5 = 0.76 V
1 and 6 = 0.09 V - 0.10 V (changes a little bit)

Heating
1 and  7 = 3.31 V
1 and  8 = 3.31 V
1 and  9 = 3.31 V
1 and 10 = 3.31 V
1 and 11 = 5.02 V

second run, both switches to OFF:

Hot Water
1 and 2 = 0.00 V
1 and 3 = 0.00 V
1 and 4 = 0.00 V
1 and 5 = 0.00 V
1 and 6 = 5.02 V

Heating
1 and  7 = 0.00 V
1 and  8 = 0.00 V
1 and  9 = 0.00 V
1 and 10 = 0.00 V
1 and 11 = 5.02 V

Ok, so I see an issue between points 3 and 4. Please turn of HestiaPi via SSH:

sudo shutdown -h now

Disconnect from mains and use an Ohmmeter for resistance measurements and report back (never mind the second decimal - meant to tell you before)
3 and 4
3 and 5
4 and 5
Last but not least, which is actually the one I am suspecting, measure continuity (zero or infinite resistance) between the 2 points with the arrows below. It is the left leg of each transistor that drive the relays. There should be ~0Ω but I expect you to find infinite.

Rubbing my hands and waiting…

3 and 4 = 1.2 kohm
3 and 5 = 1.2 kohm
4 and 5 = 0 ohm

between the two arrows: no beep, no continuity, infinite, as you expected.

Can you solder a wire between the 2 points with the arrows?
There must be an issue we have seen before with the transfer from one side of the board to the other on the pin of the power supply. New PCB version is modified to solve this.
Please let me know if that solves your problem.
About the UI not loading on the LCD… From the diff you did it seemed as if you have the latest files, then again you mentioned the countdown starting from around 220 seconds. Once the electrical issue is gone, try a (re)boot and watch the loading script start Chromium and see around how many seconds is the first thing you see.

I’m sorry no.
I’m afraid soldering those tiny SMD pins is a bit above my skill level.

could you please provide an address so I could return it to you?

thanks in advance.

Sorry for the delay over the holidays…
I am emailing you directly the address.

perfect, thanks!
(and here some more characters to get through the minimal amount of chars per reply) facepalm

In case you are in a hurry, you can go ahead and purchase a new one so that we can dispatch only the replacement part next working day. Once we receive the faulty one we will refund you in full the second purchase.