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?
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.
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?
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.
Last Edit: Nov 23, 2021 4:56:59 GMT -8 by ncjay: added the bit about the MacBook
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.
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?
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?
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: