Unable to maintain serial connection when starting Dash


Hi all, been using Dash for a few days and ran into the following issue.

I am trying to communicate with an Arduino-like device (Teensy 3.5) over a serial connection (using PySerial). I have my Dash GUI working as a standalone script. I have my serial connection and data handling script working on my PC and my microcontroller. When I try to start the Dash app with the serial code now inside of the Dash app, I am unable to maintain the serial connection. Starting the serial connection in a callback doesn’t work either.

Does anyone have a working example of serial communication using Dash that doesn’t involve Dash DAQ? The Dash DAQ examples avoid showing the full source code around serial communication. What I have seen is the exact same code I that I’m using from an Arduino forum post in the DAQ Dash package as seen in this video from the Plotly YouTube channel, but no demonstration of the code working or when the serial communications are initialized when running the actual program. It also seems weird to be using code from an Arduino forum post in a commercial product, but I digress. I just want my GUI to work.

I found Dash when I was trying to create a GUI for my scientific equipment I use in my PhD work, but I was displeased to learn about the paid Dash DAQ project, as I suspect now that means most of the features I was looking to use might be purposefully inhibited or just not possible with regular Dash.