Aqualink PDA automation using RS485

ab.origine

Active member
May 10, 2017
28
Paradiso
Finally managed to hook up Pi with Jandy.
Web interface came up (although does not respond to any buttons) but I got error on ssh when I ran aquaweb.py :

[email protected]:~ $ sudo python /root/aquaweb/aquaweb.py
Creating screen emulator...
Creating spa emulator...
Creating RS485 port...
Creating web server...
Main loop begins...
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/root/aquaweb/aquaweb.py", line 293, in startServer
server = MyServer(('', PORT), webHandler)
File "/usr/lib/python2.7/SocketServer.py", line 417, in __init__
self.server_bind()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
SocketServer.TCPServer.server_bind(self)
File "/usr/lib/python2.7/SocketServer.py", line 431, in server_bind
self.socket.bind(self.server_address)
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
error: [Errno 98] Address already in use
__________________________________________________________

and this is the oputput when I started aquadisplay.py :

[email protected]:~/Downloads $ python aquadisplay.py
RS485 : opening RS485 port /dev/ttyUSB0
RS485 : synchronized
RS485 : ready
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 0310 02 10 00 22 1003 *** bad checksum ***
RS485 : --> c557 0c f0 6c 1003 *** bad checksum ***
RS485 : --> 1002 11 00 23 1003
RS485 : --> 1002 40 02 00c5570cf0 6c 1003
RS485 : --> 1002 12 00 24 1003
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 13 00 25 1003
RS485 : --> 1002 40 02 00c5570cf0 6c 1003
RS485 : --> 1002 18 00 2a 1003
RS485 : --> 1002 40 02 00c5570cf0 6c 1003
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 13 02 80bdbf989a 55 1003
RS485 : --> 1002 19 00 2b 1003
RS485 : --> 1002 40 02 00c5570cf0 6c 1003
RS485 : --> 0310 02 13 0280bdbf989a 55 1003 *** bad checksum ***
RS485 : --> 2c10 03 2c 1003 *** bad checksum ***
RS485 : --> 1002 40 02 00c5570c6c03100200010b00 1e 1003 *** bad checksum ***
RS485 : --> 1002 13 02 80bdbf989a5510021b00 2d 1003 *** bad checksum ***
RS485 : --> 0310 02 00 010b00 1e 1003 *** bad checksum ***
RS485 : --> 1002 13 02 003d3f181a 55 1003 *** bad checksum ***
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 1e10 03 10 021302003d3f181a10022100 33 1003 *** bad checksum ***
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 13 02 003d3f181a 55 1003 *** bad checksum ***
RS485 : --> 1002 22 00 34 1003
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 1003 10 02 1302003d3f181a 55 1003 *** bad checksum ***
RS485 : --> 1002 40 02 0045570c70100200010b00 1e 1003 *** bad checksum ***
RS485 : --> 1002 13 02 003d3f181a 55 1003 *** bad checksum ***
RS485 : --> 1002 28 00 3a 1003
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 1003 10 02 1302003d3f181a 55 1003 *** bad checksum ***
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 1002 2a 00 3c 1003
RS485 : --> 4557 0c 70 6c 1003 *** bad checksum ***
RS485 : --> 010b 00 1e 1e 1003 *** bad checksum ***
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 0310 02 30 00 42 1003 *** bad checksum ***
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 1003 10 02 3100 43 1003 *** bad checksum ***
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 1002 33 00 45 1003
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 0b00 1e 10 1e 1003 *** bad checksum ***
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 1003 10 02 3900 4b 1003 *** bad checksum ***
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 0310 02 3a 00 4c 1003 *** bad checksum ***
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 1002 3b 00 4d 1003
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 0110 02 48 00 5a 1003 *** bad checksum ***
RS485 : --> 1002 40 02 0045570c706c10 1e 1003 *** bad checksum ***
RS485 : --> 1002 49 00 5b 1003
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 1002 4a 00 5c 1003
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 1002 4b 00 5d 1003
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 1002 00 01 01 1003 *** bad checksum ***
RS485 : --> 1002 50 62 10100240020045570c100200010b00 1e 1003 *** bad checksum ***
RS485 : --> 1002 51 00 100240020045570c70 6c 1003 *** bad checksum ***
RS485 : --> 1002 52 00 64 1003
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 1002 53 00 65 1003
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 1002 00 01 0b001e1010025800 6a 1003 *** bad checksum ***
RS485 : --> 1002 40 02 0045570c70 6c 1003
RS485 : --> 1e10 03 10 025900 6b 1003 *** bad checksum ***
RS485 : --> 1002 40 02 0045570c706c1010025a00 6c 1003 *** bad checksum ***
RS485 : --> 1002 40 02 0045570c70 6c 1003
Traceback (most recent call last):
File "aquadisplay.py", line 134, in <module>
i. readMsg()
File "aquadisplay.py", line 66, in readMsg
self.msg += self.port.read(1)
File "/home/pi/.local/lib/python2.7/site-packages/serial/serialposix.py", line 501, in read
'device reports readiness to read but returned no data '
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

- aquadisplay.py seems to be working as I got real-time display on webserver but it does not respond to any buttons.
webserver mirrors Jandy control panel display though (whenever I enter menu on jandy control panel - webserver displays same menu and etc.)


Great job Earle and thanks for all your help!
 

efp3

Active member
Jan 19, 2015
32
Orange, CA
Seems there's a couple problems here.

The first, "error: [Errno 98] Address already in use" is simply saying that there is another web server running on your PI. Do you have Apache enabled? Or maybe another copy of aquaweb out there? That error itself is related to TCP ports, not the RS485 bits. A clean reboot on the PI and retry should get you up and running (you may need to disable apache if it's installed before doing this) with it being able to bind the port.

However, it looks like you have TONS of noise on your RS485 line. There should be basically no checksum errors (I haven't ever seen any, in fact, on my setup). This could be the wiring from the control head to the RPI, or it could be there really is noise on the RS485 bus (i.e. buried wires partially shorting, near a power conduit and getting EMF, etc.). With that much noise, transmitting the buttons back to the control unit may be hard or impossible.

Of course, with the RPI, power conditioning into the computer should be checked. I'm using an old RPI 1 B+ which could probably be powered by two sticks rubbed together, but the newer RPI3s need high quality, ~3A supplies to be really stable (and most USB adapters max out at 2-2.4A)...
 

ab.origine

Active member
May 10, 2017
28
Paradiso
So this is my current screen:

jandy1.jpg

it updates instantly as soon as something changes on Jandy control panel, but again the buttons are unresponsive.
The way it is wired now is: Jandy panel>RS485 USB dongle connected to middle two wires (D+ and D-)>Jandy control panel (I am using Cat5 wiring, twisted pairs are used for both Jandy to RS485 and Jandy control panel) and in terms of wiring, It is quite a bit of clutter in there, so that might be causing some noise.

I am using RPI B2 with "good" (Amazon Fire HD original) 1amp power supply and Raspberry only has a wifi dongle and RS485 connected to it's USB ports (tried 2.5 amp power supply as well and had no difference).

Rpi has a clean install of Raspbian and there is basically nothing else is enabled other than SSH and XRDP.
Tried restarting Rpi - but still the same

It seems as aquaweb.py is starting on startup, so I killed it with: sudo pkill -f aquaweb

Then tried: sudo python root/aquaweb/aquawebpda-v2.py
and this is the output I am getting:
Sat Oct 21 05:06:53 2017: Creating screen emulator
Sat Oct 21 05:06:53 2017: Creating RS485 port
Sat Oct 21 05:06:53 2017: Creating web server
Sat Oct 21 05:07:11 2017: IN cmd=00 args=44f7ff1002400200c5570cf0 *** bad checksum ***
Sat Oct 21 05:07:24 2017: IN cmd=00 args=5c10fb1002400200c5570cf0 *** bad checksum ***
Sat Oct 21 05:09:01 2017: IN cmd=10 args=02400200c5570cf0 *** bad checksum ***
----------------------------------------
Exception happened during processing of request from ('192.168.3.41', 60122)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 654, in __init__
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------
Sat Oct 21 05:09:29 2017: IN cmd=ff args=7ffd1002400200c5570cf0 *** bad checksum ***
Sat Oct 21 05:10:24 2017: IN cmd=7f args=1002400200c5570cf0 *** bad checksum ***
Sat Oct 21 05:10:45 2017: IN cmd=ff args=f61002400200c5570cf0 *** bad checksum ***
----------------------------------------
Exception happened during processing of request from ('192.168.3.41', 62846)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 654, in __init__
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------
Sat Oct 21 05:12:36 2017: IN cmd=00 args=fdb7ff1002400200c5570cf0 *** bad checksum ***

- and so on...
webserver has a different layout though, but again not responding to any buttons:
jandy2.jpg

Whenever I stop server and then run aquadisplay.py, it gives me endless output such as:
RS485 : opening RS485 port /dev/ttyUSB0
RS485 : synchronized
RS485 : ready
RS485 : --> 1002 40 02 00c5570cf0 6c 1003
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 21 00 33 1003
RS485 : --> 1002 40 02 00c5570cf0 6c 1003
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 22 00 34 1003
RS485 : --> 1002 40 02 00c5570cf0 6c 1003
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 23 00 35 1003
RS485 : --> 1002 40 02 00c5570cf0 6c 1003
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 28 00 3a 1003
RS485 : --> 1002 40 02 00c5570cf0 6c 1003
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 29 00 3b 1003
RS485 : --> 1002 40 02 00c5570cf0 6c 1003
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 2a 00 3c 1003
RS485 : --> 1002 40 02 00c5570cf0 6c 1003
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 2b 00 3d 1003



Any recommendations?

Thanks again!
 

efp3

Active member
Jan 19, 2015
32
Orange, CA
Since installing Rpi between Jandy panel and keypad, the RS-6 became really laggy :(
Can it be because of wiring?

That would be my guess. The remote (web or physical) needs to be polled to send back any button presses. If it doesn't see its poll, it can't send that button press...so it waits until the head unit retries several more times. I'd check for intermittent connectivity or any near-shorts near the screw terminals you're connected to. Maybe corrosion/etc. as well.

I use ~20' of CAT5e cable connected to a RJ45 jack I installed in the head unit (to make it easy to replace the cable...just buy another and plug it in, no worrying about wiring or anything) and haven't had any issues. I can't say how many wires I've got buried to the farthest spalink control unitl, but it's probably on the order of 75' there. No checksum errors or anything seen on my end.

As for the stream you're seeing w/the aquadisplay, that's expected (sans crc errors, of course). The head unit goes and polls every possible connected device in an infinite loop, which is what you're seeing.

I don't use the -v2 from johnnytaco, but I don't think he's modified much of the actual comms (seems focused on the ugly job of actually automating the PDA display into something usable by home automation systems), but again...if there's comms trouble button presses aren't going to work...
 

ab.origine

Active member
May 10, 2017
28
Paradiso
So...
Installed STP cable from RPi to Aqualink RS6 (7 feet).
Checked connections, everything looks good.

Keypad does not seem to be laggy any more.

Ran aquaweb.py and this is the output:


Creating screen emulator...
Creating spa emulator...
Creating RS485 port...
Creating web server...
Main loop begins...
Started httpserver on port 80
192.168.3.41 - - [27/Oct/2017 18:57:15] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:02:33] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:06:14] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:26:48] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:29:10] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:30:31] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:30:34] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:31:34] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:33:52] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:34:09] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:34:41] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:34:44] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:36:00] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:36:59] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:42:12] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 20:10:29] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 20:10:34] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 20:12:52] Request timed out: timeout('timed out',)
----------------------------------------
Exception happened during processing of request from ('192.168.3.41', 57140)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 654, in __init__
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------
----------------------------------------
Exception happened during processing of request from ('192.168.3.41', 57141)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 654, in __init__
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------

- Webserver works, but again soes not repond to any buttons. Screen updates with air and water temperature, as well as with any changes to menu when manually changing it from keypad.

- Ran aquawebpda-v2.py and this is the output:



Fri Oct 27 16:39:46 2017: Creating screen emulator
Fri Oct 27 16:39:46 2017: Creating RS485 port
Fri Oct 27 16:39:46 2017: Creating web server
----------------------------------------
Exception happened during processing of request from ('192.168.3.41', 59278)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 654, in __init__
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------
----------------------------------------
Exception happened during processing of request from ('192.168.3.41', 59279)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 654, in __init__
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------

- Ran aquadisplay.py and this is the output:


RS485 : opening RS485 port /dev/ttyUSB0
RS485 : synchronized
RS485 : ready
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 59 00 6b 1003
RS485 : --> 1002 40 02 40c5570cf0 ac 1003
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 5a 00 6c 1003
RS485 : --> 1002 40 02 40c5570cf0 ac 1003
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 5b 00 6d 1003
RS485 : --> 1002 40 02 40c5570cf0 ac 1003
RS485 : --> 1002 00 01 0b00 1e 1003
RS485 : --> 1002 60 00 72 1003
RS485 : --> 1002 40 02 40c5570cf0 ac 1003
RS485 : --> 1002 00 01 0b00 1e 1003
- etc...

Again, buttons do not respond at all in webserver.
Any ideas?

Thanks!
 

efp3

Active member
Jan 19, 2015
32
Orange, CA
So...
Installed STP cable from RPi to Aqualink RS6 (7 feet).
Checked connections, everything looks good.
Keypad does not seem to be laggy any more.

Great, so it looks like now the communications between the RPI and the head unit are good! The other problems below look to be (WiFi/Ethernet) networking related:


192.168.3.41 - - [27/Oct/2017 18:57:15] Request timed out: timeout('timed out',)
192.168.3.41 - - [27/Oct/2017 19:02:33] Request timed out: timeout('timed out',)
...
192.168.3.41 - - [27/Oct/2017 20:12:52] Request timed out: timeout('timed out',)
----------------------------------------
Exception happened during processing of request from ('192.168.3.41', 57140)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 654, in __init__
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------
----------------------------------------

Basically, neither app is happy with what's coming in and going out over the network, but are fine w/the RS485 connection.

I don't know of anyone who's seen this before, so I'd suggest some generic checks:
* Stop and disable any firewall running on the RPI
* Try a different browser. I've used Chrome on a phone and tablet, and Firefox on Ubuntu without incident.
* Go from wireless to wired connection, just for testing. If both wireless and wired are connected, remove one so only 1 network route would exist?
* Check that the IP your RPI gets is not in use by someone else. That would result in some weird behaviors similar to this...

Hope something there helps! You're almost there. The network is supposed to be the easy bit...

-EFP3
 

ab.origine

Active member
May 10, 2017
28
Paradiso
Tanks all for your help,

Earle, RPi is currently connected over wifi, I will try to get a long cable wired to RPi sometime this week-end and test it. WiFi signal strength is good tough (about 80%). I will try another dongle too, in case it helps.
* Tried different browsers (Chrome, IE, Edge, Opera) but all the same, buttons do not respond, although the screen updates to whatever the keypad changes too.
* I am using default Raspbian distro with no 3rd party firewall, so all ports/applications should be open by default.
[email protected]:~ $ sudo iptables -LChain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
* In terms of I address, it is on DHCP reservation and no other machine is using it on the network.

* ajohnson30 - I am running it as a root - sudo python /root/aquaweb/aquaweb.py
 

Enjoying this content?

Support TFP with a donation.

Give Support

efp3

Active member
Jan 19, 2015
32
Orange, CA
Are you running Raspbian? I've just done a complete update on my own pool controller (running Raspbian) and it's still OK for me.

Here's a way to see if it's network from your RPI to your PC, or something completely enclosed in the RPI:
* Start aquaweb.py on the RPI
* Bring up a web browser showing the PDA on your desktop
* Use your real remote, verify you can see the screen update even if the buttons on the web page don't work
* On the RPI, use CURL to try sending a keypress: curl -d key=up http://127.0.0.1/key.cgi
You should see a blank HTML output from the CURL command (<html><head><title>key<title></head><body>up</body></html>)

Does the selection move up? If so,the problem is wholly contained on the RPI. If not, it's networking between PC/RPI related...
 

ab.origine

Active member
May 10, 2017
28
Paradiso
Just did as you suggested.
aquaweb.py starts automatically on startup. - stopped in and started again.
When I point browser to RPi IP it gives me pool controller interface.
whenever I keyed in - [FONT=&quot]curl -d key=up [/FONT]http://127.0.0.1/key.cgi I got the following HTML output: [FONT=&quot]<html><head><title>key<title></head><body>up</body></html> [/FONT]- although the screen does not move up.
I guess this is the problem within RPI right?

I will reinstall a fresh image of Raspbian stretch and try afterwards.
Any specific steps you would recommend for installing pool controller?

Thanks for your efforts!
 

efp3

Active member
Jan 19, 2015
32
Orange, CA
Just did as you suggested.
aquaweb.py starts automatically on startup. - stopped in and started again.
When I point browser to RPi IP it gives me pool controller interface.
whenever I keyed in - [FONT=&quot]curl -d key=up [/FONT]http://127.0.0.1/key.cgi I got the following HTML output: [FONT=&quot]<html><head><title>key<title></head><body>up</body></html> [/FONT]- although the screen does not move up.
I guess this is the problem within RPI right?

I will reinstall a fresh image of Raspbian stretch and try afterwards.
Any specific steps you would recommend for installing pool controller?

Thanks for your efforts!

Good info. My guess now is that it's one of two things:

1) You have a powered on remote that's answering the Jandy control head before the RPI can do so, cancelling out any commands it sends since the head unit's already seen an "OK." I use the 2nd remote's ID so for me it's fine even with the (half-broken) remote I have turned on, but if for some reason your remote is set to the same address it could do this.

2) The TX portion of the RS485 adapter isn't actually driving the line (or not driving it hard enough) to be sensed by the head unit. Most USB units are *supposed* to drive whenever they get a byte in the TX FIFO, but the TTL-level ones actually require driving a 2ndary line to enable transmission even if you write data into its TX FIFO.

If #1, turn off your remote and try the CURL command again.

If #2, check wiring and if possible find a different model USB<->RS485 adapter.

I wouldn't bother reinstalling Raspbian at this point...
 

ab.origine

Active member
May 10, 2017
28
Paradiso
Earle, went ahead and disconnected pool remote.
whenever I ran curl -d key=up http://127.0.0.1/key.cgi
This is the output I received: <html><head><title>key</title></head><body>up</body></html>
The webserver screen now looks like this:
pool_web_when_disconnected.jpg
And again, buttons don't seem to be responding.

I guess it is RS485 adapter's fault?
Any recommendation for a good one?

Thanks!
 

efp3

Active member
Jan 19, 2015
32
Orange, CA
Looks like no transmissions are making it from the RPI to the control head. What's supposed to happen is the control head pings "Are you there XX?" where XX rotates through all possible connected devices. The RPI then responds "Yes, I'm here" and then the control head starts the display process and draws the (c) and version screen and then goes to the main menu. If the "I'm here" isn't seen, then on screen updates are sent since it doesn't know you're connected.

Sorry, but no suggestions on actual adapters. I just used whatever I could get off of eBay and it just worked for me.
 

efp3

Active member
Jan 19, 2015
32
Orange, CA
Earle, went ahead and disconnected pool remote.

I just re-read this and want to confirm that you just turned off the pool remote, NOT actually completely disconnected the wireless control box that's connected to the head unit, yes? Nothing pump-side needs to be disconnected, we just need any remote unit that could be transmitting to be silent for testing...
 

ab.origine

Active member
May 10, 2017
28
Paradiso
So what I did was I removed all four cables from Aqualink RS6 which go to the remote and left only two D+ and D- connected which go from RS6 panel to RPi's RS485.
rpi4.jpg
 

efp3

Active member
Jan 19, 2015
32
Orange, CA
I don't think you want to do that. Can you put them back in place and just turn off the power switch on your handheld remote? The CPLD in the remote control box may be needed by the head unit to even know it needs to look for this device...
 

ab.origine

Active member
May 10, 2017
28
Paradiso
My pool system consists only of RS-6 and wall remote (the one pictured in the previous post), I don't have any other handheld remotes.
So this is the type of RS6 I have:
41zKB-sEqTL.jpg

Which is connected to this:
7953_alrsonetouch_1.jpg



If you are referring to a remote similar to this -
$_58.JPG

my system does not have it.

Sorry for the confusion.
 

Enjoying this content?

Support TFP with a donation.

Give Support
Thread Status
Hello , There was no answer in this thread for more than 60 days.
It can take a long time to get an up-to-date response or contact with relevant users.