Close
0%
0%

Traffic Monitor

TrafficMonitor.ai built with edge ML for object detection and radar for speed monitoring

Similar projects worth following
TrafficMonitor.ai, the Traffic Monitor, is an open source smart city traffic monitoring software built with commodity hardware to capture holistic roadway usage. Utilizing edge machine learning object detection and Doppler radar, it counts pedestrians, bicycles, and cars and measures vehicle speeds.

Site: https://trafficmonitor.ai
Repo: https://github.com/glossyio/traffic-monitor
Docs: https://docs.trafficmonitor.ai
Chat: https://trafficmonitor.zulipchat.com/

Our mission is to democratize the power of AI tools to improve community safety and quality of life through the ethical and transparent use of these capabilities. The Traffic Monitor software and hardware are open source and available for anyone to build, modify, improve, and contribute back. We welcome your ideas and contributions at the Traffic Monitor GitHub repository!

Note: This project is in early-beta.  Updates to the software will likely include major, breaking changes without a way to reverse. We appreciate your patience and welcome contributions!



v0.3.0 has been released!  This update brings improved stability, many new metrics and telemetry, a new configuration system supporting any number of cameras and sensors to be pre-configured, air quality monitoring capabilities, and more!  Read the release announcement for full details.

tm-ondevice-dash-w-aq-2025-02.png

On-device dashboard with Air Quality

Portable Network Graphics (PNG) - 657.34 kB - 03/10/2025 at 18:27

Preview

events-counts-daily.png

Cumulative events by object for the day (resets daily).

Portable Network Graphics (PNG) - 28.98 kB - 03/10/2025 at 18:23

Preview

events-zone_radar-last5.png

Last 5 events detected and confirmed by radar.

Portable Network Graphics (PNG) - 393.29 kB - 03/10/2025 at 18:23

Preview

event-car-speed-stats-daily.png

Car object speed statistics for the day (resets daily).

Portable Network Graphics (PNG) - 31.14 kB - 03/10/2025 at 18:24

Preview

events-hourly-24-hours.png

Hourly events count by object for the last 24-hours.

Portable Network Graphics (PNG) - 63.47 kB - 03/10/2025 at 18:23

Preview

View all 8 files

  • 1 × Raspberry Pi 5 RPi5 4GB or 8GB
  • 1 × AI co-processor Coral TPU or Raspberry Pi HAT+ (Hailo8L)
  • 1 × Doppler Radar(s) OmniPreSense OPS243-A Doppler Radar Sensor
  • 1 × Camera(s) Raspberry Pi Cam 3 (Wide Angle), 1 or more
  • 1 × Enclosure Weather-resistant, 3D printable model available in the docs

  • 3D Print Controller in Home Assistant

    glossyio3 days ago 0 comments

    I thought folks, especially on Hackaday.io, would appreciate peering into my 3D printing Home Assistant. I have a 3D Printer set up in my garage to print the Traffic Monitor 3D Enclosure.  I am new to 3D printing as of a few months ago, so I had no idea when something would go wrong or what my settings needed to be for a successful print. 

    I also wanted local control and monitor, because I am very conscientious about privacy and security--which I hope is reflected in the open source TrafficMonitor.ai project. 

    Software and Hardware

    Some pieces I used to make this work:

    • I set up the Moonraker HA plugin to tap into all the sensors and controls for my Elegoo Neptune 4 Plus (moonraker on klipper, right??).
    • I used a couple TP-Link Matter plugs (and block internet access to those plugs at the router-level!!). 
    • I had to install the Matter HA plugin to gain control of those plugs, but they are now completely within my control within my network.
    • Ecowitt Wi-Fi gateway for temperature/humidity monitoring (I have some moisture sensors in my plants outside, so I just moved this gateway into my 3D chamber instead of my living room. 😆)
    • Cheap USB webcam attached to the Neptune 4 (enabled via SSH, beyond the scope here). 
    • Heater is just a small space heater I pipe into the custom-made chamber.
    • Custom-made chamber for the Neptune 4 Plus (I'll post on this another day).

    HA Dashboard

    Besides the obvious Neptune sensor cards I created power control and consumption monitoring cards.

    • Power control toggle switches (that are also the power meters) for each the printer and chamber heater.
    • Heater-control toggle to tell it to use the automation to keep it between the set high and low temperatures.
    • Keepwarm toggle to tell it to run the heater automation script to keep temp even when the printer is not printing. (I use this for pre-warming it on those very cold days).

    I had to utilize the Utility Meter helpers to calculate the KWh from the meters, but that worked like a charm!  Now I can tell exactly how much power I use (and money I spend) to print each component.

    3D Printer Home Assistant Controller and Monitor
    Local-only 3D printer monitoring and control via Home Assistant with a few meters and sensors. Able to control power and chamber temperature.

    HA Automations

    I created settable Helpers to set the high and low temperatures for those scripts (those slider bars). I then used the HA GUI to create a couple automation scripts:

    1. to turn on the heater; when it dropped below temp AND (status == printing OR keepwarm == true) 
    2. to turn off the heater; when it reached high temp

    Conclusion

    This setup has really helped me become more comfortable with the 3D printer and helps control the conditions (e.g. chamber temp), so I can figure out and control the environment to make the best prints.

    Although I use the Home Assistant dashboard primarily to monitor. When I need fine-tuned control or understanding of what's going on with the printer, I use the Klipper fluidd dashboard.  I will typically keep both windows up next to each other.

    As a side-note, tale of caution: I am sure this will resonate with folks interested in the recent news from Bambu Lab's attempt to "secure" your printer firmware. Last year, after I left my Chamberlain garage door openers connected to the internet and lost my local control and monitoring because they locked local MyQ API access after an unannounced firmware update, I am particularly caution about manufacturers doing this to equipment I have purchased.

    Cheers!

View project log

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates