Error importing backup from vera
-
Hey guys,
I am new here and decided to move my 10+ year old vera installation to hass.
Decision based upon the activity in this forum, the new Reactor plugin and my NX584 alarm panel being supported by HA.
These have been challenging days where I learned a lot about docker and a lot of other new stuff.
On my path I now stumbled upon an error in importing the reactor files from a recent vera backup into my new rector docker container running on a Qnap TS473A.
The error is:
Fetching current rulesets...
Can't parse config from tools/verabackup.tar: SyntaxError: Unexpected token e in JSON at position 0
at JSON.parse (<anonymous>)
at /opt/reactor/tools/import_reactor_backup.js:382:22
at processTicksAndRejections (internal/process/task_queues.js:95:5)
The backup file must be from a current version of Vera Reactor. This file reports undefinedI am running Reactor 3.8 which is supposed to be the latest according to the auto update.
Any pointers anyone?
-
You are trying to feed the "tar" file into the importer. The tar file is an archive package that can contain multiple files. You need to un-tar the archive, and then feed the file that it unpacks into the importer.
If your archive file ends with
.tar.gz
(or.taz
or.tgz
), then un-tar'ing it is done like this:tar -x -z -v -f mytarfile.tar.gz
If your archive ends with
.tar
, then it's the same, just drop the-z
option.The latest Reactor for Vera is 3.9, which currently can only be installed from Github source; it is not in the Vera App Marketplace. However, this should not matter to your efforts here.
-
Ah. I was wondering... you have the wrong file(s), then. Reactor backups are one file with all ReactorSensors in the single file.
Use the "Download" link on the Backup and Restore page of the Reactor master device (important: right-click the link and choose "Save As..." -- instructions are there with the link), and you will download a single JSON file. That's the input to the importer.
Make sure the backup date being reported there is recent, also. If not, make a new backup first.
-
Aha, I should have been able to figure that out myself but I had no idea that option existed. Thanks anyway, I just imported the file and it worked!
Thanks for your excellent work, your software is very intuitive as compared to others.
Is there any advice or good practice for replacing the vera house modes?
-
Will you still be using your Vera? Are you moving to or adding another hub? If so, which?
-
I am trying to get rid of my Vera and moving to HA on Qnap.
It has been quite a challenge up to now especial since I have a NX584 so needed to set up a separate Pi for that but I keep on it.
My NX584 used to set the house modes and your reactor took care of the lights and the heating.
The house modes were nice although I would have preferred something more fancy like:
At home daylight
At home dark
At home alarm on
Away alarm on -
I just make rules for those things. I have a Rule Set called Dusk-Dawn, somewhat misnamed, and it has rules for Morning, Day, Evening, Night, and other time cycles. I then use Rule State conditions in other rules for each room to figure out what to do at those times in those rooms. There are also virtual switches for "Party Mode" (prevents lights from automatically being turned off at night, among other things); "Guest Mode" changes the light pattern on the main level/kitchen so guests don't have to walk around a dark house if they need a snack; etc.
Following that model, you could make a Rule Set called "House Mode", and have rules or virtual switches for each mode accordingly. The trick is to set up your rules so that modes can't "overlap" -- get your rules right so that it's not possible to be in two modes at once (e.g. can't simultaneously be Day and Night).
-
Hi Patrick,
Running MSR on docker.
Trying to import the reactor config from Vera.
My workflow is:
- docker exec -it reactor /bin/sh
- /opt/reactor # node tools/import_reactor_backup.js /var/reactor/reactor-config-backup.json vera
Got the following error: (After restarting, no reactor config from Vera was imported)
Fetching current rulesets...
Pass 1: Translating...
ReactorSensor 134 Auto (un)lock doors
Creating ruleset for ReactorSensor 134 Auto (un)lock doors
Creating rule rule-134
ReactorSensor 139 Auto Lights
Creating ruleset for ReactorSensor 139 Auto Lights
Creating rule rule-139
ReactorSensor 143 Somfy Control
Creating ruleset for ReactorSensor 143 Somfy Control
Creating rule rule-143
ReactorSensor 167 Blue Iris Control
Creating ruleset for ReactorSensor 167 Blue Iris Control
Creating rule rule-167
ReactorSensor 183 Towel and Heater Sch
Creating ruleset for ReactorSensor 183 Towel and Heater Sch
Creating rule rule-183
ReactorSensor 208 Geofencing Action
Creating ruleset for ReactorSensor 208 Geofencing Action
Creating rule rule-208
(node:639) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'split' of undefined
at fixConditions1 (/opt/reactor/tools/import_reactor_backup.js:185:82)
at /opt/reactor/tools/import_reactor_backup.js:44:13
at Array.forEach (<anonymous>)
at fixConditions1 (/opt/reactor/tools/import_reactor_backup.js:41:35)
at /opt/reactor/tools/import_reactor_backup.js:44:13
at Array.forEach (<anonymous>)
at fixConditions1 (/opt/reactor/tools/import_reactor_backup.js:41:35)
at /opt/reactor/tools/import_reactor_backup.js:438:13
at Array.forEach (<anonymous>)
at /opt/reactor/tools/import_reactor_backup.js:402:34
(Usenode --trace-warnings ...
to show where the warning was created)
(node:639) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:639) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.Any help will be appreciated. The worst case scenario is to re-do all the triggers and conditions in MSR from the ground up.
-
Are you using Vera's geofencing?
-
Yes I am using Vera Geofencing.
-
OK. Pull the updated docker container and try again.
-
I did a pull, now running 21257. Import seems to be working. The import tool created a bunch of rules from Vera Reactor. I will go through them 1 at a time to make the necessary changes. I will report back later if there are issues related to this.
Thanks again.
-
T toggledbits locked this topic on