What is the outline of the Roon API use case?

Would there be any benefits to porting node-roon-api to Rust and / or Swift?

If you like just do :+1:
In my eyes the only benefit is a different programming language.

All my Roon Extensions and also those of @Jan_Koudijs are written in Javascript as far as I know.

Best DrCWO

If there is a benefit probably depends on what you want to achieve. If you just want to solve a problem then the Node.js API might be the quickest route. If you want a challenge and the route is part of the goal then porting the API to your favorite language can be an interesting option.

Coincidentally I’m currently working on a Rust port. I already open sourced the code so you might have a look if you are interested.

Reason for me to start this port is to learn the Rust programming language by getting my hands dirty. There is a bit more information in the README.md file.

1 Like

It’s not that easy.

I support a python version, but it uses the undocumented layer underneath the supported node api.

I didn’t write the initial version, but I know the author started off trying to use the node api via python - but gave up after finding it difficult to make reliable.

So I’d suggest using node if you can, python if you can”t or don’t want to - and if you want to write a new language wrapper - don’t underestimate the work involved.

1 Like

Habe you ever tested this with micro python on a ESP32 Wrover?

1 Like

I haven’t. Don’t have any experience of this, but at a quick glance:

Pyroon depends on a websocket_client library, so I imagine that would be one challenge.

It also uses the threading library which might be another.

For micro python I read: Once the network is established the socket module can be used to create and use TCP/UDP sockets as usual, and the urequests module for convenient HTTP requests.

Looks quite standard. I will see if I find something about threading…

Thanks DrCWO

The roon api uses websockets protocol - so you need support for that rather than http or normal sockets.

I think there is a micropython library, but it’s not the same as the one I use on Python, so the code is likely to need porting to a new library.

Thank you for your assessment.
Best DrCWO