diff --git a/package.json b/package.json index ceb2222..842a52e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gpio", - "version": "1.1.2", + "version": "1.1.3", "description": "rpi battery signals", "scripts": { "db:prepare": "npx knex migrate:latest", diff --git a/src/manager.js b/src/manager.js index 7521d16..5589f69 100644 --- a/src/manager.js +++ b/src/manager.js @@ -63,9 +63,13 @@ const share = async () => { try { const system = { uptime: execSync("uptime").toString(), - temp: Number( - execSync("vcgencmd measure_temp").toString().split("=")[1].split("'")[0] - ), + tempGpu: execSync("vcgencmd measure_temp") + .toString() + .split("=")[1] + .split("'")[0], + tempCpu: ( + execSync("cat /sys/class/thermal/thermal_zone0/temp").toString() / 1000 + ).toFixed(1), }; const dayWeek = await db.dayWeek();