Closed matthias-bs closed 2 months ago
Mathias, thanks for opening the topic. I'm a bit of a code lammer and I tried to follow all your steps, but without success.
Board - lilygo model T3 V1.6.1
So I'm using Arduino IE as you can see in this link to have a chance of doing everything right, but not :/ https://github.com/matthias-bs/BresserWeatherSensorReceiver/blob/main/BUILD.md
code for BresserWeatherSensorMQTT2.ino https://gist.github.com/nosfaratu/a1c46ffddb8e8281a7018ab253c5f4f0
code for WeatherSensorcfg.h https://gist.github.com/nosfaratu/6b9cf40bd2a2667aee947fadecb6ac58
I compile the code and save it in another folder. Then I'll check ok, when I upload it gives an error, but the upload finishes. Set it to reset but the board does not reset.
https://gist.github.com/nosfaratu/3bd3a127fa0f1e063de87ca436db1833
Thanks in advance!
Hi,
in your WeatherSensorCfg.h
, you have uncommented two defines in the board section:
// This define is set by selecting "Board: TTGO LoRa32-OLED" / "Board Revision: TTGO LoRa32 V2.1 (1.6.1)"
// in the Arduino IDE:
#define ARDUINO_TTGO_LoRa32_V21new
[...]
// DFRobot Firebeetle32
// https://github.com/espressif/arduino-esp32/tree/master/variants/firebeetle32/pins_arduino.h
//
// This define (not very specific...) is set by selecting "FireBeetle-ESP32" in the Arduino IDE:
#define ARDUINO_ESP32_DEV
Please leave those defines commented out as it was before. If you select this board and board variant in the IDE (as you did as I see in the screenshot), the correct settings are used automatically.
For the first test, I recommend using the basic example. I any case, please use the examples provided when trying the first steps. You are trying BresserWeatherSensorMQTT2.ino
- how should I know which changes you made?
After flashing the board, please switch to the serial console (same serial port as for flashing).
Regards, Matthias
@matthias-bs
Success! Using just BresserWeatherSensorBasic.ino from the examples, without changing anything it flashed!
The log appears on the serial monitor!
But I can't pass anything to HA xD but nothing appears on the lilygo screen :/
--- edit----
Now I have successfully installed BresserWeatherSensorMQTT, it connects to the wifi network but does not communicate with mqtt :/
I just changed the ssid/pass data, and mqtt data
const char ssid[] = "ubnt"; const char pass[] = "#Nrfzydas";
const char MQTT_HOST[] = "192.168.1.99"; const char MQTT_USER[] = "mqtt"; // leave blank if no credentials used const char MQTT_PASS[] = "Nrfzy22222"; // leave blank if no credentials used
Did you check the part related to secure/non-secure MQTT and the related port and WiFi settings? You have to change
#define USE_SECUREWIFI // use secure WIFI
// #define USE_WIFI // use non-secure WIFI
to
//#define USE_SECUREWIFI // use secure WIFI
#define USE_WIFI // use non-secure WIFI
in order to try a non-secure connection on port 1883.
Check the MQTT broker's logfile to see why the connection fails.
A secure connection requires USE_SECUREWIFI
, port 8883 and some specific credentials.
Please see the section 'Notes' in the header of the *.ino file.
Regarding the display - have a look at find_transmitter.ino how to use it.
mqtt is already resolved! I had to set sleep to false, because it almost always appeared offline
I can now listen to the topic on homeassistant
Now it remains to create the sensors.
Regarding the screen, do I just put that file and flash it along with the others?
No, you have to modify the MQTT sketch to use the display. You can use the other sketch I mentioned as an example for using the Adafruit SSD1306 library.
Seems to be solved - closing.
Thanks for the development! But I need help... I have a Lora Lilygo T3 V1.6.1 and no matter how much I follow your tutorial I can't flash this :/ I know I shouldn't put this here, but I don't know where else to turn, sorry
Ursprünglich gepostet von @nosfaratu in https://github.com/matthias-bs/BresserWeatherSensorReceiver/issues/143#issuecomment-2010911201