Selasa, 21 Februari 2023

spreadsheet di node red

 


[{"id":"4dc8e823.4bf4f8","type":"comment","z":"f7e38b71.5811d8","name":"How to configure Google sheets ","info":"# Install extra nodes\n\nFrom the manage palette, install node-red-contrib-viseo-google-authentication and\nnode-red-contrib-viseo-google-spreadsheet.\n\n# Set up a Google service account and enable Google sheets API\nGo to [https://console.developers.google.com/project](https://console.developers.google.com/project) and sign in to your Google/Gmail account.\n\nOnce signed in, you'll see a list of existing projects (if there are any) or you can click Create Project to create a new one.\n\nOn the New Project page, enter a name for your project, select an organization and then click Create.\n\n# Enable the Drive API\n\nMake sure you are logged into the Developers Console and your project is selected as the current project.\n\nFrom the navigation menu, hover over APIs and Services and select Library.\n\nSearch for and click the Google Drive API tile.\n\nClick enable.\n\n# Enable the Sheets API\n\nMake sure your project is still selected as the current project.\n\nFrom the navigation menu, hover over APIs and Services and select Library.\nSearch for and click the Google Sheets API tile.\n\nClick Enable.\n\n# Download Service Account Credentials\n\nTo create credentials, from the navigation menu, hover over APIs and Services and select click Credentials. On the Credentials page, click Create credentials and select the Service account key option.\n\nSet the Service account dropdown to New service account. Then enter the Name and select a Role for your service account.\n\nCopy the Service account ID which is an email address starting with your service account name.\n\nClick Create to generate a certificate file and download it as json.\n\nClick on the pen to the right of the Credentials in the node, copy and paste the information in the json file in the field for JSON.\n\n# Create a new Google spread sheet from Google Drive. \n\nTake the ID part from the https link to the spread sheet.\n\nThe link looks similar to this: https://docs.google.com/spreadsheets/d/1C_F7--lWjn1Q3dzkNIcU66NoalhSXL3HPvsIxEUFXo0/edit#gid=0\n\nHere the ID is 1C_F7--lWjn1Q3dzkNIcU66NoalhSXL3HPvsIxEUFXo0 which should be copied to the ID field in the node configuration.\n\nWhen you have the Google sheet open click on the share button in the upper right corner. In the people field put in the email address that you copied from Service account ID and click ready.\n\nNow you should be able to read and write to the Google sheet.\n\nThere is an ERROR message \"Missing VISEO Bot Maker key - Read the documentation.\". \nThis will not stop the flow from working.","x":150,"y":40,"wires":[]},{"id":"35db33a7.fb635c","type":"comment","z":"f7e38b71.5811d8","name":"(double click to read the instruction or look at the info panel to the right)","info":"","x":270,"y":80,"wires":[]},{"id":"ce25ff9b.d59ae","type":"function","z":"f7e38b71.5811d8","name":"","func":"msg.payload=Number(msg.payload)/100\nmsg.payload = parseFloat ( msg.payload.toFixed(1))\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":280,"y":380,"wires":[["7776eee5.c896a"]]},{"id":"7776eee5.c896a","type":"GSheet","z":"f7e38b71.5811d8","creds":"281a99af.2108f6","method":"get","action":"","sheet":"1u7Q7evwp3GfVBvjlpxqn50TZ54k7-48RZlA9_cFuH1Y","cells":"Sheet1!B2:B3","flatten":false,"name":"modbus","x":440,"y":380,"wires":[["87241d3b.0f4ee"]]},{"id":"87241d3b.0f4ee","type":"ui_artlessgauge","z":"f7e38b71.5811d8","group":"a9b5c519.89b948","order":20,"width":27,"height":9,"name":"","icon":"fa-bolt","label":"TEST","unit":"","layout":"radial","decimals":0,"differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload","secondary":"secondary","inline":false,"animate":true,"sectors":[{"val":0,"col":"#ff9900","t":"min","dot":0},{"val":10,"col":"#ff9900","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":620,"y":380,"wires":[]},{"id":"adae7cec.29ce9","type":"comment","z":"f7e38b71.5811d8","name":"Modbus to Node Red and save Googlespreadsheet","info":"","x":210,"y":140,"wires":[]},{"id":"302173bf.2377dc","type":"comment","z":"f7e38b71.5811d8","name":"Googlespreadsheet To Node red","info":"GOOGLE","x":150,"y":320,"wires":[]},{"id":"4adfae99.93ff","type":"inject","z":"f7e38b71.5811d8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":380,"wires":[["ce25ff9b.d59ae"]]},{"id":"d16ca2ab.17888","type":"function","z":"f7e38b71.5811d8","name":"","func":"msg.payload=Number(msg.payload)/100\nmsg.payload = parseFloat ( msg.payload.toFixed(1))\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":300,"y":200,"wires":[["163567f4.cac448"]]},{"id":"c48b2883.571dd8","type":"modbus-read","z":"f7e38b71.5811d8","name":"FREKWENSI","topic":"FREWKENSI","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"1","dataType":"HoldingRegister","adr":"0","quantity":"1","rate":"1","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"89cb9a7a.f6d138","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":110,"y":200,"wires":[["d16ca2ab.17888"],[]]},{"id":"163567f4.cac448","type":"GSheet","z":"f7e38b71.5811d8","creds":"281a99af.2108f6","method":"update","action":"","sheet":"1u7Q7evwp3GfVBvjlpxqn50TZ54k7-48RZlA9_cFuH1Y","cells":"Sheet1!A2","flatten":false,"name":"modbus","x":480,"y":200,"wires":[[]]},{"id":"281a99af.2108f6","type":"gauth"},{"id":"a9b5c519.89b948","type":"ui_group","name":"SIMOR","tab":"67ef31b2.efd2d","order":1,"disp":false,"width":27,"collapse":false},{"id":"89cb9a7a.f6d138","type":"modbus-client","d":true,"name":"","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":true,"queueLogEnabled":false,"tcpHost":"127.0.0.1","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":false,"reconnectTimeout":"2000","parallelUnitIdsAllowed":false},{"id":"67ef31b2.efd2d","type":"ui_tab","name":"Dashboard","icon":"airplay","order":4,"disabled":false,"hidden":false}]

Tidak ada komentar:

Posting Komentar

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

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