I did not even know there were data vs charging cables, I will try to google and find out and dig through the box of cables to see what I have.
Its this ESP32 , I read in the Q&A part that it should work with HA and Xiaomi sensors.
KeeYees Development Board 2.4 GHz Dual Core WLAN WiFi + Bluetooth 2-in-1 Microcontroller ESP-WROOM-32 Chip CP2102 for ESP32 for Arduino (2PCS) https://www.amazon.com/dp/B07QCP2451/ref=cm_sw_r_apan_glt_fabc_P4ERTX61YG9BPHAGT648?_encoding=UTF8&psc=1
I've switched to micropython for everything I possibly can. I love it as I've been writing python for well over 10 years as a hobbyist and never particularly liked having to use arduino c++ for hardware.
My primary board is the esp32 and there's a couple of quirks that are much better handled with the pyboard (the library support is more extensive since it's the official micropython board) but I like to have a lot of them and the esp32s I'm using are far cheaper at $15 for two.
I haven't run into anything I couldn't do with them yet that forced me to revert to arduino
Though I am only just starting to explore this this area, it sounds like an ESP32 or ESP8266 coupled with Micropython (subset of python which comes in a couple of flavors) may be applicable for your use. Might want to ask and or scan /r/esp32 plus /r/8266 for further details. I am currently picking up the ESP32's off of Amazon for around $10 ( https://www.amazon.ca/KeeYees-Development-Bluetooth-Microcontroller-ESP-WROOM-32/dp/B07QCP2451/ref=sr_1_3?dchild=1&keywords=esp32&qid=1591812003&sr=8-3) per unit but they can be purchased for cheaper at other outlets.
I am definitely not an expert, but anecdotally, the cheap ESP32S boards I ordered from Amazon will accept programming from the Arduino IDE without holding the button when I use my Linux Mint Laptop. The same boards require me to hold the button down to connect and send the same code from my Windows 10 desktop.
These boards.
Toshiba Satellite S855 running Linux Mint, and a Lenovo desktop running W10 home. Both have the latest IDE and libraries. Could be the OS, but could also be a hardware difference.
I bought a different board and it works much better. Both of these work:
https://www.amazon.com/dp/B07QCP2451?psc=1&ref=ppx_yo2ov_dt_b_product_details
https://www.amazon.com/dp/B0718T232Z?psc=1&ref=ppx_yo2ov_dt_b_product_details
Industrial automation is what I do!
I would recommend if you want to build your skills and have some programming experience, check out the ESP32, in particular this module which is robust and proven. They will drop into a breadboard and can be powered right off your computer via their USB port.
They are programmed in C++ with PlatformIO running inside VSCode. Supported by the Arduino libraries which makes it super easy to get going if you have any experience with them.
Here is a $30 "beginner's project": grab a pack of cheap temperature sensors and connect them to an ESP32, then program it to report their temperatures via MQTT over WiFi. Then you can trend those temperatures with Mango. Get that going and you are on your way to becoming an automation tech ;)
https://www.amazon.com/dp/B07QCP2451?psc=1&ref=ppx_yo2ov_dt_b_product_details
​
Sorry i know some subs dont allow links. Any help is greatly appreciated
Here is the config I am trying to use and the board I have. My board has both 5v and 3.3v.
This is the board I am trying to use. I think I have the board type set correctly, but could be wrong.
https://www.amazon.com/gp/product/B07QCP2451/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
​
I am not sure what the setup_priority parameter is. I don't see anything on that in the esphome docs.
​
How would I scan for the devices? It is scanning failing to find any i2c devices when booting.
esphome: name: scale
esp32: board: nodemcu-32s
logger:
api:
ota: password: "6725d044b0aa94009923f02f5d58ad9c"
wifi: ssid: !secret wifi_ssid password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "Scale Fallback Hotspot" password: "liza2056"
captive_portal:
i2c: sda: 21 scl: 22 scan: true id: bus_a font: - file: "fonts/GoogleSans-Medium.ttf" id: myfont size: 20
display:
- platform: ssd1306_i2c
model: "SSD1306 128x32"
i2c_id: bus_a
address: 0x3C
lambda: |-
it.print(0, 0, id(myfont), "Hello World!");
button:
- platform: restart
name: Scale Restart
Log File: [07:50:52][C][i2c.arduino:038]: I2C Bus:
[07:50:52][C][i2c.arduino:039]: SDA Pin: GPIO21
[07:50:52][C][i2c.arduino:040]: SCL Pin: GPIO22
[07:50:52][C][i2c.arduino:041]: Frequency: 50000 Hz
[07:50:52][C][i2c.arduino:050]: Recovery: failed, SDA is held low on the bus
[07:50:52][I][i2c.arduino:054]: Results from i2c bus scan:
[07:50:52][I][i2c.arduino:056]: Found no i2c devices!
[07:50:52][C][ssd1306_i2c:023]: I2C SSD1306
[07:50:52][C][ssd1306_i2c:023]: Rotations: 0 °
[07:50:52][C][ssd1306_i2c:023]: Dimensions: 128px x 32px
[07:50:52][C][ssd1306_i2c:024]: Address: 0x3C
[07:50:52][C][ssd1306_i2c:025]: Model: SSD1306 128x32
[07:50:52][C][ssd1306_i2c:027]: External VCC: NO
[07:50:52][C][ssd1306_i2c:028]: Flip X: YES
[07:50:52][C][ssd1306_i2c:029]: Flip Y: YES
[07:50:52][C][ssd1306_i2c:030]: Offset X: 0
[07:50:52][C][ssd1306_i2c:031]: Offset Y: 0
[07:50:52][C][ssd1306_i2c:032]: Inverted Color: NO
[07:50:52][C][ssd1306_i2c:033]: Update Interval: 1.0s
[07:50:52][E][ssd1306_i2c:036]: Communication with SSD1306 failed!
Item | Current | Lowest | Reviews |
---|---|---|---|
KeeYees Development Board 2.4 GHz Dual Core WLAN… | $14.98 | $14.98 | 4.5/5.0 |
^Item Info | Bot Info | Trigger
Wroom32 is the module, the black square, has the esp32 chip inside along with memory and either antenna or a plug for an external antenna. The devboards take the wroom module and stick them on a pcb with a bunch of other stuff that make prototyping easier. Voltage regulator so you can power from 5V instead of the 3.3V the chip actually needs and a usb to uart chip so you can program with a USB cable instead of a serial connection. If you are just starting out go with a dev board. The official devkit from esp is good. https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-devkitc.html
I have also used the doit devkit v1 and nodemcu versions. Depends on what you can get in your location. I'm in Canada so Amazon is typically the fastest. If I was buying one today it would probably be https://www.amazon.ca/dp/B07QCP2451/ref=cm_sw_r_cp_apa_glt_i_YX23FJ9SZXVEHFYYWDDY
If you're graduating in electrical engineering, I'm assuming you have a decent amount of technical experience. If you want straight C, I think you should take a look at the ESP-IDF. It's not exactly beginner friendly, but it is written in straight C, with some components of the ide also accepting assembly commands as well. A cheap ESP32 board can be bought on amazon for 15$(for two of em).
Arduino's C++ implementation is fairly easy and straightforward, if you know how you can use structs to make "pseudo classes", you can probably just google basic method implementation and the ball rolling, if that's the case I recommend this. If you can swing it, you should get both the esp32 I posted above and the dev kit, then you can get some wifi stuff going too. If the IDF is too daunting, then I recommend you use the esp32 with arduino(there's integration with them together)