uPyEasy

Moderators: Voyager, BertB, Stuntteam, LisaM

Message
Author
AndrewJ
Normal user
Posts: 228
Joined: 14 Feb 2017, 12:38

Re: uPyEasy

#101 Post by AndrewJ » 20 Dec 2017, 20:56

Just tried the latest version from Google Drive on my DOIT Devboard V1. I temporarily removed security on my wireless network to allow it to connect.

Unfortunately still getting errors a few seconds after restart. This is from the log after the long series of startup messages....

* Running on http://0.0.0.0:80/
2000-01-01T00:00:09.005 [debug] uPyEasy-uPyEasy: Protocols: Async processing protocols
2000-01-01T00:00:09.005 [debug] uPyEasy-uPyEasy: Plugins: Async processing plugins
Traceback (most recent call last):
File "boot.py", line 2, in <module>
File "upyeasy/__init__.py", line 57, in main
File "picoweb/__init__.py", line 240, in run
File "uasyncio/core.py", line 127, in run_forever
File "uasyncio/core.py", line 88, in run_forever
File "uasyncio/__init__.py", line 241, in start_server
OSError: 128
OSError: [Errno 2] ENOENT
MicroPython v1.9.3-181-g02d2a0f-dirty on 2017-12-19; ESP32 module with ESP32
Type "help()" for more information.

Actually two OSErrors this time! :( :(
Hope the above info helps.
As with the earlier version, I see the ESP32 with an IP address in my router, so its "nearly" working.

BTW I have noticed that it says "* Running on http://0.0.0.0:80/" - this IP address puzzles me a bit (probably an ignorant question).

If you have time to make a special firmware version to get round this, I'd be most grateful.

I haven't checked it on my Wemos LOLIN LITE yet. I'll try to do that later this evening.
Cheers,
AndrewJ

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#102 Post by LisaM » 20 Dec 2017, 21:06

AndrewJ wrote:
20 Dec 2017, 17:55
Thanks, Lisa. Excellent work! :D
I'll give the new version a try on my Doit board and I'll let you know about oserror 128.
Since the previous alpha I've received a Wemos Lolin Lite ESP32. I'll try that as well.
Cheers
AndrewJ
I'm waiting for the ordered Lolin32 Pro, it has the ESP32-WROVER module with 4MB PsRam, Bluetooth and SD card.
I'm working on including bluetooth, SD card and thread based support functionality in uPyEasy. I'll have everything running on one core and all plugins on another, performance should be awesome then. For latency the pyboard will be much better, for functionality the ESP32. With 4MB PsRam stack and heap space are no longer an issue and lots of new functionality will be possible. All of this is costing $9!
Many sensor already have python drivers, so make them should be simple. I've tried to make the plugin and protocol coding as simple and reliable as possible, it should be very easy to convert existing plugin/protocol code to uPyEasy.
Scripting is also something i'm working on, plan is to have the first scripting possible at the first beta.

I'm also working on the python driver for grovkillen's senseair co2 measuring device, i'll need that for a prototype hardware device i'm developing for the business markets.

Besides all of this, i also have a very busy job as (the only) Data Architect for the largest insurance corporation here.. Sometimes it's hard to balance all of this, so please have some patience if development progress is slow at some weeks.. ;)

AndrewJ
Normal user
Posts: 228
Joined: 14 Feb 2017, 12:38

Re: uPyEasy

#103 Post by AndrewJ » 20 Dec 2017, 21:08

Just gave it a try on the Wemos LOLIN LITE.

Unfortunately, I get the same two errors, 128 then 2/ENOENT :(

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#104 Post by LisaM » 20 Dec 2017, 21:13

AndrewJ wrote:
20 Dec 2017, 20:56
Just tried the latest version from Google Drive on my DOIT Devboard V1. I temporarily removed security on my wireless network to allow it to connect.

Unfortunately still getting errors a few seconds after restart. This is from the log after the long series of startup messages....

* Running on http://0.0.0.0:80/
2000-01-01T00:00:09.005 [debug] uPyEasy-uPyEasy: Protocols: Async processing protocols
2000-01-01T00:00:09.005 [debug] uPyEasy-uPyEasy: Plugins: Async processing plugins
Traceback (most recent call last):
File "boot.py", line 2, in <module>
File "upyeasy/__init__.py", line 57, in main
File "picoweb/__init__.py", line 240, in run
File "uasyncio/core.py", line 127, in run_forever
File "uasyncio/core.py", line 88, in run_forever
File "uasyncio/__init__.py", line 241, in start_server
OSError: 128
OSError: [Errno 2] ENOENT
MicroPython v1.9.3-181-g02d2a0f-dirty on 2017-12-19; ESP32 module with ESP32
Type "help()" for more information.

Actually two OSErrors this time! :( :(
Hope the above info helps.
As with the earlier version, I see the ESP32 with an IP address in my router, so its "nearly" working.

BTW I have noticed that it says "* Running on http://0.0.0.0:80/" - this IP address puzzles me a bit (probably an ignorant question).

If you have time to make a special firmware version to get round this, I'd be most grateful.

I haven't checked it on my Wemos LOLIN LITE yet. I'll try to do that later this evening.
Cheers,
AndrewJ
Line 214 is:

Code: Select all

s2, client_addr = s.accept()
The 0.0.0.0 is ok, it means any available ip-address.
Can you send the entire log?

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#105 Post by LisaM » 20 Dec 2017, 21:29

AndrewJ wrote:
20 Dec 2017, 21:08
Just gave it a try on the Wemos LOLIN LITE.

Unfortunately, I get the same two errors, 128 then 2/ENOENT :(
New version on google drive, can you load that one in the ESP32?
After the error do:
>>> Import uos
>>> uos.remove('boot.py')

Then power cycle.

After reboot, on repl prompt:
>>> import wstest

And let me know what happens... ;)

Ps wstest.py is just this test program:

Code: Select all

import socket
from machine import Pin

#led_pin = Pin(5, Pin.OUT)

CONTENT = """\
HTTP/1.0 200 OK
Content-Type: text/html

<html>
  <head>
  </head>
  <body>
    <p>Hello #%d from MicroPython!</p>
    <a href="/toggle">Click here to toggle LED hooked to pin 5</a>
  </body>
</html>
"""

def main():
    s = socket.socket()
    ai = socket.getaddrinfo("0.0.0.0", 80)
    print("Bind address info:", ai)
    addr = ai[0][-1]

    s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    s.bind(addr)
    s.listen(5)
    print("Listening, connect your browser to http://<this_host>:80/")

    counter = 0
    while True:
        sock, addr = s.accept()
        print("Client address:", addr)
        stream = sock.makefile("rwb")
        req = stream.readline().decode("ascii")
        method, path, protocol = req.split(" ")
        print("Got", method, "request for", path)
        if path == "/toggle":
            led_pin.value(1-led_pin.value())
        while True:
            h = stream.readline().decode("ascii").strip()
            if h == "":
                break
            print("Got HTTP header:", h)
        stream.write((CONTENT % counter).encode("ascii"))
        stream.close()
        sock.close()
        counter += 1
        print()

main() # Press Ctrl-C to stop web server

AndrewJ
Normal user
Posts: 228
Joined: 14 Feb 2017, 12:38

Re: uPyEasy

#106 Post by AndrewJ » 20 Dec 2017, 23:03

Hi Lisa,
Ok, I followed the steps
LisaM wrote:
20 Dec 2017, 21:29
New version on google drive, can you load that one in the ESP32?
After the error do:
>>> Import uos
>>> uos.remove('boot.py')
After reboot, on repl prompt:
>>> import wstest
and I got
I (26302) modsocket: Initializing
Bind address info: [(2, 1, 0, '0.0.0.0', ('0.0.0.0', 80))]
Listening, connect your browser to http://<this_host>:80/

Not sure what to make of this...
In my router, I'm not seeing the ESP32 now. (even with wireless security disabled again).
Think I'm missing something but not sure what.

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#107 Post by LisaM » 21 Dec 2017, 00:46

Hi Andrew,

Very interesting, because the test program is doing exactly the same as uPyEasy:
wstest:

Code: Select all

sock, addr = s.accept()
uPyEasy (actually uasyncio):

Code: Select all

s2, client_addr = s.accept()
So, something is different because of the uasyncio error at line 241. I'll read some docs to find out what the difference is.
Can you get me a complete log?

AndrewJ
Normal user
Posts: 228
Joined: 14 Feb 2017, 12:38

Re: uPyEasy

#108 Post by AndrewJ » 21 Dec 2017, 09:04

Can you get me a complete log?
Having trouble attaching file here. It keeps saying invalid extension. I'll email it to you.
AndrewJ

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#109 Post by LisaM » 21 Dec 2017, 10:22

AndrewJ wrote:
21 Dec 2017, 09:04
Can you get me a complete log?
Having trouble attaching file here. It keeps saying invalid extension. I'll email it to you.
AndrewJ
Got it, uPyEasy does get an ip address so that should be no problem. Looking into it.

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#110 Post by LisaM » 22 Dec 2017, 13:12

AndrewJ wrote:
20 Dec 2017, 23:03
Hi Lisa,
Ok, I followed the steps
LisaM wrote:
20 Dec 2017, 21:29
New version on google drive, can you load that one in the ESP32?
After the error do:
>>> Import uos
>>> uos.remove('boot.py')
After reboot, on repl prompt:
>>> import wstest
and I got
I (26302) modsocket: Initializing
Bind address info: [(2, 1, 0, '0.0.0.0', ('0.0.0.0', 80))]
Listening, connect your browser to http://<this_host>:80/

Not sure what to make of this...
In my router, I'm not seeing the ESP32 now. (even with wireless security disabled again).
Think I'm missing something but not sure what.
This is my ESP32 testmachine: https://nl.aliexpress.com/item/Official ... 21054.html
Isn't that the same as your ESP32?

AndrewJ
Normal user
Posts: 228
Joined: 14 Feb 2017, 12:38

Re: uPyEasy

#111 Post by AndrewJ » 22 Dec 2017, 17:44

This is my ESP32 testmachine: https://nl.aliexpress.com/item/Official ... 21054.html
Isn't that the same as your ESP32?
Yes, it looks the same as mine. Yours could possibly be a different version of the ESP32 chip if it is recently purchased. Mine was bought about 6 months ago, also from Aliexpress.
The chip version shows when you do an erase or download to it, when it detects the chip type. Mine is ESP32DOWDQ6 (revision 0). I think I have read somewhere that there is a revision 1 about by now.

Have you already received your ESP32 or is it in transit?

Cheers
AndrewJ

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#112 Post by LisaM » 22 Dec 2017, 20:53

AndrewJ wrote:
22 Dec 2017, 17:44
This is my ESP32 testmachine: https://nl.aliexpress.com/item/Official ... 21054.html
Isn't that the same as your ESP32?
Yes, it looks the same as mine. Yours could possibly be a different version of the ESP32 chip if it is recently purchased. Mine was bought about 6 months ago, also from Aliexpress.
The chip version shows when you do an erase or download to it, when it detects the chip type. Mine is ESP32DOWDQ6 (revision 0). I think I have read somewhere that there is a revision 1 about by now.

Have you already received your ESP32 or is it in transit?

Cheers
AndrewJ
I have these 3:
https://www.aliexpress.com/item/Officia ... 21054.html -> Chip is ESP32D0WDQ6 (revision 1)
https://www.aliexpress.com/item/ESP32-B ... 25963.html
https://nl.aliexpress.com/item/LOLIN32- ... 82537.html

With the last one, the Lolin32, is on it's way to me. The Lolin32 has 4MB PsRam, so uPyEasy could then also run in ram instead of flash.
uPyEasy wil support all if not most ESP32 version, including ssd1306 en the ILI9341 touch tft screen.

What's the second ESP32 chip version you have?

One way or another, we will fix this... ;)

AndrewJ
Normal user
Posts: 228
Joined: 14 Feb 2017, 12:38

Re: uPyEasy

#113 Post by AndrewJ » 22 Dec 2017, 21:42

What's the second ESP32 chip version you have?
It's a Wemos LOLIN LITE32 (v1.0.0) board (seems to be a cut-down LOLIN32 with less GPIOs exposed).
https://www.aliexpress.com/item/WEMOS-L ... 0.0.DIgzf6
This apparently comes with Micropython loaded - but I didn't realise until -after- I'd erased and loaded upyeasy!
Chip is ESP32DOWDQ6 (revision 1).
One way or another, we will fix this... ;)
Absolutely. I'll be glad to help any way I can. I can certainly do more testing when you are ready, and I'm keen to learn Micropython too, although I'm starting from ground zero.

Best regards
AndrewJ

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#114 Post by LisaM » 22 Dec 2017, 23:39

AndrewJ wrote:
22 Dec 2017, 21:42
I'm keen to learn Micropython too, although I'm starting from ground zero.
Python is King of the Hill: https://www.ibm.com/developerworks/comm ... ce?lang=en

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#115 Post by LisaM » 22 Dec 2017, 23:44

AndrewJ wrote:
22 Dec 2017, 21:42
Chip is ESP32DOWDQ6 (revision 1).
The already installed ESP32 micropython version was probably an old one, they migrated the ESP32 micropython branch back into the master branch just a week ago and the master branch is the one we're using. ;)
Since the chip is the same, the OSError 128 error shouldn't happen... Continuing search...

Admin
Site Beheer
Posts: 9
Joined: 14 Apr 2015, 20:54

Re: uPyEasy

#116 Post by Admin » 23 Dec 2017, 09:22

Topic moved to dedicated uPyEasy subforum

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#117 Post by LisaM » 23 Dec 2017, 15:33

Hi Andrew,

Shall we continue at viewtopic.php?f=22&t=3906 for your ESP32?

Cheers,

Lisa

AndrewJ
Normal user
Posts: 228
Joined: 14 Feb 2017, 12:38

Re: uPyEasy

#118 Post by AndrewJ » 23 Dec 2017, 20:48

Yes, it's good to have a dedicated area of the forum for uPyEasy :)

karl222
Normal user
Posts: 88
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: uPyEasy

#119 Post by karl222 » 06 Jan 2018, 20:28

hey guys,

many thanks for your great efforts bringing espeasy to the next Level!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

As I am not a pro on all that stuff I would appreciate having a FlashESPxxx tool as with ESP Mega in order to install upyeasy...

Maybe you did already and I am just too dumb to have it seen.

many thanks, great work!
karl

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#120 Post by LisaM » 06 Jan 2018, 20:40

karl222 wrote:
06 Jan 2018, 20:28
hey guys,

many thanks for your great efforts bringing espeasy to the next Level!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

As I am not a pro on all that stuff I would appreciate having a FlashESPxxx tool as with ESP Mega in order to install upyeasy...

Maybe you did already and I am just too dumb to have it seen.

many thanks, great work!
karl
Tool & instructions: viewtopic.php?f=22&t=3906

karl222
Normal user
Posts: 88
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: uPyEasy

#121 Post by karl222 » 11 Jan 2018, 14:51

Thx!

waspie
Normal user
Posts: 106
Joined: 09 Feb 2017, 19:35

Re: uPyEasy

#122 Post by waspie » 17 Jan 2018, 01:55

when might there be support for MQTT for openhab?

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#123 Post by LisaM » 22 Jan 2018, 14:16

LisaM wrote:
22 Oct 2017, 12:55
BertB wrote:
22 Oct 2017, 09:40
Thank you LisaM.
Do you think there will be room for something as easy as Rules?
I can imagine scripting is much more powerfull, but it looks like learning a new complex-ish language.
How about an example script that resembles the old rules script as close as possible? It will basically act as a template for rule based scripting, simple but leaving the option open of making it complex. Will something like that help you?

For example this old rule part:

Code: Select all

On TurnOn do
    gpio,12,1
EndOn
will be turned into this:

Code: Select all

if TurnOn:
    gpio (12,1)
endif
Scripts have grown to become almost normal, but changeable, micropython programs. Despite it's great benefit, everything is now possible with scripts, it has a big downside: you'll need to program Python.

So... i've kept Scripts, but re-introduced rules.
Rule example:

Code: Select all

if event['test#temperature'] > 15 :
     gpio('d12',1)
     event['timer1'] = 60   # seconds
 

Code: Select all

if timer1:
     gpio('d12',0)

Code: Select all

if turnon:
    gpio('d12',1)
    event['timer1'] = 60   # seconds
Since rules are way slower then scripts, i'm limiting it to one code block per file and each code block must still be correct Python. That will save some performance, since each file can then be parsed on demand instead of all of them.

Is that still exceptable?

BertB
Normal user
Posts: 1001
Joined: 25 Apr 2015, 14:39

Re: uPyEasy

#124 Post by BertB » 22 Jan 2018, 19:40

Yes, I think it is great.

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#125 Post by LisaM » 24 Jan 2018, 11:20


LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#126 Post by LisaM » 24 Jan 2018, 11:23

uPyEasy beta-1 is also having the menu's Scripts, Rules and Notifications hidden by default to make the menu bar less complex. They can be enabled in the advanced menu:
upyeasy menu hidden.JPG
upyeasy menu hidden.JPG (26.21 KiB) Viewed 5675 times

leel1967l
Normal user
Posts: 62
Joined: 30 Nov 2017, 18:29

Re: uPyEasy

#127 Post by leel1967l » 20 Feb 2018, 10:35

Hi Lisa,
very nice work.

Is there an alpha version compatible with Wemos D1 Mini with ESP 8266 and/or D1 Mini Lite ESP 8285?

thanks

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#128 Post by LisaM » 20 Feb 2018, 16:15

leel1967l wrote:
20 Feb 2018, 10:35
Hi Lisa,
very nice work.

Is there an alpha version compatible with Wemos D1 Mini with ESP 8266 and/or D1 Mini Lite ESP 8285?

thanks
Hi leel1967l,

Not yet, i'm planning on a beta version for the ESP8266 to be released soon.

Cheers,

Lisa

uweklaus
Normal user
Posts: 7
Joined: 28 Feb 2018, 09:33

Re: uPyEasy

#129 Post by uweklaus » 28 Feb 2018, 12:04

Hi LisaM,

I would also love to test it on a WeMOS D1 mini ... :)

roondar
Normal user
Posts: 1
Joined: 08 Jan 2018, 23:08

Re: uPyEasy

#130 Post by roondar » 07 May 2018, 16:51

@LisaM

Really great work :p

dony71
Normal user
Posts: 13
Joined: 25 Apr 2018, 20:01

Re: uPyEasy

#131 Post by dony71 » 07 Sep 2018, 22:00

any version for ESP8266 to try yet?

iiot
Normal user
Posts: 1
Joined: 30 Mar 2019, 06:01

Re: uPyEasy

#132 Post by iiot » 30 Mar 2019, 06:03

Lisa what ever happened to this? Will you be releasing an ESP8266 version? I think this firmware would be perfect for a project i have

LisaM
Normal user
Posts: 511
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#133 Post by LisaM » 29 May 2019, 00:24

iiot wrote:
30 Mar 2019, 06:03
Lisa what ever happened to this? Will you be releasing an ESP8266 version? I think this firmware would be perfect for a project i have
Hi iiot,

The source code has grown to such a size that it's using to much heap memory to be able to use it on a ESP8266, so minimal requirements is still the ESP32.

Cheers,

Lisa

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest