esp8266_spa icon indicating copy to clipboard operation
esp8266_spa copied to clipboard

Topic only shows me Spa/node ON

Open Magfel opened this issue 5 years ago • 27 comments

Hi, I like this project, thanks a lot. I did all you recommand but when when I include MQTT client, the only command founded is "Spa/Node" with the status ON. Can you explain me why ? My jeedom (MQTT Server) seems communicate right with the Wemos D1 Mini pro but not with th tub. I have compiled arduino program wtih the LOLIN (WEMOS) D1 mini Pro, is it right ? I've read, in another MQTT application, that we have to select NodeMCU ... Is there a difference ?

Magfel avatar Oct 15 '20 22:10 Magfel

Hi, thank you for the heads up. Please subscribe to Spa/# as you will then see debug messages on /debug.

In the code are several places with comments to higher the verbosity. Please test these.

Which spa controller are you using? There are differences between controller versions which may cause a problem.

Wemos d1 mini is right.

cribskip avatar Oct 16 '20 07:10 cribskip

I have a Balboa BP2100G1. When I suscribe to Spa/# I have only the Spa/node information with a ON status. This night, the debug commande was added. It returns a -4 value. I've set the DC-DC converter to 5V to power the Wemos D1, is it right ? Is it possible A and B wires inverted ?

Magfel avatar Oct 16 '20 21:10 Magfel

I have the BP2100G0.

| I've set the DC-DC converter to 5V to power the Wemos D1, is it right ? Perfect :-)

| Is it possible A and B wires inverted ? That may be the case, please swap them and try again.

Debug is used for several informations. When reconnecting, it publishes the MQTT state before the reconnect (e.g. TImeout etc.) Docs

cribskip avatar Oct 17 '20 15:10 cribskip

OK, I have a BP2100G0 too, it was a mistake from me cause I'd downloaded the BP2100G1 datasheet. Now, it works fine since I've change the Wemos card to an original WEMOS D1 mini pro, I don't known what was the problem with the first one. I've added a few lines of code to have the possibility of uploading the sketch through the wireless connection. And I have put all the electronic components in a 3D printed case Thanx a lot !! I will continue this project. IMG_20201009_192645

Magfel avatar Oct 26 '20 18:10 Magfel

Nice to hear it's working for you also :-)

HTTP-Updater ist already implemented: https://github.com/cribskip/esp8266_spa/blob/b1cb9cef590acb9f651b07251ffd164370011b81/esp8266_spa.ino#L209

Sweat case, could you please post a picture from your setup inside?

cribskip avatar Oct 26 '20 19:10 cribskip

IMG_20201010_150355 Is is a beta version, I'm going to do one larger. How do http-updater works ? When I go to the page \192.168.0.164, I have a blank page with "Not found: /" written on the top left.

Magfel avatar Oct 26 '20 19:10 Magfel

Use http://ip/update If asked, use user admin, blank password

Neat setup compared to mine 😅

Magfel [email protected] schrieb am Mo., 26. Okt. 2020, 20:47:

[image: IMG_20201010_150355] https://user-images.githubusercontent.com/29733553/97220244-74c80e80-17cb-11eb-9911-2e6e52517e2d.jpg Is is a beta version, I'm going to do one larger. How do http-updater works ? When I go to the page \192.168.0.164, I have a blank page with "Not found: /" written on the top left.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cribskip/esp8266_spa/issues/4#issuecomment-716782332, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK476TXEEQT4IPXNE2OF6TSMXG3VANCNFSM4SSRWOAA .

cribskip avatar Oct 26 '20 20:10 cribskip

Thanks :-) Use http://ip/update it works, but I prefer using OTA version. I know why my first "Wemos" card didn't work. On these cards, the pin D1 is the GPIO5 !!!

Magfel avatar Oct 27 '20 00:10 Magfel

Thanks :-) Use http://ip/update it works, but I prefer using OTA version. I know why my first "Wemos" card didn't work. On these cards, the pin D1 is the GPIO5 !!!

Hi @Magfel I am experiencing the same issue as you but don't understand your last comment as D1 is GPIO5 on my Wemos D1 Pro??

I am having the same issue of the Wemos D1 only reporting node ON

EmmanuelLM avatar Dec 24 '20 07:12 EmmanuelLM

EmmanuelLM, Try a little program using D1 linked to a LED and test it to be sure it's the real pin used by the program. It was the problem with a copy of the Wemos PRO.

Magfel avatar Dec 24 '20 11:12 Magfel

I just checked this and D1 is indeed D1 ... I double-checked my chip as well, which seems to work. It definitely feels like a hardware issue rather than a software one, but I cannot understand why the program would only post ON and not post the other messages right after it....

EmmanuelLM avatar Dec 26 '20 08:12 EmmanuelLM

Excuse me, I'm late back to the discussion ;-)

@EmmanuelLM Did you see this Hint in the code and test it out? Please also post a picture of your setup, thanks https://github.com/cribskip/esp8266_spa/blob/5f867a4486b858caddb717e2fb8187c5919024d6/esp8266_spa.ino#L245

cribskip avatar Dec 26 '20 10:12 cribskip

I did yes, when I get something, it is 254... in fairness, I wonder if my cable is at fault, so I have ordered a new one and will report back when it arrives next week.

EmmanuelLM avatar Dec 26 '20 18:12 EmmanuelLM

I am back with a new cable and still the same issue.... I also noted that the node timeouts every few seconds from the mqtt broker (Mosquitto) and that going to http://ip/update also produces a ERR_CONNECTION_TIMED_OUT - it makes me wonder if the problem is perhaps linked to the network? looks like the node may be trying to reconnect on a regular basis hence the constant Node ON messages... but I don't fully get why I don't receive the debug messages at that point as well...

EmmanuelLM avatar Dec 30 '20 15:12 EmmanuelLM

One other question / possibility why it could not work - I see the Max485 breakout board is a 5V logic vs the wemos d1 mini pro is 3.3v logic, which makes me wonder if the RX/TX are 'overdriven' at 5v, which could cause issues...?

EmmanuelLM avatar Dec 30 '20 17:12 EmmanuelLM

I have a Balboa BP2100G1. When I suscribe to Spa/# I have only the Spa/node information with a ON status. This night, the debug commande was added. It returns a -4 value. I've set the DC-DC converter to 5V to power the Wemos D1, is it right ? Is it possible A and B wires inverted ?

Hi Everybody,

I am very happy to find this topic! :). I have the same Balboa BP2100G1 control panel. Could you explain where i can plug Wemos D1 to the panel? The J34 wifi socket? And the DC-DC converter, is it coming from Led 12V? Could you give me some more information about wiring? Thx in advance

pengemetal avatar Dec 30 '20 18:12 pengemetal

@EmmanuelLM Ok, so your cable seems to be good. Maybe the wifi distance is your problem but in this case, you may still see the RECONNECT message. What's the Reconnect reason when the node reconnects? How many millis has the node been running? Or do you ONLY see Node Online?

@pengemetal Yes, you are right, the hook up documentations is rather sparse ;-) The stock display has a 4 pin molex-type connector with +12...15V, GND and A+B. All connections are on the wire and needed. Please also see the referenced https://github.com/ccutrer/balboa_worldwide_app/wiki#physical-layer for further details. The LED 12V supply for the RGB lighting in the spa is NOT being used.

Testing for correct cabling to the SPA, you can also hook up a USB TTL UART to the RO Pin of the Max485 and bridge RE/DE to GND. You should see plausible data at 115200 8N1.

cribskip avatar Dec 30 '20 18:12 cribskip

Hi, I don't see the reconnect message, and spa/debug reports -1 (when it does), with a spa/rcv of 254.

EmmanuelLM avatar Dec 30 '20 19:12 EmmanuelLM

Just for testing, please swap a and b

cribskip avatar Dec 30 '20 20:12 cribskip

@EmmanuelLM Ok, so your cable seems to be good. Maybe the wifi distance is your problem but in this case, you may still see the RECONNECT message. What's the Reconnect reason when the node reconnects? How many millis has the node been running? Or do you ONLY see Node Online?

@pengemetal Yes, you are right, the hook up documentations is rather sparse ;-) The stock display has a 4 pin molex-type connector with +12...15V, GND and A+B. All connections are on the wire and needed. Please also see the referenced https://github.com/ccutrer/balboa_worldwide_app/wiki#physical-layer for further details. The LED 12V supply for the RGB lighting in the spa is NOT being used.

Testing for correct cabling to the SPA, you can also hook up a USB TTL UART to the RO Pin of the Max485 and bridge RE/DE to GND. You should see plausible data at 115200 8N1.

Thank you for your answer! Just one more question: Could you help mi about relays wiring? What are they doing? Thx

pengemetal avatar Dec 30 '20 21:12 pengemetal

Just for testing, please swap a and b

Will try, i'll also hook up a usb ttl for kicks! Did you see my other comment about the max485 being a 5v chip?

EmmanuelLM avatar Dec 30 '20 21:12 EmmanuelLM

@EmmanuelLM 5v is OK for newer chip revisions since a few years. Unless you took a trip to the museum you should be fine.

@pengemetal the relays in the picture were to switch on external lamps. Then for J29 (power shedding of the heater) meanwhile, they are near to useless because I've attached a good and cheap heat pump and disconnected the internal heater (code to come)

cribskip avatar Dec 31 '20 06:12 cribskip

I am back with a new cable and still the same issue.... I also noted that the node timeouts every few seconds from the mqtt broker (Mosquitto) and that going to http://ip/update also produces a ERR_CONNECTION_TIMED_OUT - it makes me wonder if the problem is perhaps linked to the network? looks like the node may be trying to reconnect on a regular basis hence the constant Node ON messages... but I don't fully get why I don't receive the debug messages at that point as well...

Hi EmmanuelLM, Does the wifi signal strong enough ?

Magfel avatar Dec 31 '20 09:12 Magfel

Hi, Wifi is good, i am a few meters away from the router, I have also tried switching A & B with the same result. The one other difference I can think of vs the native code is the change mqtt.connect to take into account authentication so mqtt.connect("EspSpa", "login", "password")

I have a usb - ttl coming later today so will do a step by step to ensure my tub is actually producing something (the display works so I think the answer is yes) and work my way backwards to diagnose the issue... if helpful to anyone, this device seems to be able to do it all! https://www.ebay.co.uk/i/202172720183

EmmanuelLM avatar Dec 31 '20 11:12 EmmanuelLM

News from the front: it works!!!! The issue was the RS485 to TTL module that I was using, I ended up swapping it over to a "ARCELI TTL To RS485 Adapter 485 Serial Port UART Level Converter Module 3.3V 5V" and it now works flawlessly. I will push over some changes to the doc to add a diagram and help other people who might come across here.

The only last issue I have is the wemos d1 mini pro does not 'boot' by itself with the current power rail, I need to first connect it to a usb power supply and then it works as expected (including resets...) - how strange...

EmmanuelLM avatar Dec 31 '20 16:12 EmmanuelLM

@EmmanuelLM thanks for the update and great it works. Rather strange with the power supply. PR welcome 😅

cribskip avatar Dec 31 '20 19:12 cribskip

Hi, I have started making changes to the code, mainly to deal with the following:

  • remove the need for D1 with the RS485/TTL converter
  • add support for Home Assistant autodiscover support
  • deal with spurious temperature readings (not sure if that was just me?)
  • shuffle the mqtt message structure and add more debug info I migrated the files to PlatformIO as I find it easier to develop on that - this does mean the source file is not in the same location as yours and I have not yet figured out how to make a pull request from alternative folder locations... once I do, I will send PRs You can see changes here in the meantime: https://github.com/EmmanuelLM/esp8266_spa/blob/master/src/esp8266_spa.ino If you go to the root of the fork, you will see I also updated the documentation, I will send a PR for that

EmmanuelLM avatar Jan 03 '21 21:01 EmmanuelLM