jarkko-hautakorpi / iBeacon-indoor-positioning-demo

Indoor positioning of iBeacon tags (tagged people, dogs, cats and objects) by trilateration, using ESP32.
MIT License
187 stars 102 forks source link

TypeError: Cannot read property 'length' of undefined #3

Closed rishaldyprisly closed 5 years ago

rishaldyprisly commented 6 years ago

` 25 | if(msg !== null) {

26 | for(let i=0; i<msg.e.length;i++) { <-------- 27 | let mac = msg.e[i].m.toLowerCase(); 28 | let station = msg.st.toLowerCase(); 29 | if(this.stations.includes(station)) {`

Thankyou for created this great project, i need some help in here.

jarkko-hautakorpi commented 6 years ago

Did you modify the ESP32 code? The "e" is the SenML object (JSON) message which the ESP32 is sending. Try starting Mosquitto in verbose debug mode to see if you receive valid data: mosquitto -v -c mosquitto.conf