Sensor reading to variable

Trying to do stuff based on user shaking device.

I have tried for hours to store sensor data in a variable to no avail.

I start the poller and have tried using the single reading node, sensor data direct to variable, formulas, convert to string … nothing.

I can output the sensor data in a text field, so the device is certainly not broken. I just can’t figure out how to store in a variable.

Please help.

Never mind, solved it by plugging into a page mounted event.

Alas, I was thinking this could run in the background but no such feature yet.