I should have searched around. This was recently solved with a fork by BKeyport to Remote-Control here.
Read the statement by Michael Teeuw here.
Posts made by max64
-
RE: MMM-Remote-Control {fix monitor on/off} tvservice --> vcgencmd
-
MMM-Remote-Control {fix monitor on/off} tvservice --> vcgencmd
As was documented in this 8 month old thread, users having issues with the screen remaining blank after a MONITORON event solved the problem by replacing the exec statement to tvservice to instead exec vcgencmd in node_helper.js.
The below solution was posted -
Change:activateMonitor: function () { if (this.config.turnOffDisplay) { // Check if hdmi output is already on exec("/opt/vc/bin/tvservice -s").stdout.on("data", function(data) { if (data.indexOf("0x120002") !== -1) exec("/opt/vc/bin/tvservice --preferred && chvt 6 && chvt 7", null); }); } }, deactivateMonitor: function () { if (this.config.turnOffDisplay) { exec("/opt/vc/bin/tvservice -o", null); } },
WIth:
activateMonitor: function () { if (this.config.turnOffDisplay) { // Check if hdmi output is already on exec("vcgencmd display_power 1").stdout.on("data", function(data) { if (data.indexOf("0x120002") !== -1) exec("/opt/vc/bin/tvservice --preferred && chvt 6 && chvt 7", null); }); } }, deactivateMonitor: function () { if (this.config.turnOffDisplay) { exec("vcgencmd display_power 0", null); } },
However, the node_helper.js language has now changed since the above post to now be:
if (query.action === "MONITORON") { exec("tvservice --preferred && sudo chvt 6 && sudo chvt 7", opts, function(error, stdout, stderr){ self.checkForExecError(error, stdout, stderr, res); }); return true; } if (query.action === "MONITOROFF") { exec("tvservice -o", opts, function(error, stdout, stderr){ self.checkForExecError(error, stdout, stderr, res); }); return true; }
I’ve little experience with js coding, and wondered if anyone had already updated the above vcgencmd calls to work with the now current node_helper language? Or if someone could suggest what that language would now be so I don’t break anything ignorantly futzing around?
(Of course, the optimum would be to have a config option officially added to Remote-Control to have the option of using tvservice (as the default), or vcgencmd for those of us that tvservice doesn’t work so well for…)
Many thanks for any help provided.
(Using RPI Zero W / Raspbian Stretch Lite / Dell monitor via HDMI / serveronly mode)
-
RE: MMM-Nest-Status - New module for your Nest thermostats and protect smoke detectors!
Is Nest Lock status next on your agenda?
-
RE: MMM-Nest-Status - New module for your Nest thermostats and protect smoke detectors!
The right alignment text is perfectly centered over the dial. And the transparent background looks very very good.
Switched the token to the same for both modules and set the updateInterval to 1.5 minutes on both also. No null yet… Using your socket method there’s really no reason to use initialLoadDelay to stagger the API calls.
Many thanks.
-
RE: MMM-Nest-Status - New module for your Nest thermostats and protect smoke detectors!
Love the module. (and I tried them all)
2 humble requests:
-
Any way to add a transparency setting to the entire graphic so that an underlying background pic can partially show through? (Can that be done via custom.css?)
-
Can you add a “initial polling delay” config option? (similar to what is in the weather forecast module). My use case is a vertical monitor where I have two instances of the module loaded. One in top-right (Upstairs) and one in bottom right (Downstairs). Nest recommends polling of not more than once per minute with separate device per hour and token limits. I set up each instance of the module to use a different token, but as you can only set the ‘updateInterval’ it’s a challenge to get the two modules to stagger the calls. (And I think this is why i was getting “null” response displayed after a while… )
1 observation: when using the “alignment” option, both text and graphics are justified according to the setting. This is OK for “center” and even looks OK for “left”, but it does look odd for “right” where the thermostat graphic itself is flush right of the allocated space (e.g., top-right), but the title text is also right justified (.e.g., Upstairs) and not aligned with the graphic itself. IMHO the text above and below the graphic would look best centered with the graphic, and then the whole block is “aligned” according to the setting chosen.
Again…great work.
-