Giter VIP home page Giter VIP logo

esphome-kickstart's People

Contributors

kuba2k2 avatar yeyeto2788 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

esphome-kickstart's Issues

AP Gateway

Message - Expected AP gateway = 192.168.175.1 or 192.168.176.1 but got 192.168.4.1
no connection and cycle through until failed.
Is there a config issue?

Creating a custom flash uf2 file.

Is there supposed to be an easy way to create a UF2 file with a custom app size. The boot log of my device looks like:

ROM:[V0.1]
FLASHRATE:4
BOOT TYPE:0 XTAL:40000000
IMG1 DATA[1128:10002000]
IMG1 ENTRY[800053f:100021ef]
IMG1 ENTER
CHIPID[000000f6]
read_mode idx:2, flash_speed idx:0
calibration_result:[1:3:13][b:d]
calibration_result:[2:13:7][1:d]
calibration_result:[3:7:5][1:7]
calibration_ok:[2:13:7]
FLASH CALIB[NEW OK]
OTA2 ADDR[80ba000]
OTAx SELE[ffffffff]
OTA1 USE
IMG2 DATA[0x807f2d0:3908:0x10005000]
IMG2 SIGN[RTKWin(10005008)]
IMG2 ENTRY[0x10005000:0x803a5d5]
System_Init1
System_Init2
I [      0.000] LibreTiny v1.4.0 on generic-rtl8710bn-2mb-788k, compiled at Oct 26 2023 08:11:53, GCC 10.3.1 (-Os)

Notice that the OTA2 ADDR is 0x80ba000 which gives an app size of 700KB, so I am trying to create a uf2 file using that app size.

I used the kickstart-rtl8710bn-2mb-788k.yaml to create:

substitutions:
  name: kickstart-rtl8710bn-2mb-788k
  import_url: github://libretiny-eu/esphome-kickstart/yaml/import-rtl8710bn-2mb-788k.yaml@master

packages:
  base: !include kickstart-base.yaml

esphome:
  platformio_options:
    custom_flash.app: 0xAF000

rtl87xx:
  board: generic-rtl8710bn-2mb-788k
#  loglevel: debug

select:
  - platform: template
    id: !extend pin
    options:
      - Select PIN
      - PA06 / FCS
      - PA07 / FD1
      - PA08 / FD2
      - PA09 / FD0
      - PA10 / FSCK
      - PA12 / PWM3
      - PA15 / PWM1 / SWDIO
      - PA18 / UART0_RX / I2C1_SCL / SPI0_SCK / SPI1_SCK
      - PA19 / UART0_CTS / I2C0_SDA / SPI0_CS / SPI1_CS
      - PA22 / UART0_RTS / I2C0_SCL / SPI0_MISO / SPI1_MISO / PWM5
      - PA23 / UART0_TX / I2C1_SDA / SPI0_MISO / SPI1_MISO / PWM0
      - PA29 / UART2_RX / I2C0_SCL / PWM4
      - PA30 / UART2_TX / I2C0_SDA / PWM4

output:
  - platform: gpio
    pin: PA14
    id: led_error
  - platform: gpio
    pin: PA05
    id: led_status

switch:
  - platform: gpio
    name: "Relay"
    pin: PA00
    restore_mode: RESTORE_DEFAULT_OFF
  - platform: output
    name: "Green LED"
    output: led_status
    restore_mode: ALWAYS_ON
  - platform: output
    name: "Red LED"
    output: led_error
    restore_mode: DISABLED

binary_sensor:
  - platform: gpio
    pin:
      number: PA22
      inverted: true
    name: "Input"

But it errors with:

CUSTOM OPTIONS:
 - flash:
     - app = 716800
 - fw_name = esphome
 - fw_version = 2023.10.0-dev
CUSTOM FLASH LAYOUT:
ValueError: invalid literal for int() with base 16: '':
  File "/home/anthony/.local/lib/python3.10/site-packages/platformio/builder/main.py", line 173:                                                             
    env.SConscript("$BUILD_SCRIPT")                                                                                                                          
  File "/home/anthony/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 598:                                               
    return _SConscript(self.fs, *files, **subst_kw)                                                                                                          
  File "/home/anthony/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 285:                                               
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)                                                                                    
  File "/home/anthony/.platformio/platforms/libretiny/builder/main.py", line 89:                                                                             
    target_elf = env.BuildProgram()                                                                                                                          
  File "/home/anthony/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Util/envs.py", line 242:                                                       
    return self.method(*nargs, **kwargs)                                                                                                                     
  File "/home/anthony/.local/lib/python3.10/site-packages/platformio/builder/tools/piobuild.py", line 61:                                                    
    env.ProcessProgramDeps()                                                                                                                                 
  File "/home/anthony/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Util/envs.py", line 242:                                                       
    return self.method(*nargs, **kwargs)                                                                                                                     
  File "/home/anthony/.local/lib/python3.10/site-packages/platformio/builder/tools/piobuild.py", line 121:                                                   
    env.BuildFrameworks(env.get("PIOFRAMEWORK"))                                                                                                             
  File "/home/anthony/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Util/envs.py", line 242:                                                       
    return self.method(*nargs, **kwargs)                                                                                                                     
  File "/home/anthony/.local/lib/python3.10/site-packages/platformio/builder/tools/piobuild.py", line 342:                                                   
    SConscript(env.GetFrameworkScript(name), exports="env")                                                                                                  
  File "/home/anthony/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 662:                                               
    return method(*args, **kw)                                                                                                                               
  File "/home/anthony/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 598:                                               
    return _SConscript(self.fs, *files, **subst_kw)                                                                                                          
  File "/home/anthony/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 285:                                               
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)                                                                                    
  File "/home/anthony/.platformio/platforms/libretiny/builder/frameworks/arduino.py", line 15:                                                               
    env.SConscript("base.py")                                                                                                                                
  File "/home/anthony/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 598:                                               
    return _SConscript(self.fs, *files, **subst_kw)                                                                                                          
  File "/home/anthony/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 285:                                               
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)                                                                                    
  File "/home/anthony/.platformio/platforms/libretiny/builder/frameworks/base.py", line 28:                                                                  
    env.PrintInfo(platform, board)                                                                                                                           
  File "/home/anthony/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Util/envs.py", line 242:                                                       
    return self.method(*nargs, **kwargs)                                                                                                                     
  File "/home/anthony/.platformio/platforms/libretiny/builder/utils/env.py", line 130:                                                                       
    length = int(length, 16)                                                                                                                                 

I tried using the libretiny-esphome but it gives the same error. Any help resolving this is appreciated.

ESPHome Kickstart does not start

Hi,

I do not know if this is the right place to ask but I am glad for any help!

I am trying to flash this device with with tuya-cloudcutter and ESPHome:
https://www.amazon.de/dp/B0B8HSJ4WG?psc=1&ref=ppx_yo2ov_dt_b_product_details

According to the Smart Life app the Main Module version is 1.0.10 and therefore I used 1.0.10 - BK7231N / bk7231n_lowpower_common_ty to flash the device. I then selected ESPHome-Kickstart-v23.08.29_bk7231n_app.ota.ug.bin as the firmware file.

As far as I can understand from the logs (it is the verbose version) everything looks good and it should be working:

root@raspberrypi:~/tuya-cloudcutter# ./tuya-cloudcutter.sh -r -v
Building cloudcutter docker image
[+] Building 0.7s (13/13) FINISHED                                                                                                                  docker:default
 => [internal] load build definition from Dockerfile                                                                                                          0.0s
 => => transferring dockerfile: 460B                                                                                                                          0.0s
 => [internal] load .dockerignore                                                                                                                             0.0s
 => => transferring context: 2B                                                                                                                               0.0s
 => [internal] load metadata for docker.io/library/python:3.9.12-slim-buster                                                                                  0.5s
 => [base 1/2] FROM docker.io/library/python:3.9.12-slim-buster@sha256:830e161433edfe047a23ebc99c12ee0eb1dc0a50e6b5f1c98e869ac271786632                       0.0s
 => [internal] load build context                                                                                                                             0.0s
 => => transferring context: 3.02kB                                                                                                                           0.0s
 => CACHED [base 2/2] RUN apt-get -qq update && apt-get install -qy --no-install-recommends git hostapd rfkill dnsmasq build-essential libssl-dev iproute2 m  0.0s
 => CACHED [python-deps 1/4] RUN pip install --upgrade pipenv                                                                                                 0.0s
 => CACHED [python-deps 2/4] COPY src/Pipfile /src/                                                                                                           0.0s
 => CACHED [python-deps 3/4] COPY src/Pipfile.lock /src/                                                                                                      0.0s
 => CACHED [python-deps 4/4] RUN cd /src && PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy                                                                  0.0s
 => CACHED [cloudcutter 1/2] COPY src /src                                                                                                                    0.0s
 => CACHED [cloudcutter 2/2] WORKDIR /src                                                                                                                     0.0s
 => exporting to image                                                                                                                                        0.0s
 => => exporting layers                                                                                                                                       0.0s
 => => writing image sha256:b54b5f4552ed02961a70330def6f8a8b1afbdb90f2d000570b2d5124d6ebba29                                                                  0.0s
 => => naming to docker.io/library/cloudcutter                                                                                                                0.0s
Successfully built docker image
1) Detach from the cloud and run Tuya firmware locally
2) Flash 3rd Party Firmware
[?] Select your desired operation [1/2]: 2
[?] Select your desired operation [1/2]: 2
Loading options, please wait...
[?] How do you want to choose the device?: By firmware version and name
   By manufacturer/device name
 > By firmware version and name
   From device-profiles (i.e. custom profile)

[?] Select the firmware version and name: 1.0.10 - BK7231N / bk7231n_lowpower_common_ty
   1.0.1 - BK7231N / oem_bk7231n_strip_ffc_mk_ty
   1.0.1 - BK7231N / ua_app
   1.0.1 - BK7231T / HYS_03_010_RGB_soq7iunzlbpafjlm
   1.0.1 - BK7231T / oem_bk7231s_1_plug_arlec
   1.0.1 - BK7231T / oem_bk7231s_light_mix4to5_db_rmd
   1.0.1 - BK7231T / oem_bk7231s_ty_ffc_newdp
 > 1.0.10 - BK7231N / bk7231n_lowpower_common_ty
   1.0.10 - BK7231N / oem_bk7231n_gate_magnet
   1.0.10 - BK7231N / oem_bk7231n_light_pir_ty
   1.0.10 - BK7231N / ua_app
   1.0.10 - BK7231T / oem_bk7231s_light_ty_oldDp
   1.0.14 - BK7231N / oem_bk7231n_slide_strip_ty
   1.0.15 - BK7231N / oem_bk7231n_slide_strip_ty


Performing safety checks to make sure all required ports are available
Checking UDP port 53... Available.
Checking UDP port 67... Available.
Checking TCP port 80... Available.
Checking TCP port 443... Available.
Checking TCP port 1883... Available.
Checking TCP port 8886... Available.
Safety checks complete.

[?] Select your custom firmware file for BK7231N chip: ESPHome-Kickstart-v23.08.29_bk7231n_app.ota.ug.bin
 > ESPHome-Kickstart-v23.08.29_bk7231n_app.ota.ug.bin
   OpenBeken-v1.17.230_bk7231n.ug.bin

Selected Device Slug: avatto-ds06-door-sensor
Selected Profile: bk7231n-lowpower-common-ty-1.0.10-sdk-2.3.1-40.00
Selected Firmware: ESPHome-Kickstart-v23.08.29_bk7231n_app.ota.ug.bin

================================================================================
Place your device in AP (slow blink) mode.  This can usually be accomplished by either:
Power cycling off/on - 3 times and wait for the device to fast-blink, then repeat 3 more times.  Some devices need 4 or 5 times on each side of the pause
Long press the power/reset button on the device until it starts fast-blinking, then releasing, and then holding the power/reset button again until the device starts slow-blinking.
See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
================================================================================

Wiping NetworkManager configs
Scanning for open Tuya SmartLife AP
..
Found access point name: "A-06FE", trying to connect...
Device 'wlan0' successfully activated with '8bcec9e6-5f5e-4932-9860-0aa332acba38'.
Connected to access point.
Waiting 1 sec to allow device to set itself up...
Running initial exploit toolchain...
Exploit run, saved device config too!
output=/work/configured-devices/qm1L6gazDpKT.deviceconfig
Saved device config in /work/configured-devices/qm1L6gazDpKT.deviceconfig

================================================================================
Power cycle and place your device in AP (slow blink) mode again.  This can usually be accomplished by either:
Power cycling off/on - 3 times and wait for the device to fast-blink, then repeat 3 more times.  Some devices need 4 or 5 times on each side of the pause
Long press the power/reset button on the device until it starts fast-blinking, then releasing, and then holding the power/reset button again until the device starts slow-blinking.
See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
================================================================================

Wiping NetworkManager configs
Scanning for open Tuya SmartLife AP
...
Found access point name: "A-06FE", trying to connect...
Error: Connection activation failed: (53) The Wi-Fi network could not be found.
Wiping NetworkManager configs
....
Found access point name: "A-06FE", trying to connect...
Device 'wlan0' successfully activated with 'eff3d797-5679-45f7-8430-878bb5432784'.
Connected to access point.
Configured device to connect to 'cloudcutterflash'
Device is connecting to 'cloudcutterflash' access point. Passphrase for the AP is 'abcdabcd' (without ')
Flashing custom firmware...

================================================================================
Wait for up to 10-120 seconds for the device to connect to 'cloudcutterflash'. This script will then show the firmware upgrade requests sent by the device.
================================================================================

Using WLAN adapter: wlan0
Sep  8 13:27:53 dnsmasq[15]: started, version 2.80 cachesize 150
Sep  8 13:27:53 dnsmasq[15]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify dumpfile
Sep  8 13:27:53 dnsmasq-dhcp[15]: DHCP, IP range 10.42.42.10 -- 10.42.42.40, lease time 12h
Sep  8 13:27:53 dnsmasq-dhcp[15]: DHCP, sockets bound exclusively to interface wlan0
Sep  8 13:27:53 dnsmasq[15]: read /etc/hosts - 5 addresses
Configuration file: /dev/stdin
wlan0: Could not connect to kernel driver
Using interface wlan0 with hwaddr d8:3a:dd:43:e1:b2 and ssid "cloudcutterflash"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
[13:27:55.780094 MQTT] Connected
Sep  8 13:27:58 dnsmasq[15]: query[A] h3.iot-dns.com from 10.42.42.38
Sep  8 13:27:58 dnsmasq[15]: config h3.iot-dns.com is 10.42.42.1
Using PSK v1 - Received PSK ID version 01

[13:27:59.704717 Log (Client)] Request: HTTPServerRequest(protocol='https', host='h3.iot-dns.com', method='POST', uri='/v2/url_config', version='HTTP/1.1', remote_ip='10.42.42.38')
[13:27:59.705039 LOG (Client)] ==== Request body ===
{"region":"AA","env":"","uuid":"qm1L6gazDpKT","ts":17,"sign":"nLOrdm/122jozQBT+4PGracW6ullZZZIp8giMknxsJI=","config":[{"key":"httpUrl","need_ca":false},{"key":"mqttUrl","need_ca":false},{"key":"httpsPSKUrl","need_ca":false},{"key":"mqttsPSKUrl","need_ca":false}]}
[13:27:59.705640 LOG (Client)] ==== End request body ===
[13:27:59.706517 LOG (Server)] Response:  {"caArr":null,"httpUrl":{"addr":"http://10.42.42.1/d.json","ips":["10.42.42.1"]},"mqttUrl":{"addr":"10.42.42.1:1883","ips":["10.42.42.1"]},"ttl":600}

[13:28:00.118513 Log (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.active&et=1&t=18&uuid=qm1L6gazDpKT&v=4.4&sign=a63b8acab0b76d9a8ba589285119c57f', version='HTTP/1.1', remote_ip='10.42.42.38')
[13:28:00.118763 LOG (Client)] ==== Request body ===
{"token":"AAAAAA","softVer":"1.0.10","productKey":"yqiqbaldtr0i7mru","protocolVer":"2.2","baselineVer":"40.00","productKeyStr":"keyr5qhaxgstx9ys","devId":"M8ByrwsTC1Qm0mm00d8K","hid":"1c90ff8506fe","modules":"[{\"otaChannel\":9,\"softVer\":\"1.1.6\",\"online\":true}]","devAttribute":579,"cadVer":"1.0.3","cdVer":"1.0.0","options":"{\"isFK\":false,\"otaChannel\":0}","t":18}
[13:28:00.119497 LOG (Client)] ==== End request body ===
[13:28:00.121399 LOG (Server)] Response:  {'result': {'schema': '[{"type":"obj","mode":"ro","property":{"type":"bool"},"id":1},{"type":"obj","mode":"ro","property":{"range":["low","middle","high"],"type":"enum"},"id":3}]', 'devId': 'c44aKuT2z9FxyIA3JCJI', 'resetFactory': False, 'timeZone': '+02:00', 'capability': 1025, 'secKey': '0iWfiEsk1qW9aCG8', 'stdTimeZone': '+01:00', 'schemaId': '000003agra', 'dstIntervals': [], 'localKey': 'c4l4LHpISFRUWTZp'}, 'success': True, 't': 1694179680}

[13:28:01.346058 Log (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.dynamic.config.get&devId=c44aKuT2z9FxyIA3JCJI&et=1&t=1694179680&v=2.0&sign=1b5cf6af9790ecd31a457498bdf50e87', version='HTTP/1.1', remote_ip='10.42.42.38')
[13:28:01.346288 LOG (Client)] ==== Request body ===
{"type":"[\"timezone\"]","t":1694179680}
[13:28:01.347109 LOG (Client)] ==== End request body ===
[13:28:01.351373 LOG (Server)] Response:  {'result': {'ackId': '0-0', 'validTime': 1800, 'time': 1694179681, 'config': {'stdTimeZone': '+01:00', 'dstIntervals': [[1648342800, 1667091600], [1679792400, 1698541200]]}, 'timezone': {'ackId': '0-0', 'validTime': 1800, 'time': 1694179681, 'config': {'stdTimeZone': '+01:00', 'dstIntervals': [[1648342800, 1667091600], [1679792400, 1698541200]]}}}, 't': 1694179681, 'success': True}
[13:28:03.521322 MQTT Received] Topic: smart/device/out/c44aKuT2z9FxyIA3JCJI - Message: {"protocol":4,"t":1694179683,"data":{"dps":{"3":"high"}}}

[13:28:04.306300 Log (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.uuid.pskkey.get&et=1&t=1694179683&uuid=qm1L6gazDpKT&v=1.0&sign=e4a17f74aa8967b238cdcdb8b9dc606a', version='HTTP/1.1', remote_ip='10.42.42.38')
[13:28:04.306498 LOG (Client)] ==== Request body ===
{"t":1694179683}
[13:28:04.307311 LOG (Client)] ==== End request body ===
[13:28:04.308926 LOG (Server)] Response:  {'result': {'pskKey': ''}, 't': 1694179684, 'success': True}
[13:28:04.311790 MQTT Sending] Sending firmware update message {"data":{"firmwareType":0},"protocol":15,"t":1694179684} using protocol 2.2
[13:28:04.316777 MQTT Received] Topic: smart/device/in/c44aKuT2z9FxyIA3JCJI - Message: {"data":{"firmwareType":0},"protocol":15,"t":1694179684}
[13:28:04.317847 MQTT Sending] Triggering firmware update message.

[13:28:04.819584 Log (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.dynamic.config.get&devId=c44aKuT2z9FxyIA3JCJI&et=1&t=1694179684&v=2.0&sign=00f2cc621bc17f306213193edd3185a8', version='HTTP/1.1', remote_ip='10.42.42.38')
[13:28:04.819822 LOG (Client)] ==== Request body ===
{"type":"[\"timezone\",\"rateRule\"]","t":1694179684}
[13:28:04.819950 LOG (Client)] ==== End request body ===
[13:28:04.823952 LOG (Server)] Response:  {'result': {'ackId': '0-0', 'validTime': 1800, 'time': 1694179684, 'config': {'stdTimeZone': '+01:00', 'dstIntervals': [[1648342800, 1667091600], [1679792400, 1698541200]]}, 'timezone': {'ackId': '0-0', 'validTime': 1800, 'time': 1694179684, 'config': {'stdTimeZone': '+01:00', 'dstIntervals': [[1648342800, 1667091600], [1679792400, 1698541200]]}}}, 't': 1694179684, 'success': True}

[13:28:05.147816 Log (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.dynamic.config.ack&devId=c44aKuT2z9FxyIA3JCJI&et=1&t=1694179684&v=2.0&sign=00b9a43be758cb060492ccfad86ac52b', version='HTTP/1.1', remote_ip='10.42.42.38')
[13:28:05.148004 LOG (Client)] ==== Request body ===
{"ackList":[{"type":"timezone","ackId":"0-0"}],"t":1694179684}
[13:28:05.148127 LOG (Client)] ==== End request body ===
[13:28:05.149791 LOG (Server)] Response:  {'t': 1694179685, 'success': True}

[13:28:05.180591 Log (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.upgrade.get&devId=c44aKuT2z9FxyIA3JCJI&et=1&t=1694179685&v=4.4&sign=466369995bd74243c9a32aac341b89da', version='HTTP/1.1', remote_ip='10.42.42.38')
[13:28:05.180778 LOG (Client)] ==== Request body ===
{"type":0,"t":1694179685}
[13:28:05.180901 LOG (Client)] ==== End request body ===
[13:28:05.196550 LOG (Server)] Response:  {'result': {'url': 'http://10.42.42.1:80/files/ESPHome-Kickstart-v23.08.29_bk7231n_app.ota.ug.bin', 'hmac': '8FE6E331A1915C113996CBFA834B47E1BFD06729A2E8A5D82346F5918D448621', 'version': '9.0.0', 'size': '561888', 'type': 0}, 'success': True, 't': 1694179685}

[13:28:05.240362 Log (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.upgrade.status.update&devId=c44aKuT2z9FxyIA3JCJI&et=1&t=1694179685&v=4.1&sign=fa2555b36ecf45cfca80a0538fed7c73', version='HTTP/1.1', remote_ip='10.42.42.38')
[13:28:05.240498 LOG (Client)] ==== Request body ===
{"type":0,"upgradeStatus":2,"t":1694179685}
[13:28:05.240582 LOG (Client)] ==== End request body ===
[13:28:05.242046 LOG (Server)] Response:  {'t': 1694179685, 'success': True}

[13:28:05.265495 Log (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='GET', uri='/files/ESPHome-Kickstart-v23.08.29_bk7231n_app.ota.ug.bin', version='HTTP/1.1', remote_ip='10.42.42.38')
[13:28:05.265653 LOG (Server)] Response:  bytes=0-561887
[13:28:05.302113 MQTT Received] Topic: smart/device/out/c44aKuT2z9FxyIA3JCJI - Message: {"protocol":16,"data":{"progress":"0","firmwareType":0}}
[13:28:09.535123 MQTT Received] Topic: smart/device/out/c44aKuT2z9FxyIA3JCJI - Message: {"protocol":16,"data":{"progress":"30","firmwareType":0}}
[13:28:13.106580 MQTT Received] Topic: smart/device/out/c44aKuT2z9FxyIA3JCJI - Message: {"protocol":16,"data":{"progress":"60","firmwareType":0}}
[13:28:13.134012 MQTT Received] Topic: log/log_seq/c44aKuT2z9FxyIA3JCJI - Message: http | 2.3.1 | 01-01 00:00:04 | erc:0 | [20:tuya.device.uuid.pskkey.get | 25:-2050]
[13:28:15.354138 MQTT Received] Topic: smart/device/out/c44aKuT2z9FxyIA3JCJI - Message: {"protocol":16,"data":{"progress":"72","firmwareType":0}}

[13:28:16.595679 Log (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.timer.count&devId=c44aKuT2z9FxyIA3JCJI&et=1&t=1694179695&v=4.0&sign=d9fb155042ccf00e07a715823c0fcfc3', version='HTTP/1.1', remote_ip='10.42.42.38')
[13:28:16.595868 LOG (Client)] ==== Request body ===
{"devId":"c44aKuT2z9FxyIA3JCJI","lastFetchTime":"0","t":1694179695}
[13:28:16.595990 LOG (Client)] ==== End request body ===
[13:28:16.598696 LOG (Server)] Response:  {'result': {'devId': 'c44aKuT2z9FxyIA3JCJI', 'count': 0, 'lastFetchTime': 0}, 't': 1694179696, 'success': True}

[13:28:17.000175 Log (Client)] Request: HTTPServerRequest(protocol='http', host='10.42.42.1', method='POST', uri='/d.json?a=tuya.device.upgrade.silent.get&devId=c44aKuT2z9FxyIA3JCJI&et=1&t=1694179696&v=4.4&sign=45dc6e3647f99facaa12094377fae711', version='HTTP/1.1', remote_ip='10.42.42.38')
[13:28:17.000453 LOG (Client)] ==== Request body ===
{"subId":null,"t":1694179696}
[13:28:17.000991 LOG (Client)] ==== End request body ===
[13:28:17.003659 LOG (Server)] Response:  {'t': 1694179697, 'success': True}
[13:28:17.019969 MQTT Received] Topic: log/log_seq/c44aKuT2z9FxyIA3JCJI - Message: upgrade | 2.3.1 | 09-08 13:28:17 | erc:0 | [13:0]
[13:28:17.213453 MQTT Received] Topic: smart/device/out/c44aKuT2z9FxyIA3JCJI - Message: {"protocol":16,"data":{"progress":"77","firmwareType":0}}
[13:28:19.310122 MQTT Received] Topic: smart/device/out/c44aKuT2z9FxyIA3JCJI - Message: {"protocol":16,"data":{"progress":"84","firmwareType":0}}
[13:28:21.383987 MQTT Received] Topic: smart/device/out/c44aKuT2z9FxyIA3JCJI - Message: {"protocol":16,"data":{"progress":"90","firmwareType":0}}
[13:28:22.333309 MQTT Received] Topic: smart/device/out/c44aKuT2z9FxyIA3JCJI - Message: {"protocol":16,"data":{"progress":"92","firmwareType":0}}
[13:28:22.691672 Firmware Upload] /files/ESPHome-Kickstart-v23.08.29_bk7231n_app.ota.ug.bin send complete, request range: bytes=0-561887/561888
[13:28:22.995197 MQTT Received] Topic: smart/device/out/c44aKuT2z9FxyIA3JCJI - Message: {"protocol":16,"data":{"progress":"98","firmwareType":0}}
Firmware file has been sent and MQTT reported a progress of nearly complete.  Waiting 15 seconds to ensure flashing completes.
Flashing should be complete.  It takes about 15 seconds for the device to reboot and verify the flash was valid.
Please wait about 30 seconds then look for signs of activity from the firmware you supplied (either watch for AP mode or check if it joined your network).
Device MAC address: 1c:90:ff:85:06:fe

But unfortunately the Wifi AP kickstart-BK7231N is not visible/appearing.
Any idea what the reason could be? I would be very thankful for any tip.

Best Francesco

Option for ESP based boards

Hey there!

Is it possible to enable this to work on ESP-based boards so that .bin files are generated for ESP8266 and ESP32 boards? Sometimes it is a bit tricky to track down what pins are used on some devices.

Cheers.

ESPHome via UART

Hey there,

I'm trying to flash image_bk7231t_app.ota.ug.bin via UART on an already cloud-cut device (using OpenBK7231T_App), but I'm not seeing a wifi network to connect to the device....?

Reason I want to try esphome-kickstart is mainly because OpenBK7231T's IR implementation sucks, and I know esphome uses IRRemoteESP8266 library which is a hell of a lot better....

Any ideas?

BK7231Q support

I have a WA2 module with BK7231Q chip. I can find here the pinout so I could connect it with UART and flash it with ltchiptool.
Will it be supported? Do I have any other options to flash ESPHome?

Unable to scan ESP devices

Apologies if I've misunderstood but ESP support was recently added yet I cannot scan any ESP8266 or ESP32 devices with esphome-kickstart flashed to them. ltchiptool with the UKP2ESPHome plugin reports that the device isn't running kickstart firmware.

From what I can tell the ESP version is not running the hub_api (which depends on libretiny) so there is no endpoint listening for /flash_read which is probably why the tool reports the error.

Have I misunderstood the capabilities of the ESP support?

Using latest versions of all software mentioned.

directions?

I am trying to dump the firmware for Device model number: 35798 Globe Electric A19 lightbulb (very common at costco in Canada)

In order to submit the information so that ESPhome can be flashed to it.
@kuba2k2 gave some information to get me started but I cant find any directions for this anywhere.
I have downloaded https://github.com/libretiny-eu/esphome-kickstart/releases/download/v23.04.28/image_bk7231n_app.ota.ug.bin
placed it in the custom firmware folder of cloudcutter but before I proceeded I wondered if there was anything I needed to do?

Also a http command was mentioned I am guessing to read particular information from the firmware at certain offsets. How do I go about ascertaining the offsets?

Error compiling yaml to UF2

So far everytime I try to compile a yaml profile to a UF2 file to load on to my Kickstart flashed device I receive this error in ESPHome:

arm-none-eabi-g++: fatal error: Killed signal terminated program cc1plus

It is a fatal error that leads to the needed UF2 file not being created. Any help would be greatly appreciated.

esphome-kick start on already clout cut device

i have already done cloud cut and have access to device webpage. I want pins layouts and trying to install esphome-kickstart

i tried uploading the uf2 file found at
https://github.com/libretiny-eu/esphome-kickstart/releases/download/v23.04.28/kickstart-bk7231n-2023-04-28.uf2

but getting error. What i am doing is accessing the web page of the esp device , OTA update > chose file > add uf2 file mentioned at the link. but update is unsuccessful with error

[W] [web_server_base:034]
OTA Update failed! Error: ard=11,uf2=3

can u guide how to install esphome-kickstart on already cloudcut esp device?

RTL8710BN web server not working

I tried to flash a RTL8710BN and I couldn't open the web server view to check for the pins inputs/outputs or update OTA.
Also the device was not discovered automatically in the esphome web view. The BK7231 were auto discovered.

The RTL8710BN was discovered in Home Assistant and I could check there the pins to identify which are the inputs/outputs. I double checked that the web_server component exists in import-rtl8710bn.yaml and I recompiled the .uf2 file without success.
Finally I was able to upload OTA using esphome by adding the device's IP in use_address:..., so the computer was able to find the device with its IP, it was just the web UI that was not working.

Is it an issue with RTL8710BN? Did anyone else experience this issue with RTL8710BN?
It's not a problem for me but I mentioned it in case anyone thinks the flashing was not success.

ESP8285 different config

I need to flash a few devices with ESP8285 to identify their inputs and outputs.
I added new config files in yaml folder withboard: esp8285 and built the firmware. It seems to work fine but I'm not sure if that was necessary.
Could I just use the ESP8266 firmware?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.