How do I change my Node ID in PyUAVCAN?


I am using the pyuavcan demo application as a starting point for my own demo application to get familiar with how uavcan works.
Currently I am trying to implement the Register-API, specifically the register.
How do I change the Node ID in the demo application? I couldn’t find any function to change it. I looked through this forum, the pyuavcan documentation and the pyuavcan source code. But there is no mention of changing the node id. The only thing I found was that the demo app mentions that the node id is assigned statically here and most applications would need it configurable.

Any help or pointers would be appreciated. Thanks.

We have a new demo that is not yet public but it should answer your questions better than the current one:

I expect it to go live in a few days assuming that the review is not going to take too long. To reproduce it locally, install the library and the Yakut tool directly from git:

pip install git+

(this command will also pull in PyUAVCAN as a dependency)

Thank you for your response.
I looked at the demo and it’s much clearer now.

I gave the demo a try but the node id wasn’t stored persistently. Writing a new node id via the register API worked and the new node id was in the response of the register call. But once i restarted the node it was back to the old id.
Did I forget something?

Sounds like you restored the original node-ID via environment variables at the second launch. Make sure to unset UAVCAN__NODE__ID.

Yes. That was it. Thank you again.