Skip to content

10 Troubleshooting

Resinchem edited this page Feb 16, 2024 · 6 revisions

Troubleshooting Issues

As this firmware is still relatively new and is still a work in progress, it has only been tested with a small set of hardware. The preferred hardware (and most tested) is:

  • Wemos D1 Mini
  • TFMini-s board version 1.4 or 1.8.1 (1.8.1 preferred - this is version currently sold on Amazon)

A few other users have reported success with a NodeMCU ESP8266, but due to the wide variety of these boards by different manufacturers, testing every combinataion simply isn't possible and I likely won't be able to offer any support for hardware that I do not have.

But here are some of the most common problems and potential resolutions:

The firmware won't flash (initial installation)

  • Disconnect the TF-Mini: To flash the initial firmware, the serial port is needed. The TFMini sensor also uses the serial port, so the firmware cannot flash if the TFMini is connected. Disconnect the TFMini during the intial flash, then reconnect the TFMini before recycling the power to the controller.

  • Assure you have selected the right COM port: Unplug and controller from the USB port and using something like Device Manager or similar (or the refresh button on the flashing software it if has one) to see what COM port appears when you connect the controller to the computer. Be sure this is the port you are selecting. Assure all the other settings match what is shown on the Initial Installtion wiki page

  • Try holding down a controller button: While this normally only applies to the ESP32, you can try holding down the boot/EN/reset/flash button (different boards have different buttons and labels) to put the board into flashing mode. Hold down the button, connect the USB cable (continuing to hold down the button) and start the flash. When the flashing sofware reports "Connecting...", release the button. You might have to try different buttons if your board has more than one. Again, this is normally only required on some ESP32s, but it is worth a try if the board simply won't connect and flash.

  • Try a different board: Unfortunately, there are a lot of cheap cloned boards out there and it is possible you just have a bad board (or even a batch of bad boards). I have had issues where three out of a set of five boards simply would not flash. If you have multiple boards, but they were all part of a single order from a single seller, you may have to try ordering new boards from a different seller.

I don't see the mobile hotspot for onbording or can't join it (first time setup)

After flashing the firmware (and erasing the flash during that step), but before onboarding your controller on your wifi, the controller should broadcast a local hotspot 'ESP_ParkingAsst'. Please see the wiki page First Time Setup and make sure you have followed all the steps listed there. But if you still aren't seeing the hotspot, or cannot connect to it for onboarding:

  • Assure you are relatively close to the controller and nothing is blocking the signal. The hotspot being broadcast by the ESP8266 is a very weak signal. You likely are not going to see the hotspot from across your house or if you have the controller in some sort of signal blocking enclosure.

  • The hotspot only broadcasts for a short time. For security reasons, if no device connects within approximately 6 minutes the hotspot shuts down. Reset or power cycle the controller to start the hotspot broadcast again.

  • Assure your phone or other device is staying connected to the hotspot. Since the hotspot does not offer Internet connectivity, some devices will immediately try switching back to another wifi network. Android normally prompts you and you must select to stay connected to prevent your phone from switching back to a normal wifi network.

  • Assure you don't have any settings (or temporarily turn them off) that prevents connections to an 'unsecured' network. This hotspot is only used for the onboarding process and is disabled after you connect to your normal wifi... and it only broadcasts for a very short range (and has no Internet connectivity), so it is highly unlikely your network will be 'hacked' while onboarding your device.

  • Assure the TFMini is properly connected at this point. The TFMini uses the serial port and communication with the serial port occurs as part of the startup process. While this shouldn't prevent the hotspot from starting, it's better to go ahead and connect the TFMini. It will need to be connected immediately after the onboarding process anyway.

  • Be sure to enter an IP address of 192.168.4.1 in the browser of the device that is connected to the hotspot

  • Finally check the controller and see if you notice that the onboard LED is continously or rapidly blinking. This is an indication that the board is in a 'boot loop' state, continously rebooting. This is normally a result of a bad or corrupted flash. Remove the TFMini and try flashing the firmware again. If you continue to get a boot loop after flashing, you may need to try a different board (see above). Also assure the board you are using has at least 4MB of flash. The firmware will not fit on a board with less than that.

Can't get to the web settings site (after intial installation and onbording)

  • Assure the device is actually on your wifi: Check your phone or other mobile device for broadcasting newtorks. If you still see an 'ESP_ParkingAsst' hotspot being broadcast, this means the controller did not successfully join your network. The hotspot will not appear when the controller succssfully joins your network. If the hotspot is showing again, repeat the onboarding process, assuring your password is correct... including any capitilization.

  • Duplicate device name: Do you have more than one parking assistant (or are attempting to add a another one)? Each device must have a unique name assigned during the onboarding process. The default name for the first device is parkasst. This name is used not only to help you identify multiple installations when using the web interface, but is also used for a number of network issues, including wifi hostname and MQTT client name. Attempting to have multiple devices on the nework with the same name can cause a number of potential issues with all of those devices. First, if adding more than one device, all devices other than the first one must be running version 0.41 or later (this was the first version to support multiple devices on the same network). If your first install is still running v0.40 or earlier, then the name parkasst is used for that device and all new devices need to have a different name. Unfortunately, if you can't reach the web interface, you'll have to reflash the firmware for any controllers with duplicate names and specify a unique name during the onboarding process.

  • Assure you are using the right IP Address: You'll need to use your router or other utility to locate the IP address of the device on your network. Again, see the bottom of the First Time Setup wiki page for more details. If you've come to this section because the web interface previously worked, but has stopped, be sure the controller hasn't been given an new IP address by your router. You may want to consider assigning a reserved or static IP address to the controller via your router to prevent the IP address from changing in the future.

  • Assure the TFMini is connected: As mentioned above, the connection to the TFMini is checked during the boot process. If the connection fails, it shouldn't stop the web server from running, but connect the TFMini if you haven't at this point just to be sure.

  • Be patient: As mentioned elsewhere in this wiki, please remember that the web server is running on a tiny ESP8266 which isn't a 'server powerhouse'. The ESP8266 is also handling other processes at the same time, so the web site may take a few seconds to appear or process any requests. In addition, after rebooting the controller, it can take anywhere from a few seconds to a minute or more for the web server to respond. This depends primarily on how long it takes the controller to join your wifi (and MQTT server if enabled). This can be due to a number of factors, including the strength of the wifi signal. Once you see the boot process complete via the LED lights (see The Boot Process), the web server should be available.

LED Lights do not respond or are inconsistenly flickering

If the LED lights do not respond or light up, first assure you can get to the web settings page. If you cannot get to the web settings, then the device isn't booting properly. Try the other troubleshooting steps above first. The LED lights are never going to respond if the board is not succesfully booting. But if you can get to the web site, then there are some different troubleshooting steps depending on what you may or may not be seeing with the LEDs.

  • No LEDs ever come on at all (even during the boot): If you do not see any LEDs at all, even when powering up the board (and you can get to the settings web site), then you need to check the wiring to your LEDs. Assure you have a good 5V signal (running direct from the power supply and not through the controller board or ESP). Assure you haven't reversed polarity on your voltage connections. If everything is wired properly and the board is booting, you should at least the first 30 pixels of the LEDs light up as part of the boot process. If you aren't seeing the boot process LEDs, then either the wiring is wrong or the board is not completing the boot up process.

  • Only a single pixel or two light up: Assure you've wired the correct end of the WS2812b LED strip. Remember that data only travels one direction with the LED strips, indicated by a small arrow on the strip. If you make your connections at the wrong end, the first pixel may light up, but the signal cannot travel along the rest of the strip. You will need to rewire the strip from the opposite end.

  • Lights flicker or otherwise act 'weird': Did you opt to omit the logic level shifter? There seems to be an endless online debate about whether a logic level shifter is truly needed or not, and I am not going to rehash that here. But flickering or otherwise misbehaving LEDs are almost always a result of a signal problem. While you might have other LED installs where the signal line is multiple feet and work just fine without a shifter, other installs might exhibit an issue with just a few inches of signal line. If your LEDs flicker or act incorrectly, then install a logic level shifter or a sacrificial pixel. End of story and I won't be entertaining any debates on whether a shifter is needed or not. That is my only troubleshooting advice. If you do have the shifter installed and are still seeing the issue, check your wiring and also assure that you wired the shifter correctly (5V one side, 3.3V on the other - GPIO pin to the 3.3V side, line out to the LEDs on the 5V side).

  • Boot LEDs light up but do not repond after that: If you are seeing the normal boot process LEDs correctly, but the LEDs do not respond afterwords, the problem is almost surely the sensor. If the sensor is not getting a valid distance reading, then the LEDs will not respond. If you are using a TFMini-s, then check your wiring and assure you did not reverse the TX/RX lines to the controller. If you are attempting to use any other sensor, then you will likely never be able to get a response with the firmware as written. The communication protocol for the TFMini-s and TFMini-Plus are very specific and those are the libraries and protocols used in this firmware. It WILL NOT work with an ultrasonic sensor, nor is it likely to work with any other LIDAR or similar sensor. If you truly want to use a different sensor, then you will need to fork, clone or otherwise copy the source code and modify it for your sensor.

My system doesn't respond after an upgrade

Some upgrades have to rewrite the flash to add new features. In some instances, this is planned, required and mentioned in the release notes. When this occurs, you must onboard the system to your wifi again and re-enter all your settings. This was more prevalent in earlier releases and should rarely happen with more current releases. However, if you find the system is not responding after an upgrade and reboot, use your phone or other mobile device to see if the "ESP_ParkingAsst" hotspot is being broadcast. If so, this means that your configuration file was overwritten (or corrupted) by the upgrade. Simply onboard your system again, per the wiki section First Time Setup. You will likely also need to re-enter your setup in the web interface.

For this reason, it is highly recommended that you record your current settings, especially items like parking zone distances, should you ever need to re-enter the values as part of an upgrade.

Help! My board is stuck in a boot loop!

A boot loop can generally be identified by a continous rapidly blinking LED on the ESP8266 board. It can happen for a number of reasons, but is generally a result of an incomplete or corrupted flash. Unfortunately, there isn't anything that can be done over-the-air when this occurs. The only choice is to try to reflash the board via USB cable like the first time install (being sure to erase the flash) and onboard the controller again. I've even had it happen to me just doing a point upgrade via the web firmware upgrade, where it flashed just fine to two other controllers, but put the third into a boot loop (identical hardware). A reflash of the firmware via USB will almost always fix the issue. If it happens when you first flash the firmware and continues to happen after multiple attempts, then the board may be bad (see the troubleshooting section above).

I'm still having problems

If you've followed the installation and setup steps in the wiki, have completed all the above troubleshooting steps, ARE USING SUPPORTED HARDWARE and are still having a problem, please feel free to post your problem or question in the discussion area. Please be as complete as possible in terms of your hardware and what steps you have already taken. Just saying "it doesn't work" isn't really helpful for me to assist you. I would ask that you do not open a new issue unless you are sure the problem is firmware related.

And I am sorry, but please don't request support or modification for other sensors. I specifically selected the TFMini-s for the reasons stated in both the YouTube video and blog article and I currently do not have the bandwidth to support multiple versions of the firmware. That may change in future but not anytime soon. Others have already created forked versions of this repo with the idea to support an ultrasonic sensor, so if that's what you want to use, then I suggest looking into those or consider forking or cloning this repo and making those changes yourself. Note that I have not tested, nor can I support, these other versions.