Import question
-
Is the import feature supported by stock Vera or only open loop or is it both?
-
Luup Reactor's configuration format is the same for both Vera and openLuup, so the importer would be expected to perform identically on configurations from either platform.
-
Ok, so I a a bit confused. When you say make sure reactor is running are you speaking vera legacy reactor or MSR as well? When I execute node app.js to run MSR I no longer have the $ prompt at the end of the MSR log displayed. Do I issue the command from there? It If control c it kills the MSR session. Also the syntax, do you need <> and just the path of the backup file, or the filename as well? I left the name reactor-config-backup.json and I copied it into the tools folder as suggested in the doc. Sorry like I said I need some lessons in linux.
-
Good to ask these question; it helps clarify what needs to be in the instructions.
- You should start Reactor (MSR) using the background-support script. This is done by typing
nohup ./app.sh &
on the command line, while inside thereactor
directory. This will start Reactor in the background and keep it running, in a similar fashion to how openLuup is kept running a script. You can restart Reactor by typepkill node
on the command line. You can quit Reactor by typingpkill -QUIT node
. - Reactor on the Vera or openLuup does not need to be running when the import is happening.
- Once you have MSR up and running in the background, your command line is free to run the importer. Be sure to run the importer from the
reactor
directory as well (I've tried to be consistent about this):node tools/import_reactor_backup.js <path-to-import-file> <vera-id>
The<vera-id>
I refer to here is the string that follows theid
in thecontrollers
section yourreactor.yaml
configuration file; it'svera
by default, unless you changed it. - Once the import completes, restart MSR (
pkill node
) and then refresh your browser window. You should see a list of Rule Sets that corresponds to your ReactorSensors. Each Rule Set will contain a number of rules that the importer determined were necessary to express the Luup Reactor logic in MSR logic.
Make sure you read the "Getting Started" page in the docs, which highlights some of the differences between Vera Reactor and MSR, and will give you the new terms and definitions for things.
- You should start Reactor (MSR) using the background-support script. This is done by typing
-
Yes I did notice no lua as a difference. I will probably need to move some of my activity lua into vera scenes and handle it that way. Is lua going to be added or not in the forecast? I run some lua that has some conditional logic in it on its own. Will take a look at the import per your instruction a bit later. Thanks
-
Even if I implemented Lua, none of the Luup things often used with Lua from Vera for would be there. I may do something like condition action groups in the (not near) future, as that seems to be a common thread in Run Lua actions.
-
Ok, Import was successful. I will work around the lua with scenes for now. I only have it in a few spots. Condition action groups would be useful.
Thanks
-
having some issues importing, my guess is that my reactors on vera are a complete disaster, but thought i would ask:
/opt/reactor # node tools/import_reactor_backup.js tools/reactor-config-backup_so.json vera
Fetching current rulesets...
Pass 1: Translating...
ReactorSensor 182 RS-AUTO HOME MODE
Creating ruleset for ReactorSensor 182 RS-AUTO HOME MODE
Creating rule rule-182
(node:3881) UnhandledPromiseRejectionWarning: TypeError: (node.data.value || "").split is not a function
at fixConditions1 (/opt/reactor/tools/import_reactor_backup.js:94:53)
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:44:13
at Array.forEach (<anonymous>)
at fixConditions1 (/opt/reactor/tools/import_reactor_backup.js:41:35)
(Usenode --trace-warnings ...
to show where the warning was created)
(node:3881) 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:3881) [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./opt/reactor # node --trace-warnings tools/import_reactor_backup.js tools/reactor-config-backup_so.json vera
Fetching current rulesets...
Pass 1: Translating...
ReactorSensor 182 RS-AUTO HOME MODE
Creating ruleset for ReactorSensor 182 RS-AUTO HOME MODE
Creating rule rule-182
(node:3898) UnhandledPromiseRejectionWarning: TypeError: (node.data.value || "").split is not a function
at fixConditions1 (/opt/reactor/tools/import_reactor_backup.js:94:53)
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:44:13
at Array.forEach (<anonymous>)
at fixConditions1 (/opt/reactor/tools/import_reactor_backup.js:41:35)
at emitUnhandledRejectionWarning (internal/process/promises.js:168:15)
at processPromiseRejections (internal/process/promises.js:247:11)
at processTicksAndRejections (internal/process/task_queues.js:94:32)
(node:3898) TypeError: (node.data.value || "").split is not a function
at fixConditions1 (/opt/reactor/tools/import_reactor_backup.js:94:53)
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:44:13
at Array.forEach (<anonymous>)
at fixConditions1 (/opt/reactor/tools/import_reactor_backup.js:41:35)
(node:3898) [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.
at emitDeprecationWarning (internal/process/promises.js:180:11)
at processPromiseRejections (internal/process/promises.js:249:13)
at processTicksAndRejections (internal/process/task_queues.js:94:32) -
Open a PR in Mantis and post your Vera Reactor backup file as an attachment to it.
-
ok, done. very low priority as I'd rather you spend time polishing the builds than dealing with my clusterf**k.
-
FYI, the new release worked like a charm, than you
-
You're still going to have your work cut out for you. There's a lot of things MSR does differently. Expressions are high on that list.
-
T toggledbits locked this topic on Dec 31, 2021, 9:46 PM