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
297 stars 75 forks source link

4 pin models #47

Closed TimE90 closed 2 years ago

TimE90 commented 3 years ago

Hey @visualapproach!

Thanks for this great project. My family and friends having several Lay Z Spa models. Some having the 6 pin connector and others are the 4 pin models.

Do you think it‘s possible to extend functionality for the 4 pin models?

visualapproach commented 3 years ago

No need to go out! To upload new firmware over the air you edit platformio.ini and remove the semicolons at the bottom rows. Change the IP to whatever your tub has. Then click the upload (right arrow) icon.

TheCurly commented 3 years ago

So far I have been using Arduino IDE, but I'll check out PlatformIO. I exported the compiled binary from Arduino IDE and uploaded that via the firmware updater page, not sure if that works.

visualapproach commented 3 years ago

There is no firmware update page. Maybe you think of upload.html? It's for uploading regular files like index.html and so on. But you can use arduino ide also, just select the IP of your device instead of COMx

TheCurly commented 3 years ago

There is no firmware update page. Maybe you think of upload.html? It's for uploading regular files like index.html and so on. But you can use arduino ide also, just select the IP of your device instead of COMx

There is an update.html page that says "Firmware updater", but I'll try to update through Arduino over the network. Did not know that was possible!

visualapproach commented 3 years ago

There is no firmware update page. Maybe you think of upload.html? It's for uploading regular files like index.html and so on. But you can use arduino ide also, just select the IP of your device instead of COMx

There is an update.html page that says "Firmware updater", but I'll try to update through Arduino over the network. Did not know that was possible!

Haha, I forgot. It was added by someone else and I haven't tested it. Not sure what kind of .bin-file it's supposed to take.

TheCurly commented 3 years ago

After about an hour, the display is now showing En8 and beeping again. Never seen that before and I can't immediately find what it means.

TheCurly commented 3 years ago

Made a quick sketch to check the WiFi signal and the Wemos reports RSSI values ranging from -49 to -52dB, that should be good enough for a stable connection.

visualapproach commented 3 years ago

Made a quick sketch to check the WiFi signal and the Wemos reports RSSI values ranging from -49 to -52dB, that should be good enough for a stable connection.

Okay. Unless it's code related I suspect it might be impedance mismatch or something. I'm NOT an electronic engineer, but I think it may be useful to put resistors from LLC to RX and TX. That would be four in total. Like: ESP-----LLC----500Ohms---DSP RX ESP-----LLC----500Ohms---DSP TX ESP-----LLC----500Ohms---CIO RX ESP-----LLC----500Ohms---CIO TX Or it might be useless. But it could be worth a try thou. The value 500 Ohms is just a guess. But say 100 to 800 should be a good start.

TheCurly commented 3 years ago

Made a quick sketch to check the WiFi signal and the Wemos reports RSSI values ranging from -49 to -52dB, that should be good enough for a stable connection.

Okay. Unless it's code related I suspect it might be impedance mismatch or something. I'm NOT an electronic engineer, but I think it may be useful to put resistors from LLC to RX and TX. That would be four in total. Like: ESP-----LLC----500Ohms---DSP RX ESP-----LLC----500Ohms---DSP TX ESP-----LLC----500Ohms---CIO RX ESP-----LLC----500Ohms---CIO TX Or it might be useless. But it could be worth a try thou. The value 500 Ohms is just a guess. But say 100 to 800 should be a good start.

I added the 4 resistors (560 ohm) a few days ago, but I am still getting intermittent E13 errors. Looks like the frequency of the errors goes up when I control the spa through the web page. If I just leave it alone and turn it on through the display it runs for half a day or so. Could it be something in the code?

visualapproach commented 3 years ago

Yeah, it could be anything I guess. Did you try with no autoportal? One could see what happens if just bypassing the traffic. I may make code for that, but it will take a while. I have a lot of other things needing my attention now.

TheCurly commented 3 years ago

Yes, I tried without autoportal but it did the same thing. My wife is getting a little annoyed by the beeping but take your time :)

TheCurly commented 3 years ago

I have had the spa running for more than a week with the bypass program, and I only got 1x an E13 error. The 560ohm resistors are still in place so I am thinking about taking them out and repeating the same test with the bypass program. The Wemos D1 mini is running at 80MHz.

visualapproach commented 3 years ago

@TheCurly Okay, it sounds like software is to blame. Mostly. Thanks for the report, I'll see if I can think of something.

Lukey1979 commented 3 years ago

@Inazone Hi mate, I'm looking to start this project as soon as all the components arrive. I have a Maldives 54173, which is a 4 wire hydrojet spa (Square Shaped) Purchased 2019. I saw your comments about your 4 wire setup. Hoping that when it comes time to put mine together, I don't run into too many issues. Any insight or steps you did to setup yours that strayed from the install guide here would be super helpful.

chunkysteveo commented 3 years ago

Yeah, not started mine yet as I have a Paris 4 pin version. Would be good to get a comparison table or similar as from what I have read up - the 6 pin is the "good" version that allows for all functions and "bells and whistles" etc (literally bells!), and the 4 pin version "works". Would be good to get some differences on the 6 and 4 pin setups in bullet list/table form.

Inazone commented 3 years ago

@Lukey1979, hi there I have not started this project yet, I am currently keeping an eye on the project to see how the 4 wire progresses. Unfortunately I don't have the skills of people like the project creator, for coding etc, so I am waiting to see what happens. As an aside I did stick some sound deadening material on the inside of the pump housing, has dramatically reduced the noise of running and stopped a drumming I was getting when both the air jets and hydro jets were on. Well worth doing.

Lukey1979 commented 2 years ago

Hi @jenswalit Just wondering how you are going with you 4pin Wifi setup? You mentioned that you had problems when using the resistors on the board, just wondering what those issues were? Do you have any E13 issues when running the board without the resistors. Im getting quite a few E13 errors and was suspecting they are caused by incorrect resistance.

visualapproach commented 2 years ago

The 'built in' resistors is only protecting for shorts. You could try putting resistors on the other side of the LLC.

Lukey1979 commented 2 years ago

Hi @visualapproach By built in resistors, do you mean the 1 x 10k resistor on your board and the 7 x 500+ resistors on the board with the red LLC? I will try to put some resistors on the LLC --> RX TX side to see if that helps. I noticed that tonight not only was I getting E13 errors, I was noticing that the wifi control was either disconnecting from wifi briefly or rebooting as when I was access the web page I noticed that Take Control had turned off and pumps and heating off when I had all this turned on and operating.

visualapproach commented 2 years ago

I meant the 7 resistors but you only need 4 (rx/tx x 2). Sounds like brown outs, but "take control" is designed to turn off in case of errors.

gd360 commented 2 years ago

Hello there,

First of all big thanks for that awesome project!

I have the Model "Limited Edition" here, which is also a 4 wire version. Are there already any expieriences with this model? I have to admint that i connected first and checked pinout after, which is wrong. The Display has V and GND on the Outside and TX RX in the middle. I am willing to try stuff, ich you could help. I am not the best electronics guy, but i can handle a mulitimeter and a friend is quiet ok to good in coding i'd say. Is there a way to test the display compatibality e.g. by connecting it to the board an listen to serial monitor? My pool is outdoors an in an enclosure, so for testing this woould be perfect.

gd360 commented 2 years ago

I know openned the enclosure a bit to see the model. I have the 54112 Version that @jenswalit and @Lukey1979 mentioned. Jens wrote, that he got it running doing some changes in the model.h but unfortunatley didn't post it. Does anyone have a clue?

visualapproach commented 2 years ago

I know openned the enclosure a bit to see the model. I have the 54112 Version that @jenswalit and @Lukey1979 mentioned.

Jens wrote, that he got it running doing some changes in the model.h but unfortunatley didn't post it. Does anyone have a clue?

Have you opened the file? There is some clues in it. There are three choices you can make. One of them will work if you are lucky.

jenswalit commented 2 years ago

Hello, sorry for my late Answer. I only use the #define NO54138. But sometime when i open the WebGiu and the Heater is running i got some Error.

jenswalit commented 2 years ago

Sorry i lok and see that i change someting like that.

#define NO54112 //this is the Version Vegas 4Pin Pump 1->5V+ 2->Data 3->Data 4->5V-

`#ifdef NO54112 //cio const uint8_t TEMPINDEX = 2; const uint8_t ERRORINDEX = 3; const uint8_t CIO_CHECKSUMINDEX = 5; //dsp const uint8_t COMMANDINDEX = 2; const uint8_t DSP_CHECKSUMINDEX = 5; const uint8_t PAYLOADSIZE = 7; const uint8_t PUMPBITMASK = 1 << 4; const uint8_t BUBBLESBITMASK = 1 << 5; const uint8_t JETSBITMASK = 0; const uint8_t HEATBITMASK = (1 << 1) | (1 << 3); const uint8_t POWERBITMASK = 1;

endif`

visualapproach commented 2 years ago

Thx @jenswalit

visualapproach commented 2 years ago

I think NO54123 definition will work fine. It's like NO54112 described above, but will turn on the heaters in two stages.

gd360 commented 2 years ago

Sorry for the late reply and thanks a lot for the help. Its now working and totally stable so far. It was really that easy, The last in the file worked. I was just to overwhelmed my lack of knowledge so I asked first.

One more question: Is MQTT working as well? Haven't tried it yet.

visualapproach commented 2 years ago

One more question: Is MQTT working as well? Haven't tried it yet.

It should. You have to enable it on the MQTT web page. Don't do that until you have an MQTT broker setup or the web server will get slow to respond since the device will try to connect to MQTT all the time.

Happy to hear that it works!