slametps / MMM-TuyaSL

A MagicMirror module to display Tuya-based (smart_life) smarthome devices
3 stars 4 forks source link

No Data showing #7

Open arora1mayank opened 3 years ago

arora1mayank commented 3 years ago

[16.09.2021 12:53.24.960] [ERROR] (node:5858) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron. See https://github.com/electron/electron/issues/23506 for more information [16.09.2021 12:53.28.692] [LOG] MMM-TuyaSL node helper received a socket notification: TUYASL_NETWORK_SEARCH - Payload: [object Object] [16.09.2021 12:53.28.695] [LOG] Getting device list... [16.09.2021 12:53.28.707] [LOG] ERROR: Error: ENOENT: no such file or directory, open '/tmp/mmm-tuyasl-token.txt' at Object.openSync (fs.js:466:3) at Object.func [as openSync] (electron/js2c/asar_bundle.js:5:1812) at Object.readFileSync (fs.js:368:35) at Object.e.readFileSync (electron/js2c/asar_bundle.js:5:8592) at Class.search (/home/pi/MagicMirror/modules/MMM-TuyaSL/node_helper.js:152:21) at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-TuyaSL/node_helper.js:246:12) at Socket. (/home/pi/MagicMirror/js/node_helper.js:109:11) at Socket.emit (events.js:315:20) at Socket.emitUntyped (/home/pi/MagicMirror/node_modules/socket.io/dist/typed-events.js:69:22) at /home/pi/MagicMirror/node_modules/socket.io/dist/socket.js:428:39 at processTicksAndRejections (internal/process/task_queues.js:79:11) [16.09.2

slametps commented 3 years ago

you can try by creating an empty file /tmp/mmm-tuyasl-token.txt.

arora1mayank commented 3 years ago

where is tmp located? in your module folder or where @slametps

arora1mayank commented 3 years ago

Please get this working please help me finding the issue

sdetweil commented 3 years ago

looks like nothing called login, which would create the file.

where is tmp located?

it says /tmp so, in the root

/home /tmp /opt /usr etc

arora1mayank commented 3 years ago

Where is /tmp let me see if i found

Just need to create a file with name mmm-tuya.sl.txt

sdetweil commented 3 years ago

he said

you can try by creating an empty file /tmp/mmm-tuyasl-token.txt

slametps commented 3 years ago

Please get this working please help me finding the issue

In your raspberry OS, it should be a /tmp folder. This folder is usually to place temporary files of any user or system applications.

arora1mayank commented 3 years ago

sir i saw a file by this name already exists @slametps @sdetweil

arora1mayank commented 3 years ago

{ module: 'MMM-TuyaSL', position: 'top_right', header: 'TuyaSL', config: { userName: 'email@gmail.com', password: 'pass', countryCode: 'en', showOnlyOnline: false, showOnlyOn: false, colour: false, updateInterval: 300 1000, timeout: 10 1000, } },

slametps commented 3 years ago

sir i saw a file by this name already exists @slametps @sdetweil

who is the owner of the file? Can you capture your console?

arora1mayank commented 3 years ago

IMG20210917095206

arora1mayank commented 3 years ago

@sdetweil @slametps

slametps commented 3 years ago

the file exists. you still get no data and got the same error that inform the file does not exist?

arora1mayank commented 3 years ago

Yes dont know whats the problem i am using smart life app and added my account email and pass

All correct config that i sent?

slametps commented 3 years ago

can you paste your pm2 log contains info about MMM-TuyaSL module?

sdetweil commented 3 years ago

also paste the output of

ls -laF /tmp/mmm-tuyasl-token.txt
arora1mayank commented 3 years ago

Gave you npm logs

Will give you pm2 and output of command in sometime

arora1mayank commented 3 years ago

pi@Comitup-927:~ $ ls -laF /tmp/mmm-tuyasl-token.txt ls: cannot access '/tmp/mmm-tuyasl-token.txt': No such file or directory pi@Comitup-927:~ $ ls -laF /tmp/mmm-tuyasl-token.txt -rw-r--r-- 1 pi pi 0 Sep 18 17:22 /tmp/mmm-tuyasl-token.txt

arora1mayank commented 3 years ago

I booted my pi and it was not there so created a new file by the same name @slametps

arora1mayank commented 3 years ago

[18.09.2021 17:25.42.848] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.42.850] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.42.851] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.42.853] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.42.854] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.42.855] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.42.857] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.42.859] [LOG] MMM-TuyaSL node helper received a socket notification: MMM-Screencast:START-DIAL - Payload: [object Object] [18.09.2021 17:25.42.861] [LOG] MMM-TuyaSL node helper received a socket notification: DETECTOR_STOP - Payload: [object Object] [18.09.2021 17:25.42.885] [ERROR] [RASPOTIFY] Error: Raspotify is not installed! [18.09.2021 17:25.43.377] [LOG] MMM-TuyaSL node helper received a socket notification: ASSISTANT_THINK - Payload: [object Object] [18.09.2021 17:25.43.389] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.43.941] [LOG] [SPOTIFY:ERROR] Token refreshing failed. [18.09.2021 17:25.43.947] [LOG] MMM-TuyaSL node helper received a socket notification: ASSISTANT_CONFIRMATION - Payload: [object Object] [18.09.2021 17:25.44.412] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.44.423] [LOG] DEBUG: regionTuya : eu [18.09.2021 17:25.44.425] [LOG] ERROR: TypeError: Cannot use 'in' operator to search for 'header' in INVAILD_REQUEST_2 at getDeviceList (/home/pi/MagicMirror/modules/MMM-TuyaSL/node_helper.js:192:24) at processTicksAndRejections (internal/process/task_queues.js:97:5) [18.09.2021 17:25.45.130] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.45.135] [INFO] Newsfeed-Fetcher: Broadcasting 100 items. [18.09.2021 17:25.46.067] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.47.059] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.47.590] [LOG] MMM-TuyaSL node helper received a socket notification: ASSISTANT_REPLY - Payload: [object Object] [18.09.2021 17:25.48.116] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.49.059] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.50.056] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.51.058] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.52.059] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.53.056] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.54.061] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.55.060] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.55.727] [LOG] MMM-TuyaSL node helper received a socket notification: ASSISTANT_STANDBY - Payload: [object Object] [18.09.2021 17:25.55.737] [LOG] MMM-TuyaSL node helper received a socket notification: DETECTOR_START - Payload: [object Object] [18.09.2021 17:25.56.060] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.57.086] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.58.063] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.59.062] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:26.00.055] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_MINUTE - Payload: [object Object] [18.09.2021 17:26.01.057] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:26.02.055] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:26.03.056] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:26.04.059] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:26.05.059] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:26.05.377] [LOG] Shutting down server... [18.09.2021 17:26.05.379] [LOG] Stopping module helper: MMM-TuyaSL

arora1mayank commented 3 years ago

@sdetweil @slametps

arora1mayank commented 3 years ago

[18.09.2021 17:25.35.084] [LOG] MMM-TuyaSL node helper received a socket notification: TUYASL_NETWORK_SEARCH - Payload: [object Object] [18.09.2021 17:25.35.089] [LOG] Getting device list... [18.09.2021 17:25.35.254] [LOG] MMM-TuyaSL node helper received a socket notification: ALL_MODULES_STARTED - Payload: [object Object] [18.09.2021 17:25.35.256] [LOG] MMM-TuyaSL node helper received a socket notification: MODULE_DOM_CREATED - Payload: [object Object] [18.09.2021 17:25.35.259] [LOG] MMM-TuyaSL node helper received a socket notification: DOM_OBJECTS_CREATED - Payload: [object Object] [18.09.2021 17:25.39.127] [LOG] Initialize button monitor_control on PIN 25 [18.09.2021 17:25.39.134] [LOG] Initialize button power on PIN 24 [18.09.2021 17:25.39.139] [LOG] Create new newsfetcher for url: https://www.thehindu.com/news/national/feeder/default.rss - Interval: 300000 [18.09.2021 17:25.39.161] [LOG] [TELBOT] MMM-TelegramBot Version: 1.3.8 [18.09.2021 17:25.39.207] [LOG] [TELBOT] Ready! [18.09.2021 17:25.39.214] [LOG] [GA] MMM-GoogleAssistant Version: 3.0.5 rev: 210730-1 [18.09.2021 17:25.39.220] [LOG] [GA] YouTube Search Function initilized. [18.09.2021 17:25.42.037] [LOG] MMM-TuyaSL node helper received a socket notification: CLOCK_SECOND - Payload: [object Object] [18.09.2021 17:25.42.039] [LOG] MMM-TuyaSL node helper received a socket notification: CURRENTWEATHER_TYPE - Payload: [object Object]

sdetweil commented 3 years ago

we get notices, you don't have to tag us I don't know the answer

arora1mayank commented 3 years ago

okay but @slametps help me

slametps commented 2 years ago

I booted my pi and it was not there so created a new file by the same name @slametps

You don't need to create the file yourself. The module will try to create that file if required.

slametps commented 2 years ago
          //console.log(`DEBUG: Status code    : ${res.status}`);
          //console.log(`DEBUG: Status text    : ${res.statusText}`);
          //console.log(`DEBUG: Request method : ${res.request.method}`);
          //console.log(`DEBUG: Path           : ${res.request.path}`);
          //console.log(`DEBUG: Date           : ${res.headers.date}`);
          //console.log(`DEBUG: Data           : ${res.data}`);
          //console.log(`DEBUG: config         : ${res.config}`);
          //console.log('Data.request: ' + this.dump(res.request));
          //console.log(`Data: ` + (${res.data}).toSource());
          //console.log(`DEBUG: Data.code      : ${res.data.header.code}`);
          //console.log(`DEBUG: Data.payloadVersion: ${res.data.header.payloadVersion}`);

try to uncomment those lines to debug your installed module.

nived0802r commented 2 years ago

Is this issue fixed ? i got it today!