implementing client side operation ? #334
Replies: 3 comments 14 replies
-
Do I understand correctly that you want to deploy the NiceGUI app to a server and access the serial port on the machine which connects to the server via browser? You may want to look at the Web Serial API (see https://stackoverflow.com/a/62987500/364388). You can execute any JavaScript. So this should be possible. |
Beta Was this translation helpful? Give feedback.
-
Ok so after trying for hours I still didn't make it :( the first thing I tried is to make a call to this javascript function here is my code from nicegui import ui, app
async def get_port():
port = await ui.run_javascript(f'navigator.serial.requestPort()', timeout=50,respond=True)
ui.notify(f'Port is : {port}')
ui.button('test', on_click=get_port)
ui.run(title='test') any idea why I'm not getting any response ? thanks |
Beta Was this translation helpful? Give feedback.
-
@falkoschindler thanks I will try to implement a custom component because the app must send and receive data continuously |
Beta Was this translation helpful? Give feedback.
-
Hello,
Is it possible to do some operations on the client side ?
For example I tried to make page for controlling devices using a serial com port (using pyserial library).
of course everything was working great on my computer because it was local, but when I deploy to external server it won't work.
is this possible ?
Thanks for your beautiful library and hard work
Beta Was this translation helpful? Give feedback.
All reactions