Read the statement by Michael Teeuw here.
PIR and config.js
-
@sdetweil Use the whole node_helper.js except as I modify it? The only thing I would modify would be the sensor pin number… All else would stay the same?
Thanks -
@N6NG Do I modify it where it is or do I copy it into the config.js ? If I modify it where it is and change the sensor pin what would I put in the config.js?
-
@N6NG said in PIR and config.js:
@N6NG Do I modify it where it is or do I copy it into the config.js ? If I modify it where it is and change the sensor pin what would I put in the config.js?
all you are doing is changing the vcgencmd string
exec(“…”)
then everything else is normal in config.js
pin and commandType (I didn’t look at the module doc)
-
@sdetweil Ok Sam… thanks I’ll give it a try and see how it does… will let you know…
Dennis
-
@N6NG When I put the
exec (“/usr/bin/vcgencmd display_power 0”, null);
in the config.js I get an error. When I run npm run config:check it says that line has an Unexpected token
“/usr/bin/vcgencmd display_power 0”Dennis
-
@N6NG be careful copy/paste, the forum without code marker uses the slanted. single and double quotes. used by word processing apps
JavaScript expects the upright versions
-
@sdetweil I typed it in straight from the keyboard… No copy and paste at all… Still the still the same error…
Dennis -
@N6NG that doesn’t go on config.js, it goes in the node_helper.js to replace what it already does, if it’s different.
-
@sdetweil Oh… ok… thanks… I’ll do that.
Dennis