Some results of testing pimatic node_v8. I followed the instructions of @michbeck100 and did a clean implementation of pimatic#node_v8. I used the ‘empty’ config.json.
The cron plugin gave the error ‘Can’t reference ‘this’ before calling super in derived class constructors’. So I applied the changes needed to comply with CoffeeScript 2.x and it worked.
When writing a rule I got the error ’Cannot read property ‘ignoreCase’ of null’. I traced it back to the match function in matcher.coffee. This function is not handling a null value for the options parameter. In coffeescript 2.x, a null value is not automatically translated into a default value. I added code to set options the default value when called with ‘null’ value.
The error is gone and I can add rules.
Just saw the the response of @michbeck100 and i can use the new version
-
Pimatic & Node 8.0
-
@michbeck100 I’m having issues with
Attributes can only be added in the constructor
. Do you know how to do this?class RaspBeeSwitch extends env.devices.PowerSwitch constructor: (config, lastState) -> super(config.id, config.name) @config = config @deviceID = @config.deviceID @_presence = lastState?.presence?.value or false @_online = lastState?.online?.value or false @_state = lastState?.state?.value or off @addAttribute 'presence', description: "online status", type: t.boolean
-
@sweebee is this at pimatic runtime or during development? Maybe you have the wrong pimatic peer dependency?
pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten -
For the impatient of you, it seems that pimatic 0.9.43, which is the current stable release, seems to work with node 8, too. So you can install it with the instructions from https://pimatic.teamemo.com/Guide/Getting-Started.
Just install node 8 instead node 4 from here: https://nodejs.org/download/release/v8.15.0/node-v8.15.0-linux-armv7l.tar.gz
The rest of the installation should be the same.For the record: My node_v8 branch still has its right to exist as it upgrades to coffeescript 2 which moves pimatic to ES6 compatible code. Would be great if every developer still tests his plugins with these changes, even if this means that parts of the code must be updated.
pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten -
@sweebee said in Pimatic & Node 8.0:
@michbeck100 I’m having issues with Attributes can only be added in the constructor. Do you know how to do this?
This is an issue with the new Coffeescript version! As the new version is basing Coffeescript on ES6 it is not possible to access members before the object has been fully initialized by calling super(). This was possible, however, with Coffeescript v1. Unfortunately, the pimatic core heavily relies on this (legacy) feature of Coffeescript.
So, with the legacy coffeescript you can do:
class RaspBeeSwitch extends env.devices.PowerSwitch constructor: (config, lastState) -> @addAttribute 'presence', description: "online status", type: t.boolean super(config.id, config.name)
In short: Migrating the pimatic core to the new coffeescript version requires a rewrite of certain functions in the pimatic core.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
Currently, I’m running node v10.15.3 and everything seems to be working fine except for the https://www.npmjs.com/package/serialport package which is used in a few plugins.
Still looking for a fix. I’m getting a lot of
node-pre-gyp ERR!
errors -
@tim Thanks for the feedback.
Fixture for Homeduino is about to be released this week. Johnny-Five and MySensors will be the next I’ll look after. Regarding RfLink there is a pending issue to which I have added a comment with further details for the maintainer.
Are there any other plugins using serialport I am not aware of?
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@mwittig there is
pimatic-led-light
and my pluginpimatic-rfxcom
.Also
pimatic-zwave-usb
but for some reason that one is working fine for me. Which is really weird. -
@tim Thanks. Regarding pimatic-rfxcom it is on you It should be fine if you update the dependencies to rfxcom@0.2.2, however, I have not checked if the update implies breaking changes at the level of the rfxcom API.
Btw, as far as I can see pimatic-zwave-usb does not use serialport, but openzwave-shared implements a native driver for serial comms
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@mwittig said in Pimatic & Node 8.0:
In short: Migrating the pimatic core to the new coffeescript version requires a rewrite of certain functions in the pimatic core.
Would still be great if we could move to a newer version of coffeescript or even to plain ES6. What do you think?
pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten -
@mwittig Pimatic RFXCoM is updated & works again. Right now pimatic-led-light is the only problem for me, tried updating the packages but it did not start. Since I’m only using it for Hyperion I’ll look into creating a shellswitch
-
Hi! My RPi4 is arriving next weekend an I want to do a fresh install on Raspbian Buster.
Upgrade from Stretch to Buster everything runs with node 4.6.2.Can I now install node 8 next weekend or is the status still testing?
Thank you!
-
@00lex Would be a good chance to test, don’t you think? 😬 Because all configurations are different there won’t be any guarantee that it works for you, but chances are good.
pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten -
@00lex
You can even go with Node v10.15.3 (LTS). You can read more about here -
@bill-blacksoll said in Pimatic & Node 8.0:
@00lex
You can even go with Node v10.15.3 (LTS). You can read more about herethank you.
@michbeck100
would you advise to go with v10.15.3 too? -
@00lex I’m still on 4.x. But that’s just because I am too lazy to do the update. Just go for it and report back what happened.
pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten -
Okay i will report in 2 weeks. I want run both pi’s simultan and move step by step my stuff over.
-
@00lex said in Pimatic & Node 8.0:
I want to do a fresh install on Raspbian Buster
Note beyond, some plugins do not work with node v8/v10 (see earlier posts on this thread). Buster haven’t been tested yet either. If you don’t mind testing it though, please report back your findings
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
I did a complete installation of pimatic 0.9.48 on node 10.15.3 at the last weekend. It is running super!
-