You could easily program a pi-zero or other mini to accept the otp text format using something like these
https://www.passwordstore.org/ https://github.com/tadfisher/pass-otp
Then to insert the pass... something like this to convert from QRCode if text format isn't available:
zbarimg -q --raw /tmp/canvas.png | pass otp insert some-new-otp
to retrieve
pass otp some-new-otp -c