Git Product home page Git Product logo

live-serial's People

Contributors

rosenbrockc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jd-rd capricieuxv

live-serial's Issues

It is important to log unfiltered data

I don't know if there is an easy way to do this, but in my opinion, the filtering of the data to be logged should be an "opt-in" situation rather than an "opt-out". I frequently worry about loosing information due to filtering; I almost never worry about having data files that are too big. I think most people will think this way. Also, data is often pre-filtered by the sensor before it is sent to the serial port. There is usually no point in filtering twice.

Plot Labels

The plot labels don't show up when a sensor key is not specified. This is true even when there is only one sensor (un-keyed) per COM port. E.g.

[sensor.foot]
dtype=int,float
port=COM5
label=Foot Scale
value_index=1

[sensor.seat]
dtype=int,float
port=COM6
label=Seat Scale
value_index=1

[port.COM5]
port_baud=115200
port_timeout=0.01

[port.COM6]
port_baud=115200
port_timeout=0.01

File names for Un-keyed Sensors

Using the same config file as #3 the CSV files that get generated have long integer file names. Since the sensor name is in the config file and there is no ambiguity as to which stream is which, they ought to be named after the sensor.

port_encoding inconsistent

When I specify "port_encoding=ASCII" it appears to be ignored with the following output.

Using script args from config C:\Users\user\Documents\live-serial\prox.cfg. COM4: using {'port_parity': 'N', 'port_timeout': '0.025', 'port_stopbits': 1, 'encoding': 'UTF-8', 'virtual': False, 'delimiter': '\s', 'port_baud': '9600'} as config-set serial parameters.

Enhancement: Plot Multiple Columns/Sensors

It would be nice to be able to specify multiple columns in the value_index option of a sensor; this would produce multiple lines on the single subplot. Also, if an "aggregate" sensor (e.g., sum or difference of real sensor values) could be plotted in a subplot, that would also be nice. E.g.,

[sensor.total]
port=aggregated
label=Total Weight
sensors=sensor.foot,sensor.seat
function=numpy.sum

Auto-Port Names

When the ports are configured in a config file, there should be an auto option so that the explicit ports don't need to be listed. In that case, any ports present in the config file would be monitored.

"Live feed has no sensor data keys. Can't set up plotting."

Tried to run but got the error "Value Error: Live feed has no sensor data keys. Can't set up plotting." I don't know what "sensor data keys" are.

` [sensor.prox]
dtype=float
port=COM4
label=Proximity
value_index=0

[port.COM4]
port_baud=115200
port_timeout=0.025 `

This may be a different issue...
When I specify "port_encoding=ASCII" it appears to be ignored with the following output.

Using script args from config C:\Users\user\Documents\live-serial\prox.cfg. COM4: using {'port_parity': 'N', 'port_timeout': '0.025', 'port_stopbits': 1, 'encoding': 'UTF-8', 'virtual': False, 'delimiter': '\\s', 'port_baud': '9600'} as config-set serial parameters.

New directory not created when non-existent directory specified in the command line

The ideal behavior would be for a new directory to be created when the user specifies the data be logged to a directory that does not exist.

The following command
python liveserial\livemon.py COM4 COM5 COM6 -config capscalescale.cfg -refresh 10 -logdir C:\Users\TNiederhauser\Documents\logs\ThreeSensors -method last

Gives this error
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\TNiederhauser\\Documents\\logs\\ThreeSensors\\2246023103488.csv'

Font Size in Windows

For the plots in windows, the initial figure size is tiny and the font size on the axes and tick labels can't be read, even when the window is dragged bigger.

It would be nice if the plot options could just be specified in the config file; any valid matplotlib plot option should be accepted.

Error

-h from the command line brings up "-timeout". The setting in the config file is "port_timeout". Is this an inconsistency or are they 2 different parameters?

Global Configuration

The other script arguments (like -method, -refresh, -buffertime, etc.) should be options in the configuration file as well. Then a project could just use a config file and livemon.py would be called as:

python livemon.py auto -config project.cfg -log

Y-axis tick labels not updating

The y-axis tick are not updating as the data scales

[sensor.prox]
dtype=int, float
port=COM4
label=Proximity
value_index=2

[port.COM4]
port_baud=115200
port_timeout=0.3
port_encoding=ASCII
# port_delimeter=\s

[global]
wait=10
buffertime=5
logdir=path

Port Delimiter

White-space separated is common, but not the only option. Let the user specify what delimiter to use.

Is it possible to use 'serial_write()' function with livemon?

Sorry, actually it's not an issue, a question.
I use serial_read() and serial_write() to execute command on my target device from the host PC.
Also I want to save real-time log during executing my python script to control target device.
Is it possible to use logger and serial_write function concurrently?

Logging not working correctly

The serial port is putting out 2 values separated by a space. The configuration file is shown below.

[sensor.prox]
dtype=int, float
port=COM4
label=Proximity
value_index=2

[port.COM4]
port_baud=115200
port_timeout=0.3
port_encoding=ASCII
# port_delimeter=\s

[global]
wait=10
buffertime=5
logdir=path

The beginning of the log file is as follows. It shows the computer system time stamp twice and omits the first value in the serial data, which happens to be an integer.

Time,Value 1,Value 2
1.71905112267,1.71905112267,5.08333333333
1.74497765965,1.74497765965,6.72222222222
1.90651988983,1.90651988983,432.0
2.00033950806,2.00033950806,526.0
2.09400129318,2.09400129318,620.0

Documentation needs logdir

"logdir" does not show up on the documentation page for configuration file even though it can be used in a configuration file.

Encoding on Serial Port

It seems that everyone does not use UTF-8. My Arduino is returning encoding as UTF-16. The encoding ought to be a user-configurable option for each COM port.

Wait Time for Data Stream

Currently, the code waits for about 0.5 seconds before determining that there is no data available (and raising an exception). The user ought to be able to specify how long they are willing to wait for the hardware to initialize the stream.

Also, if the timeout is too low on the port configuration, then the data comes muddled (with new lines only showing up every few buffer flushes and the other data mixed up). If the timeout is made longer, then it works great. We either need to automate this, or add it to a wiki somewhere so the user can troubleshoot their session.

If the data is muddled then the code raises ValueError: Live feed has no sensor data keys. Can't setup plotting.

When logdir=path is not in config file code does not run

When logdir=path is commented out in the config file the follow error is raised and the code does not run.
ValueError: Live feed has no sensor data keys. Can't setup plotting. Try fiddling with the -wait parameter.

The config file is shown below.

[sensor.prox]
dtype=int, float
port=COM3
label=Proximity
value_index=2

[port.COM3]
port_baud=115200
port_timeout=0.3
encoding=ASCII
# port_delimeter=\s

[global]
wait=10
buffertime=5
logdir=C:\Users\TNiederhauser\OneDrive - NewVista Property Holdings, LLC\ProxData\test\

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.