|
Post by fehknt on Sept 22, 2020 15:58:27 GMT -8
Seems very similar to the problem Fletch posted about but the port seems consistent on both ends as 1883 in my case.
put the stacktrace into esp exception decoder and got:
PC: 0x400d6b4c: MQTTreconnect(bool) at /home/pi/SDL_ESP32_WirelessSmartGardenExtender/SDL_ESP32_WirelessSmartGardenExtender.ino line 394 0x400d6b4c: MQTTreconnect(bool) at /home/pi/SDL_ESP32_WirelessSmartGardenExtender/SDL_ESP32_WirelessSmartGardenExtender.ino line 394 0x400dbe05: setup() at /home/pi/SDL_ESP32_WirelessSmartGardenExtender/SDL_ESP32_WirelessSmartGardenExtender.ino line 782 0x400e9aaf: loopTask(void*) at /home/pi/.arduino15/packages/esp32/hardware/esp32/1.0.4/cores/esp32/main.cpp line 14 0x4008a6d1: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143 EXCVADDR: 0x00000000
The serial monitor lines just before panic:
MQTT_PORT=1883
Attempting MQTT connection...client name=SGSWireless-87b4
failed, rc=-2 try again in 2 seconds
Attempting MQTT connection...client name=SGSWireless-76cc
failed, rc=-2 try again in 2 seconds
Attempting MQTT connection...client name=SGSWireless-9cd7
failed, rc=-2 try again in 2 seconds
Attempting MQTT connection...client name=SGSWireless-67f5
failed, rc=-2 try again in 2 seconds
Attempting MQTT connection...client name=SGSWireless-36f2
failed, rc=-2 try again in 2 seconds
Guru Meditation Error: Core 1 panic'ed (IntegerDivideByZero). Exception was unhandled.
Any advice? Thanks!
|
|
|
Post by fehknt on Sept 22, 2020 18:55:12 GMT -8
Oh it looks like MQTTreconnect(true) is explicitly supposed to reset the device with j = 343 / 0; after 5 attempts.
On the PI side in testSGSSystem.py I get (and similar connection refused on the SGS2.py):
Traceback (most recent call last): File "./testSGSSystem.py", line 27, in sendCommandToWireless req = requests.get(myURL,timeout=30) File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get return request('get', url, params=params, **kwargs) File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, **kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.86.2', port=80): Max retries exceeded with url: /setSingleValve?params=admin,1,1,20 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xf62d5ad0>: Failed to establish a new connection: [Errno 111] Connection refused')) ########################### Wireless Extender 192.168.86.2 NOT RESPONDING ###########################
|
|
|
Post by SDL on Sept 25, 2020 16:30:56 GMT -8
Have you set up your WiFi connection the SGS system?
BP
|
|
|
Post by fehknt on Sept 26, 2020 14:25:19 GMT -8
Yes, the SGS board connects to the WiFi but then resets every few seconds (the first post has the serial logs). I can reset the board and get back to the WiFi setup but as soon as I complete that setup, it connects successfully but enters a continuous reset loop.
|
|
|
Post by fehknt on Sept 29, 2020 8:16:32 GMT -8
Just got the replacement SGS2 board -- it ran the test OK but something seems to have gone wrong after running sgsconfigure and has entered the same reboot loop after failing MQTT 5 times
|
|
|
Post by SDL on Sept 29, 2020 9:53:08 GMT -8
OK. Do you have your Raspberry Pi running SGS2?
I'm thinking mosqqitto is not running on your Raspberry Pi. That's the error I would expect if it were not.
With SGS running, try this command in an additional terminal window:
mosquitto_sub -d -t SGS/#
This shows all the mosquito MQTT traffic.
Note: I **think** you may not have the right IP address in sgsconfigure.
Is this our SD Card you are running?
BP
|
|
|
Post by fehknt on Sept 29, 2020 21:03:50 GMT -8
oh, I assumed that the mqtt server was part of the SDL supplied software... Nowhere in the docs does it say to install an MQTT server Once I set up a local MQTT on the Pi everything started working. (This is my own SD card.) Things seem to be running mostly now but I had to remove the Color() call on SGS2.py:459 because Color wasn't a known function. Seems to operate OK without it but it also doesn't seem to blink an LED every 5 seconds either. I do seem to be getting sensorValues though, so that's the critical part!
|
|
|
Post by SDL on Oct 2, 2020 8:09:53 GMT -8
|
|