Skip to content

antoniovalentini/openneato-logview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UDP Log Viewer

Important

This entire codebase was written by AI in a single lazy evening because I needed the tool and couldn't be bothered to build it properly. It works for me, but use it at your own risk. I take no responsibility for anything it does or doesn't do. Not intended for production use.

A local web app that receives syslog UDP packets and displays them in a real-time browser-based log viewer. Tailored for OpenNeato — custom firmware for Neato robot vacuums that streams structured logs over UDP.

Dark terminal-style log viewer with color-coded severity levels

Features

  • Parses RFC 3164 syslog format (<PRI>hostname: message)
  • Structured view for OpenNeato JSON payloads — CMD, REQ, and EVT rows with expandable detail panels
  • Color-coded severity: CRIT, ERROR, WARN, NOTICE, INFO, DEBUG, RAW
  • Filter tabs (ALL / CMD / REQ / EVT) and a live search box
  • Raw / Parsed toggle to see the original UDP packet
  • Auto-scroll that pauses when you scroll up
  • Clear button wipes the log and the server-side ring buffer
  • Keeps the last 500 lines in memory — a freshly opened tab gets recent history

Install & Run

Requires Node.js 18+.

npm install

Port 514 requires root on Linux. Use --udp-port to pick an unprivileged port instead:

# Development (no root needed)
npm run dev -- --udp-port 5140

# Or on port 514 with sudo (preserves PATH so npm is found)
sudo env "PATH=$PATH" npm run dev

Then open http://localhost:3000 in your browser. The HTTP port defaults to 3000 and can be changed with --port:

npm run dev -- --port 8080 --udp-port 5140

Production build

npm run build
node dist/server.js --udp-port 5140

OpenNeato setup

In your OpenNeato firmware configuration, point the syslog destination at this machine's IP address and the chosen port. OpenNeato sends standard RFC 3164 packets with a JSON body:

<PRI>hostname: {"t":...,"typ":"command"|"request"|"event","d":{...}}

The viewer automatically detects the JSON structure and renders CMD / REQ / EVT rows with timing badges and expandable detail panels.

Testing without hardware

Send test packets with nc:

# Structured OpenNeato-style packets
echo -n '<134>openneato: {"t":1000,"typ":"request","d":{"method":"GET","path":"/api/status","status":200,"ms":12}}' | nc -u -w1 127.0.0.1 5140
echo -n '<134>openneato: {"t":1001,"typ":"command","d":{"cmd":"GetState","status":"ok","ms":23}}' | nc -u -w1 127.0.0.1 5140
echo -n '<133>openneato: {"t":1002,"typ":"event","d":{"category":"history_start","mode":"spot"}}' | nc -u -w1 127.0.0.1 5140

# Plain syslog (falls back to flat rendering)
echo -n '<131>openneato: i2c timeout' | nc -u -w1 127.0.0.1 5140

# Non-syslog packet (appears as a magenta [RAW] line)
echo -n 'not a syslog packet' | nc -u -w1 127.0.0.1 5140

Syslog severity mapping

PRI % 8 Level Color
0–2 CRIT red
3 ERROR red
4 WARN amber
5 NOTICE blue
6 INFO green
7 DEBUG gray
RAW magenta (parse failed)

Run tests

npm test

About

Local web app that receives syslog UDP packets and displays them in a real-time browser-based log viewer

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors