moejetz / mmm-toggle-by-mqtt Goto Github PK
View Code? Open in Web Editor NEWShows/hides modules and turns on/off hdmi display based on mqtt command.
Shows/hides modules and turns on/off hdmi display based on mqtt command.
Hi! I'm using your MM module and loving it so far, thanks for your work!
Unfortunately I recently run into issues with it. All of a sudden I realized it was no longer turning on and off my monitor, and found this related error in the logs:
0|magicmir | [2021-09-26 15:54:09.290] [ERROR] Whoops! There was an uncaught exception...
0|magicmir | [2021-09-26 15:54:09.294] [ERROR] TypeError: exec is not a function
0|magicmir | at Class.turnDisplayOff (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_helper.js:85:9)
0|magicmir | at MqttClient.<anonymous> (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_helper.js:63:26)
0|magicmir | at MqttClient.emit (events.js:200:13)
0|magicmir | at MqttClient._handlePublish (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_modules/mqtt/lib/client.js:1162:12)
0|magicmir | at MqttClient._handlePacket (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_modules/mqtt/lib/client.js:351:12)
0|magicmir | at work (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_modules/mqtt/lib/client.js:283:12)
0|magicmir | at Writable.writable._write (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_modules/mqtt/lib/client.js:294:5)
0|magicmir | at doWrite (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_modules/readable-stream/lib/_stream_writable.js:428:64)
0|magicmir | at writeOrBuffer (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_modules/readable-stream/lib/_stream_writable.js:417:5)
0|magicmir | at Writable.write (/home/pi/MagicMirror/modules/mmm-toggle-by-mqtt/node_modules/readable-stream/lib/_stream_writable.js:334:11)
0|magicmir | [2021-09-26 15:54:09.307] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
0|magicmir | [2021-09-26 15:54:09.310] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
I don't know why it started happening, because I didn't update or change either the tmp
folder permissions, MM, Node, ShellJS or your module, but I found a related ShellJS issue where they're still trying to find an explanation: shelljs/shelljs#1024
Anyway I managed to fix it by getting rid of ShellJS in favor of Node's native child_process
, so I'll be opening a PR soon... I guess there's no need to specify all the versions or how to reproduce the error (I wouldn't know how anyway).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.