Skip to content

aina-saa/maws2json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maws2json

Usage examples

Over serial line (stdin pipe)

Lets assume that Vaisala weather station is connected via RS232 to USB serial dongle in /dev/ttyUSB0:

cat /dev/ttyUSB0 | maws2json

Over TCP/IP stream (stdin pipe)

Lets assume thatVaisal weather station can be reached from IP address 10.10.10.10 in a port 5000:

netcat 10.10.10.10 5000 | maws2json

Convert data lines from a file

Lets assume that you have a file called "maws.dat" that contains MAWS datalines:

maws2json --file maws.dat

Read data and submit it to GCP Pub/Sub

Lets assume that you are reading again from serial port in real time:

cat /dev/ttyUSB0 | maws2json | sed 's/\"/\\\"/g' | xargs -I % gcloud pubsub topics publish projects/my-gcp-project-id/topics/maws --message='%'

About

Reads MAWS formatted data and converts it into JSON output stream.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors