@djmvt, i’m curious what happened after you installed the higher node version. Do you have plugins that do not support node 8 or 10 or any other reason?
I updated yesterday the Telegram plugin (to 1.1.13) on my node 4.6.2 Pimatic system. The plugin didn’t load and i had to downgrade to version 1.1.11. After the downgrade Telegram worked again.
For me MySensors is blocking the upgrade to node 10. There is a pull request that makes the plugin v10 compatible. So i’m waiting for the developer for a new release.
-
pimatic-telegram@1.1.14
-
@dan, by releasing a plugin with a good fix but no support for node 4.x, node 4.x user can’t update anything anymore (due to way Pimatic handles updates). So i was thinking the updater should be smarter. I see a few ways to help users/plugins that are on node v4 and want to upgrade node v4 compatible plugins (incl Pimatic!) and the development of new / upgraded plugins with node 8/10 features
- the updater knows witch node version Pimatic is running. It checks plugins for node v4 compatibility and doesn’t offer to update plugins that do not support v4.
- Make the plugins updates selectable in the gui
- Do manual patching of plugins, faking pimatic updater by editing package.json version info, etc.
I would prefer the first option (no room for errors:))
-
@bertreb You are making valid points. However these changes should be implemented in the Pimatic framework (As far as they are not available yet).
Because of your comments I just realized I also forgot to update the package.json file for pimatic-telegram for the minimum required node version, so it will be checked during install. I will make this change asap.
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
@mwittig is on point. We also do welcome you to fork pimatic on Github and make a contribution
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
@bertreb said in pimatic-telegram@1.1.13:
@djmvt, i’m curious what happened after you installed the higher node version. Do you have plugins that do not support node 8 or 10 or any other reason?
I updated yesterday the Telegram plugin (to 1.1.13) on my node 4.6.2 Pimatic system. The plugin didn’t load and i had to downgrade to version 1.1.11. After the downgrade Telegram worked again.
For me MySensors is blocking the upgrade to node 10. There is a pull request that makes the plugin v10 compatible. So i’m waiting for the developer for a new release.After installing the higher node (10.x) pimatic wasn’t able to install for some reason (had to do with dependencies being outdated as far as I could see) but since I had a busy night I didn’t look any further how to fix that. What I saw was that homeduino also had some issues on higher node.js versions (mostly because of an instable serialport version) and since my pimatic setup relies for about 70% on homeduino I decided to go back to the latest 4.x version of node.
Had a few minor issues with huezll after that but was able to fix that by copying the backup I made of my plugins to the running system.
I will check in the coming weeks on my test raspad with node 10+ and pimatic to see if I can get everything to work and to stay stable.
But I’m also testing with other domotica solutions on a second raspad to see how other developers implement stuff.
-
Homeduino was recently updated to support node v10. So that part should work (see Homeduino node10)
The older serialport 2.x is used in serveral plugins and blocks upgrades to higher node versions than v4. I introducted a new smartmeter plugin (with some extra features) just to get passed the blocking version of serialport in the older (not maintained) smartmeter plugins. -
@bertreb said in pimatic-telegram@1.1.14:
Homeduino was recently updated to support node v10. So that part should work (see Homeduino node10)
The older serialport 2.x is used in serveral plugins and blocks upgrades to higher node versions than v4. I introducted a new smartmeter plugin (with some extra features) just to get passed the blocking version of serialport in the older (not maintained) smartmeter plugins.Ah ok, will do a test run on the raspad then, maybe this weekend. Gonna try a clean install of raspbian, node and pimatic to see how it runs. (because installing pimatic with node 10.x gave me errors on my running system)
-
@bertreb said in pimatic-telegram@1.1.14:
- the updater knows witch node version Pimatic is running. It checks plugins for node v4 compatibility and doesn’t offer to update plugins that do not support v4.
I have changed Pimatic core to check for node version required by latest released plugin against installed node version. Intended behaviour of the fixture would be:
- incompatible updates would not be pushed to the list of “to be updated” plugins.
Big IF: Plugin devs need to ensure the minimum node version is listed in package.json
"engines": { "node": ">=8.0.0", ... }
@mwittig will need to review my PR and approve. I have only done a dummy test on my dev by mocking a lower node version installed.
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
In general:
The discussion is starting to branch off from the pimatic-telegram release, and is becoming more about node compatibility.
Let’s open a different topic / discuss in the appropriate topics re node > v4 and plugin compatibility"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
Very nice!
I tested your PR. Some results:
On my node 4.6.2 pimatic the new plugin manager solves show incompatible plugin updates. So my installed pimatic-telegram@1.1.11 is not showing up anymore as a possible upgrade.
On my node 10.16.3 test system I changed a plugin package, to get a minimum required node version 20. In the same package I lowered the installed version number.
On the update page the plugin is shown as a possible update, that shouldn’t be because I don’t have node 20 installed (yet).
Is it the way I test or something else? -
@bertreb this could not happen in a production environment, unless the user hacks a package as you did.
The change in pluginManager pulls package info such as version and required engine.node version from the NPM repository, and then compares requested (NPM package.json) node.engine.version against environment node version.In your case it sees an upgradeable package:
(HACKED local package.json version < NPM package.json.version) => upgradeable)
(HACKED local package.json engine.node version is higher BUT not evaluated)Unless I do not understand correctly.
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
@bertreb Should not be necessary as we are only interested in the required node version listed in the upgrade package on the remote site. Then again, my logic is not necessarily logical .
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
@bertreb said in pimatic-telegram@1.1.14:
Thanks, I will downgrade to 1.1.11.
Hi. I’m quite newby with node js… Could you please tell me how to downgrade to 1.1.11. I already have the ZIP on my pimatic/node-modules and have replaced the main files. Althouh I get get “1.1.11” when i see the plugin list it does not work. I have already reboot pimatic, and verufy the token and ChatID, but I still get the “Could not find an provider…” error when creating a rule because the predicate “send” does not appear.
Than you very much!!
-
sudo systemctl stop pimatic cd ~/pimatic-app/node_modules sudo rm -rf pimatic-telegram npm install pimatic-telegram@1.1.11 sudo systemctl start pimatic
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
@dan WORKING!!!
Thank you very much!!
-
@villariezo said in pimatic-telegram@1.1.14:
@dan WORKING!!!
Thank you very much!!
Great to hear! Enjoy!
"Screw the captain. It's the engineer running the ship!"
pimatic-telegram, pimatic-tts, pimatic-woox, pimatic-lg-smart-tv, pimatic-spotify, pimatic-wakeuplight and some not-announced plugins -
hi, i installed pimatic from scratch and activated telegram plugin. i just cant set a telegram receiver device…the class is not available. manually adding in config also doesnt work