Rabu, 28 Juni 2023

google home node red

 if (msg.payload.command == "action.devices.commands.OnOff" &&  msg.payload == false) {

    if (msg.payload.params.on) {

        msg.payload = true;

      

    } 

}


if (msg.payload.command == "action.devices.commands.OnOff" &&  msg.payload == true) {

    if (msg.payload.params.on) {

        msg.payload = false;

      

    } 

}

return msg;

Selasa, 06 Juni 2023

membuat datalogger esp32 ke google sheet

 1. Membuat dokumen di drive: new -> google sheet


2. membuat script

klik extension -> app script 

var sheet_id = "cek di link google sheet yg d buat";
var sheet_name = "logger";
function doGet(e){
var ss = SpreadsheetApp.openById(sheet_id);
var sheet = ss.getSheetByName(sheet_name);
var sensor = Number(e.parameter.sensor);
var date = Number(e.parameter.date);
sheet.appendRow([sensor,date]);
}

3. deploy - new deployment - pilih web app


4. setting who acces ganti anyone
5. kemudian deploy
6. test buka web browser
https://script.google.com/macros/s/AKfycbwglAL30Vufa0LRwj4diDBOe-Y12dtXWpyr23v4f67uRjs666LVkBTIhiYaNdvoTa1o/exec?sensor=35&date=1103


Cara membuat datalogger blynk di spreadsheet / googlesheet menggunakan akun versi Free

  silahkan video di atas. semoga bermanfaat. jika masih kurang jelas bisa kontak saya