Search found 81 matches

by guyd
Sun Jul 22, 2018 10:10 am
Forum: General Discussion and Questions
Topic: MQTT for MicroPython under ESP32
Replies: 14
Views: 10202

Re: MQTT for MicroPython under ESP32

Thank you,
the purpose of Finally - I know from good old python,
BUT
after closing the socket, will it keep listening forever ?

Cheers
Guy
by guyd
Sun Jul 22, 2018 10:08 am
Forum: ESP32 boards
Topic: MicroPython - ESP32 - Is is possible to update files?
Replies: 15
Views: 10013

Re: MicroPython - ESP32 - Is is possible to update files?

Hi,
Yes, Wifi is activated, but WEBRepl is available for ESP32 ?
by guyd
Sun Jul 22, 2018 9:24 am
Forum: General Discussion and Questions
Topic: MQTT for MicroPython under ESP32
Replies: 14
Views: 10202

Re: MQTT for MicroPython under ESP32

Hi,
you don't have to be formal, Guy will do, or: d, guyd as james says.

So- the "finally" part is for crash exemptions ? I just want to be sure that ESP will keep waiting for my calls.

Guy,
by guyd
Sun Jul 22, 2018 9:04 am
Forum: General Discussion and Questions
Topic: MQTT for MicroPython under ESP32
Replies: 14
Views: 10202

Re: MQTT for MicroPython under ESP32

Hi,
donald_duck will do too :)
when you close a socket, how would you keep listening for future publishes ?
by guyd
Sun Jul 22, 2018 8:31 am
Forum: ESP32 boards
Topic: ESP32 - update clock after boot
Replies: 11
Views: 9840

Re: ESP32 - update clock after boot

`ntptime` is alluded to in the ESP8266 docs but, you're right, it's not been well documented. As best I can tell it's only in the ESP8266 and ESP32 ports (and a different implementation in the Loboris fork as Dave mentioned). Since it's a pure python implementation it could be easily added to any o...
by guyd
Sun Jul 22, 2018 8:20 am
Forum: General Discussion and Questions
Topic: MQTT for MicroPython under ESP32
Replies: 14
Views: 10202

Re: MQTT for MicroPython under ESP32

G'day Guy, I found using the uPy IDE (https://dfrobot.gitbooks.io/upycraft/) , this example (search for MQTT) works. https://dfrobot.gitbooks.io/upycraft/nei-zhi-examples-zhi-communicate.html cheers, Steve Hi, Great! my guess is "sub_cb" @uMQTT replaces "on_message" @ MQTT. Can you explain why code...
by guyd
Sun Jul 22, 2018 7:36 am
Forum: General Discussion and Questions
Topic: MQTT for MicroPython under ESP32
Replies: 14
Views: 10202

MQTT for MicroPython under ESP32

Hi, I'm using a python code to execute GPIO commands on demand, using MQTT - which works excellent on RPI. Now I'm trying to implement same concept on a ESP32, but MQTT syntax is a bit different on umqtt. I'm looking for some examples for such code that is subscribed to a topic ( with loop_forever )...
by guyd
Sun Jul 22, 2018 6:21 am
Forum: ESP32 boards
Topic: MicroPython - ESP32 - Is is possible to update files?
Replies: 15
Views: 10013

MicroPython - ESP32 - Is is possible to update files?

Hi,

I'm using ESP32 to activate a scheduled GPIO on and off ( relay ).
Time schedule is defined in a file saved on ESP32.

Is it possible to change this text file while ESP32 is not connected to PC using cable (ESP32 is already installed on remote location ) ?

Guy
by guyd
Sun Jul 22, 2018 6:06 am
Forum: ESP32 boards
Topic: ESP32 - update clock after boot
Replies: 11
Views: 9840

Re: ESP32 - update clock after boot

This was what I did using the loboris port: https://github.com/mozilla-iot/webthing-upy/blob/172151f0dc866f685ad9f4bea1c6a07bdd41f0da/connect.py#L12-L24 I don't know if the same thing works or not on the official ESP32 version. Oh, so machine module has a ntp_sync module? I does not show in MiccroP...
by guyd
Sun Jul 22, 2018 6:02 am
Forum: ESP32 boards
Topic: ESP32 - update clock after boot
Replies: 11
Views: 9840

Re: ESP32 - update clock after boot

There is primitive NTP support in the ESP32 port (borrowed from the ESP8266 port). In short: import ntptime ntptime.settime() # Synchronise the system time using NTP Caveat: There is no timezone support so the system time will be set to UTC. Does ntptime module supported in Micropython or is it app...