ncjay
Junior Member

Posts: 71
|
Post by ncjay on Nov 22, 2021 12:55:14 GMT -8
The new Solar SkyCam unit here appears to be working:
- LEDs described in the documentation all light - Camera flash occurs every minute or so - its IP address becomes pingable shortly after the flash, then goes offline until the next flash (I assume power saving in effect) - as far as I know all software is up to date - testSkyCamRemote.py output is encouraging, I guess:
pi@SwitchDocLabs:~/SDL_Pi_WeatherSense $ sudo python3 testSkyCamRemote.py log: Sending CONNECT (u0, p0, wr0, wq0, wf0, c1, k60) client_id=b'' log: Received CONNACK (0, 0) Connected with result code 0 log: Sending SUBSCRIBE (d0, m1) [(b'SKYCAM/+/INFO', 0)] log: Received SUBACK log: Sending PINGREQ log: Received PINGRESP log: Sending PINGREQ log: Received PINGRESP
...but WeatherSenseMonitor.py is not providing the output blocks beginning with "Picture ID" described in the documentation.
I'm stumped, again. Where should I start looking for a solution?
thanks ncjay
|
|
|
Post by SDL on Nov 22, 2021 15:33:16 GMT -8
I would guess that the SkyCam is not hooked to the MQTT Port. I would disconnect your AP (so the SkyCam can not connect to your local network), connect to the SkyCam via the SKyCam AP and then reprovision the device. The MQTT port should be set to 1883 and not 0.
BP
|
|
ncjay
Junior Member

Posts: 71
|
Post by ncjay on Nov 22, 2021 17:14:45 GMT -8
Thanks, please clarify - I need to totally disable my wifi access point temporarily?
thanks ncjay
|
|
|
Post by doxidad on Nov 22, 2021 17:34:17 GMT -8
Power off your AP for about 5 minutes until the camera AP shows back up. Reset your parameters on the camera and make sure the port is set to 1883. I had this problem and discovered that the MQTT port never got set so it was using port 0. I tried to reset it a couple of times with no results and ended up re-flashing the ESP32 code modified to force the port. Once the port is set in memory their is not a problem. Switchdoc says that they have not had any problems like this. I programmed this with Chrome on a Samsung tablet. Switchdoc had not used that combination - what browser/computer are a you using?
|
|
ncjay
Junior Member

Posts: 71
|
Post by ncjay on Nov 23, 2021 4:55:37 GMT -8
Thanks. It occurred to me that maybe I could just take the the camera assembly out beyond the wifi's signal range and have the same effect - i.e. it wouldn't be able to connect. And thanks for letting me know it would take five minutes or so.
I was using Safari on an iPad to set the parameters. (I suppose I can take a MacBook out into the field with me, though, rather than the iPad.)
I read your thread and you indicate you accepted the default port 1883 when you did your provisioning. When I did mine, I explicitly typed in 1883. So perhaps neither one works!
I am also NOT using a prepackaged SD card. Well, actually, it began life that way but I've updated it multiple times since then.
And I'm going to run into problems re-flashing the ESP32 code, if it comes to that, since I can't manage to get the serial ports cooperating with the Arduino IDE on either my Mac or my Windows machine.
thanks ncjay
|
|
|
Post by doxidad on Nov 23, 2021 6:49:15 GMT -8
I did take the default 1883 on my original camera. I acquired another camera and explicitly typed in the 1883 - neither worked. That's when I forced the 1883 within the code and re-flashed. Once i had it working on both cameras I took the line of code that forced the 1883 and re-flashed again. Since the 1883 was already in non-volatile memory it still worked.
Are you using the Arduino IDE to communicate with the ESP32? I believe I had to load a USB->RS232 driver under windows for it to be seen properly. I'm not familiar with the Mac infrastructure.
|
|
ncjay
Junior Member

Posts: 71
|
Post by ncjay on Nov 23, 2021 11:35:24 GMT -8
OK, thanks. I haven't used anything yet to communicate with the ESP32 - I've only tried it with the SunAir board. Interesting about the RS232 driver, though. Another thread to pull if I need to.
thanks ncjay
|
|
ncjay
Junior Member

Posts: 71
|
Post by ncjay on Nov 23, 2021 12:17:20 GMT -8
Argh! This is frustrating.
I "disabled" the AP I was using on my router (I have two APs running). I verified that it was disabled from three different machines. I brought up the Camera unit, saw the SkyCam-xxxx AP available, then attempted to join it and .... "cannot join wireless network SkyCam-xxxx". On two different Macs, on my phone, and even on the iPad I used to provision originally. Any idea where I should go next?
It's always something!
thanks ncjay
|
|
ncjay
Junior Member

Posts: 71
|
Post by ncjay on Nov 23, 2021 12:58:15 GMT -8
Well. This time I went with my original idea of taking the Camera unit out beyond the reach of the house wifi. It goes much further than I thought!
I only had my iPhone with me, but was able to connect to the Camera's AP (after switching off iOS's "Private Address" option. I reprovisioned the camera unit, but still don't have an MQTT connection. I didn't really expect it to work.
Tomorrow I'll take a MacBook out with me and will try to use that to connect.
Is there a way to look from the pi to the camera to see the MQTT connections? Even if they're on port 0, as we suspect?
thanks ncjay
|
|
|
Post by doxidad on Nov 23, 2021 13:30:32 GMT -8
The problem is that the ESP32 only connects - sends the data - then disconnects. Happens fairly fast. using iftop - You may have to install this with apt *don't remember if I had to install this or not try sudo iftop -i wlan0 -P
I snagged this showing up showing a connection from my pi (WPI2) port 1883 connected to esp32-arduino and the the arduino sending back data to the same port.
WPI2.lan:1883 => esp32-arduino.lan:49643 0b 1.60Kb 411b <= 0b 0b 13.6Kb
You should be able to catch the connection - just have to make sure the connection is on port 1883
|
|
ncjay
Junior Member

Posts: 71
|
Post by ncjay on Nov 24, 2021 11:34:50 GMT -8
Today's results were mixed.
I repeated the camera unit reprovisioning away from my wifi signal, this time using a MacBook. I came back in, verified the unit had rejoined the home wifi, and ran WeatherSenseMonitor.py - and still no Picture stanzas appeared.
Then I used iftop, and caught a number of these shortly after each flash:
pi4-wx:1883 => skycam-c25d:54698 0b 32b 8b <= 0b 35b 9b pi4-wx:1883 => skycam-c25d:54699 0b 32b 8b <= 0b 35b 9b pi4-wx:1883 => skycam-c25d:54700 0b 32b 8b <= 0b 35b 9b pi4-wx:1883 => skycam-c25d:54701 0b 32b 8b <= 0b 35b 9b pi4-wx:1883 => skycam-c25d:54702 0b 32b 8b <= 0b 35b 9b
So the pi is using port 1883 to communicate with the SkyCam, and is getting data - right?
But I'm not seeing big payloads, at least not in the above capture.
Perhaps I have something misconfigured in software?
Thanks ncjay
|
|
|
Post by SDL on Nov 28, 2021 10:53:38 GMT -8
Ncjay,
Tell me more about iftop, where you got it and what it is doing for you. I'm really interested! Funny how much we learn from customers!
BP
|
|
|
Post by doxidad on Nov 28, 2021 12:22:33 GMT -8
sudo apt install iftop
|
|
ncjay
Junior Member

Posts: 71
|
Post by ncjay on Nov 29, 2021 10:49:13 GMT -8
Yes, everything I know about it is in the conversation with doxidad above.
Still stuck on getting the camera working, though...
thanks ncjay
|
|
|
Post by SDL on Nov 30, 2021 9:18:06 GMT -8
Is this a browser problem? We have provisioned many through Safari.
I'm going to update the main code to default to 1883.
BP
|
|