Skip to content

Instantly share code, notes, and snippets.

@savikko
Last active April 9, 2023 08:42
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save savikko/4de18e228cca2f52848e6ab405dda89b to your computer and use it in GitHub Desktop.
Save savikko/4de18e228cca2f52848e6ab405dda89b to your computer and use it in GitHub Desktop.
# NOTE! First upload has to be done via UART - seems that OTA is not possible if ESPHome-compiled firmware is just uploaded
# see note at https://esphome.io/components/esp32_ble_tracker.html
esphome:
name: gls10
platform: ESP32
# https://github.com/esphome/issues/issues/1098#issuecomment-845789058
board: esp32dev
platformio_options:
platform: espressif32@3.2.0
board: az-delivery-devkit-v4
board_build.mcu: esp32
board_build.f_cpu: 240000000L
ota:
api:
# nice for debugging, but seems that this generates reboots once in few minutes
# see https://github.com/esphome/issues/issues/2634
# web_server:
# port: 80
logger:
# uncomment if you want to use wifi
# wifi:
# ssid: !secret wifissid
# password: !secret wifipass
# fast_connect: true
# power_save_mode: HIGH
# comment out if using wifi - only one can be in use
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO17_OUT
phy_addr: 1
esp32_ble_tracker:
# not sure if necessary but
# https://github.com/esphome/issues/issues/1098#issuecomment-606784815
# might be issue when using wifi
scan_parameters:
interval: 160ms
window: 15ms
duration: 60s
sensor:
- platform: ruuvitag
mac_address: AA:FF:DF:BE:AB:FF
humidity:
name: "Somesensor Humidity"
temperature:
name: "Somesensor Temperature"
@savikko
Copy link
Author

savikko commented Jan 1, 2022

LEDs:

  • GPIO14: Power
  • GPIO12: Bluetooth
  • GPIO32: Network

Button GPIO33

@drharris9121
Copy link

This looks like just what I need. I'm having trouble getting started, however. It looks like the USB connector is power only. How are you able to install ESPHome initially?

@savikko
Copy link
Author

savikko commented Jul 7, 2022

@drharris9121 : You need USB-TTL adapter and few jumper wires, then connect pins correctly to GL-S10.

I used originally bitluni camprog (as that was only USB-TTL i found from my stash):
image

Point is that when you have USB-TTL adapter and you have opened the device like this:
image

You will find this:
image

Then just connect (there is pinout printed on PCB) cables correctly and you should be able to upload ESPHome firmware.

@drharris9121
Copy link

Really appreciate the detailed description. Motivates me to move the project up. Thanks!

@oywino
Copy link

oywino commented Jan 30, 2023

Is this an alternative to @blackadders method to flash the GL-S10 as a Bluetooth Proxy for Home Assistant?
By the way, from the look of it, this seems to be compatible only with the version 1.0 board, am I right?

@savikko
Copy link
Author

savikko commented Jan 30, 2023

Is this an alternative to @blackadders method to flash the GL-S10 as a Bluetooth Proxy for Home Assistant? By the way, from the look of it, this seems to be compatible only with the version 1.0 board, am I right?

I actually have not even realized gl.inet has released next hardware version. So yes, this assumes v1.

Checked quickly method you mentioned and it appears to be using web uploader. But otherwise about the same.

I am actually using currently OpenMQTTGateway to act as bt proxy. Works flawlessly.

I hope gl.inet would add usb-uart to this board to make it easier to upload alternative firmware. Of course increases BOM but probably price could still be very reasonable.

@oywino
Copy link

oywino commented Jan 30, 2023

I'm not sure if I understood your answer.
It doesn't look like you're using the GL-S10 as a Bluetooth Proxy, right? So what purpose are you using it for?

@savikko
Copy link
Author

savikko commented Jan 30, 2023

Yes, i am using it as bluetooth proxy.

This gist defines (esphome yaml part) just one ruuvitag sensor, blackadders article is about esphome btproxy and my choice for proxying bluetooth is OMG.

@oywino
Copy link

oywino commented Jan 30, 2023

I'm still struggling to understand your answer. So I tried to Google it, and the result came back:
"gist" = Tumor
"OMG" = Oh My God
😶

@savikko
Copy link
Author

savikko commented Jan 30, 2023

You are now at gist.github.com, the text above, "an article", is a gist.

OMG is OpenMQTTGateway.

@oywino
Copy link

oywino commented Jan 31, 2023

Aha 👍 I see.
But does this mean that you installed OMG firmware on the GL-S10 ?

@savikko
Copy link
Author

savikko commented Jan 31, 2023

Correct.

@oywino
Copy link

oywino commented Jan 31, 2023

Interesting. Do you know if a YAML file exist that will support v2.x boards ?

@savikko
Copy link
Author

savikko commented Jan 31, 2023

@oywino
Copy link

oywino commented Jan 31, 2023

That YAML file is for the ESPHome firmware and not for the OMG firmware?

@savikko
Copy link
Author

savikko commented Jan 31, 2023

Yes.

@oywino
Copy link

oywino commented Jan 31, 2023

OK, so let's try again; Do you know if a board v2.x YAML file exists for the OMG firmware ?

@savikko
Copy link
Author

savikko commented Jan 31, 2023

There is no such thing as YAML files for OMG.

See further instructions at https://docs.openmqttgateway.com/upload/web-install.html

@oywino
Copy link

oywino commented Jan 31, 2023

I don't understand. Did you or did you not install the OMG firmware on the GL-S10 ?

@savikko
Copy link
Author

savikko commented Jan 31, 2023

I installed OMG firmware on GL-S10.

This gist is about ESPHome yaml for GL-S10. I originally installed ESPHome, then found out that OMG is better for my usecase and now using that. And some time ago HA / ESPHome published that some btproxy -thingie and I am not familiar with that.

@oywino
Copy link

oywino commented Jan 31, 2023

Ok, so the YAML file you posted here has nothing to do with the flashing of the OMG firmware on to the GL-S10 ?

@savikko
Copy link
Author

savikko commented Jan 31, 2023

Correct.

@oywino
Copy link

oywino commented Jan 31, 2023

Ok, so can you please post a copy of the YAML file you did use to flash the OMG firmware on to the GL-S10 ?

@savikko
Copy link
Author

savikko commented Jan 31, 2023

No, actually I cannot. OMG does not use any YAMLs.

Please do some own research regarding what is ESPHome, what is OMG and how those are installed and how those differ.

@oywino
Copy link

oywino commented Jan 31, 2023

Ok, thanks for your help so far 😊

@XHunter74
Copy link

@savikko , please tell me which binary you uploaded to GL-S10?

@savikko
Copy link
Author

savikko commented Apr 9, 2023

The binary ESPHome generated.

@XHunter74
Copy link

I asked about OMG binary. By the way, I used generic esp32dev-ble and it is work perfectly but I don't need ethernet at all.

@savikko
Copy link
Author

savikko commented Apr 9, 2023

Ah, regarding OMG i used that esp32dev-ble.
Working perfectly as well, using wifi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment