Read the statement by Michael Teeuw here.
Module Developer Challenge - I surrender!
-
-
@ninjabreadman said in Module Developer Challenge - I surrender!:
Hmm, it may be that vcgencmd is specific to the RPi.
Ha! I see. Ok, on to the others. :-)
-
@Mykle1 It actually might be best to run
cat /sys/class/thermal/thermal_zone*/type
to see if they’re already populating on your Ubuntu install. If so, you can runcat /sys/class/thermal/thermal_zone*/temp
to get all the values, or justcat
a specific one. Should be to three decimal places (i.e.64000
means 64.000°C).You might run it a few times to see that the values change, and if they do, then use the same
exec()
method fromMMM-SystemStats
with the right command and some math. -
@ninjabreadman said in Module Developer Challenge - I surrender!:
acpi seems like a contender, as does lm-sensors.
Made some progress with lm-sensors which gives me great hope. I can see the return in the terminal but not in the node_helper. Still, I’m encouraged. I’ll continue to work on it tomorrow. I’m feeling a bit tired tonight.
Sockets connected & modules started ... Launching application. { 'nouveau-pci-0100': { 'PCI adapter': { temp1: [Object] } }, 'coretemp-isa-0000': { 'ISA adapter': { 'Core 0': [Object], 'Core 1': [Object], 'Core 2': [Object], 'Core 3': [Object] } } } Whoops! There was an uncaught exception... TypeError: this.sendSocketNotification is not a function at /home/pop/MagicMirror/modules/MMM-PC-Stats/node_helper.js:32:9 at /home/pop/MagicMirror/modules/MMM-PC-Stats/node_modules/sensors.js/lm-sensors.js:96:12 at ChildProcess.exithandler (child_process.js:209:7) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:194:7) at maybeClose (internal/child_process.js:899:16) at Socket. (internal/child_process.js:342:11) at emitOne (events.js:96:13) at Socket.emit (events.js:191:7) at Pipe._handle.close [as _onclose] (net.js:510:12)
-
@Mykle1 Not sure what you’re doing in your code. But…
- You’ll get a temp reading for each cpu core, so you need to choose|add|average…, and
- How do you execute the script? Did you give it proper permissions?
- I’m you already know, but you also need to allow the external file to be read from node_helper.js.
-
@E3V3A said in Module Developer Challenge - I surrender!:
Not sure what you’re doing in your code. But…
Neither am I. :-)
-
@Mykle1 you might want to upload your current version to a github branch so we can see what your doing
-
He can’t it’s a secret HAHHAHAHAHHA
-
I would like to thank everyone that gave me suggestions and advice. I really do appreciate the support.
I ended up using a combination of 2 npm packages. pc-stats and sensors.js. My first time building a module from an npm package, and then adding a second to the same module confused me quite a bit. That, and my lack of any real coding experience, found me at a standstill.
Well, once again, @cowboysdude took pity on me. He took the time to teach me where I went wrong, and what I was missing, and what I didn’t need. Maybe I won’t retain everything that he taught me but I will certainly remember his kindness and generosity. His patience is astonishing. :-)
https://github.com/mykle1/MMM-PC-Stats
Now I just need some formatting if anyone cares to assist me with that. Anyway, here’s a quick shot. Ideally, I would like to move the Core temps to right, just under the video card temp
-
@cowboysdude said in Module Developer Challenge - I surrender!:
He can’t it’s a secret HAHHAHAHAHHA
My code (if you can even call it that) is never a secret. It’s more like an embarrassing teenager moment. ;-)
However, I do enjoy learning and I do appreciate you taking the time to teach me. You’re a damn good dude! :-)