visualapproach / WiFi-remote-for-Bestway-Lay-Z-SPA

Hack - ESP8266 as WiFi remote control for Bestway Lay-Z spa Helsinki
GNU General Public License v3.0
304 stars 74 forks source link

NO54154 4 Wire unable to get working on new Unified firmware - works on the old FW #510

Closed chunkysteveo closed 7 months ago

chunkysteveo commented 1 year ago

Hardware:

Software:

Your message Spa works and has worked perfect for months and years, just got it ready for Summer - working fine on the "old - split" firmware, 4W_2022-08-03. Tried out the new unified firmware following the instructions and wiping my ESP8266, but getting a "04" or "39" on the CIO depending on the temperature unit, and no response from the pump by either Web GUI or buttons.

Did the Hardware test and it states all pins failing (I think there is a typo in the hardware test output stings, as it states pins 3,4,5 and then 3,4,5 again in the code, not 0,1,2,3,4,5?).

Re-installed Firmware 4W_2022-08-03 and the spa works again fine via buttons and Web GUI again.

I've skimmed through the code and am unsure what may be causing this, but it's like the pin mappings are all out for me on the newest version? I'd love to be able to be on the latest revision and take advantage of the new GUI, HA entities and the firmware updates etc. Any pointers, as its most definitely NOT a hardware issue, despite the HW test stating all lines are down? Is it the level shifter having issue with the new firmware (seems unlikely)?

visualapproach commented 1 year ago

Hi @chunkysteveo thanks for your report. Sounds like I haven't done my homework properly. Have to look at it and see if I can spot the bug. Good to have a reference to the old version and hw check

chunkysteveo commented 1 year ago

Thanks @visualapproach ! It's been a while since we used the tub, and this NO54154 Paris unit, so I've been out of the loop since before you consolidated all the versions into one.

Happy to do some digging and testing when needed on the unit to get it working on the latest release šŸ‘šŸ»

visualapproach commented 1 year ago

I tested on a nodeMCU, PCB v1, 54154. Used a jumper between pin 2-6, and 3-7 and got this: CIO to DSP pin 3 success!CIO to DSP pin 4 success!CIO to DSP pin 5 fail!DSP to CIO pin 3 success!DSP to CIO pin 4 success!DSP to CIO pin 5 fail! the pin # in the result is referring to the wires: 5V beeing #1, GND #2, RX #3, TX #4

Hardware test page is checking DSP RX to CIO RX which ofc is wrong. I will correct it. (I could only test on my 6 wire pump so consider yourself a beta testing volunteer)

visualapproach commented 1 year ago

New beta available. If it works you should see it pass on pin 3 and 4. Fail on 5 since it's not connected.

chunkysteveo commented 1 year ago

I'll give it a go tomorrow!

chunkysteveo commented 1 year ago

OK, beta firmware - the hardware test now passed, see results below:

CIO to DSP pin 3 success!CIO to DSP pin 4 success!CIO to DSP pin 5 fail!DSP to CIO pin 3 success!DSP to CIO pin 4 success!DSP to CIO pin 5 fail!

When connecting to the Spa, I am still getting no response from the Web GUI or buttons, and the display shows "04" and "39" temps on the new firmware.

So in DSP_4W.cpp you swapped the TX/RX around. Do you need to do that in DSP_4W.h too?

visualapproach commented 1 year ago

Ok. I don't think it matters. You can declare void myfunction(int, int, int); But I'll correct it to avoid confusion.

Go to debug-on Let it run for a while and click this link debug-off Then post log.txt here.

chunkysteveo commented 1 year ago

Giving it a go now...

chunkysteveo commented 1 year ago

Hmmm.. log isn't growing, should it?

1684339911:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,0,0,0,3,FD,0,0,0,0

That's all it shows?

visualapproach commented 1 year ago

It only updates when something has changed. Try leaving it on longer and press a couple of buttons. The zeroes doesn't look promising though.

chunkysteveo commented 1 year ago

Ok. Leaving it on and will press buttons!

It's odd that the old firmware works perfect. It's not the hardware at fault here.

visualapproach commented 1 year ago

But on the other hand we might be on to something :)

visualapproach commented 1 year ago

The odd thing is that it works for some ppl. Maybe not with that exact model but 4 wire.

chunkysteveo commented 1 year ago

There was a note in the old fw about pins being different on a 54154, next to my username... not that I recall it!!?

chunkysteveo commented 1 year ago

Buttons mashed like a piano!

1684339911:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,0,0,0,3,FD,0,0,0,0 1684341295:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,0,0,0,3,FD,0,0,0,0 1684341321:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,20,0,0,23,FD,0,0,0,0 1684341324:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,0,0,0,3,FD,0,0,0,0 1684341335:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,10,0,1,14,FD,0,0,0,0 1684341337:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,11,0,1,15,FD,0,0,0,0 1684341339:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,13,0,1,17,FD,0,0,0,0 1684341343:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,10,0,0,13,FD,0,0,0,0 1684341345:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,10,0,1,14,FD,0,0,0,0 1684341358:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,10,0,0,13,FD,0,0,0,0 1684341364:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,0,0,0,3,FD,0,0,0,0 1684341378:0,0,0,0,0,0,0,0,0,0,0 ,BA,3,0,0,0,3,FD,0,0,0,0 1684341378:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,0,0,0,3,FD,0,0,0,0

visualapproach commented 1 year ago

The log shows the raw 11 bytes of data from cio and dsp respectively. Don't remember which order but I can check later. Or you can do it by peeking into the code. I think cio is first. All zeroes indicate something wrong with that connection. Easy test: flip the pins for cio on hwpage.

chunkysteveo commented 1 year ago

Will try the pin flip in the web gui....

chunkysteveo commented 1 year ago

Cio pins flipped in GUI....

1684342235:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,0,0,0,3,FD,0,0,0,0 1684342595:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,0,0,0,3,FD,0,0,0,0 1684342637:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,20,0,0,23,FD,0,0,0,0 1684342638:0,0,0,0,0,0,0,0,0,0,0 ,3B,3,20,0,0,23,FD,0,0,0,0 1684342639:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,20,0,0,23,FD,0,0,0,0 1684342640:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,0,0,0,3,FD,0,0,0,0 1684342651:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,10,0,1,14,FD,0,0,0,0 1684342655:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,10,0,0,13,FD,0,0,0,0 1684342656:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,10,0,1,14,FD,0,0,0,0 1684342659:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,11,0,1,15,FD,0,0,0,0 1684342660:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,10,0,0,13,FD,0,0,0,0 1684342665:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,10,0,1,14,FD,0,0,0,0 1684342669:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,11,0,1,15,FD,0,0,0,0 1684342671:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,13,0,1,17,FD,0,0,0,0 1684342673:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,10,0,1,14,FD,0,0,0,0 1684342674:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,10,0,0,13,FD,0,0,0,0

visualapproach commented 1 year ago

That didn't do much. I'll think about it but now I will watch some episodes of suites and have some šŸ· to enjoy the long weekend. We'll figure it out

chunkysteveo commented 1 year ago

Hahaha! Enjoy!! šŸ»

visualapproach commented 1 year ago

I checked and can confirm that the zeroes are coming from the CIO. Can you check in browser inspect/console for the TIMES messages. What does "DBG" say? Also, switch to another 4 wire model in the settings and start logging to see if there is any difference.

All zeroes indicate no messages are coming from te CIO, and the software reading the messages is the same for all 4 wire pumps. So I say "it can't be software", and you say "it can't be hardware"... I guess we just have to find out who's right. It may very well be me.

olskar commented 1 year ago

I am thinking this perhaps could be the same issue I encounter and describe here;

https://github.com/visualapproach/WiFi-remote-for-Bestway-Lay-Z-SPA/discussions/508

In my case it is NO54123 4 Wire unable to get working on new Unified firmware and it did work on the old firmware

olskar commented 1 year ago

How do I do this hardware test @visualapproach @chunkysteveo ?

chunkysteveo commented 1 year ago

It's in the newer firmware. Upload that and then...

Go to /debug-on/ Let it run for a while pressing buttons and go to /debug-off/ Then post log.txt here that you. An find in the file system via the web menu.

tunnus-1 commented 1 year ago

Hardware:

  • Pump model NO54154 Paris
  • 4 wires
  • PCB type V1
  • Level shifter type -TXS0108E

Software:

  • Version: Works 4W_2022-08-03, does not work on new Unified FW

Your message Spa works and has worked perfect for months and years, just got it ready for Summer - working fine on the "old - split" firmware, 4W_2022-08-03. Tried out the new unified firmware following the instructions and wiping my ESP8266, but getting a "04" or "39" on the CIO depending on the temperature unit, and no response from the pump by either Web GUI or buttons.

Did the Hardware test and it states all pins failing (I think there is a typo in the hardware test output stings, as it states pins 3,4,5 and then 3,4,5 again in the code, not 0,1,2,3,4,5?).

Re-installed Firmware 4W_2022-08-03 and the spa works again fine via buttons and Web GUI again.

I've skimmed through the code and am unsure what may be causing this, but it's like the pin mappings are all out for me on the newest version? I'd love to be able to be on the latest revision and take advantage of the new GUI, HA entities and the firmware updates etc. Any pointers, as its most definitely NOT a hardware issue, despite the HW test stating all lines are down? Is it the level shifter having issue with the new firmware (seems unlikely)?

I've exactly the same issue, but couldn't find this (old) firmware you are referring to, what's the version number (v3.x.x)?

visualapproach commented 1 year ago

Did you save hardware config from the gui?

tunnus-1 commented 1 year ago

New beta available. If it works you should see it pass on pin 3 and 4. Fail on 5 since it's not connected.

I've have also this issue with the newest firmware (v4.1.3). My tub is Paris (#54148, 4-wires, AirJet, manufactured in 2017) and was testing mainly with NO54123, but tried all 4-wire models in UI. Spa display shows "04".

Hw test results were the same (pass on pin 3 and 4, fail on 5).

Screenshot 2023-06-20 at 17 12 00
tunnus-1 commented 1 year ago

Did you save hardware config from the gui?

Yes, and also did ESP restart between changes

tunnus-1 commented 1 year ago

Did you save hardware config from the gui?

Yes, and also did ESP restart between changes

configuration below (did try almost all possible combinations...)

Screenshot 2023-06-20 at 18 17 31
visualapproach commented 1 year ago

Ok seems something is broken for this model and firmware :(

chunkysteveo commented 1 year ago

Yeah - looking that way for these 4 wire versions. Happy to test out any fw if/when needed to solve this one!

visualapproach commented 1 year ago

Yes I wish someone could record the pin signals with a digital analyzer on the old and the new fw to give a clue where to begin looking for bugs. It's strange that other 4-wire models seem to work.

tunnus-1 commented 1 year ago

Yes I wish someone could record the pin signals with a digital analyzer on the old and the new fw to give a clue where to begin looking for bugs. It's strange that other 4-wire models seem to work.

Don't have an analyzer, but could otherwise try to help with troubleshooting. Would still need to know what's the latest fw that has worked with these particular 4-wire versions (at least Paris, maybe some other model as well)? Also, might help if you can add some extra debugging to code, so we users could provide more info?

example debug I got from v4.1.3 1687190582:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,0,0,0,3,FD,0,0,0,0 1687190613:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,20,0,0,23,FD,0,0,0,0 1687190619:0,0,0,0,0,0,0,0,0,0,0 ,BB,3,0,0,0,3,FD,0,0,0,0

chunkysteveo commented 1 year ago

Firmware I am using on my 4-wire Paris (using NO54154) is "4W_2022-08-03". That's as far as I pushed the commit history before I could be bothered pulling it in and out of my egg - as it's in use now while it's nice and warm.

tunnus-1 commented 1 year ago

Firmware I am using on my 4-wire Paris (using NO54154) is "4W_2022-08-03". That's as far as I pushed the commit history before I could be bothered pulling it in and out of my egg - as it's in use now while it's nice and warm.

Can you give a direct link or a version tag (v3.x.x)? Tried searching with this date, but no success

chunkysteveo commented 1 year ago

Ahh the release tag? I have been using git commits and working direct from the code rather than a release version.

The fw was 13th September, so guessing that would be version "3.4.0"? Mind you - i've spotted my name in the 3.4.1 release with a code update, so I must have been able to use that version too in the past.

I may try to work with the release versions individually - but for now I have a working tub and a wife that's happy for now! haha

tunnus-1 commented 1 year ago

Ahh the release tag? I have been using git commits and working direct from the code rather than a release version.

The fw was 13th September, so guessing that would be version "3.4.0"? Mind you - i've spotted my name in the 3.4.1 release with a code update, so I must have been able to use that version too in the past.

I may try to work with the release versions individually - but for now I have a working tub and a wife that's happy for now! haha

Did some tests with v3.4.1 (which seems to be fw "4W_2022-08-03"), but couldn't get it to work with my Paris model. Tried different model.h settings, none of them worked.

Some progress though, now I can see current/actual temp both in UI and in display instead of "04".

Screenshot 2023-06-27 at 21 30 11

In the bottom of the screen, "CIO TX" sometimes shows "Dead", usually it's "Active"

Screenshot 2023-06-27 at 21 07 09
chunkysteveo commented 1 year ago

Maybe 3.4.0 then? Eeek - not sure?! My Paris 2017 egg I have to set the model in the .h file as the NO54154 to get it working fully. That may help you as I see in the screenshot you have a different NO number?

tunnus-1 commented 1 year ago

Maybe 3.4.0 then? Eeek - not sure?! My Paris 2017 egg I have to set the model in the .h file as the NO54154 to get it working fully. That may help you as I see in the screenshot you have a different NO number?

Ok, could try that version too. I tried practically all models, including 54154, that screenshot just happens to show other model I tested at a time.

chunkysteveo commented 1 year ago

Ahh, maybe not a model issue then. Maybe a loose connection for the CIO?

tunnus-1 commented 1 year ago

Ahh, maybe not a model issue then. Maybe a loose connection for the CIO?

I guess it could be a loose connection, but with the latest fw I did a hw test, and that was okay. And most of the time that "banner" in the bottom of UI shows both CIO & DSP active, but still buttons/commands never work.

tmh88 commented 1 year ago

If it helps, I have been trying different software versions, I have a Paris #54148 4 wire pump and display using model number 54154 in the config. I can get both the screen and GUI to control and read temps up to v3.5.0. tried v3.5.1 and the screen control works also shows the temp, but the GUI only shows the temp and cannot control from the GUI same with v4.0.0 BETA. tried latest version v4.1.4 nothing works. So, Iā€™m assuming something changed in version v3.5.1 as that seems to be when the issues start.

If there is any testing / debug I can do to help, please let me know.

Thanks Tom.

visualapproach commented 1 year ago

@tmh88 Between v4.0.0 Beta and v4.1.4 I switched the pinout order, so you would have to do the hardware config again, and note the different order on RX/TX. It was done to make the hardware test working on 4 wire. Maybe that's what made the latest not work at all. Looking through the diff between 3.5.0 and 3.5.1 there is nothing that I can see that would affect this at all.

You could check the browser console output in both versions 3.5.0 and 3.5.1. Especially the latter, to see if the messages are sent at all.

tmh88 commented 1 year ago

@visualapproach I'm fairly new to this repository, how do I check the debug in the browser console, also what am I looking for in the console? Hopefully I can assist to try and fix the 4 wire version. Thanks

visualapproach commented 1 year ago

I'm not sure what to look for but maybe see if we can spot something. Use chrome and right click on page. Select inspect and choose the console tab. Then you should see messages scrolling by.

tunnus-1 commented 1 year ago

If it helps, I have been trying different software versions, I have a Paris #54148 4 wire pump and display using model number 54154 in the config. I can get both the screen and GUI to control and read temps up to v3.5.0. tried v3.5.1 and the screen control works also shows the temp, but the GUI only shows the temp and cannot control from the GUI same with v4.0.0 BETA. tried latest version v4.1.4 nothing works. So, Iā€™m assuming something changed in version v3.5.1 as that seems to be when the issues start.

If there is any testing / debug I can do to help, please let me know.

Thanks Tom.

Now I made most progress so far, using v3.5.0 and model config 54154, I'm finally able to control my pump with GUI. Well, not everything is working, I have "04" on display and GUI does not show temperature at all, so still some way to go.

Screenshot 2023-08-11 at 21 41 37 Screenshot 2023-08-11 at 21 41 06
visualapproach commented 1 year ago

In the image the cio tx says "dead". So maybe start there. Does v4.2.0 make any difference?

tunnus-1 commented 1 year ago

In the image the cio tx says "dead". So maybe start there. Does v4.2.0 make any difference?

Noticed that, but don't really know how I could utilize that info, as with v3.4.1 my situation was basically reversed (temperature display was the only thing working, and with v3.5.0 it's the only thing not working...)

At some point I'll try v4.2.0

tunnus-1 commented 1 year ago

@tmh88 & @chunkysteveo could you post images of your PCBs? In essence I'd like to know if you have low pass filter setup implemented

tmh88 commented 1 year ago

@tmh88 & @chunkysteveo could you post images of your PCBs? In essence I'd like to know if you have low pass filter setup implemented

I'm running an esp direct (wemos D1 mini esp8266)

20230722_185552.jpg