Page 1 of 1

webrepl is not working?

Posted: Sat Sep 07, 2019 5:49 pm
by zmaier
Hello,

i am using a wemos D1 Mini Pro with a HX711 and a DS18B20. Everey ten minutes data is send to a thingspeak and InfluxDB Server. So far, everything is working fine.
But, i want to connect to the system via webrepl. The daemon is started :
“WebREPL daemon started on ws://192.168.43.186:8266
Started webrepl in normal mode”

But i can not connect, i always get the answer "Disconnected” at the webrepl page.
Why is it not working? Any idea, what could i try?

JFYI: Both, Wemos and Laptop are connected to a wlan hotspot made with my mobile phone? Does this have any influence?

regards
Martin

Re: webrepl is not working?

Posted: Sat Sep 07, 2019 6:10 pm
by kevinkk525
Strange, I have the same problem.. No error/debug output on the esp either.

But if you clone/download the webrepl repository to your desktop and open it from there then it works.

Re: webrepl is not working?

Posted: Sat Sep 07, 2019 9:09 pm
by zmaier
I downloaded the repository, but my setup is not working :(
https://github.com/micropython/webrepl

Re: webrepl is not working?

Posted: Sun Sep 08, 2019 8:51 am
by zmaier
One sleepless night later, i found the problem.

boot.py -> main.py -> import run.mpy

So my program is precompiled and is started with import run.mpy and here is the problem.
Within run,mpy you have to call

Code: Select all

import webrepl
webrepl.start()
I had that code in boot.py :)

Now everthing is working.
But still the documentation is a bit strange, because there is not written, that you have to start werepl-daemon in your code.. During the setup-dialog it says, the daemon is starting automatically at boot

Re: webrepl is not working?

Posted: Sun Sep 08, 2019 9:00 am
by kevinkk525
It is started automatically because those lines will get added to the boot.py
If that is not the case for you then you might have changed your boot.py or something similar.