Git Product home page Git Product logo

evolver's People

Contributors

brandogw avatar cpmancuso avatar ezirayw avatar frederickjansen avatar mgalardini avatar nb-e avatar sarahl88 avatar vidyaap avatar zheins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

evolver's Issues

Consolidate evolver config and calibration config files

evolver_config.json contains:

{"ip": "192.168.1.37", "mac": "b8:27:eb:34:55:8a", "deviceName": "evolver-darwin"}

calibrations.json contains:

{"activeCalibration": {"temp": {"filename": "sample_tempcal.txt"}, "od": {"filename": "sample_odcal.txt"}}}

Could be consolidated into one file to simplify file structure

Communication issues with updated server code

I find this error when updating the code. Seems like there's still some thing I'm not setting up properly.

I'm currently using Master in both the DPU and Arduino branches.

od_135r,1000,_!

Traceback (most recent call last):
  File "/home/pi/evolver/evolver/evolver_server.py", line 246, in run_commands
    returned_data = serial_communication(command['param'], command['value'], command['type'])
  File "/home/pi/evolver/evolver/evolver_server.py", line 284, in serial_communication
    raise EvolverSerialError('Error: Response has incorrect address.\n\tExpected: ' + param + '\n\tFound:' + address)
evolver_server.EvolverSerialError: Error: Response has incorrect address.
	Expected: od_135
	Found:
od_90r,1000,_!
od_90b,32114,31657,31284,31869,31740,31508,
Traceback (most recent call last):
  File "/home/pi/evolver/evolver/evolver_server.py", line 246, in run_commands
    returned_data = serial_communication(command['param'], command['value'], command['type'])
  File "/home/pi/evolver/evolver/evolver_server.py", line 286, in serial_communication
    raise EvolverSerialError('Error: Response did not have valid serial communication termination string!\n\tExpected: ' +  evolver_conf['serial_end_incoming'] + '\n\tFound: ' + response[len(response) - 3:])
evolver_server.EvolverSerialError: Error: Response did not have valid serial communication termination string!
	Expected: end
	Found: 08,
od_ledr,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,2500,_!
od_lede,2500,2500,2500,2500,
Traceback (most recent call last):
  File "/home/pi/evolver/evolver/evolver_server.py", line 246, in run_commands
    returned_data = serial_communication(command['param'], command['value'], command['type'])
  File "/home/pi/evolver/evolver/evolver_server.py", line 286, in serial_communication
    raise EvolverSerialError('Error: Response did not have valid serial communication termination string!\n\tExpected: ' +  evolver_conf['serial_end_incoming'] + '\n\tFound: ' + response[len(response) - 3:])
evolver_server.EvolverSerialError: Error: Response did not have valid serial communication termination string!
	Expected: end
	Found: 00,
stirr,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,_!

Traceback (most recent call last):
  File "/home/pi/evolver/evolver/evolver_server.py", line 246, in run_commands
    returned_data = serial_communication(command['param'], command['value'], command['type'])
  File "/home/pi/evolver/evolver/evolver_server.py", line 284, in serial_communication
    raise EvolverSerialError('Error: Response has incorrect address.\n\tExpected: ' + param + '\n\tFound:' + address)
evolver_server.EvolverSerialError: Error: Response has incorrect address.
	Expected: stir
	Found:
tempr,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,_!
tempb,1967,1948,1938,1935,
Traceback (most recent call last):
  File "/home/pi/evolver/evolver/evolver_server.py", line 246, in run_commands
    returned_data = serial_communication(command['param'], command['value'], command['type'])
  File "/home/pi/evolver/evolver/evolver_server.py", line 286, in serial_communication
    raise EvolverSerialError('Error: Response did not have valid serial communication termination string!\n\tExpected: ' +  evolver_conf['serial_end_incoming'] + '\n\tFound: ' + response[len(response) - 3:])
evolver_server.EvolverSerialError: Error: Response did not have valid serial communication termination string!
	Expected: end
	Found: 35,
Broadcasting data
{'data': {}, 'config': {'lxml': {'fields_expected_incoming': 17, 'fields_expected_outgoing': 17, 'recurring': False, 'value': ['4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095']}, 'od_135': {'fields_expected_incoming': 17, 'fields_expected_outgoing': 2, 'recurring': True, 'value': '1000'}, 'od_90': {'fields_expected_incoming': 17, 'fields_expected_outgoing': 2, 'recurring': True, 'value': '1000'}, 'od_led': {'fields_expected_incoming': 17, 'fields_expected_outgoing': 17, 'recurring': True, 'value': ['2500', '2500', '2500', '2500', '2500', '2500', '2500', '2500', '2500', '2500', '2500', '2500', '2500', '2500', '2500', '2500']}, 'pump': {'fields_expected_incoming': 49, 'fields_expected_outgoing': 49, 'recurring': False, 'value': None}, 'stir': {'fields_expected_incoming': 17, 'fields_expected_outgoing': 17, 'recurring': True, 'value': ['15', '15', '15', '15', '15', '15', '15', '15', '15', '15', '15', '15', '15', '15', '15', '15']}, 'temp': {'fields_expected_incoming': 17, 'fields_expected_outgoing': 17, 'recurring': True, 'value': ['4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095', '4095']}}}

Data broadcast crashing

Noticed after doing a temperature calibration that the setup page was no longer updating values. Most likely caused by the broadcasting thread crashing due to serial communication issues with the server.

Add authentication token for cloud and dpu

Token for cloud communication should probably be set separately on the device, and integrate with HAPI auth (if possible). When creating a new device on the cloud, get a session token for it and input that through the touch screen of the evolver.
Token to communicate to DPU could be part of config file? Both evolver and DPU have to contain same token.

Server freezes during temp cal

During temperature calibration, during updating the temperature, the server freezes up. This is the output log from the server.

Output to arduino: xrNaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN, ! Received from arduino: temp2018,1980,1986,1997,1983,1961,1973,1972,1986,1954,1919,1956,1994,1957,1943,1969,end Output to arduino: we4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095, ! Received COMMAND Output to arduino: xr1517,1478,1484,1492,1481,1461,1472,1470,1485,1454,1419,1456,1492,1458,1442,1467, ! Error in running commands - relinquishing serial an integer is required (got type NoneType) Got command from BROADCAST Output to arduino: we4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095,4095, ! Error in running commands - relinquishing serial 'utf-8' codec can't decode byte 0xfe in position 0: invalid start byte Got command from BROADCAST

Fluidic commands not going through

When trying to send fluidic commands via the GUI. In this case, printed the value variable.

Received COMMAND
['13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '13', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0']
13
Task exception was never retrieved
future: <Task finished coro=<AsyncServer._handle_event_internal() done, defined at /usr/local/lib/python3.6/site-packages/python_socketio-3.0.0-py3.6.egg/socketio/asyncio_server.py:296> exception=TypeError("'NoneType' object does not support item assignment",)>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/python_socketio-3.0.0-py3.6.egg/socketio/asyncio_server.py", line 297, in _handle_event_internal
    r = await server._trigger_event(data[0], namespace, sid, *data[1:])
  File "/usr/local/lib/python3.6/site-packages/python_socketio-3.0.0-py3.6.egg/socketio/asyncio_server.py", line 325, in _trigger_event
    ret = await self.handlers[namespace][event](*args)
  File "/home/pi/evolver/evolver/evolver_server.py", line 51, in on_command
    evolver_conf['experimental_params'][param]['value'][i] = value[i]
TypeError: 'NoneType' object does not support item assignment
Received COMMAND

Dropped successive fluidic commands

If multiple fluidic commands are sent in rapid succession (say, at ~1 second intervals), some are currently (server version 1.1.1) being dropped. I have done limited testing, but I think in those cases the server send the previous command to the arduinos instead of the new one. The solution from the DPU side is to write the custom function so that all required fluidic events are collated and fired only once (which is how the example custom_script.py is written anyway).

Not sure what a good solution could be, apart from adopting a parsimonious approach at sending commands. Might be good to explicitly warn the users too (with a comment in the custom_script.py template).

Pump Calibration within GUI

New GUI react component for pump cals - entering numbers for flow rates for each pump, and how much time.

Server Crashing

xrNaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN, !
File "/home/pi/evolver/evolver/evolver_server.py", line 417, in broadcast
data = run_commands()
File "/home/pi/evolver/evolver/evolver_server.py", line 279, in run_commands
data = ping_arduino(config)
File "/home/pi/evolver/evolver/evolver_server.py", line 379, in ping_arduino
config_to_arduino(key, value, PARAM[key][0], ENDING_SEND, PARAM[key][2])
File "/home/pi/evolver/evolver/evolver_server.py", line 350, in config_to_arduino
SERIAL.write(bytes(output, 'UTF-8'))
File "/usr/local/lib/python3.6/site-packages/pyserial-3.4-py3.6.egg/serial/serialposix.py", line 537, in write
TypeError: an integer is required (got type NoneType)

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.