sarnau / MMMMobileAlerts

Documentation about the protocols of ELV Mobile Alerts sensors plus a node MQTT gateway and an Arduino UDP gateway
46 stars 27 forks source link

Error messages during start #26

Closed Matze11 closed 3 years ago

Matze11 commented 3 years ago

Hi there, i don't know if writing an issue is the right way, but I just try to get help on this way. After the start command I received the following error messages:

root@maserver:/maserver# node mobilealerts.js

Local IP address for proxy: undefined

Error: ENOENT: no such file or directory, open 'lastSensorMessages.json' at Object.openSync (node:fs:495:3) at Object.readFileSync (node:fs:396:35) at Object. (/maserver/mobilealerts.js:164:30) at Module._compile (node:internal/modules/cjs/loader:1108:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10) at Module.load (node:internal/modules/cjs/loader:973:32) at Function.Module._load (node:internal/modules/cjs/loader:813:14) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) at node:internal/main/run_main_module:17:47 { errno: -2, syscall: 'open', code: 'ENOENT', path: 'lastSensorMessages.json' }

MQTT server is connected

(node:59) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use node --trace-deprecation ... to show where the warning was created)

davyui commented 3 years ago

Hi, I get the same error. Can someone provide the format for the lastSensorMessages.json file?

sarnau commented 3 years ago

An empty JSON file should do.

davyui commented 3 years ago

That's fixed the problem. Thanks.