Skip to content

Conversation

@flatsiedatsie
Copy link
Contributor

No description provided.

@benfrancis
Copy link
Member

Thanks for the PR @flatsiedatsie!

Do you happen to know whether there were any major API changes in the jump from 0.57 to 1.5.0 which could cause problems? I assume the WebSocket client is only used by IPC to communicate with the gateway process, so should be relatively easy to test.

Unfortunately it looks like this PR has failed automated checks, but it may just be that a Python 3.7 package is no longer available on the ubuntu-latest test runner!

As an aside, I have upgraded the gateway from Node.js 10 to Node.js 20 and would really like to upgrade the Python version used too if that's something you might be able to help with? WebThingsIO/gateway#3141

Then we can upgrade gateway-addon-python to a more up to date version of Python too and get all this stuff working again.

@flatsiedatsie
Copy link
Contributor Author

flatsiedatsie commented Oct 31, 2025

If I remember correctly this was the only Python upgrade showstopper. Candle moved to 3.9 and then 3.11 (for Matter support) without any other changes being necessary.

Very happy with the change to Node 20 :-) I'm curious though: for me the old addons wouldn't run, so I had to install both Node 20 node 12. I added some code that lets addons choose which node version they want. This was was necessary to allow Zigbee2MQTT to run, which needs a recent version of Node.

Do you happen to know whether there were any major API changes in the jump from 0.57 to 1.5.0 which could cause problems?

As you can see in the code, they added another parameter to the function call.

@benfrancis
Copy link
Member

@flatsiedatsie wrote:

If I remember correctly this was the only Python upgrade showstopper. Candle moved to 3.9 and then 3.11 (for Matter support) without any other changes being necessary.

👍

Very happy with the change to Node 20 :-) I'm curious though: for me the old addons wouldn't run, so I had to install both Node 20 node 12. I added some code that lets addons choose which node version they want. This was was necessary to allow Zigbee2MQTT to run, which needs a recent version of Node.

What do you mean by wouldn't run? Currently many add-ons are filtered out of the list of add-ons available to install if addon-list says the add-on needs Node.js 10 but the gateway says it's running Node.js 20 when retrieving the list. Many add-ons need to be individually tested with Node.js 20 and then have their manifests updated in the add-on list. If there are other issues you've experienced then please file issues for those.

As you can see in the code, they added another parameter to the function call.

👍

I think we may need to increase the Python version at https://github.com/WebThingsIO/gateway-addon-python/blob/master/.github/workflows/pythonpackage.yml#L16 in order to get the Python package GitHub action to run on this repo, because Python 3.7 is no longer available on ubuntu-latest. In #3141 I suggested version 3.11.2 since that is the current version in Debian Bookworm (though we may want to upgrade to Trixie soon!).

@benfrancis
Copy link
Member

@flatsiedatsie Does this work? I'm aiming to release 2.0.0 today and it would be great to include this new version of gateway-addon-python in the gateway. What is a good add-on to test it with that's in the WebThings Gateway add-on directory?

I'm hoping that if we change https://github.com/WebThingsIO/gateway-addon-python/blob/master/.github/workflows/pythonpackage.yml#L16 to 3.11 it will make the GitHub Action work.

@flatsiedatsie
Copy link
Contributor Author

that's in the WebThings Gateway add-on directory?

I don't know. But you could manually install a Candle addon through github to do a quick test? I have some recent ones that only work with python 3.11, so those should be useful.

Try this one, it only has a 3.11 release:

https://github.com/createcandle/buttoninput/releases/download/0.2.2/buttoninput-0.2.2-linux-arm64-v3.11.tgz

Note: this is 64 bit. Is the Gateway 2.0.0 using 64 bit?

Will you be releasing a disk image of some sort? I'd love to try it out!

What do you mean by wouldn't run?

My vague memory is tht once I set the node version to 20 for the gateway, addons from the Webthings list that were compiled for v10/v12 wouldn't run. So as a work around Candle now comes with multiple Node versions installed:

12 - for legacy addons
20 - for the controller and new addons
24 - for Zigbee2MQTT

I created a hacky system where a preference for a certain version can be set if the manifest.json, and the gateway uses that to invoke the addon with the specific node binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants