Black Lives Matter. Please consider donating to Campaign Zero's mission of ending police violence in America.

Arduino Yun + Motion -> Plotly

I am sending data (analogRead) from my Arduino Yun (bee hive monitoring) to a Plotly graph using a sketch based on the example.

Now I want to add the number of changed pixels (%D) from a webcam using Motion (

I tried passing an argument from Motion (%D) to the Arduino sketch using BridgeClient via a python script triggered as an on_motion_detected event, and to send it to Plotly in the same way as the analogRead data, but that seems to block the communication between the sketch and the Linino.

Is there a way to directly send the Python argument to the Plotly graph without passing it first to the Arduino sketch?

(Another possibility would be to regularly import a .csv created by Motion, into the plot. But I didn’t figure out how to get that import working either.)