wtremmel / esp8266-mqtt-sensor-client

0 stars 0 forks source link

Where to put connection info? #1

Closed user-hash closed 4 years ago

user-hash commented 4 years ago

Hi, thanks for good work, i posted a problem on the mqtt client few days ago and you directed me to this version. I had problems uploading with platformio, so I imported the code in Arduino IDE. It compiles and uploads normaly and detects the correct adress of BME680, I can even see debug information, which is progress. Sadly it dont connects to the wifi or mqtt, because config information is empty. It looks like data upload information is not saved, or I must hardcode the details in this version of the code?

19:00:47.095 ->       5088 E: Cannot open config file
19:00:47.095 ->       5088 V: Smyname = 
19:00:47.095 ->       5088 V: Ssite = 
19:00:47.095 ->       5088 V: Sroom = 
19:00:47.095 ->       5088 V: Sssid = 
19:00:47.095 ->       5088 V: Spass = 
19:00:47.095 ->       5090 V: Smqttuser = 
19:00:47.095 ->       5093 V: Smqttpass = 

Is BME680 implemented in this version?

19:00:47.373 ->       5356 T: I2C device found at address 0x77
19:00:47.373 ->       5361 N: BME280 found? false at 0x77

Thanks for answers, Im a begginer so any help is appreciated!

wtremmel commented 4 years ago

You need to upload a file named config.json containing this information. I have added an example in the data directory. Rename it to config.json, modify for your data and upload it using the file-uploader of either Arduino or Platformio.

user-hash commented 4 years ago

Thanks, connection is working now and I can recieve voltage values via mqtt. I still have problems with getting data from the BME680 sensor. Should I close this issue and open a new one?

In short: Code is detecting BME680 sensor adresses corectly,but gives strange response. 19:00:47.373 -> 5356 T: I2C device found at address 0x77 19:00:47.373 -> 5361 N: BME280 found? false at 0x77 Did I miss something in the settings? Thanks for help, code is very well written and a litlle overwhelming for a noob like me.

wtremmel commented 4 years ago

check the source - there is no code for BME680. Only BME280 is implemented.

user-hash commented 4 years ago

Thought so. But BME680 is implemented in the MQTTClient source code? Could you post data folder example in there too? I made the data folder with the files, but It was my first time dealing with data uploads, so I might made and error in making them. I made the files in notepad and I saved the without the file format. Is this correct?

user-hash commented 4 years ago

Thanks for your help, I managed to get sensor running using MQTTClient code and I can recieve the correct values now.