Skip to content

Commit

Permalink
Switch to yaota8266 fork from @jedie
Browse files Browse the repository at this point in the history
  • Loading branch information
rroemhild committed Jan 6, 2020
1 parent 5593e42 commit a9999d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ flash-ota:
esptool.py --port $(PORT) --baud 460800 write_flash --flash_size=detect --verify -fm dio 0x3c000 micropython/ports/esp8266/build-GENERIC/firmware-ota.bin

sign-ota:
cd yaota8266/ota-client; python ota_client.py sign ../../micropython/ports/esp8266/build-GENERIC/firmware-ota.bin
yaota8266/cli.py sign micropython/ports/esp8266/build-GENERIC/firmware-ota.bin

espopensdk:
-git clone --recursive https://github.com/pfalcon/esp-open-sdk.git
Expand All @@ -70,10 +70,13 @@ micropython:
cd micropython; git apply ../micropython.patch

yaota:
-git clone --recursive https://github.com/schinckel/yaota8266.git
cd yaota8266; git checkout merged
-git clone --recursive https://github.com/jedie/yaota8266.git
cd yaota8266; git checkout develop
cd yaota8266; make rsa-keys;
cd yaota8266; cp config.h.example config.h
cd yaota8266/ota-client; bash gen_keys.sh;

yaota-build:
cd yaota8266; make build

bootstrap: espopensdk micropython

Expand Down
5 changes: 3 additions & 2 deletions homie/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def sub_cb(self, topic, payload, retained):
# Micropython extension
elif topic.endswith(T_MPY):
if payload == "reset":
reset()
launch(self.reset, ("reset",))
elif payload == "webrepl":
launch(self.reset, ("webrepl",))
elif payload == "yaota8266":
Expand Down Expand Up @@ -284,7 +284,8 @@ def run_forever(self):
loop.run_until_complete(self.run())

async def reset(self, reason):
RTC().memory(reason)
if reason != "reset":
RTC().memory(reason)
await self.publish(DEVICE_STATE, reason)
await self.mqtt.disconnect()
await sleep_ms(500)
Expand Down

0 comments on commit a9999d8

Please sign in to comment.