Finally found it: static class fields were not added to Node.js until version 12.0.0. Let me make some changes to support lower versions.
Ok, definitely a version support issue as mikee385 stated. I also found an easier way to control nodejs installations. Using fnm made the process a lot less painful. I've run into a new problem. I see the Panel as a device and can command it's status directly to Home,Away,Disarmed, but I can't seem to use Rule Machine to actuate the commands for automation purposes; I intend to use virtual switch on dashboard so I can set alarm status. No tile for Panel is included to make this happen otherwise.
Lastly, and I'm not pushing here, but is there any progress on a thermostat or garage (Linear) device for this integration? I have a CT100 and I notice an existing driver in the community that might be portable to the Vivint integration app.
I had honestly forgotten that I didnāt finish those. I noticed yesterday that the thermostat wasnāt done when I was looking into the version issue, but I hadnāt noticed the garage device, so thank you for pointing that out. Iāll try to put some time into it soon. Garage device is simpler, so Iāll likely work on that one first.
Oh.. thank u thank u thank u. I did the rule change again, somehow it just didn't seem to take the first time, but now it seems to be fine. Virtual Switching w/ dashboard definitely works, though Hubitat's aesthetics leave much to be desired. Look forward to Beta testing your device changes. Vivint really has no clue what they're missing out on. U'd think that enhancing customer experience and expanding automation control would be a selling point for them, but other than their alarm systems, they've been stagnant for years.
As an aside, I did a dash virtual button instead, because I don't think it makes good security sense to allow a disarm function on a dash w/o requiring a pin-code, as the alarm panel requires. Arming it, however, absolutely.
Again, mikee385 thank u for ur time, patience and promptness on these issues.
I just checked in a new version to GitHub that removes the static class fields. @user920 when you have a chance, can you please test it and let me know if it resolves the issues for you?
I tried w/ pi's default install and it threw an error that I couldn't copy down. I'm finding that fnm doesn't agree w/ pi, but Ubuntu seems fine. The problem I'm having in Ubuntu is get through the service setup part of the integration. I think different commands are needed to create and start a service in Ubuntu. I'm too new at pi to know how to override which version of nodejs gets installed via apt-get.
Still tryn...
Quick update... 10.17.0 up to 16.15.0 now seems to work just fine under Ubuntu. Service setup is still an issue.
Ok, got a VM pi running properly, and it's service did start, so the versioning issue has been fixed. I did not follow-up w/ the integration app to see if it still works (wrong subnet anyway), but given that the localhost test looks the same as before, we can assume integration is fine. Still stuck on the Ubuntu service install option.
Forgive me if I have no clue of how busy your life is when it comes to projects, but I'm curious as to what kind of progress you have on the Vivint devices.
Also, the integration changes you made seem to be holding up just fine on the pi setup, though I'm still at a loss for service setup under Ubuntu.
FWIW, Node v10.x has passed end-of-life by over a year (Maintenance ended 2021-04-30). If you're running any version 13.x or older or an odd number version older than 16.x, you're not likely to see any fixes and you could be putting your system at risk of a security issue.
If possible, you should try to upgrade to 14.x or 16.x (at least) if not 18.x.
I'd be fine with upgrading, if that were an actual option. Raspberry Pi refuses to upgrade to anything newer than 10.24.0 I've tried snap, nvm, fnm, and the end result is it thinks node doesn't exist, even though I can see the file. Ubuntu..., doesn't have this problem. The only thing stopping me from using Ubuntu instead is the lack of instruction on how to setup the service part.
Ok, found a solution to the node won't update past 10.24.0 issue. fnm, n, nvm, apt, and using nodesource bin distribution will not upgrade node for reasons related to how rasp is maintained. Using snap was the only way I found to bypass this issue, because it installs it's own separate version of node. The catch u can only go up to version 15.x in the normal channel, which is fine for what is needed. After that, the only issue is to make sure to change the path for npm from /bin/... to /snap/... in the hubitat-vivint.service file before installing it, or systemctl will error.
Hey mikee385, would this https://github.com/gouldner/SmartThingsPublic/blob/master/devicetypes/gouldner/rg-linear-gd00z-garage-door-opener-v2.src/rg-linear-gd00z-garage-door-opener-v2.groovy help with the garage door device info for Vivint?
No, but I appreciate the help. The Homebridge Vivint project has done all of the hard work; I just have to adapt it to handle the communication between Hubitat and Node.js.
Iāve made the changes and checked them into GitHub. Youāll need to update both the code on the Node.js server and on Hubitat.
Buuuut I can almost guarantee that it wonāt work, as I donāt have my own devices to test with. Would you mind trying it out and sending me any error messages that you see? We may also need to go through the debug logs on the server to make sure I understand what the Vivint servers are sending.
No prob. Node seems to work ok.
Updating HPM seemed to work, though it did not add the garage door device at first. Went into Vivint Integration App and toggled the debug and it add the new device. Seems to now respond to commands.
Not bad for a first test. Looks like we're 99.999% there. I post any changes in behavior.
app:2942022-06-13 23:50:13.720 debug[id:46, name:Front Door, type:Lock, battery:100, lock:locked]
app:2942022-06-13 23:50:13.710 debug[id:40, name:Side Door, type:Lock, battery:55, lock:locked]
app:2942022-06-13 23:50:13.709 warnUnknown device type GarageDoor for Vivint Garage Door. Skipping...
app:2942022-06-13 23:50:13.706 debug[id:37, name:Garage Door, type:GarageDoor, door:closed]
app:2942022-06-13 23:50:13.696 debug[id:36, name:Front Door, type:ContactSensor, battery:100, tamper:clear, contact:closed]
app:2942022-06-13 23:50:13.686 debug[id:35, name:Sliding Door, type:ContactSensor, battery:100, tamper:clear, contact:closed]
app:2942022-06-13 23:50:13.675 debug[id:34, name:Side Door, type:ContactSensor, battery:100, tamper:clear, contact:closed]
app:2942022-06-13 23:50:13.665 debug[id:33, name:Glass Break, type:GlassBreakSensor, battery:100, tamper:clear, glassBreak:clear]
app:2942022-06-13 23:50:13.656 debug[id:14, name:Panel, type:Panel, status:disarmed]
Force imported the vivint-integration and now it works.
app:2942022-06-13 23:57:30.466 infoCreated 8 devices
app:2942022-06-13 23:57:30.457 debug[id:46, name:Front Door, type:Lock, battery:100, lock:locked]
app:2942022-06-13 23:57:30.447 debug[id:40, name:Side Door, type:Lock, battery:55, lock:locked]
app:2942022-06-13 23:57:30.330 debugCreating Vivint Garage Door named Vivint Garage Door
app:2942022-06-13 23:57:30.327 debug[id:37, name:Garage Door, type:GarageDoor, door:closed]
app:2942022-06-13 23:57:30.317 debug[id:36, name:Front Door, type:ContactSensor, battery:100, tamper:clear, contact:closed]
app:2942022-06-13 23:57:30.306 debug[id:35, name:Sliding Door, type:ContactSensor, battery:100, tamper:clear, contact:closed]
app:2942022-06-13 23:57:30.294 debug[id:34, name:Side Door, type:ContactSensor, battery:100, tamper:clear, contact:closed]
app:2942022-06-13 23:57:30.282 debug[id:33, name:Glass Break, type:GlassBreakSensor, battery:100, tamper:clear, glassBreak:clear]
app:2942022-06-13 23:57:30.264 debug[id:14, name:Panel, type:Panel, status:disarmed]
As an aside, cause I'm more focused on the Garage and Thermostat devices, I've noticed that node is identifying regular cameras as doorbell cameras. I'm not making much of this since mine is currently offline, but I'm sure it's likely to affecting others.
Can you send me a PM with the contents of:
http://[ip address of your raspberrypi]:38283/snapshot
Iām not sure if thereās anything private in there, so a PM is probably safer in this case.
Thatāll help me configure the cameras better. I only have the doorbell camera, and I was speculating when I configured it separately from the normally camera.
Sent a PM in regards to the Garagedoor status going to Unknown when it is fully open. That state does not allow HSM to close the door.


