uPyEasy

Moderators: Voyager, BertB, grovkillen, Stuntteam, LisaM

Message
Author
LisaM
Normal user
Posts: 513
Joined: 11 Apr 2017, 18:29

Re: uPyEasy

#51 Post by LisaM » 21 Oct 2017, 19:51

grovkillen wrote: 21 Oct 2017, 13:15 Lisa will release this when it is mature enough. She only use this thread to show current status and get feedback.
+10!

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

Re: uPyEasy

#52 Post by LisaM » 21 Oct 2017, 20:39

BertB wrote: 21 Oct 2017, 12:27 This is a realy great development.
But, I wonder how Easy it will be in the end to setup and use.
I also wonder how 'high speed' or 'real time' modules are handled.
And how portable modules will be across the various platforms. Will it be possible to develop a DS1820 module that can be uses on all platforms and if no, how does one cope with the differences.
uPyEasy uses the micropython hardware API: https://github.com/micropython/micropyt ... rdware-API
So far i haven't encountered any differences between esp8266 wifi and esp32 wifi, also the onboard led is reacting exactly the same on the pyboard and the esp32 (uPyEasy active: led on, uPyEasy not active (crash for example): led off). I haven't had enough experience with all platforms to be 100% sure, but so far it looks promising.

The ds1820 module will be part of the first beta's, simply because it's currently already available on all platforms as an micropython program. Due to the micropython hardware api, there are no differences from a micropython program viewpoint which uPyEasy is.

Initial setup is described in a earlier post, it does work exactly like that. Tested on pyboard and esp32, linux network settings cannot be changed directly from micropython, and it works.

I believe the speed will be more then enough for it's purpose, also because of the async nature of uPyEasy. To give an impression of the speed, i have attached a screen capture video of all three platforms.

Like grovkillen said before, i'm showing this so that you can take a look at the build in progress and give me feedback concerning what uPyEasy is capable of. I'm building in a continuous pace, beginning with the UI which is the backbone. If that works on all platforms using the same code base (which is what it currently does) then it's time for a next step. I'll bake a few firmware's for you guys to play with (since it's only the UI, nothing else can be done with it).
Attachments
uPuEasy - Google Chrome 21-10-2017 20_26_29.zip
(3.12 MiB) Downloaded 923 times

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

Re: uPyEasy

#53 Post by BertB » 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.

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

Re: uPyEasy

#54 Post by LisaM » 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

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

Re: uPyEasy

#55 Post by BertB » 22 Oct 2017, 14:48

It sure does.

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

Re: uPyEasy

#56 Post by LisaM » 22 Oct 2017, 15:03

As you maybe have seen in the uPyEasy movie, the dates in uPyEasy are wrong. That is because NTP isn't implemented yet, the default manufacturing date is used, so i put it on my short list for now. Also syslog is a desire of mine, since uPyEasy starts to generate more and more debug log messages which scroll of the screen. Syslog also put on my todo short list.

Working on the tools tab, i noticed that the 'advanced' subtab size is spiraling out of control, so i have put it in a separate main tab:
upyeasy advanced.JPG
upyeasy advanced.JPG (31.71 KiB) Viewed 71206 times

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

Re: uPyEasy

#57 Post by AndrewJ » 22 Oct 2017, 22:31

This is a really interesting development, keep the updates coming please! :)
I like the idea of examples of old and new rules/scripts. A range of complexity would be good, going from the simple to the more advanced. That's if time allows!

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: uPyEasy

#58 Post by toffel969 » 23 Oct 2017, 18:39

BertB wrote: 22 Oct 2017, 14:48It sure does.
+1 on that, got so used to the rules engines with all its limitations and features :-)
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

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

Re: uPyEasy

#59 Post by LisaM » 23 Oct 2017, 18:46

toffel969 wrote: 23 Oct 2017, 18:39 +1 on that, got so used to the rules engines with all its limitations and features :-)
The rules will still be there, the limitations are gone. The number of features will be almost limitless, only the limits imposed by micropython will apply.
It also means that crashing uPyEasy will be much easier, you have full access to the database, so handle with care...

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

Re: uPyEasy

#60 Post by LisaM » 29 Oct 2017, 02:18

Added extensive logging: console, weblog and syslog logging is added. It's also flexible, more logging channels can be added through an additional 'sink'. All log messages are broadcasted on all channels at the same time.
Logging levels are: off, debug, info, warning and error.
upyeasy advanced.JPG
upyeasy advanced.JPG (153.43 KiB) Viewed 70845 times
Syslog in synology:
upyeasy syslog.JPG
upyeasy syslog.JPG (67.74 KiB) Viewed 70845 times
Weblog, the number of lines is adjustable for memory reasons:
upyeasy.JPG
upyeasy.JPG (414.02 KiB) Viewed 70845 times
NTP protocol is also added, timezone/dst is done manually due to memory reasons.

Hardware page now has i2c/spi/uart sections, if these reserve Dx's the Dx is no longer available and grayed out.
upyeasy hw dxpin.jpg
upyeasy hw dxpin.jpg (146.43 KiB) Viewed 70845 times
On the same hardware page, the pins can be configure to 7 pin state's:
upyeasy pinmode.JPG
upyeasy pinmode.JPG (138.72 KiB) Viewed 70841 times
The pin state's can be looked at in the tools/dx pin status menu choice:
upyeasy pin.JPG
upyeasy pin.JPG (143.24 KiB) Viewed 70842 times

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: uPyEasy

#61 Post by frank » 29 Oct 2017, 09:34

this looks great i hope that we can download the first test version soon :D

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

Re: uPyEasy

#62 Post by LisaM » 29 Oct 2017, 12:33

frank wrote: 29 Oct 2017, 09:34 this looks great i hope that we can download the first test version soon :D
I'm working towards the first test version, a couple of weeks left. Like i've said before, it will only contain the UI parts and is mainly for others to test to see if the program holds up in other environments then my testbeds. The first two platforms will be for pyboard+w5500 and the esp32. The nodemcu will require more testing because of the very tight free heap size, the free flash and stack size won't be a problem. If the free heap size is getting to small, i'll need to do some optimization first.

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

Re: uPyEasy

#63 Post by LisaM » 09 Nov 2017, 14:37

Protocols (domoticz http and domoticz mqtt) & Plugins (gpio & dht) are now loaded automatically, no code changes needed (other then adding/deleting the filename from an __init__.py file).
It's still using a single code base, all images are using the same uPyEasy code. The GUI is now stable and identical for all platforms.
I have 3 images to play with if you're interested, it's still GUI only although the protocols & plugins are actually loaded. Please let me know if you want one (with the condition that you let know if it works ;) )
Please PM me if you want the image

The images are:
  • Orange Pi Zero (H2)
    Pyboard (stm32 port)
    ESP32
Like said before, i'm focusing on the big boys here because there is a fine solution for the very small soc's (ESPEasy on ESP-01). Also because the big boys are the future, in the near future the ESP32 will be as expensive as the NodeMCU (esp-13), why buy the nodemcu then if the ESP32 is a LOT faster?
I will make a NodeMCU/Sonoff version, probably trimmed to make it fit in the very limited space available, as soon as the other ports are stable and fully functional.
The Orange Pi Zero is 10$ device which continues to amaze me, it's running armbian and very very fast.

Please note that the image is an pre-alpha version, without pin functionality, mainly to test if it works on your soc!
Last edited by LisaM on 11 Nov 2017, 12:27, edited 4 times in total.

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: uPyEasy

#64 Post by Drum » 09 Nov 2017, 14:57

I would love to try the ESP32 image. ;)

adampr1
Normal user
Posts: 17
Joined: 27 Jun 2016, 13:34
Location: Germany

Re: uPyEasy

#65 Post by adampr1 » 09 Nov 2017, 15:02

and me :)
ESP32 and Orange Pi Zero

B.R., Gruß,
Adam
Domoticz Beta release on OrangePI PC and BananaPI,
2x RFLink (last version),
ESPEasy, ESPEasy32 (different configurations),
MySensors (different configurations),
2x MiLight RGBW (over RFLink)
and others things :D

frank
Normal user
Posts: 116
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: uPyEasy

#66 Post by frank » 09 Nov 2017, 18:09

for me the Pyboard (stm32 port) version

legalo
New user
Posts: 3
Joined: 24 Dec 2016, 10:37
Location: france lunel

Re: uPyEasy

#67 Post by legalo » 09 Nov 2017, 18:44

for me
ESP32 and Orange Pi Zero

please thanks. :D

User avatar
budman1758
Normal user
Posts: 301
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: uPyEasy

#68 Post by budman1758 » 15 Nov 2017, 03:43

I too would like a OrangePi Zero and an ESP32 version. Thanks!! :mrgreen:
"The glass is twice as big as it needs to be".

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

Re: uPyEasy

#69 Post by BertB » 15 Nov 2017, 12:49

Is the Orange pi zero better than the Raspberry pi zero?

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

Re: uPyEasy

#70 Post by LisaM » 15 Nov 2017, 13:51

BertB wrote: 15 Nov 2017, 12:49 Is the Orange pi zero better than the Raspberry pi zero?
Better? That's a subjective opinion, here's an objective comparison:
https://www.board-db.org/compare/139,158/

My reasons to buy the Orange Pi Zero:
  • Ethernet
  • Bluetooth
  • Cheaper (compared with the raspberry pi zero W)

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

Re: uPyEasy

#71 Post by BertB » 15 Nov 2017, 15:25

My zero has onboard wifi and bluetooth and had a price of 11 euro.

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

Re: uPyEasy

#72 Post by LisaM » 15 Nov 2017, 15:59

Doesn't matter, because i don't care if it's a Raspberry or Orange. uPyEasy is running on Armbian and if the Raspberry is running Armbian, it's going to run there also (probably since it can't test it).

Are you running Raspberry Pi Zero - Armbian? If so, are you willing to test it? ;)

Cheers,

Lisa

User avatar
budman1758
Normal user
Posts: 301
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: uPyEasy

#73 Post by budman1758 » 16 Nov 2017, 07:13

It does not look like Armbian has any images for Raspberry anything. Their focus seems to be ARM and Allwinner chips. Thats not to say it cant be ported to Raspberry. Don't have a clue on that tho.....

Is uPyEasy running as an app on your Armbian boards or is it the complete OS? :?:

I ordered an OrangePi Zero H2 and cant wait to try it out and also on an ESP32. :mrgreen:
"The glass is twice as big as it needs to be".

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

Re: uPyEasy

#74 Post by LisaM » 16 Nov 2017, 20:15

budman1758 wrote: 16 Nov 2017, 07:13 Is uPyEasy running as an app on your Armbian boards or is it the complete OS? :?:
It's an app build on Armbian, it might work on other linux versions or not. The reason to choose for Armbian is interrupts from the OS, the OS needs to be very light and small so it doesn't interrupt uPyEasy operation to much. To many interrupt means less reliable operation of uPyEasy since it might miss sensor values due to the interrupt. Also the dxpin library is a concern, for Armbian there is an pin library available for micropython. Other ports might not have that.

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

Re: uPyEasy

#75 Post by BertB » 17 Nov 2017, 22:51

LisaM wrote: 15 Nov 2017, 15:59 Doesn't matter, because i don't care if it's a Raspberry or Orange. uPyEasy is running on Armbian and if the Raspberry is running Armbian, it's going to run there also (probably since it can't test it).

Are you running Raspberry Pi Zero - Armbian? If so, are you willing to test it? ;)

Cheers,

Lisa
No and yes. I run have raspbian on rpi's, but let's see if I can get it running Armbian

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

Re: uPyEasy

#76 Post by LisaM » 18 Nov 2017, 00:03

BertB wrote: 17 Nov 2017, 22:51 No and yes. I run have raspbian on rpi's, but let's see if I can get it running Armbian
If not, maybe it also works on Raspbian.

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

Re: uPyEasy

#77 Post by BertB » 19 Nov 2017, 12:59

So far, I cannot find Armbian for Raspberry.
Sure, I am willing to try uPyEasy on a Zero.
Provided you have some kind of howto for me.

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

Re: uPyEasy

#78 Post by LisaM » 08 Dec 2017, 19:34

Finally i have created a working uPyEasy version that has working protocols (domoticz http/mqtt) and plugins (bme280, dht11/22, switch). The plugins pass fake values, not real ones. The reason for that, while the sensor code is already in place, is that i need to add sensors to my test platforms to be able to test the sensors and i want the values always to be the same for debugging purposes. So, while everything is functional it's not sending real values but fake values to domoticz.
Only the PyBoard firmware in the google drive section is updated! The ESP32 has run into a bug which i'm working on with the micropython developers.
The Orange PI/Raspberry PI version is next and i will post a message here if it's ready.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: uPyEasy

#79 Post by grovkillen » 08 Dec 2017, 20:24

LisaM wrote: 08 Dec 2017, 19:34 Finally i have created a working uPyEasy version that has working protocols (domoticz http/mqtt) and plugins (bme280, dht11/22, switch). The plugins pass fake values, not real ones. The reason for that, while the sensor code is already in place, is that i need to add sensors to my test platforms to be able to test the sensors and i want the values always to be the same for debugging purposes. So, while everything is functional it's not sending real values but fake values to domoticz.
Only the PyBoard firmware in the google drive section is updated! The ESP32 has run into a bug which i'm working on with the micropython developers.
The Orange PI/Raspberry PI version is next and i will post a message here if it's ready.
I love that you are thinking ahead while we're working on the current code base. Good work this far!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

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

Re: uPyEasy

#80 Post by AndrewJ » 09 Dec 2017, 12:19

Great work, thanks for the update. Good luck with fixing the ESP32 bug!

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

Re: uPyEasy

#81 Post by LisaM » 10 Dec 2017, 02:12

Bug not fixed, but work-around found. It's now working and not, since another issue popped up... :cry:
Searching for solution.

-UPDATE- IDF settings adjusted, it's working now (domoticz virtual sensor is now updated continuously).

ESP32 image in google drive is updated to the latest version.

PS. Changes: Default web port now 80 instead of 8081, port is also configurable in config tab.
Last edited by LisaM on 11 Dec 2017, 00:47, edited 1 time in total.

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

Re: uPyEasy

#82 Post by AndrewJ » 10 Dec 2017, 22:38

Lisa, Good news about the ESP32 workaround. :)
I'm trying to access the Google Drive using the link you sent me by PM some weeks ago, but I get a 404 error. Could you send me an updated link, please?
Tia
AndrewJ

CHK_BLN
Normal user
Posts: 24
Joined: 19 Nov 2015, 22:14

Re: uPyEasy

#83 Post by CHK_BLN » 10 Dec 2017, 23:44

Hi Lisa
with the new firmware for the ESP32, the WIFI configuration does not work anymore.

The following error message comes.

>>> upyeasy.setwifi('SSID', 'PASSSWORD','BACKUPSSID', 'BACKUPPW')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'upyeasy' is not defined

greeting

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

Re: uPyEasy

#84 Post by LisaM » 10 Dec 2017, 23:53

CHK_BLN wrote: 10 Dec 2017, 23:44 Hi Lisa
with the new firmware for the ESP32, the WIFI configuration does not work anymore.

The following error message comes.

>>> upyeasy.setwifi('SSID', 'PASSSWORD','BACKUPSSID', 'BACKUPPW')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'upyeasy' is not defined

greeting
>>> import upyeasy
>>> upyeasy.setwifi('SSID', 'PASSSWORD','BACKUPSSID', 'BACKUPPW')
Should do the trick.

Cheers,

Lisa

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

Re: uPyEasy

#85 Post by LisaM » 11 Dec 2017, 00:50

I also had an alpha esp32 tester with a board that didn't work, but i seem to have lost the pm. Can this person please pm me again with the esp32 error details? Sorry for the confusion.

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

Re: uPyEasy

#86 Post by AndrewJ » 11 Dec 2017, 10:08

Hi Lisa, this alpha tester could be me ... I'll pm you.
AndrewJ

CHK_BLN
Normal user
Posts: 24
Joined: 19 Nov 2015, 22:14

Re: uPyEasy

#87 Post by CHK_BLN » 11 Dec 2017, 21:50

Hi Lisa

I tried your trick.
But unfortunately without success
Here is the result:

>>> import upyeasy
? [0; 32mI (99442) modsocket: Initializing? [0m

>>> upyeasy.setwifi ('SSID', 'PASSSWORD', 'BACKUPSSID', 'BACKUPPW')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "upyeasy / __ init__.py", line 28, in setwifi
File "upyeasy / utils.py", line 60, in setwifi
NameError: local variable referenced before assignment

Best regards

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

Re: uPyEasy

#88 Post by LisaM » 12 Dec 2017, 00:09

CHK_BLN wrote: 11 Dec 2017, 21:50 Hi Lisa

I tried your trick.
But unfortunately without success
Here is the result:

>>> import upyeasy
? [0; 32mI (99442) modsocket: Initializing? [0m

>>> upyeasy.setwifi ('SSID', 'PASSSWORD', 'BACKUPSSID', 'BACKUPPW')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "upyeasy / __ init__.py", line 28, in setwifi
File "upyeasy / utils.py", line 60, in setwifi
NameError: local variable referenced before assignment

Best regards
Probably are the tables not created yet can you try (after reboot):
>>> import upyeasy
>>> upyeasy.main()
>>> upyeasy.setwifi ('SSID', 'PASSSWORD', 'BACKUPSSID', 'BACKUPPW')

Then no more errors should appear, if so: reboot, import upyeasy, upyeasy.main()

I'll fix the bug so that upyeasy is started automatically again after reboot

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

Re: uPyEasy

#89 Post by AndrewJ » 12 Dec 2017, 19:48

I tried the steps recommended in your reply to CHK_BLN, but sadly not working yet.

After a hardware reboot, reconnected to screen...
>>> import upyeasy - no errors

>>> upyeasy.main() - I got the following output:

I (12626650) wifi: wifi driver task: 3ffde154, prio:23, stack:4096
I (12626650) wifi: Init static rx buffer num: 10
I (12626660) wifi: Init dynamic rx buffer num: 0
I (12626660) wifi: Init rx ampdu len mblock:7
I (12626660) wifi: Init lldesc rx ampdu entry mblock:4
I (12626670) wifi: wifi power manager task: 0x3ffe8758 prio: 21 stack: 2560
W (12626680) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration

Brownout detector was triggered

Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4364
load:0x40078000,len:0
load:0x40078000,len:10992
entry 0x4007a6c4
I (242) cpu_start: Pro cpu up.
I (242) cpu_start: Single core mode
I (242) heap_init: Initializing. RAM available for dynamic allocation:
I (246) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (252) heap_init: At 3FFDCDD0 len 00003230 (12 KiB): DRAM
I (258) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (264) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (271) heap_init: At 4009005C len 0000FFA4 (63 KiB): IRAM
I (277) cpu_start: Pro cpu start user code
I (71) cpu_start: Starting scheduler on PRO CPU.
OSError: [Errno 2] ENOENT
MicroPython v1.9.2-447-g0ef2d8e-dirty on 2017-12-10; ESP32 module with ESP32
Type "help()" for more information.
>>>

The brownout reference made me wonder about power supply issues. "Shouldn't" be a problem as I'm using a powered USB hub to connect my ESP32 to Raspberry Pi3. Having said that, there seems to be an error before that (RF calibration data).

ESP32 is a DOIT ESP32 Devkit V1.

Any ideas where it's going wrong?

Edit: I then tried help() in the REPL, and got the following information if it's of any help....

>>> help()
Welcome to MicroPython on the ESP32!

For generic online docs please visit http://docs.micropython.org/

For access to the hardware use the 'machine' module:

import machine
pin12 = machine.Pin(12, machine.Pin.OUT)
pin12.value(1)
pin13 = machine.Pin(13, machine.Pin.IN, machine.Pin.PULL_UP)
print(pin13.value())
i2c = machine.I2C(scl=machine.Pin(21), sda=machine.Pin(22))
i2c.scan()
i2c.writeto(addr, b'1234')
i2c.readfrom(addr, 4)

Basic WiFi configuration:

import network
sta_if = network.WLAN(network.STA_IF); sta_if.active(True)
sta_if.scan() # Scan for available access points
sta_if.connect("<AP_name>", "<password>") # Connect to an AP
sta_if.isconnected() # Check for successful connection

Control commands:
CTRL-A -- on a blank line, enter raw REPL mode
CTRL-B -- on a blank line, enter normal REPL mode
CTRL-C -- interrupt a running program
CTRL-D -- on a blank line, do a soft reset of the board
CTRL-E -- on a blank line, enter paste mode

For further help on a specific object, type help(obj)
For a list of available modules, type help('modules')
>>>


I'm going to lie down and do some Guru Meditation!!
Cheers
AndrewJ.

CHK_BLN
Normal user
Posts: 24
Joined: 19 Nov 2015, 22:14

Re: uPyEasy

#90 Post by CHK_BLN » 12 Dec 2017, 22:45

Hi Lisa
your help worked.
But after a reboot the settings are lost.
Best regards

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

Re: uPyEasy

#91 Post by AndrewJ » 12 Dec 2017, 22:59

Hi again Lisa,
Some progress now although not yet there ....

Discovered that my microUSB connector was not secure in the ESP32, it now looks like this was the main cause of my recent problems, so please ignore my post earlier this evening.

Repeated the whole process from the start with a better usb connection.
This time, no errors from upyeasy.main(). Went on to configure wifi settings.
Rebooted, and repeated import upyeasy, upyeasy.main() as per latest advice.
ESP32 started and showed a connection to my wifi (briefly) .... but then crashed out with OSerror 128.

This is the log (although I'm sure that some lines have now disappeared, including the wifi connection!?)

2000-01-01T00:00:56.005 [debug] uPyEasy: Protocol: domoticz http contruction
2000-01-01T00:00:56.005 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_http
2000-01-01T00:00:57.005 [debug] uPyEasy: Plugins: Load
2000-01-01T00:00:57.005 [debug] uPyEasy: Plugins: Delete plugin records
2000-01-01T00:00:57.005 [debug] uPyEasy: Plugins: Load frozen plugin gpio
2000-01-01T00:00:57.005 [debug] uPyEasy: Plugin: gpio contruction
2000-01-01T00:00:57.005 [debug] uPyEasy: Plugins: Create frozen plugin Record: gpio
I (58379) wifi: pm start, type:0

2000-01-01T00:00:57.005 [debug] uPyEasy: Plugins: Load frozen plugin dht
2000-01-01T00:00:57.005 [debug] uPyEasy: Plugin: dht contruction
2000-01-01T00:00:57.005 [debug] uPyEasy: Plugins: Create frozen plugin Record: dht
2000-01-01T00:00:58.005 [debug] uPyEasy: Plugins: Load frozen plugin bme
2000-01-01T00:00:58.005 [debug] uPyEasy: Plugin: bme280 contruction
2000-01-01T00:00:58.005 [debug] uPyEasy: Plugins: Create frozen plugin Record: bme
2000-01-01T00:00:58.005 [debug] uPyEasy: Utils: Sys hostname
2000-01-01T00:00:58.005 [debug] uPyEasy: Utils: uPyEasy Name
Set syslog hostname 0.0.0.0
reloaded sink syslog
2000-01-01T00:00:58.005 [debug] uPyEasy-uPyEasy: Hal: Entering SetTime
2000-01-01T00:00:58.005 [debug] uPyEasy-uPyEasy: Hal: Entering GetNtpTime
2000-01-01T00:00:58.005 [debug] uPyEasy-uPyEasy: Hal: network Table
2000-01-01T00:00:58.005 [debug] uPyEasy-uPyEasy: Hal: Using NTP Hostname: pool.ntp.org
2000-01-01T00:00:58.005 [debug] uPyEasy-uPyEasy: Hal: TimeZome offset: 60
2000-01-01T00:00:58.005 [debug] uPyEasy-uPyEasy: Hal: Received UTC NTP Time: 566430409
2000-01-01T00:00:58.005 [debug] uPyEasy-uPyEasy: Hal: Timezone corrected NTP Time: 566434009
2000-01-01T00:00:58.005 [debug] uPyEasy-uPyEasy: Hal: DST corrected NTP Time: 566434009
2000-01-01T00:00:58.005 [debug] uPyEasy-uPyEasy: Hal: Received NTP Time: 566434009
2000-01-01T00:00:58.005 [debug] uPyEasy-uPyEasy: Hal: StartTime: 566434009
2017-12-12T22:46:49.001 [debug] uPyEasy-uPyEasy: Main: Pre-loading home page
2017-12-12T22:46:49.001 [debug] uPyEasy-uPyEasy: Main: get_ip_address AttributeError
2017-12-12T22:46:49.001 [debug] uPyEasy-uPyEasy: Main: uPyEasy Main Async Loop
* Running on http://0.0.0.0:80/
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "upyeasy/__init__.py", line 56, in main
File "picoweb/__init__.py", line 240, in run
File "uasyncio/core.py", line 124, in run_forever
File "uasyncio/core.py", line 88, in run_forever
File "uasyncio/__init__.py", line 229, in start_server
OSError: 128
>>>

Getting closer now! Hope this helps. :)
AndrewJ

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

Re: uPyEasy

#92 Post by LisaM » 13 Dec 2017, 01:15

OSError is an indication that port 80 is still locked, while upyeasy tries to open port 80. A hard reset (power down, wait 10s, power on) is required.
Then same two steps: import upyeasy, upyeasy.main()

Cheers,

Lisa

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

Re: uPyEasy

#93 Post by AndrewJ » 13 Dec 2017, 13:26

Hi Lisa,
Thanks for the reply. I just tried again unplugging the ESP32, with a long period (several minutes) before restarting, but sadly it's still not working. :(

After all the [debug] messages I see it running, for about 5 secs, then it throws an error...

* Running on http://0.0.0.0:80/
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "upyeasy/__init__.py", line 56, in main
File "picoweb/__init__.py", line 240, in run
File "uasyncio/core.py", line 124, in run_forever
File "uasyncio/core.py", line 88, in run_forever
File "uasyncio/__init__.py", line 229, in start_server
OSError: 128
>>>
Any ideas?
Cheers
Andrew

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

Re: uPyEasy

#94 Post by AndrewJ » 13 Dec 2017, 13:30

I've been googling the error messages I saw. Nothing much for File "upyeasy/__init__.py, but I did find something which sounds similar for File picoweb/__init__.py -- see this link, hope it may help ...
https://forum.micropython.org/viewtopic.php?t=3651

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

Re: uPyEasy

#95 Post by LisaM » 13 Dec 2017, 13:42

OSError 128 points to a occupied port 80 by a previous program. A hard reset (power down-wait 10s-power up) should do the trick. Then import upyeasy, upyeasy.main() should work.

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

Re: uPyEasy

#96 Post by AndrewJ » 13 Dec 2017, 18:07

Hi Lisa,
You may have missed it in my earlier post, but i had already tried the procedure you suggested. :) Anyway, I've just had another go, and in fact for good measure I went right back to the beginning, erased the ESP32 and reflashed it, the done the extra commands in the REPL. At each step where a reboot is needed, I was careful to unplug it and wait at least 10 secs.

However, I'm sorry to say that the result is still the same... it starts to run ("Running on http://0.0.0.0:80/") but then after about 5 secs it falls over with OSError 128. :( :(

I'm at a loss now, hope you may be able to suggest something please?

Cheers
AndrewJ

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

Re: uPyEasy

#97 Post by LisaM » 19 Dec 2017, 21:11

In the Google drive uPyEasy section is a new version of uPyEasy for ESP32, it has these new features:
- Autostart after flash
- Autoconnect to the strongest open wifi AP after a fresh install
- 2 working controllers (domoticz http/mqtt)
- 2 working plugins (switch/ds18b20)
- Ability to disable GPIO pins in the hardware section which are not present or being used by the board itself (every board is different)
- Tools/Wifi Scan is operational

Since it has a lot of new features, please erase your ESP32 before flashing the new firmware version (so the database is rebuild):
esptool.py --port /dev/ttyUSBx erase_flash
(x for your USB port).

The DS18B20 plugin must be save first, before you can select the romid. I'm working on that to get that fixed.

Autoconnect to the strongest open wifi AP after a fresh install? Beware that this might be your guest network which is isolated from your normal network, you'll need to forward a port on your public ip-address to port 80 of your ESP32.

@AndrewJ, can you try this version if the OSError 128 is also popping up? If it does, i'll compile a special version for you.

This will be the LAST alpha version, the next version will be the first BETA version. The beta version is stable enough for everyone to download, initially it will be binary only. When the code is stable enough, it will become a github repository.

Attached is the protocol and plugin source code. Beware that they might be changed in the next releases.
Attachments
protocols_plugins.zip
(7.33 KiB) Downloaded 796 times

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: uPyEasy

#98 Post by grovkillen » 19 Dec 2017, 21:50

Great news Lisa!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: uPyEasy

#99 Post by TD-er » 20 Dec 2017, 09:39

Hmm, that sounds great and quite quick development as you're already approaching beta status.

I will try it myself also during the holidays. The ESP32's are already "in stock" :)

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

Re: uPyEasy

#100 Post by AndrewJ » 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

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests