ESP32 boards

Moderators: BertB, Voyager, grovkillen, Stuntteam, LisaM

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

Re: ESP32 boards

#51 Post by CHK_BLN » 06 Jan 2018, 14:49

Hi Lisa
Enclosed a feedback to the version v53
Uptime is displayed incorrectly:
Uptime: -1 days 0 hours 0 minutes

After configuring a BME280, the ESP32 can no longer be reached via browser.

The serial monitor says:
568478250.503 <HTTPRequest object at 3ffc0570> <StreamWriter <socket >> "POST / device_setting? Id = 0"
2018-01-05 14:37:24 [debug] uPyEasy-uPyEasy: Pages: Entering Device Settings Page
2018-01-05 14:37:24 [debug] uPyEasy-uPyEasy: Pages: POST
2018-01-05 14:37:24 [debug] uPyEasy-uPyEasy: id
2018-01-05 14:37:24 [debug] uPyEasy-uPyEasy: 0
2018-01-05 14:37:25 [debug] uPyEasy-uPyEasy: Current Plugin: 2
2018-01-05 14:37:25 [debug] uPyEasy-uPyEasy: New Plugin: 2
2018-01-05 14:37:25 [debug] uPyEasy-uPyEasy: Pages: Create Device
2018-01-05 14:37:25 [debug] uPyEasy-uPyEasy: Pages: Device name: test
2018-01-05 14:37:25 [debug] uPyEasy-uPyEasy: Pages: New Device: Same plugin
2018-01-05 14:37:25 [debug] uPyEasy-uPyEasy: Pages: Device max Count: 0
2018-01-05 14:37:26 [debug] uPyEasy-uPyEasy: Plugins: Init device: test with plugin: 2
2018-01-05 14:37:26 [debug] uPyEasy-uPyEasy: Plugin: bme280 contruction
2018-01-05 14:37:26 [debug] uPyEasy-uPyEasy: Plugins: Init device: test, instantiate plugin: BME280
2018-01-05 14:37:26 [debug] uPyEasy-uPyEasy: Utils: uPyEasy name
2018-01-05 14:37:26 [debug] uPyEasy-uPyEasy: Plugin: bme280 init
2018-01-05 14:37:26 [debug] uPyEasy-uPyEasy: Plugins: Read device store: test
2018-01-05 14:37:26 [debug] uPyEasy-uPyEasy: Hal: get i2c
2018-01-05 14:37:26 [debug] uPyEasy-uPyEasy: Hal: get i2c esp32
2018-01-05 14:37:26 [debug] uPyEasy-uPyEasy: Hal: get i2c esp32, create i2c object with id: 1
2018-01-05 14:37:27 [debug] uPyEasy-uPyEasy: Hal: pin = d20
2018-01-05 14:37:27 [debug] uPyEasy-uPyEasy: Hal: pin esp32: 21
2018-01-05 14:37:27 [debug] uPyEasy-uPyEasy: Hal: pin = d21
2018-01-05 14:37:27 [debug] uPyEasy-uPyEasy: Hal: pin esp32: 22
2018-01-05 14:37:27 [debug] uPyEasy-uPyEasy: plugin: bme280 init OSError exception: OSError (19,)
2018-01-05 14:37:27 [debug] uPyEasy-uPyEasy: Plugins: Saveform plugin test
2018-01-05 14:37:27 [debug] uPyEasy-uPyEasy: Plugin: bme280 saveform
568478250.503 <HTTPRequest object at 3ffc0570> <StreamWriter <socket> ValueError ('invalid syntax for integer with base 10',)
Traceback (most recent call last):
File "picoweb / __ init__.py", line 186, in _handle
File "upyeasy / pages.py", line 1192, in devicesettingpage
File "upyeasy / plugin.py", line 132, in saveform
File "upyeasy / plugins / bme280.py", line 132, in saveform
ValueError: invalid syntax for integer with base 10
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "upyeasy / __ init__.py", line 56, in main
File "picoweb / __ init__.py", line 275, in run
File "uasyncio / core.py", line 138, in run_forever
File "uasyncio / core.py", line 97, in run_forever
File "upyeasy / plugin.py", line 188, in asyncdevices
KeyError: test
Best regards

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

Re: ESP32 boards

#52 Post by AndrewJ » 06 Jan 2018, 17:39

LisaM wrote:
05 Jan 2018, 22:27
Version: v53

Fixed:
- Time on ESP32
- Switch plugin

Added:
- I2C
- BME280 sensor

Database changes:
- None
I'm getting an error in the early part of startup.... log below.

Code: Select all

rst:0x1 (POWERON_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
modY'T� �����div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4364
load:0x40078000,len:0
load:0x40078000,len:10NN�H����� 0x4007a6c4
I (438) cpu_start: Pro cpu up.
I (438) cpu_start: Single core mode
I (438) heap_init: Initializing. RAM available for dynamic allocation:
I (442) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (448) heap_init: At 3FFDCDD0 len 00003230 (12 KiB): DRAM
I (454) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (460) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (467) heap_init: At 4009005C len 0000FFA4 (63 KiB): IRAM
I (473) cpu_start: Pro cpu start user code
I (43) cpu_start: Starting scheduler on PRO CPU.
OSError: [Errno 2] ENOENT
MicroPython v1.9.3-254-g41a9bdc-dirty on 2018-01-05; ESP32 module with ESP32
Type "help()" for more information.
>>>
Board: LOLIN32 LITE (the same one that was working with the last iteration of v52 once I changed the port number.) Erased before flash.
edit: As a check, I just tried going back to the previous version, it is working again, with the port number changed to 9000. So the problem appears to be something in v53.

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

Re: ESP32 boards

#53 Post by LisaM » 06 Jan 2018, 17:56

AndrewJ wrote:
06 Jan 2018, 17:39
Board: LOLIN32 LITE (the same one that was working with the last iteration of v52 once I changed the port number.) Erased before flash.
edit: As a check, I just tried going back to the previous version, it is working again, with the port number changed to 9000. So the problem appears to be something in v53.
It looks like the boot.py file in the ESP32 doesn't load the upyeasy module, can you try:
>>> import upyeasy
>>> upyeasy.main()

Does this work?

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

Re: ESP32 boards

#54 Post by CHK_BLN » 06 Jan 2018, 18:18

>>> import upyeasy
>>> upyeasy.main()

It is working

Best regards

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

Re: ESP32 boards

#55 Post by BertB » 06 Jan 2018, 18:43

Hi Lisa,
I managed to get something running on a ESP32 board with OLED.

This is what CMD window showed:

Code: Select all

D:\Tools\uPython>esptool.py -p COM5 --baud 115200 write_flash --compress 0x1000 D:\Tools\uPython\upyeasy-esp32\firmware.bin
esptool.py v2.3-dev
Connecting........_____....._
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0220
Compressed 1177632 bytes to 687554...
Wrote 1177632 bytes (687554 compressed) at 0x00001000 in 61.0 seconds (effective 154.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting...
And this is showed in a terminal window after boot:

Code: Select all

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x17 (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
[1B][0;33mW (65) rtc_clk: Potentially bogus XTAL frequency: 35 MHz, guessing 40 MHz[1B][0m
[1B][0;32mI (437) cpu_start: Pro cpu up.[1B][0m
[1B][0;32mI (437) cpu_start: Single core mode[1B][0m
[1B][0;32mI (438) heap_init: Initializing. RAM available for dynamic allocation:[1B][0m
[1B][0;32mI (441) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM[1B][0m
[1B][0;32mI (447) heap_init: At 3FFDCDD0 len 00003230 (12 KiB): DRAM[1B][0m
[1B][0;32mI (453) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM[1B][0m
[1B][0;32mI (459) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[1B][0m
[1B][0;32mI (466) heap_init: At 4009005C len 0000FFA4 (63 KiB): IRAM[1B][0m
[1B][0;32mI (472) cpu_start: Pro cpu start user code[1B][0m
[1B][0;32mI (42) cpu_start: Starting scheduler on PRO CPU.[1B][0m
OSError: [Errno 2] ENOENT
MicroPython v1.9.3-254-g41a9bdc-dirty on 2018-01-05; ESP32 module with ESP32
Type "help()" for more information.
>>> 
After uploading upyeasy-test.

Code: Select all

This is what de board says after boot:
rst:0x10 (RTCWDT_RTC_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371 
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371 
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371 

etc.
That's it.

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

Re: ESP32 boards

#56 Post by LisaM » 06 Jan 2018, 19:13

CHK_BLN wrote:
06 Jan 2018, 14:49
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "upyeasy / __ init__.py", line 56, in main
File "picoweb / __ init__.py", line 275, in run
File "uasyncio / core.py", line 138, in run_forever
File "uasyncio / core.py", line 97, in run_forever
File "upyeasy / plugin.py", line 188, in asyncdevices
KeyError: test
Best regards
Oops, bug. Fixed the bug, updated the firmware in post 1. Can you flash again and try? It's working at my ESP32.

Cheers,

Lisa

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

Re: ESP32 boards

#57 Post by BertB » 06 Jan 2018, 19:37

With first post, you mean here:
http://www.letscontrolit.com/forum/view ... =22&t=3906

Result is the same ...

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

Re: ESP32 boards

#58 Post by LisaM » 06 Jan 2018, 19:37

BertB wrote:
06 Jan 2018, 18:43
Hi Lisa,
I managed to get something running on a ESP32 board with OLED.

That's it.
It looks like the boot.py file in the ESP32 doesn't load the upyeasy module, can you try:
>>> import upyeasy
>>> upyeasy.main()

Does this work?

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

Re: ESP32 boards

#59 Post by BertB » 06 Jan 2018, 19:39

>>> import upyeasy
import upyeasyupyeasy.main()
upyeasy.main()

is what I get

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

Re: ESP32 boards

#60 Post by BertB » 06 Jan 2018, 19:41

The board only echoes what I type

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

Re: ESP32 boards

#61 Post by BertB » 06 Jan 2018, 19:42

Forget about the last remark. It was the auto echo of termite

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

Re: ESP32 boards

#62 Post by LisaM » 06 Jan 2018, 19:47

Drum wrote:
06 Jan 2018, 12:19
Just checked the espressif site to see if they have anything new and saw this
http://espressif.com/en/media_overview/ ... ntest-2018

Looks like a new dev board and esp32 chip I have not seen yet. Of course the oppertunity to get a dev board free is a nice option.

I have not read the fine print yet.

In any case the ESP32-PICO-D4 looks very interesting...
A free $10 development board... Yeah right... Putting my 'i don't care mode' on...
If it would be a ESP32 Demo Board or the ESP-WROVER-KIT V3 board, i might be interested since that makes versatile development a lot easier...

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

Re: ESP32 boards

#63 Post by LisaM » 06 Jan 2018, 20:00

BertB wrote:
06 Jan 2018, 18:43
I managed to get something running on a ESP32 board with OLED.
If you want to play with the OLED, SSD1306 support is builtin, here's some code to do that:

Code: Select all

# Oled ESP32
import machine
pin16 = machine.Pin(16, machine.Pin.OUT)
pin16.value(1)
import machine, ssd1306
i2c = machine.I2C(scl=machine.Pin(15), sda=machine.Pin(4))
oled = ssd1306.SSD1306_I2C(128, 64, i2c)
oled.fill(0)
oled.text('uPyEasy on', 0, 0)
oled.text('an ESP32 with an', 0, 10)
oled.text('attached SSD1306', 0, 20)
oled.text('OLED display', 0, 30)
oled.show()
Pin16 is to activate the OLED screen on my ESP32, it might be different for yours. Pin 4 & 15 are used in my ESP32 for I2C OLED, that might be different for your ESP32 also.

Cheers,

Lisa

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

Re: ESP32 boards

#64 Post by BertB » 06 Jan 2018, 20:23

LisaM wrote:
06 Jan 2018, 20:00
BertB wrote:
06 Jan 2018, 18:43
I managed to get something running on a ESP32 board with OLED.
If you want to play with the OLED, SSD1306 support is builtin, here's some code to do that:

Code: Select all

# Oled ESP32
import machine
pin16 = machine.Pin(16, machine.Pin.OUT)
pin16.value(1)
import machine, ssd1306
i2c = machine.I2C(scl=machine.Pin(15), sda=machine.Pin(4))
oled = ssd1306.SSD1306_I2C(128, 64, i2c)
oled.fill(0)
oled.text('uPyEasy on', 0, 0)
oled.text('an ESP32 with an', 0, 10)
oled.text('attached SSD1306', 0, 20)
oled.text('OLED display', 0, 30)
oled.show()
Pin16 is to activate the OLED screen on my ESP32, it might be different for yours. Pin 4 & 15 are used in my ESP32 for I2C OLED, that might be different for your ESP32 also.

Cheers,

Lisa
Thanks, but we first need it to run to begin with.

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

Re: ESP32 boards

#65 Post by AndrewJ » 06 Jan 2018, 20:32

LisaM wrote:
06 Jan 2018, 17:56
AndrewJ wrote:
06 Jan 2018, 17:39
Board: LOLIN32 LITE (the same one that was working with the last iteration of v52 once I changed the port number.) Erased before flash.
edit: As a check, I just tried going back to the previous version, it is working again, with the port number changed to 9000. So the problem appears to be something in v53.
It looks like the boot.py file in the ESP32 doesn't load the upyeasy module, can you try:
>>> import upyeasy
>>> upyeasy.main()

Does this work?
I got the following....

Code: Select all

>>> import upyeasy
[0;32mI (46290) modsocket: Initializing[0m
>>> upyeasy.main()
loaded sink log
loaded sink console
loaded sink syslog
2000-01-01T00:00:52.005 [debug] uPyEasy: Init: Init constructor
2000-01-01T00:00:52.005 [debug] uPyEasy: Init: Entering init
2000-01-01 00:00:52 [debug] uPyEasy: Init: Create directory config
2000-01-01 00:00:53 [debug] uPyEasy: Init: Create directory plugins
2000-01-01 00:00:53 [debug] uPyEasy: Init: Create directory protocols
2000-01-01 00:00:53 [debug] uPyEasy: Init: Create directory scripts
2000-01-01 00:00:53 [debug] uPyEasy: Init: config Table
2000-01-01 00:00:53 [debug] uPyEasy: Init: network Table
2000-01-01 00:00:53 [debug] uPyEasy: Init: protocol Table
2000-01-01 00:00:54 [debug] uPyEasy: Init: controller Table
2000-01-01 00:00:54 [debug] uPyEasy: Init: hardware Table
2000-01-01 00:00:54 [debug] uPyEasy: Init: dxpin Table
2000-01-01 00:00:54 [debug] uPyEasy: Init: dxmap Table
2000-01-01 00:00:54 [debug] uPyEasy: Init: plugin Table
2000-01-01 00:00:55 [debug] uPyEasy: Init: pluginstore Table
2000-01-01 00:00:55 [debug] uPyEasy: Init: device Table
2000-01-01 00:00:55 [debug] uPyEasy: Init: service Table
2000-01-01 00:00:55 [debug] uPyEasy: Init: notification Table
2000-01-01 00:00:55 [debug] uPyEasy: Init: advanced Table
2000-01-01 00:00:55 [debug] uPyEasy: Init: Create Config Record
2000-01-01 00:00:56 [debug] uPyEasy: Init: Create Network Record
2000-01-01 00:00:56 [debug] uPyEasy: Init: Create Hardware Record
2000-01-01 00:00:56 [debug] uPyEasy: Hal: hardwaredb init
2000-01-01 00:00:56 [debug] uPyEasy: Hal: hardwaredb esp32
2000-01-01 00:00:56 [debug] uPyEasy: Init: Create dxpin Record
2000-01-01 00:00:57 [debug] uPyEasy: Hal: dxpins_init
2000-01-01 00:00:57 [debug] uPyEasy: Hal: dxpins_init esp32
2000-01-01 00:00:57 [debug] uPyEasy: Init: Create advanced Record
2000-01-01 00:00:57 [debug] uPyEasy: Hal: Init
2000-01-01 00:00:57 [debug] uPyEasy: Hal: init, network record present
2000-01-01 00:00:57 [debug] uPyEasy: Hal: esp32
I (71900) wifi: wifi firmware version: 111e74d
I (71900) wifi: config NVS flash: enabled
I (71900) wifi: config nano formating: disabled
[0;32mI (71900) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
[0;32mI (71910) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
I (71930) wifi: Init dynamic tx buffer num: 32
I (71930) wifi: Init data frame dynamic rx buffer num: 64
I (71930) wifi: Init management frame dynamic rx buffer num: 64
I (71940) wifi: wifi driver task: 3ffde13c, prio:23, stack:4096
I (71940) wifi: Init static rx buffer num: 10
I (71950) wifi: Init dynamic rx buffer num: 0
I (71950) wifi: Init rx ampdu len mblock:7
I (71950) wifi: Init lldesc rx ampdu entry mblock:4
I (71960) wifi: wifi power manager task: 0x3ffe8734 prio: 21 stack: 2560
[0;33mW (71970) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration[0m
[0;32mI (72130) phy: phy_version: 362.0, 61e8d92, Sep  8 2017, 18:48:11, 0, 2[0m
I (72140) wifi: mode : null
I (72140) wifi: mode : sta (30:ae:a4:39:16:e4)
[0;32mI (72140) wifi: STA_START[0m
2000-01-01 00:00:57 [debug] uPyEasy: Hal: esp32, ssid empty
[0;32mI (74590) network: event 1[0m
2000-01-01 00:01:00 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: TALKTALK65AFF2 Strength: -40 dBm Security: 0
2000-01-01 00:01:00 [debug] uPyEasy: Hal: esp32, Scan: Open ssid found: TALKTALK65AFF2
2000-01-01 00:01:00 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: ESPeasy3_Boiler_3 Strength: -83 dBm Security: 3
I (76190) wifi: n:11 0, o:1 0, ap:255 255, sta:11 0, prof:1
I (76190) wifi: state: init -> auth (b0)
I (76280) wifi: state: auth -> assoc (0)
I (76280) wifi: state: assoc -> run (10)
I (76290) wifi: connected with TALKTALK65AFF2, channel 11
[0;32mI (76290) network: event 4[0m
[0;32mI (77230) event: sta ip: 192.168.1.6, mask: 255.255.255.0, gw: 192.168.1.1[0m
[0;32mI (77230) network: GOT_IP[0m
2000-01-01 00:01:03 [debug] uPyEasy: Hal: esp32, ip: 192.168.1.6
2000-01-01 00:01:03 [debug] uPyEasy: Hal: nic present
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Load
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Init protocol records
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Load protocol domoticz_mqtt
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_mqtt
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Load protocol domoticz_http
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_http
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Init protocol records, run async loop
2000-01-01 00:01:03 [debug] uPyEasy: Plugins: Load
2000-01-01 00:01:03 [debug] uPyEasy: Plugins: init plugin records
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Load frozen plugin switch
2000-01-01 00:01:04 [debug] uPyEasy: Plugin: switch contruction
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Create frozen plugin Record: switch
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Load frozen plugin bme280
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Create frozen plugin Record: bme280
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Load frozen plugin ds18
2000-01-01 00:01:04 [debug] uPyEasy: Plugin: ds18 contruction
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Create frozen plugin Record: ds18
2000-01-01 00:01:05 [debug] uPyEasy: Plugins: Init plugin records, run async loop
I (79290) wifi: pm start, type:0

2000-01-01 00:01:05 [debug] uPyEasy: Utils: Sys hostname
2000-01-01 00:01:05 [debug] uPyEasy: Utils: uPyEasy Name
Set syslog hostname 0.0.0.0
reloaded sink syslog
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Entering SetTime
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Entering GetNtpTime
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: network Table
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Using NTP Hostname: pool.ntp.org
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: TimeZome offset: 60
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Received UTC NTP Time: 568583149
2000-01-01 00:01:06 [debug] uPyEasy-uPyEasy: Hal: Timezone corrected NTP Time: 568586749
2000-01-01 00:01:06 [debug] uPyEasy-uPyEasy: Hal: DST corrected NTP Time: 568586749
2000-01-01 00:01:06 [debug] uPyEasy-uPyEasy: Hal: Received NTP Time: 568586749
2000-01-01 00:01:06 [debug] uPyEasy-uPyEasy: Hal: StartTime: 568586749
2018-01-05 20:45:49 [debug] uPyEasy-uPyEasy: Main: Pre-loading home page
2018-01-05 20:45:49 [debug] uPyEasy-uPyEasy: Hal: get_ip_address esp32, ip: 192.168.1.6
2018-01-05 20:45:49 [debug] uPyEasy-uPyEasy: Main: uPyEasy Main Async Loop
* Running on http://192.168.1.6:80/
2018-01-05 20:45:49 [debug] uPyEasy-uPyEasy: Protocols: Async processing protocols
2018-01-05 20:45:49 [debug] uPyEasy-uPyEasy: Plugins: Async processing plugins
stack: 2032 out of 15360
GC: total: 96000, used: 76128, free: 19872
 No. of 1-blocks: 1428, 2-blocks: 135, max blk sz: 868, max free sz: 1147
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "upyeasy/__init__.py", line 56, in main
  File "picoweb/__init__.py", line 275, in run
  File "uasyncio/core.py", line 138, in run_forever
  File "uasyncio/core.py", line 97, in run_forever
  File "picoweb/__init__.py", line 193, in _handle
  File "picoweb/__init__.py", line 192, in _handle
NameError: local variable referenced before assignment
>>> 
Progress, but not there yet. I did manage to connect briefly on port 80 from my browser before the error. I'm not sure, but I had the impression that trying to connect triggered the error(?).
Cheers
Andrew.
Last edited by AndrewJ on 06 Jan 2018, 20:51, edited 1 time in total.

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

Re: ESP32 boards

#66 Post by karl222 » 06 Jan 2018, 20:43

Unfortunately i am not running a linux system...

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

Re: ESP32 boards

#67 Post by AndrewJ » 06 Jan 2018, 21:28

AndrewJ wrote:
06 Jan 2018, 20:32
LisaM wrote:
06 Jan 2018, 17:56
AndrewJ wrote:
06 Jan 2018, 17:39
Board: LOLIN32 LITE (the same one that was working with the last iteration of v52 once I changed the port number.) Erased before flash.
edit: As a check, I just tried going back to the previous version, it is working again, with the port number changed to 9000. So the problem appears to be something in v53.
It looks like the boot.py file in the ESP32 doesn't load the upyeasy module, can you try:
>>> import upyeasy
>>> upyeasy.main()

Does this work?
I got the following....

Code: Select all

>>> import upyeasy
[0;32mI (46290) modsocket: Initializing[0m
>>> upyeasy.main()
loaded sink log
loaded sink console
loaded sink syslog
2000-01-01T00:00:52.005 [debug] uPyEasy: Init: Init constructor
2000-01-01T00:00:52.005 [debug] uPyEasy: Init: Entering init
2000-01-01 00:00:52 [debug] uPyEasy: Init: Create directory config
2000-01-01 00:00:53 [debug] uPyEasy: Init: Create directory plugins
2000-01-01 00:00:53 [debug] uPyEasy: Init: Create directory protocols
2000-01-01 00:00:53 [debug] uPyEasy: Init: Create directory scripts
2000-01-01 00:00:53 [debug] uPyEasy: Init: config Table
2000-01-01 00:00:53 [debug] uPyEasy: Init: network Table
2000-01-01 00:00:53 [debug] uPyEasy: Init: protocol Table
2000-01-01 00:00:54 [debug] uPyEasy: Init: controller Table
2000-01-01 00:00:54 [debug] uPyEasy: Init: hardware Table
2000-01-01 00:00:54 [debug] uPyEasy: Init: dxpin Table
2000-01-01 00:00:54 [debug] uPyEasy: Init: dxmap Table
2000-01-01 00:00:54 [debug] uPyEasy: Init: plugin Table
2000-01-01 00:00:55 [debug] uPyEasy: Init: pluginstore Table
2000-01-01 00:00:55 [debug] uPyEasy: Init: device Table
2000-01-01 00:00:55 [debug] uPyEasy: Init: service Table
2000-01-01 00:00:55 [debug] uPyEasy: Init: notification Table
2000-01-01 00:00:55 [debug] uPyEasy: Init: advanced Table
2000-01-01 00:00:55 [debug] uPyEasy: Init: Create Config Record
2000-01-01 00:00:56 [debug] uPyEasy: Init: Create Network Record
2000-01-01 00:00:56 [debug] uPyEasy: Init: Create Hardware Record
2000-01-01 00:00:56 [debug] uPyEasy: Hal: hardwaredb init
2000-01-01 00:00:56 [debug] uPyEasy: Hal: hardwaredb esp32
2000-01-01 00:00:56 [debug] uPyEasy: Init: Create dxpin Record
2000-01-01 00:00:57 [debug] uPyEasy: Hal: dxpins_init
2000-01-01 00:00:57 [debug] uPyEasy: Hal: dxpins_init esp32
2000-01-01 00:00:57 [debug] uPyEasy: Init: Create advanced Record
2000-01-01 00:00:57 [debug] uPyEasy: Hal: Init
2000-01-01 00:00:57 [debug] uPyEasy: Hal: init, network record present
2000-01-01 00:00:57 [debug] uPyEasy: Hal: esp32
I (71900) wifi: wifi firmware version: 111e74d
I (71900) wifi: config NVS flash: enabled
I (71900) wifi: config nano formating: disabled
[0;32mI (71900) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
[0;32mI (71910) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
I (71930) wifi: Init dynamic tx buffer num: 32
I (71930) wifi: Init data frame dynamic rx buffer num: 64
I (71930) wifi: Init management frame dynamic rx buffer num: 64
I (71940) wifi: wifi driver task: 3ffde13c, prio:23, stack:4096
I (71940) wifi: Init static rx buffer num: 10
I (71950) wifi: Init dynamic rx buffer num: 0
I (71950) wifi: Init rx ampdu len mblock:7
I (71950) wifi: Init lldesc rx ampdu entry mblock:4
I (71960) wifi: wifi power manager task: 0x3ffe8734 prio: 21 stack: 2560
[0;33mW (71970) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration[0m
[0;32mI (72130) phy: phy_version: 362.0, 61e8d92, Sep  8 2017, 18:48:11, 0, 2[0m
I (72140) wifi: mode : null
I (72140) wifi: mode : sta (30:ae:a4:39:16:e4)
[0;32mI (72140) wifi: STA_START[0m
2000-01-01 00:00:57 [debug] uPyEasy: Hal: esp32, ssid empty
[0;32mI (74590) network: event 1[0m
2000-01-01 00:01:00 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: TALKTALK65AFF2 Strength: -40 dBm Security: 0
2000-01-01 00:01:00 [debug] uPyEasy: Hal: esp32, Scan: Open ssid found: TALKTALK65AFF2
2000-01-01 00:01:00 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: ESPeasy3_Boiler_3 Strength: -83 dBm Security: 3
I (76190) wifi: n:11 0, o:1 0, ap:255 255, sta:11 0, prof:1
I (76190) wifi: state: init -> auth (b0)
I (76280) wifi: state: auth -> assoc (0)
I (76280) wifi: state: assoc -> run (10)
I (76290) wifi: connected with TALKTALK65AFF2, channel 11
[0;32mI (76290) network: event 4[0m
[0;32mI (77230) event: sta ip: 192.168.1.6, mask: 255.255.255.0, gw: 192.168.1.1[0m
[0;32mI (77230) network: GOT_IP[0m
2000-01-01 00:01:03 [debug] uPyEasy: Hal: esp32, ip: 192.168.1.6
2000-01-01 00:01:03 [debug] uPyEasy: Hal: nic present
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Load
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Init protocol records
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Load protocol domoticz_mqtt
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_mqtt
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Load protocol domoticz_http
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_http
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Init protocol records, run async loop
2000-01-01 00:01:03 [debug] uPyEasy: Plugins: Load
2000-01-01 00:01:03 [debug] uPyEasy: Plugins: init plugin records
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Load frozen plugin switch
2000-01-01 00:01:04 [debug] uPyEasy: Plugin: switch contruction
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Create frozen plugin Record: switch
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Load frozen plugin bme280
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Create frozen plugin Record: bme280
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Load frozen plugin ds18
2000-01-01 00:01:04 [debug] uPyEasy: Plugin: ds18 contruction
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Create frozen plugin Record: ds18
2000-01-01 00:01:05 [debug] uPyEasy: Plugins: Init plugin records, run async loop
I (79290) wifi: pm start, type:0

2000-01-01 00:01:05 [debug] uPyEasy: Utils: Sys hostname
2000-01-01 00:01:05 [debug] uPyEasy: Utils: uPyEasy Name
Set syslog hostname 0.0.0.0
reloaded sink syslog
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Entering SetTime
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Entering GetNtpTime
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: network Table
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Using NTP Hostname: pool.ntp.org
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: TimeZome offset: 60
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Received UTC NTP Time: 568583149
2000-01-01 00:01:06 [debug] uPyEasy-uPyEasy: Hal: Timezone corrected NTP Time: 568586749
2000-01-01 00:01:06 [debug] uPyEasy-uPyEasy: Hal: DST corrected NTP Time: 568586749
2000-01-01 00:01:06 [debug] uPyEasy-uPyEasy: Hal: Received NTP Time: 568586749
2000-01-01 00:01:06 [debug] uPyEasy-uPyEasy: Hal: StartTime: 568586749
2018-01-05 20:45:49 [debug] uPyEasy-uPyEasy: Main: Pre-loading home page
2018-01-05 20:45:49 [debug] uPyEasy-uPyEasy: Hal: get_ip_address esp32, ip: 192.168.1.6
2018-01-05 20:45:49 [debug] uPyEasy-uPyEasy: Main: uPyEasy Main Async Loop
* Running on http://192.168.1.6:80/
2018-01-05 20:45:49 [debug] uPyEasy-uPyEasy: Protocols: Async processing protocols
2018-01-05 20:45:49 [debug] uPyEasy-uPyEasy: Plugins: Async processing plugins
stack: 2032 out of 15360
GC: total: 96000, used: 76128, free: 19872
 No. of 1-blocks: 1428, 2-blocks: 135, max blk sz: 868, max free sz: 1147
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "upyeasy/__init__.py", line 56, in main
  File "picoweb/__init__.py", line 275, in run
  File "uasyncio/core.py", line 138, in run_forever
  File "uasyncio/core.py", line 97, in run_forever
  File "picoweb/__init__.py", line 193, in _handle
  File "picoweb/__init__.py", line 192, in _handle
NameError: local variable referenced before assignment
>>> 
Progress, but not there yet. I did manage to connect briefly on port 80 from my browser before the error. I'm not sure, but I had the impression that trying to connect triggered the error(?).
Cheers
Andrew.

Update: Ignore the above. I just tried again, because I started to get confused about which was the latest version. ;)
Anyway, I downloaded from post 1 again after seeing your message sent at 16:13 and repeated the process, got the ENOENT error and typed import upyeasy and upyeasy.main(). This time it started ok and I was able to connect from my browser (initially on port 80) and it let me change the port to 9000. (I know for sure that I have the right version now, as there is the BME280 included.) :)
Sorry about any confusion!

AndrewJ

As an afterthought, is there a way to include the date and time in the filename, rather than just "firmware?", or a version number and sub-version?? I think it might make it easier to track the various changes and to be clearer about exactly which version we are referring to. :)

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

Re: ESP32 boards

#68 Post by BertB » 06 Jan 2018, 21:37

where can I find this upyeasy-32.bin

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

Re: ESP32 boards

#69 Post by AndrewJ » 06 Jan 2018, 21:56

Hi Lisa,
I tried adding a BME280 device, but getting this error

Code: Select all

KeyError('valueN2',)
Traceback (most recent call last):
  File "picoweb/__init__.py", line 186, in _handle
  File "upyeasy/pages.py", line 656, in devicespage
KeyError: valueN2
and the webpage for Devices is not working (empty response).

Thanks for your continuing support on this - it's not straightforward!! :)
Andrew

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

Re: ESP32 boards

#70 Post by CHK_BLN » 06 Jan 2018, 22:32

LisaM wrote:
06 Jan 2018, 19:13
CHK_BLN wrote:
06 Jan 2018, 14:49
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "upyeasy / __ init__.py", line 56, in main
File "picoweb / __ init__.py", line 275, in run
File "uasyncio / core.py", line 138, in run_forever
File "uasyncio / core.py", line 97, in run_forever
File "upyeasy / plugin.py", line 188, in asyncdevices
KeyError: test
Best regards
Oops, bug. Fixed the bug, updated the firmware in post 1. Can you flash again and try? It's working at my ESP32.

Cheers,

Lisa
I downloaded the file from the first post and flashed it again.
But it comes the same mistake.

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "upyeasy / __ init__.py", line 56, in main
File "picoweb / __ init__.py", line 275, in run
File "uasyncio / core.py", line 138, in run_forever
File "uasyncio / core.py", line 97, in run_forever
File "upyeasy / plugin.py", line 188, in asyncdevices
KeyError: test

Best regards

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

Re: ESP32 boards

#71 Post by LisaM » 06 Jan 2018, 23:25

CHK_BLN wrote:
06 Jan 2018, 22:32
I downloaded the file from the first post and flashed it again.
But it comes the same mistake.

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "upyeasy / __ init__.py", line 56, in main
File "picoweb / __ init__.py", line 275, in run
File "uasyncio / core.py", line 138, in run_forever
File "uasyncio / core.py", line 97, in run_forever
File "upyeasy / plugin.py", line 188, in asyncdevices
KeyError: test

Best regards
Even after a hard reset (power down/power up)?

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

Re: ESP32 boards

#72 Post by LisaM » 07 Jan 2018, 01:02

karl222 wrote:
06 Jan 2018, 20:43
Unfortunately i am not running a linux system...
Doesn't matter, in this thread is explained how to use windows. Added also to the instructions in the beginning!

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

Re: ESP32 boards

#73 Post by LisaM » 07 Jan 2018, 01:23

BertB wrote:
06 Jan 2018, 21:37
where can I find this upyeasy-32.bin
It's in the first post, i've have change the instructions to be more clear.

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

Re: ESP32 boards

#74 Post by LisaM » 07 Jan 2018, 01:24

AndrewJ wrote:
06 Jan 2018, 21:28
As an afterthought, is there a way to include the date and time in the filename, rather than just "firmware?", or a version number and sub-version?? I think it might make it easier to track the various changes and to be clearer about exactly which version we are referring to. :)
Done!

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

Re: ESP32 boards

#75 Post by LisaM » 07 Jan 2018, 01:52

AndrewJ wrote:
06 Jan 2018, 21:56
Hi Lisa,
I tried adding a BME280 device, but getting this error

Code: Select all

KeyError('valueN2',)
Traceback (most recent call last):
  File "picoweb/__init__.py", line 186, in _handle
  File "upyeasy/pages.py", line 656, in devicespage
KeyError: valueN2
and the webpage for Devices is not working (empty response).

Thanks for your continuing support on this - it's not straightforward!! :)
Andrew
Can i have more log? It's hard to see it's path uPyEasy has taken.
Which I2C pins are you using? Is the BME280 connected to these pins? Are these pins set in the hardware page?

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

Re: ESP32 boards

#76 Post by karl222 » 07 Jan 2018, 07:45

Great, thx!

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

Re: ESP32 boards

#77 Post by AndrewJ » 07 Jan 2018, 10:15

LisaM wrote:
07 Jan 2018, 01:52
AndrewJ wrote:
06 Jan 2018, 21:56
Hi Lisa,
I tried adding a BME280 device, but getting this error

Code: Select all

KeyError('valueN2',)
Traceback (most recent call last):
  File "picoweb/__init__.py", line 186, in _handle
  File "upyeasy/pages.py", line 656, in devicespage
KeyError: valueN2
and the webpage for Devices is not working (empty response).

Thanks for your continuing support on this - it's not straightforward!! :)
Andrew
Can i have more log? It's hard to see it's path uPyEasy has taken.
Which I2C pins are you using? Is the BME280 connected to these pins? Are these pins set in the hardware page?
I erased, re-flashed it and rebooted. This time I got a different error with picoweb which happened even before I added a BME280 or any other device in the web interface.

Here is the full log for you to look at, HTH.
Still on LOLIN32 LITE. Firmware is v53, the modified version you mentioned in your message at 16:13 yesterday. Just one device physically connected, that is a DS18B20, but I never got as far as defining devices this time round.
Any thoughts?

Code: Select all

>>> 
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_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


[0;32mI (438) cpu_start: Pro cpu up.[0m
[0;32mI (438) cpu_start: Single core mode[0m
[0;32mI (438) heap_init: Initializing. RAM available for dynamic allocation:[0m
[0;32mI (442) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM[0m
[0;32mI (448) heap_init: At 3FFDCDD0 len 00003230 (12 KiB): DRAM[0m
[0;32mI (454) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM[0m
[0;32mI (460) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[0m
[0;32mI (467) heap_init: At 4009005C len 0000FFA4 (63 KiB): IRAM[0m
[0;32mI (473) cpu_start: Pro cpu start user code[0m
[0;32mI (43) cpu_start: Starting scheduler on PRO CPU.[0m


OSError: [Errno 2] ENOENT
MicroPython v1.9.3-254-g41a9bdc-dirty on 2018-01-06; ESP32 module with ESP32
Type "help()" for more information.
>>> 
import upyeasy
[0;32mI (44029) modsocket: Initializing[0m
>>> upyeasy.main()
loaded sink log
loaded sink console
loaded sink syslog
2000-01-01T00:00:44.005 [debug] uPyEasy: Init: Init constructor
2000-01-01T00:00:44.005 [debug] uPyEasy: Init: Entering init
2000-01-01 00:00:44 [debug] uPyEasy: Init: Create directory config
2000-01-01 00:00:45 [debug] uPyEasy: Init: Create directory plugins
2000-01-01 00:00:45 [debug] uPyEasy: Init: Create directory protocols
2000-01-01 00:00:45 [debug] uPyEasy: Init: Create directory scripts
2000-01-01 00:00:45 [debug] uPyEasy: Init: config Table
2000-01-01 00:00:45 [debug] uPyEasy: Init: network Table
2000-01-01 00:00:45 [debug] uPyEasy: Init: protocol Table
2000-01-01 00:00:46 [debug] uPyEasy: Init: controller Table
2000-01-01 00:00:46 [debug] uPyEasy: Init: hardware Table
2000-01-01 00:00:46 [debug] uPyEasy: Init: dxpin Table
2000-01-01 00:00:46 [debug] uPyEasy: Init: dxmap Table
2000-01-01 00:00:46 [debug] uPyEasy: Init: plugin Table
2000-01-01 00:00:47 [debug] uPyEasy: Init: pluginstore Table
2000-01-01 00:00:47 [debug] uPyEasy: Init: device Table
2000-01-01 00:00:47 [debug] uPyEasy: Init: service Table
2000-01-01 00:00:47 [debug] uPyEasy: Init: notification Table
2000-01-01 00:00:47 [debug] uPyEasy: Init: advanced Table
2000-01-01 00:00:47 [debug] uPyEasy: Init: Create Config Record
2000-01-01 00:00:48 [debug] uPyEasy: Init: Create Network Record
2000-01-01 00:00:48 [debug] uPyEasy: Init: Create Hardware Record
2000-01-01 00:00:48 [debug] uPyEasy: Hal: hardwaredb init
2000-01-01 00:00:48 [debug] uPyEasy: Hal: hardwaredb esp32
2000-01-01 00:00:48 [debug] uPyEasy: Init: Create dxpin Record
2000-01-01 00:00:49 [debug] uPyEasy: Hal: dxpins_init
2000-01-01 00:00:49 [debug] uPyEasy: Hal: dxpins_init esp32
2000-01-01 00:00:49 [debug] uPyEasy: Init: Create advanced Record
2000-01-01 00:00:49 [debug] uPyEasy: Hal: Init
2000-01-01 00:00:49 [debug] uPyEasy: Hal: init, network record present
2000-01-01 00:00:49 [debug] uPyEasy: Hal: esp32
I (62789) wifi: wifi firmware version: 111e74d
I (62789) wifi: config NVS flash: enabled
I (62789) wifi: config nano formating: disabled
[0;32mI (62789) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
[0;32mI (62799) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
I (62819) wifi: Init dynamic tx buffer num: 32
I (62819) wifi: Init data frame dynamic rx buffer num: 64
I (62819) wifi: Init management frame dynamic rx buffer num: 64
I (62829) wifi: wifi driver task: 3ffde13c, prio:23, stack:4096
I (62829) wifi: Init static rx buffer num: 10
I (62839) wifi: Init dynamic rx buffer num: 0
I (62839) wifi: Init rx ampdu len mblock:7
I (62839) wifi: Init lldesc rx ampdu entry mblock:4
I (62849) wifi: wifi power manager task: 0x3ffe8734 prio: 21 stack: 2560
[0;33mW (62859) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration[0m
[0;32mI (63019) phy: phy_version: 362.0, 61e8d92, Sep  8 2017, 18:48:11, 0, 2[0m
I (63029) wifi: mode : null
I (63029) wifi: mode : sta (30:ae:a4:39:16:e4)
[0;32mI (63029) wifi: STA_START[0m
2000-01-01 00:00:49 [debug] uPyEasy: Hal: esp32, ssid empty
[0;32mI (65479) network: event 1[0m
2000-01-01 00:00:52 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: TALKTALK65AFF2 Strength: -40 dBm Security: 0
2000-01-01 00:00:52 [debug] uPyEasy: Hal: esp32, Scan: Open ssid found: TALKTALK65AFF2
2000-01-01 00:00:52 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: ESPeasy3_Boiler_3 Strength: -82 dBm Security: 3
I (67079) wifi: n:11 2, o:1 0, ap:255 255, sta:11 2, prof:1
I (67079) wifi: state: init -> auth (b0)
I (67229) wifi: state: auth -> assoc (0)
I (67299) wifi: state: assoc -> run (10)
I (67299) wifi: connected with TALKTALK65AFF2, channel 11
[0;32mI (67299) network: event 4[0m
I (70299) wifi: pm start, type:0

[0;32mI (75899) event: sta ip: 192.168.1.6, mask: 255.255.255.0, gw: 192.168.1.1[0m
[0;32mI (75899) network: GOT_IP[0m
2000-01-01 00:01:02 [debug] uPyEasy: Hal: esp32, ip: 192.168.1.6
2000-01-01 00:01:02 [debug] uPyEasy: Hal: nic present
2000-01-01 00:01:02 [debug] uPyEasy: Protocols: Load
2000-01-01 00:01:02 [debug] uPyEasy: Protocols: Init protocol records
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Load protocol domoticz_mqtt
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_mqtt
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Load protocol domoticz_http
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_http
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Init protocol records, run async loop
2000-01-01 00:01:03 [debug] uPyEasy: Plugins: Load
2000-01-01 00:01:03 [debug] uPyEasy: Plugins: init plugin records
2000-01-01 00:01:03 [debug] uPyEasy: Plugins: Load frozen plugin switch
2000-01-01 00:01:03 [debug] uPyEasy: Plugin: switch contruction
2000-01-01 00:01:03 [debug] uPyEasy: Plugins: Create frozen plugin Record: switch
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Load frozen plugin bme280
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Create frozen plugin Record: bme280
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Load frozen plugin ds18
2000-01-01 00:01:04 [debug] uPyEasy: Plugin: ds18 contruction
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Create frozen plugin Record: ds18
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Init plugin records, run async loop
2000-01-01 00:01:04 [debug] uPyEasy: Utils: Sys hostname
2000-01-01 00:01:05 [debug] uPyEasy: Utils: uPyEasy Name
Set syslog hostname 0.0.0.0
reloaded sink syslog
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Entering SetTime
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Entering GetNtpTime
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: network Table
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Using NTP Hostname: pool.ntp.org
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: TimeZome offset: 60
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Received UTC NTP Time: 568630782
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Timezone corrected NTP Time: 568634382
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: DST corrected NTP Time: 568634382
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Received NTP Time: 568634382
2000-01-01 00:01:06 [debug] uPyEasy-uPyEasy: Hal: StartTime: 568634382
2018-01-06 09:59:42 [debug] uPyEasy-uPyEasy: Main: Pre-loading home page
2018-01-06 09:59:42 [debug] uPyEasy-uPyEasy: Hal: get_ip_address esp32, ip: 192.168.1.6
2018-01-06 09:59:42 [debug] uPyEasy-uPyEasy: Main: uPyEasy Main Async Loop
* Running on http://192.168.1.6:80/
stack: 2032 out of 15360
GC: total: 96000, used: 61552, free: 34448
 No. of 1-blocks: 955, 2-blocks: 129, max blk sz: 868, max free sz: 1496
568547964.096 <HTTPRequest object at 3ffb9a20> <StreamWriter <socket>> "GET /"
stack: 2032 out of 15360
GC: total: 96000, used: 62912, free: 33088
 No. of 1-blocks: 999, 2-blocks: 133, max blk sz: 868, max free sz: 1496
2018-01-06 09:59:49 [debug] uPyEasy-uPyEasy: Pages: Entering Home Page
2018-01-06 09:59:49 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-01-06 09:59:49 [debug] uPyEasy-uPyEasy: Utils: Unit Number
2018-01-06 09:59:49 [debug] uPyEasy-uPyEasy: Hal: Getting local time in seconds
2018-01-06 09:59:49 [debug] uPyEasy-uPyEasy: Hal: get_ip_address esp32, ip: 192.168.1.6
2018-01-06 09:59:49 [debug] uPyEasy-uPyEasy: Pages: Home Page Data collected
568547964.096 <HTTPRequest object at 3ffbe4d0> <StreamWriter <socket>> "GET /static/upyeasy.css"
static/upyeasy.css
stack: 2032 out of 15360
GC: total: 96000, used: 74992, free: 21008
 No. of 1-blocks: 1155, 2-blocks: 157, max blk sz: 868, max free sz: 1312
568547964.096 <HTTPRequest object at 3ffc56d0> <StreamWriter <socket>> "GET /static/upyeasy.js"
static/upyeasy.js
stack: 2032 out of 15360
GC: total: 96000, used: 80416, free: 15584
 No. of 1-blocks: 1269, 2-blocks: 172, max blk sz: 868, max free sz: 973
568547964.096 <HTTPRequest object at 3ffb8400> <StreamWriter <socket>> "GET /config"
2018-01-06 09:59:53 [debug] uPyEasy-uPyEasy: Pages: Display Config Page
2018-01-06 09:59:53 [debug] uPyEasy-uPyEasy: Pages: Init Config Table
stack: 2032 out of 15360
GC: total: 96000, used: 71664, free: 24336
 No. of 1-blocks: 1051, 2-blocks: 138, max blk sz: 868, max free sz: 968
568547964.096 <HTTPRequest object at 3ffbeaa0> <StreamWriter <socket>> "GET /static/upyeasy.css"
stack: 2032 out of 15360
GC: total: 96000, used: 72912, free: 23088
 No. of 1-blocks: 1085, 2-blocks: 143, max blk sz: 868, max free sz: 968
568547964.096 <HTTPRequest object at 3ffc2280> <StreamWriter <socket>> "GET /static/upyeasy.js"
static/upyeasy.css
static/upyeasy.js
stack: 2032 out of 15360
GC: total: 96000, used: 64640, free: 31360
 No. of 1-blocks: 1020, 2-blocks: 133, max blk sz: 868, max free sz: 805
568548011.779 <HTTPRequest object at 3ffb9a90> <StreamWriter <socket>> "POST /config"
2018-01-06 10:00:01 [debug] uPyEasy-uPyEasy: Pages: Update config
stack: 2032 out of 15360
GC: total: 96000, used: 71264, free: 24736
 No. of 1-blocks: 1271, 2-blocks: 142, max blk sz: 868, max free sz: 1117
568548011.779 <HTTPRequest object at 3ffc39b0> <StreamWriter <socket>> "GET /config"
2018-01-06 10:00:03 [debug] uPyEasy-uPyEasy: Pages: Display Config Page
2018-01-06 10:00:03 [debug] uPyEasy-uPyEasy: Pages: Init Config Table
stack: 2032 out of 15360
GC: total: 96000, used: 71552, free: 24448
 No. of 1-blocks: 1045, 2-blocks: 137, max blk sz: 868, max free sz: 982
568548011.779 <HTTPRequest object at 3ffba5e0> <StreamWriter <socket>> "GET /static/upyeasy.css"
static/upyeasy.css
stack: 2032 out of 15360
GC: total: 96000, used: 78768, free: 17232
 No. of 1-blocks: 1158, 2-blocks: 154, max blk sz: 868, max free sz: 982
568548011.779 <HTTPRequest object at 3ffc4450> <StreamWriter <socket>> "GET /static/upyeasy.js"
static/upyeasy.js
stack: 2032 out of 15360
GC: total: 96000, used: 65232, free: 30768
 No. of 1-blocks: 1022, 2-blocks: 134, max blk sz: 868, max free sz: 853
568548011.779 <HTTPRequest object at 3ffb9c60> <StreamWriter <socket>> "GET /"
2018-01-06 10:00:13 [debug] uPyEasy-uPyEasy: Pages: Entering Home Page
2018-01-06 10:00:13 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-01-06 10:00:13 [debug] uPyEasy-uPyEasy: Utils: Unit Number
2018-01-06 10:00:13 [debug] uPyEasy-uPyEasy: Hal: Getting local time in seconds
2018-01-06 10:00:13 [debug] uPyEasy-uPyEasy: Hal: get_ip_address esp32, ip: 192.168.1.6
2018-01-06 10:00:13 [debug] uPyEasy-uPyEasy: Pages: Home Page Data collected
stack: 2032 out of 15360
GC: total: 96000, used: 67904, free: 28096
 No. of 1-blocks: 1046, 2-blocks: 137, max blk sz: 868, max free sz: 1421
568548011.779 <HTTPRequest object at 3ffbe6c0> <StreamWriter <socket>> "GET /static/upyeasy.css"
stack: 2032 out of 15360
GC: total: 96000, used: 69440, free: 26560
 No. of 1-blocks: 1092, 2-blocks: 143, max blk sz: 868, max free sz: 1421
568548011.779 <HTTPRequest object at 3ffc3440> <StreamWriter <socket>> "GET /static/upyeasy.js"
static/upyeasy.css
static/upyeasy.js
stack: 2032 out of 15360
GC: total: 96000, used: 80496, free: 15504
 No. of 1-blocks: 1271, 2-blocks: 170, max blk sz: 868, max free sz: 968
568548011.779 <HTTPRequest object at 3ffc6c40> <StreamWriter <socket>> "GET /tools"
2018-01-06 10:00:20 [debug] uPyEasy-uPyEasy: Pages: Entering Tools Page
2018-01-06 10:00:20 [debug] uPyEasy-uPyEasy: 
2018-01-06 10:00:20 [debug] uPyEasy-uPyEasy: Pages: Display Tools Page
2018-01-06 10:00:20 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
stack: 2032 out of 15360
GC: total: 96000, used: 66720, free: 29280
 No. of 1-blocks: 1043, 2-blocks: 134, max blk sz: 868, max free sz: 918
568548011.779 <HTTPRequest object at 3ffbe0e0> <StreamWriter <socket>> "GET /static/upyeasy.css"
static/upyeasy.css
stack: 2032 out of 15360
GC: total: 96000, used: 73904, free: 22096
 No. of 1-blocks: 1154, 2-blocks: 151, max blk sz: 868, max free sz: 918
568548011.779 <HTTPRequest object at 3ffc50a0> <StreamWriter <socket>> "GET /static/upyeasy.js"
static/upyeasy.js
stack: 2032 out of 15360
GC: total: 96000, used: 79344, free: 16656
 No. of 1-blocks: 1268, 2-blocks: 165, max blk sz: 868, max free sz: 918
568548011.779 <HTTPRequest object at 3ffc65d0> <StreamWriter <socket>> "GET /info"
2018-01-06 10:00:23 [debug] uPyEasy-uPyEasy: Pages: Entering info Page
2018-01-06 10:00:23 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Utils: Unit Number
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: python info
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: python esp32
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: board info
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: board esp32
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Pages: Entering info Page unicode machine id error: UnicodeError()
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: Getting local time in seconds
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: get_ip_address esp32, ip: 192.168.1.6
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: get_ip_gw pyboard, ip: 192.168.1.1
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: get_ip_netmask pyboard, ip: 255.255.255.0
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: get_ip_dns pyboard, ip: 192.168.1.1
stack: 2032 out of 15360
GC: total: 96000, used: 71136, free: 24864
 No. of 1-blocks: 1086, 2-blocks: 143, max blk sz: 868, max free sz: 1018
568548011.779 <HTTPRequest object at 3ffbfb50> <StreamWriter <socket>> "GET /static/upyeasy.css"
stack: 2032 out of 15360
GC: total: 96000, used: 72672, free: 23328
 No. of 1-blocks: 1132, 2-blocks: 149, max blk sz: 868, max free sz: 1018
568548011.779 <HTTPRequest object at 3ffc5420> <StreamWriter <socket>> "GET /static/upyeasy.js"
static/upyeasy.css
static/upyeasy.js
stack: 2032 out of 15360
GC: total: 96000, used: 65232, free: 30768
 No. of 1-blocks: 1031, 2-blocks: 134, max blk sz: 868, max free sz: 862
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "upyeasy/__init__.py", line 56, in main
  File "picoweb/__init__.py", line 275, in run
  File "uasyncio/core.py", line 138, in run_forever
  File "uasyncio/core.py", line 97, in run_forever
  File "picoweb/__init__.py", line 193, in _handle
  File "picoweb/__init__.py", line 192, in _handle
NameError: local variable referenced before assignment
>>> 

User avatar
ManS-H
Normal user
Posts: 233
Joined: 27 Dec 2015, 11:26
Location: the Netherlands

Re: ESP32 boards

#78 Post by ManS-H » 07 Jan 2018, 10:55

LisaM wrote:
23 Dec 2017, 15:17
Firmware status: Alpha
Firmware version: v53

Firmware installation instructions

Download esptool: https://github.com/espressif/esptool

When doing a FRESH install, ERASEyour ESP32 FILES area:

Code: Select all

LINUX: esptool.py --port /dev/ttyUSBx erase_flash

Code: Select all

WINDOWS: esptool.py --port COMx erase_flash
The FLASHBINARY file has this format: upyeasy_vXX_YYYYMMDD_test_esp32_2048.bin
The (latest) binary files can be downloaded here: https://github.com/letscontrolit/uPyEas ... r/Releases
Hello LisaM, this url: https://github.com/letscontrolit/uPyEas ... r/Releases give's a 404 error.

This one works: https://github.com/letscontrolit/uPyEasy/releases

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

Re: ESP32 boards

#79 Post by BertB » 07 Jan 2018, 11:52

Hi Lisa,
Thanks to your new Post 1, I got much farther, but there are still issues:
First I did an erase flash, then D:\Tools\uPython>esptool.py --port COM5 write_flash --compress 0x1000 D:\Tools\uPython\upyeasy-esp32\upyeasy_v53.bin

This gave the following result:

Code: Select all

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x17 (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
W (65) rtc_clk: Potentially bogus XTAL frequency: 35 MHz, guessing 40 MHz
I (437) cpu_start: Pro cpu up.
I (437) cpu_start: Single core mode
I (437) heap_init: Initializing. RAM available for dynamic allocation:
I (441) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (447) heap_init: At 3FFDCDD0 len 00003230 (12 KiB): DRAM
I (453) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (459) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (466) heap_init: At 4009005C len 0000FFA4 (63 KiB): IRAM
I (472) cpu_start: Pro cpu start user code
I (42) cpu_start: Starting scheduler on PRO CPU.
OSError: [Errno 2] ENOENT
MicroPython v1.9.3-254-g41a9bdc-dirty on 2018-01-06; ESP32 module with ESP32
Type "help()" for more information.
Mind the OSErrror:[Errno2]

Then I entered the following:

Code: Select all

>>> import upyeasy
I (22964) modsocket: Initializing
>>> upyeasy.main()
loaded sink log
loaded sink console
loaded sink syslog
2000-01-01T00:00:21.005 [debug] uPyEasy: Init: Init constructor
2000-01-01T00:00:21.005 [debug] uPyEasy: Init: Entering init
2000-01-01 00:00:21 [debug] uPyEasy: Init: Create directory config
2000-01-01 00:00:21 [debug] uPyEasy: Init: Create directory plugins
2000-01-01 00:00:21 [debug] uPyEasy: Init: Create directory protocols
2000-01-01 00:00:21 [debug] uPyEasy: Init: Create directory scripts
2000-01-01 00:00:21 [debug] uPyEasy: Init: config Table
2000-01-01 00:00:22 [debug] uPyEasy: Init: network Table
2000-01-01 00:00:22 [debug] uPyEasy: Init: protocol Table
2000-01-01 00:00:22 [debug] uPyEasy: Init: controller Table
2000-01-01 00:00:22 [debug] uPyEasy: Init: hardware Table
2000-01-01 00:00:22 [debug] uPyEasy: Init: dxpin Table
2000-01-01 00:00:22 [debug] uPyEasy: Init: dxmap Table
2000-01-01 00:00:23 [debug] uPyEasy: Init: plugin Table
2000-01-01 00:00:23 [debug] uPyEasy: Init: pluginstore Table
2000-01-01 00:00:23 [debug] uPyEasy: Init: device Table
2000-01-01 00:00:23 [debug] uPyEasy: Init: service Table
2000-01-01 00:00:23 [debug] uPyEasy: Init: notification Table
2000-01-01 00:00:23 [debug] uPyEasy: Init: advanced Table
2000-01-01 00:00:24 [debug] uPyEasy: Init: Create Config Record
2000-01-01 00:00:24 [debug] uPyEasy: Init: Create Network Record
2000-01-01 00:00:24 [debug] uPyEasy: Init: Create Hardware Record
2000-01-01 00:00:24 [debug] uPyEasy: Hal: hardwaredb init
2000-01-01 00:00:24 [debug] uPyEasy: Hal: hardwaredb esp32
2000-01-01 00:00:24 [debug] uPyEasy: Init: Create dxpin Record
2000-01-01 00:00:25 [debug] uPyEasy: Hal: dxpins_init
2000-01-01 00:00:25 [debug] uPyEasy: Hal: dxpins_init esp32
2000-01-01 00:00:25 [debug] uPyEasy: Init: Create advanced Record
2000-01-01 00:00:25 [debug] uPyEasy: Hal: Init
2000-01-01 00:00:25 [debug] uPyEasy: Hal: init, network record present
2000-01-01 00:00:25 [debug] uPyEasy: Hal: esp32
I (37254) wifi: wifi firmware version: 111e74d
I (37254) wifi: config NVS flash: enabled
I (37254) wifi: config nano formating: disabled
I (37254) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (37264) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (37284) wifi: Init dynamic tx buffer num: 32
I (37284) wifi: Init data frame dynamic rx buffer num: 64
I (37284) wifi: Init management frame dynamic rx buffer num: 64
I (37284) wifi: wifi driver task: 3ffde13c, prio:23, stack:4096
I (37294) wifi: Init static rx buffer num: 10
I (37294) wifi: Init dynamic rx buffer num: 0
I (37304) wifi: Init rx ampdu len mblock:7
I (37304) wifi: Init lldesc rx ampdu entry mblock:4
I (37304) wifi: wifi power manager task: 0x3ffe8734 prio: 21 stack: 2560
W (37314) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration
I (37464) phy: phy_version: 362.0, 61e8d92, Sep  8 2017, 18:48:11, 0, 2
I (37474) wifi: mode : null
I (37474) wifi: mode : sta (30:ae:a4:3c:70:28)
I (37474) wifi: STA_START
2000-01-01 00:00:25 [debug] uPyEasy: Hal: esp32, ssid empty
I (39924) network: event 1
2000-01-01 00:00:28 [debug] uPyEasy: Hal: esp32, Scan: Ssid found:xxxxx Strength: -91 dBm Security: 3
2000-01-01 00:00:28 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: xxxxxxx Strength: -92 dBm Security: 3
2000-01-01 00:00:28 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: xxxxxxxx Strength: -93 dBm Security: 3
2000-01-01 00:00:28 [debug] uPyEasy: Protocols: Load
2000-01-01 00:00:28 [debug] uPyEasy: Protocols: Init protocol records
2000-01-01 00:00:28 [debug] uPyEasy: Protocols: Load protocol domoticz_mqtt
2000-01-01 00:00:28 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_mqtt
2000-01-01 00:00:29 [debug] uPyEasy: Protocols: Load protocol domoticz_http
2000-01-01 00:00:29 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_http
2000-01-01 00:00:29 [debug] uPyEasy: Protocols: Init protocol records, run async loop
2000-01-01 00:00:29 [debug] uPyEasy: Plugins: Load
2000-01-01 00:00:29 [debug] uPyEasy: Plugins: init plugin records
2000-01-01 00:00:29 [debug] uPyEasy: Plugins: Load frozen plugin switch
2000-01-01 00:00:29 [debug] uPyEasy: Plugin: switch contruction
2000-01-01 00:00:29 [debug] uPyEasy: Plugins: Create frozen plugin Record: switch
2000-01-01 00:00:29 [debug] uPyEasy: Plugins: Load frozen plugin bme280
2000-01-01 00:00:29 [debug] uPyEasy: Plugins: Create frozen plugin Record: bme280
2000-01-01 00:00:30 [debug] uPyEasy: Plugins: Load frozen plugin ds18
2000-01-01 00:00:30 [debug] uPyEasy: Plugin: ds18 contruction
2000-01-01 00:00:30 [debug] uPyEasy: Plugins: Create frozen plugin Record: ds18
2000-01-01 00:00:30 [debug] uPyEasy: Plugins: Init plugin records, run async loop
2000-01-01 00:00:30 [debug] uPyEasy: Utils: Sys hostname
2000-01-01 00:00:30 [debug] uPyEasy: Utils: uPyEasy Name
Set syslog hostname 0.0.0.0
reloaded sink syslog
2000-01-01 00:00:30 [debug] uPyEasy-uPyEasy: Hal: Entering SetTime
2000-01-01 00:00:30 [debug] uPyEasy-uPyEasy: Hal: Entering GetNtpTime
2000-01-01 00:00:30 [debug] uPyEasy-uPyEasy: Hal: network Table
2000-01-01 00:00:31 [debug] uPyEasy-uPyEasy: Hal: Using NTP Hostname: pool.ntp.org
2000-01-01 00:00:31 [debug] uPyEasy-uPyEasy: Hal: TimeZome offset: 60
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "upyeasy/__init__.py", line 40, in main
  File "upyeasy/init.py", line 224, in init
  File "upyeasy/hal.py", line 334, in settime
  File "upyeasy/hal.py", line 272, in getntptime
  File "upyeasy/hal.py", line 264, in getntptime
IndexError: list index out of range
>>>
When I try to enable WIFI, I get:

Code: Select all

>>> upyeasy.setwifi(xxxxx','yyyyyy,80)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "upyeasy/__init__.py", line 29, in setwifi
  File "upyeasy/utils.py", line 46, in setwifi
  File "filedb.py", line 73, in update
OSError: [Errno 2] ENOENT

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

Re: ESP32 boards

#80 Post by BertB » 07 Jan 2018, 12:45

this is weird ...
an hour or so later, I restarted the Putty terminal into the ESP32 and tried upyeasy.setwifi again.
it was not found, so I imported it again.

Code: Select all

upyeasy.setwifi('xxxx','yyyyyyy')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "upyeasy/__init__.py", line 29, in setwifi
  File "upyeasy/utils.py", line 42, in setwifi
  File "filedb.py", line 70, in update
AttributeError: type object 'networkTable' has no attribute '__fields__'
After that I did upyeasy.main() and now it connects to my network.

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

Re: ESP32 boards

#81 Post by AndrewJ » 07 Jan 2018, 13:30

AndrewJ wrote:
07 Jan 2018, 10:15
LisaM wrote:
07 Jan 2018, 01:52
AndrewJ wrote:
06 Jan 2018, 21:56
Hi Lisa,
I tried adding a BME280 device, but getting this error

Code: Select all

KeyError('valueN2',)
Traceback (most recent call last):
  File "picoweb/__init__.py", line 186, in _handle
  File "upyeasy/pages.py", line 656, in devicespage
KeyError: valueN2
and the webpage for Devices is not working (empty response).

Thanks for your continuing support on this - it's not straightforward!! :)
Andrew
Can i have more log? It's hard to see it's path uPyEasy has taken.
Which I2C pins are you using? Is the BME280 connected to these pins? Are these pins set in the hardware page?
I erased, re-flashed it and rebooted. This time I got a different error with picoweb which happened even before I added a BME280 or any other device in the web interface.

Here is the full log for you to look at, HTH.
Still on LOLIN32 LITE. Firmware is v53, the modified version you mentioned in your message at 16:13 yesterday. Just one device physically connected, that is a DS18B20, but I never got as far as defining devices this time round.
Any thoughts?

Code: Select all

>>> 
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_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


[0;32mI (438) cpu_start: Pro cpu up.[0m
[0;32mI (438) cpu_start: Single core mode[0m
[0;32mI (438) heap_init: Initializing. RAM available for dynamic allocation:[0m
[0;32mI (442) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM[0m
[0;32mI (448) heap_init: At 3FFDCDD0 len 00003230 (12 KiB): DRAM[0m
[0;32mI (454) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM[0m
[0;32mI (460) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[0m
[0;32mI (467) heap_init: At 4009005C len 0000FFA4 (63 KiB): IRAM[0m
[0;32mI (473) cpu_start: Pro cpu start user code[0m
[0;32mI (43) cpu_start: Starting scheduler on PRO CPU.[0m


OSError: [Errno 2] ENOENT
MicroPython v1.9.3-254-g41a9bdc-dirty on 2018-01-06; ESP32 module with ESP32
Type "help()" for more information.
>>> 
import upyeasy
[0;32mI (44029) modsocket: Initializing[0m
>>> upyeasy.main()
loaded sink log
loaded sink console
loaded sink syslog
2000-01-01T00:00:44.005 [debug] uPyEasy: Init: Init constructor
2000-01-01T00:00:44.005 [debug] uPyEasy: Init: Entering init
2000-01-01 00:00:44 [debug] uPyEasy: Init: Create directory config
2000-01-01 00:00:45 [debug] uPyEasy: Init: Create directory plugins
2000-01-01 00:00:45 [debug] uPyEasy: Init: Create directory protocols
2000-01-01 00:00:45 [debug] uPyEasy: Init: Create directory scripts
2000-01-01 00:00:45 [debug] uPyEasy: Init: config Table
2000-01-01 00:00:45 [debug] uPyEasy: Init: network Table
2000-01-01 00:00:45 [debug] uPyEasy: Init: protocol Table
2000-01-01 00:00:46 [debug] uPyEasy: Init: controller Table
2000-01-01 00:00:46 [debug] uPyEasy: Init: hardware Table
2000-01-01 00:00:46 [debug] uPyEasy: Init: dxpin Table
2000-01-01 00:00:46 [debug] uPyEasy: Init: dxmap Table
2000-01-01 00:00:46 [debug] uPyEasy: Init: plugin Table
2000-01-01 00:00:47 [debug] uPyEasy: Init: pluginstore Table
2000-01-01 00:00:47 [debug] uPyEasy: Init: device Table
2000-01-01 00:00:47 [debug] uPyEasy: Init: service Table
2000-01-01 00:00:47 [debug] uPyEasy: Init: notification Table
2000-01-01 00:00:47 [debug] uPyEasy: Init: advanced Table
2000-01-01 00:00:47 [debug] uPyEasy: Init: Create Config Record
2000-01-01 00:00:48 [debug] uPyEasy: Init: Create Network Record
2000-01-01 00:00:48 [debug] uPyEasy: Init: Create Hardware Record
2000-01-01 00:00:48 [debug] uPyEasy: Hal: hardwaredb init
2000-01-01 00:00:48 [debug] uPyEasy: Hal: hardwaredb esp32
2000-01-01 00:00:48 [debug] uPyEasy: Init: Create dxpin Record
2000-01-01 00:00:49 [debug] uPyEasy: Hal: dxpins_init
2000-01-01 00:00:49 [debug] uPyEasy: Hal: dxpins_init esp32
2000-01-01 00:00:49 [debug] uPyEasy: Init: Create advanced Record
2000-01-01 00:00:49 [debug] uPyEasy: Hal: Init
2000-01-01 00:00:49 [debug] uPyEasy: Hal: init, network record present
2000-01-01 00:00:49 [debug] uPyEasy: Hal: esp32
I (62789) wifi: wifi firmware version: 111e74d
I (62789) wifi: config NVS flash: enabled
I (62789) wifi: config nano formating: disabled
[0;32mI (62789) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
[0;32mI (62799) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
I (62819) wifi: Init dynamic tx buffer num: 32
I (62819) wifi: Init data frame dynamic rx buffer num: 64
I (62819) wifi: Init management frame dynamic rx buffer num: 64
I (62829) wifi: wifi driver task: 3ffde13c, prio:23, stack:4096
I (62829) wifi: Init static rx buffer num: 10
I (62839) wifi: Init dynamic rx buffer num: 0
I (62839) wifi: Init rx ampdu len mblock:7
I (62839) wifi: Init lldesc rx ampdu entry mblock:4
I (62849) wifi: wifi power manager task: 0x3ffe8734 prio: 21 stack: 2560
[0;33mW (62859) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration[0m
[0;32mI (63019) phy: phy_version: 362.0, 61e8d92, Sep  8 2017, 18:48:11, 0, 2[0m
I (63029) wifi: mode : null
I (63029) wifi: mode : sta (30:ae:a4:39:16:e4)
[0;32mI (63029) wifi: STA_START[0m
2000-01-01 00:00:49 [debug] uPyEasy: Hal: esp32, ssid empty
[0;32mI (65479) network: event 1[0m
2000-01-01 00:00:52 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: TALKTALK65AFF2 Strength: -40 dBm Security: 0
2000-01-01 00:00:52 [debug] uPyEasy: Hal: esp32, Scan: Open ssid found: TALKTALK65AFF2
2000-01-01 00:00:52 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: ESPeasy3_Boiler_3 Strength: -82 dBm Security: 3
I (67079) wifi: n:11 2, o:1 0, ap:255 255, sta:11 2, prof:1
I (67079) wifi: state: init -> auth (b0)
I (67229) wifi: state: auth -> assoc (0)
I (67299) wifi: state: assoc -> run (10)
I (67299) wifi: connected with TALKTALK65AFF2, channel 11
[0;32mI (67299) network: event 4[0m
I (70299) wifi: pm start, type:0

[0;32mI (75899) event: sta ip: 192.168.1.6, mask: 255.255.255.0, gw: 192.168.1.1[0m
[0;32mI (75899) network: GOT_IP[0m
2000-01-01 00:01:02 [debug] uPyEasy: Hal: esp32, ip: 192.168.1.6
2000-01-01 00:01:02 [debug] uPyEasy: Hal: nic present
2000-01-01 00:01:02 [debug] uPyEasy: Protocols: Load
2000-01-01 00:01:02 [debug] uPyEasy: Protocols: Init protocol records
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Load protocol domoticz_mqtt
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_mqtt
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Load protocol domoticz_http
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_http
2000-01-01 00:01:03 [debug] uPyEasy: Protocols: Init protocol records, run async loop
2000-01-01 00:01:03 [debug] uPyEasy: Plugins: Load
2000-01-01 00:01:03 [debug] uPyEasy: Plugins: init plugin records
2000-01-01 00:01:03 [debug] uPyEasy: Plugins: Load frozen plugin switch
2000-01-01 00:01:03 [debug] uPyEasy: Plugin: switch contruction
2000-01-01 00:01:03 [debug] uPyEasy: Plugins: Create frozen plugin Record: switch
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Load frozen plugin bme280
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Create frozen plugin Record: bme280
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Load frozen plugin ds18
2000-01-01 00:01:04 [debug] uPyEasy: Plugin: ds18 contruction
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Create frozen plugin Record: ds18
2000-01-01 00:01:04 [debug] uPyEasy: Plugins: Init plugin records, run async loop
2000-01-01 00:01:04 [debug] uPyEasy: Utils: Sys hostname
2000-01-01 00:01:05 [debug] uPyEasy: Utils: uPyEasy Name
Set syslog hostname 0.0.0.0
reloaded sink syslog
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Entering SetTime
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Entering GetNtpTime
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: network Table
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Using NTP Hostname: pool.ntp.org
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: TimeZome offset: 60
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Received UTC NTP Time: 568630782
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Timezone corrected NTP Time: 568634382
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: DST corrected NTP Time: 568634382
2000-01-01 00:01:05 [debug] uPyEasy-uPyEasy: Hal: Received NTP Time: 568634382
2000-01-01 00:01:06 [debug] uPyEasy-uPyEasy: Hal: StartTime: 568634382
2018-01-06 09:59:42 [debug] uPyEasy-uPyEasy: Main: Pre-loading home page
2018-01-06 09:59:42 [debug] uPyEasy-uPyEasy: Hal: get_ip_address esp32, ip: 192.168.1.6
2018-01-06 09:59:42 [debug] uPyEasy-uPyEasy: Main: uPyEasy Main Async Loop
* Running on http://192.168.1.6:80/
stack: 2032 out of 15360
GC: total: 96000, used: 61552, free: 34448
 No. of 1-blocks: 955, 2-blocks: 129, max blk sz: 868, max free sz: 1496
568547964.096 <HTTPRequest object at 3ffb9a20> <StreamWriter <socket>> "GET /"
stack: 2032 out of 15360
GC: total: 96000, used: 62912, free: 33088
 No. of 1-blocks: 999, 2-blocks: 133, max blk sz: 868, max free sz: 1496
2018-01-06 09:59:49 [debug] uPyEasy-uPyEasy: Pages: Entering Home Page
2018-01-06 09:59:49 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-01-06 09:59:49 [debug] uPyEasy-uPyEasy: Utils: Unit Number
2018-01-06 09:59:49 [debug] uPyEasy-uPyEasy: Hal: Getting local time in seconds
2018-01-06 09:59:49 [debug] uPyEasy-uPyEasy: Hal: get_ip_address esp32, ip: 192.168.1.6
2018-01-06 09:59:49 [debug] uPyEasy-uPyEasy: Pages: Home Page Data collected
568547964.096 <HTTPRequest object at 3ffbe4d0> <StreamWriter <socket>> "GET /static/upyeasy.css"
static/upyeasy.css
stack: 2032 out of 15360
GC: total: 96000, used: 74992, free: 21008
 No. of 1-blocks: 1155, 2-blocks: 157, max blk sz: 868, max free sz: 1312
568547964.096 <HTTPRequest object at 3ffc56d0> <StreamWriter <socket>> "GET /static/upyeasy.js"
static/upyeasy.js
stack: 2032 out of 15360
GC: total: 96000, used: 80416, free: 15584
 No. of 1-blocks: 1269, 2-blocks: 172, max blk sz: 868, max free sz: 973
568547964.096 <HTTPRequest object at 3ffb8400> <StreamWriter <socket>> "GET /config"
2018-01-06 09:59:53 [debug] uPyEasy-uPyEasy: Pages: Display Config Page
2018-01-06 09:59:53 [debug] uPyEasy-uPyEasy: Pages: Init Config Table
stack: 2032 out of 15360
GC: total: 96000, used: 71664, free: 24336
 No. of 1-blocks: 1051, 2-blocks: 138, max blk sz: 868, max free sz: 968
568547964.096 <HTTPRequest object at 3ffbeaa0> <StreamWriter <socket>> "GET /static/upyeasy.css"
stack: 2032 out of 15360
GC: total: 96000, used: 72912, free: 23088
 No. of 1-blocks: 1085, 2-blocks: 143, max blk sz: 868, max free sz: 968
568547964.096 <HTTPRequest object at 3ffc2280> <StreamWriter <socket>> "GET /static/upyeasy.js"
static/upyeasy.css
static/upyeasy.js
stack: 2032 out of 15360
GC: total: 96000, used: 64640, free: 31360
 No. of 1-blocks: 1020, 2-blocks: 133, max blk sz: 868, max free sz: 805
568548011.779 <HTTPRequest object at 3ffb9a90> <StreamWriter <socket>> "POST /config"
2018-01-06 10:00:01 [debug] uPyEasy-uPyEasy: Pages: Update config
stack: 2032 out of 15360
GC: total: 96000, used: 71264, free: 24736
 No. of 1-blocks: 1271, 2-blocks: 142, max blk sz: 868, max free sz: 1117
568548011.779 <HTTPRequest object at 3ffc39b0> <StreamWriter <socket>> "GET /config"
2018-01-06 10:00:03 [debug] uPyEasy-uPyEasy: Pages: Display Config Page
2018-01-06 10:00:03 [debug] uPyEasy-uPyEasy: Pages: Init Config Table
stack: 2032 out of 15360
GC: total: 96000, used: 71552, free: 24448
 No. of 1-blocks: 1045, 2-blocks: 137, max blk sz: 868, max free sz: 982
568548011.779 <HTTPRequest object at 3ffba5e0> <StreamWriter <socket>> "GET /static/upyeasy.css"
static/upyeasy.css
stack: 2032 out of 15360
GC: total: 96000, used: 78768, free: 17232
 No. of 1-blocks: 1158, 2-blocks: 154, max blk sz: 868, max free sz: 982
568548011.779 <HTTPRequest object at 3ffc4450> <StreamWriter <socket>> "GET /static/upyeasy.js"
static/upyeasy.js
stack: 2032 out of 15360
GC: total: 96000, used: 65232, free: 30768
 No. of 1-blocks: 1022, 2-blocks: 134, max blk sz: 868, max free sz: 853
568548011.779 <HTTPRequest object at 3ffb9c60> <StreamWriter <socket>> "GET /"
2018-01-06 10:00:13 [debug] uPyEasy-uPyEasy: Pages: Entering Home Page
2018-01-06 10:00:13 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-01-06 10:00:13 [debug] uPyEasy-uPyEasy: Utils: Unit Number
2018-01-06 10:00:13 [debug] uPyEasy-uPyEasy: Hal: Getting local time in seconds
2018-01-06 10:00:13 [debug] uPyEasy-uPyEasy: Hal: get_ip_address esp32, ip: 192.168.1.6
2018-01-06 10:00:13 [debug] uPyEasy-uPyEasy: Pages: Home Page Data collected
stack: 2032 out of 15360
GC: total: 96000, used: 67904, free: 28096
 No. of 1-blocks: 1046, 2-blocks: 137, max blk sz: 868, max free sz: 1421
568548011.779 <HTTPRequest object at 3ffbe6c0> <StreamWriter <socket>> "GET /static/upyeasy.css"
stack: 2032 out of 15360
GC: total: 96000, used: 69440, free: 26560
 No. of 1-blocks: 1092, 2-blocks: 143, max blk sz: 868, max free sz: 1421
568548011.779 <HTTPRequest object at 3ffc3440> <StreamWriter <socket>> "GET /static/upyeasy.js"
static/upyeasy.css
static/upyeasy.js
stack: 2032 out of 15360
GC: total: 96000, used: 80496, free: 15504
 No. of 1-blocks: 1271, 2-blocks: 170, max blk sz: 868, max free sz: 968
568548011.779 <HTTPRequest object at 3ffc6c40> <StreamWriter <socket>> "GET /tools"
2018-01-06 10:00:20 [debug] uPyEasy-uPyEasy: Pages: Entering Tools Page
2018-01-06 10:00:20 [debug] uPyEasy-uPyEasy: 
2018-01-06 10:00:20 [debug] uPyEasy-uPyEasy: Pages: Display Tools Page
2018-01-06 10:00:20 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
stack: 2032 out of 15360
GC: total: 96000, used: 66720, free: 29280
 No. of 1-blocks: 1043, 2-blocks: 134, max blk sz: 868, max free sz: 918
568548011.779 <HTTPRequest object at 3ffbe0e0> <StreamWriter <socket>> "GET /static/upyeasy.css"
static/upyeasy.css
stack: 2032 out of 15360
GC: total: 96000, used: 73904, free: 22096
 No. of 1-blocks: 1154, 2-blocks: 151, max blk sz: 868, max free sz: 918
568548011.779 <HTTPRequest object at 3ffc50a0> <StreamWriter <socket>> "GET /static/upyeasy.js"
static/upyeasy.js
stack: 2032 out of 15360
GC: total: 96000, used: 79344, free: 16656
 No. of 1-blocks: 1268, 2-blocks: 165, max blk sz: 868, max free sz: 918
568548011.779 <HTTPRequest object at 3ffc65d0> <StreamWriter <socket>> "GET /info"
2018-01-06 10:00:23 [debug] uPyEasy-uPyEasy: Pages: Entering info Page
2018-01-06 10:00:23 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Utils: Unit Number
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: python info
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: python esp32
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: board info
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: board esp32
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Pages: Entering info Page unicode machine id error: UnicodeError()
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: Getting local time in seconds
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: get_ip_address esp32, ip: 192.168.1.6
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: get_ip_gw pyboard, ip: 192.168.1.1
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: get_ip_netmask pyboard, ip: 255.255.255.0
2018-01-06 10:00:24 [debug] uPyEasy-uPyEasy: Hal: get_ip_dns pyboard, ip: 192.168.1.1
stack: 2032 out of 15360
GC: total: 96000, used: 71136, free: 24864
 No. of 1-blocks: 1086, 2-blocks: 143, max blk sz: 868, max free sz: 1018
568548011.779 <HTTPRequest object at 3ffbfb50> <StreamWriter <socket>> "GET /static/upyeasy.css"
stack: 2032 out of 15360
GC: total: 96000, used: 72672, free: 23328
 No. of 1-blocks: 1132, 2-blocks: 149, max blk sz: 868, max free sz: 1018
568548011.779 <HTTPRequest object at 3ffc5420> <StreamWriter <socket>> "GET /static/upyeasy.js"
static/upyeasy.css
static/upyeasy.js
stack: 2032 out of 15360
GC: total: 96000, used: 65232, free: 30768
 No. of 1-blocks: 1031, 2-blocks: 134, max blk sz: 868, max free sz: 862
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "upyeasy/__init__.py", line 56, in main
  File "picoweb/__init__.py", line 275, in run
  File "uasyncio/core.py", line 138, in run_forever
  File "uasyncio/core.py", line 97, in run_forever
  File "picoweb/__init__.py", line 193, in _handle
  File "picoweb/__init__.py", line 192, in _handle
NameError: local variable referenced before assignment
>>> 
Well, I don't understand this...
I decided to have another try, and rebooted (without erasing/reflashing). This time it worked OK (with the help of typing in "import upyeasy" and "upyeasy.main(). I don't know what changed, but I'd have to guess that it's maybe something in my home network?? If the network was somehow busy on my previous try, might that have caused the picoweb errors?

I then added a DS18B20 device, and that's working, although there do seem to be a couple of bugs:
1. In the web interface, I selected GPIO22, which matches the physiccal pin I connected to, D22. However, in the log there are references in the DS18B20 section to d21 - no idea where that is coming from. (section of log below.)

2. There is something strange about the Decimals field at the bottom. I can get the selector to show e.g. 1, but it also shows in the list a couple of unrelated items, phone numbers etc. (Using Google Chrome browser). And when I leave it at one and click Submit, then go back in to Edit, the number 1 has disappeared, it doesn't seem to get saved. It certainly doesn't take effect on the value presented on the main Devices page, this has a variable number of decimals, 2-4.

Code: Select all

stack: 2032 out of 15360
GC: total: 96000, used: 72048, free: 23952
 No. of 1-blocks: 1135, 2-blocks: 145, max blk sz: 868, max free sz: 445
568559503.555 <HTTPRequest object at 3ffbba90> <StreamWriter <socket>> "POST /device_setting?id=1"
2018-01-06 13:11:13 [debug] uPyEasy-uPyEasy: Pages: Entering Device Settings Page
2018-01-06 13:11:13 [debug] uPyEasy-uPyEasy: Pages: POST
2018-01-06 13:11:13 [debug] uPyEasy-uPyEasy: id
2018-01-06 13:11:13 [debug] uPyEasy-uPyEasy: 1
2018-01-06 13:11:14 [debug] uPyEasy-uPyEasy: Current Plugin: 3
2018-01-06 13:11:14 [debug] uPyEasy-uPyEasy: New Plugin: 3
2018-01-06 13:11:14 [debug] uPyEasy-uPyEasy: Pages: Update Device: 1
2018-01-06 13:11:14 [debug] uPyEasy-uPyEasy: Pages: Update Device: Same  plugin
2018-01-06 13:11:15 [debug] uPyEasy-uPyEasy: Plugins: Init device: Test_DS18B20 with plugin: 3
2018-01-06 13:11:15 [debug] uPyEasy-uPyEasy: Plugin: ds18 contruction
2018-01-06 13:11:15 [debug] uPyEasy-uPyEasy: Plugins: Init device: Test_DS18B20 ,instantiate plugin: DS18B20
2018-01-06 13:11:15 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-01-06 13:11:15 [debug] uPyEasy-uPyEasy: Plugin: ds18 init
2018-01-06 13:11:15 [debug] uPyEasy-uPyEasy: Plugins: Read device store: Test_DS18B20
2018-01-06 13:11:15 [debug] uPyEasy-uPyEasy: Plugin: ds18 init, pin used: d21
2018-01-06 13:11:15 [debug] uPyEasy-uPyEasy: Hal: pin = d21
2018-01-06 13:11:15 [debug] uPyEasy-uPyEasy: Hal: pin esp32: 22
2018-01-06 13:11:16 [debug] uPyEasy-uPyEasy: Plugins: Saveform plugin Test_DS18B20
2018-01-06 13:11:16 [debug] uPyEasy-uPyEasy: Plugin: ds18 saveform
2018-01-06 13:11:16 [debug] uPyEasy-uPyEasy: Plugins: Write device store: Test_DS18B20
2018-01-06 13:11:16 [debug] uPyEasy-uPyEasy: Hal: pin = d21
2018-01-06 13:11:16 [debug] uPyEasy-uPyEasy: Hal: pin esp32: 22
2018-01-06 13:11:16 [debug] uPyEasy-uPyEasy: Plugin: ds18 saveform, pin used: d21
stack: 2032 out of 15360
GC: total: 96000, used: 72752, free: 23248
 No. of 1-blocks: 1256, 2-blocks: 154, max blk sz: 868, max free sz: 773
568559503.555 <HTTPRequest object at 3ffbdc50> <StreamWriter <socket>> "GET /devices"
2018-01-06 13:11:17 [debug] uPyEasy-uPyEasy: Pages: Entering Devices Page
2018-01-06 13:11:17 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-01-06 13:11:17 [debug] uPyEasy-uPyEasy: Plugins: Read device Test_DS18B20
2018-01-06 13:11:17 [debug] uPyEasy-uPyEasy: Plugin: ds18 read
stack: 2032 out of 15360
GC: total: 96000, used: 72208, free: 23792
 No. of 1-blocks: 1122, 2-blocks: 143, max blk sz: 868, max free sz: 823
568559503.555 <HTTPRequest object at 3ffbb1d0> <StreamWriter <socket>> "GET /static/upyeasy.css"
stack: 2032 out of 15360
GC: total: 96000, used: 73776, free: 22224
 No. of 1-blocks: 1166, 2-blocks: 151, max blk sz: 868, max free sz: 823
I haven't yet tried again the BME280, I'll get to that this evening hopefully.
Despite these things, I feel we are making progress! :)
Cheers,
Andrew

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

Re: ESP32 boards

#82 Post by LisaM » 07 Jan 2018, 13:39

ManS-H wrote:
07 Jan 2018, 10:55
LisaM wrote:
23 Dec 2017, 15:17
Firmware status: Alpha
Firmware version: v53

Firmware installation instructions

Download esptool: https://github.com/espressif/esptool

When doing a FRESH install, ERASEyour ESP32 FILES area:

Code: Select all

LINUX: esptool.py --port /dev/ttyUSBx erase_flash

Code: Select all

WINDOWS: esptool.py --port COMx erase_flash
The FLASHBINARY file has this format: upyeasy_vXX_YYYYMMDD_test_esp32_2048.bin
The (latest) binary files can be downloaded here: https://github.com/letscontrolit/uPyEas ... r/Releases
Hello LisaM, this url: https://github.com/letscontrolit/uPyEas ... r/Releases give's a 404 error.

This one works: https://github.com/letscontrolit/uPyEasy/releases
Fixed, thanks for the feedback.

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

Re: ESP32 boards

#83 Post by LisaM » 07 Jan 2018, 13:55

BertB wrote:
07 Jan 2018, 12:45
this is weird ...
an hour or so later, I restarted the Putty terminal into the ESP32 and tried upyeasy.setwifi again.
it was not found, so I imported it again.

Code: Select all

upyeasy.setwifi('xxxx','yyyyyyy')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "upyeasy/__init__.py", line 29, in setwifi
  File "upyeasy/utils.py", line 42, in setwifi
  File "filedb.py", line 70, in update
AttributeError: type object 'networkTable' has no attribute '__fields__'
After that I did upyeasy.main() and now it connects to my network.
In your first run, there was no open wifi network available, so it should have exited with the network not available warning message mentioned in the first post. It didn't so it's probably a bug i need to hunt and fix.
In the second attempt it probably found a open network (or the network wifi command also has a bug and did store it but then exploded). If it's running you'll need to check if the ssid fields are fillend in at the config page. Please let me know if they're filled in or not (so i know what direction to look for when hunting the bug).
In your logfile also the ssid names are visible, i don't know if you care or not but if you do: replace them with xxxxxx (but not the other data).

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

Re: ESP32 boards

#84 Post by LisaM » 07 Jan 2018, 13:57

BertB wrote:
07 Jan 2018, 11:52
Hi Lisa,
Thanks to your new Post 1, I got much farther, but there are still issues:
First I did an erase flash, then D:\Tools\uPython>esptool.py --port COM5 write_flash --compress 0x1000 D:\Tools\uPython\upyeasy-esp32\upyeasy_v53.bin

When I try to enable WIFI, I get:

Code: Select all

>>> upyeasy.setwifi(xxxxx','yyyyyy,80)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "upyeasy/__init__.py", line 29, in setwifi
  File "upyeasy/utils.py", line 46, in setwifi
  File "filedb.py", line 73, in update
OSError: [Errno 2] ENOENT
You're missing quote's is that correct?

Code: Select all

>>> upyeasy.setwifi(xxxxx','yyyyyy,80)
Should be:

Code: Select all

>>> upyeasy.setwifi('xxxxx','yyyyyy')
If you want to specify the port but not the alternate ssid, then the command becomes:

Code: Select all

>>> upyeasy.setwifi('xxxxx','yyyyyy',port=8000)

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

Re: ESP32 boards

#85 Post by BertB » 07 Jan 2018, 14:26

LisaM wrote:
07 Jan 2018, 13:55
BertB wrote:
07 Jan 2018, 12:45
this is weird ...
an hour or so later, I restarted the Putty terminal into the ESP32 and tried upyeasy.setwifi again.
it was not found, so I imported it again.

Code: Select all

upyeasy.setwifi('xxxx','yyyyyyy')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "upyeasy/__init__.py", line 29, in setwifi
  File "upyeasy/utils.py", line 42, in setwifi
  File "filedb.py", line 70, in update
AttributeError: type object 'networkTable' has no attribute '__fields__'
After that I did upyeasy.main() and now it connects to my network.
In your first run, there was no open wifi network available, so it should have exited with the network not available warning message mentioned in the first post. It didn't so it's probably a bug i need to hunt and fix.
In the second attempt it probably found a open network (or the network wifi command also has a bug and did store it but then exploded). If it's running you'll need to check if the ssid fields are fillend in at the config page. Please let me know if they're filled in or not (so i know what direction to look for when hunting the bug).
In your logfile also the ssid names are visible, i don't know if you care or not but if you do: replace them with xxxxxx (but not the other data).
The wifi settings are filled in correctly in the config page.

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

Re: ESP32 boards

#86 Post by BertB » 07 Jan 2018, 14:27

LisaM wrote:
07 Jan 2018, 13:57
BertB wrote:
07 Jan 2018, 11:52
Hi Lisa,
Thanks to your new Post 1, I got much farther, but there are still issues:
First I did an erase flash, then D:\Tools\uPython>esptool.py --port COM5 write_flash --compress 0x1000 D:\Tools\uPython\upyeasy-esp32\upyeasy_v53.bin

When I try to enable WIFI, I get:

Code: Select all

>>> upyeasy.setwifi(xxxxx','yyyyyy,80)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "upyeasy/__init__.py", line 29, in setwifi
  File "upyeasy/utils.py", line 46, in setwifi
  File "filedb.py", line 73, in update
OSError: [Errno 2] ENOENT
You're missing quote's is that correct?

Code: Select all

>>> upyeasy.setwifi(xxxxx','yyyyyy,80)
Should be:

Code: Select all

>>> upyeasy.setwifi('xxxxx','yyyyyy')
If you want to specify the port but not the alternate ssid, then the command becomes:

Code: Select all

>>> upyeasy.setwifi('xxxxx','yyyyyy',port=8000)
The missing quote was an error while replacing the real data with xxxx and yyyy.
The real command was entered correctly.

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

Re: ESP32 boards

#87 Post by BertB » 07 Jan 2018, 14:29

To avoid the errno 2 message, I created a main.py file, containing:
import upyeasy
upyeasy.main()

Is this the way to go?

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

Re: ESP32 boards

#88 Post by AndrewJ » 07 Jan 2018, 17:08

Hi Lisa,
Many thanks for the good work on Github! You have certainly been busy!! :D
It will make it much easier to track the version of things, and also for me to begin to understand how the software works (maybe ;) ).
Cheers
Andrew

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

Re: ESP32 boards

#89 Post by LisaM » 07 Jan 2018, 17:45

BertB wrote:
07 Jan 2018, 14:29
To avoid the errno 2 message, I created a main.py file, containing:
import upyeasy
upyeasy.main()

Is this the way to go?
Yes, more in-depth explanation about the boot sequence here: http://docs.micropython.org/en/v1.9.3/e ... ystem.html (ESP32 is mostly the same as the ESP8266)
Unlike ESPEasy, micropython does have a real filesystem. The uPyEasy filedb database containing all config data is located at the Config directory, in filedb each table is a directory while each record in the table is a file in that directory.
I would rather use btree as database, but that isn't available in all platforms (only larger platforms like stm32 and unix). As former Oracle manager, i would really like a relational database on micropython but that's currently not possible.

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

Re: ESP32 boards

#90 Post by LisaM » 07 Jan 2018, 17:51

AndrewJ wrote:
07 Jan 2018, 17:08
Hi Lisa,
Many thanks for the good work on Github! You have certainly been busy!! :D
It will make it much easier to track the version of things, and also for me to begin to understand how the software works (maybe ;) ).
Cheers
Andrew
I need to add a couple of functions more (mainly SPI and some tools functions), then everything will be published on the let's controlit github uPyEasy. That will be BETA-1. Reason i kept it private so far, is that i can make some BIG internal changes if needed. And some internal BIG changes where made last few weeks, including database changes, needed to gear up for beta-1. The database now also has a version number, visible in the tools/info page, that will be needed in the future to update the database to if needed. Database update scripts will be part of the a new beta release (if needed).

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

Re: ESP32 boards

#91 Post by LisaM » 07 Jan 2018, 17:53

BertB wrote:
07 Jan 2018, 14:26
LisaM wrote:
07 Jan 2018, 13:55
BertB wrote:
07 Jan 2018, 12:45
this is weird ...
an hour or so later, I restarted the Putty terminal into the ESP32 and tried upyeasy.setwifi again.
it was not found, so I imported it again.

Code: Select all

upyeasy.setwifi('xxxx','yyyyyyy')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "upyeasy/__init__.py", line 29, in setwifi
  File "upyeasy/utils.py", line 42, in setwifi
  File "filedb.py", line 70, in update
AttributeError: type object 'networkTable' has no attribute '__fields__'
After that I did upyeasy.main() and now it connects to my network.
In your first run, there was no open wifi network available, so it should have exited with the network not available warning message mentioned in the first post. It didn't so it's probably a bug i need to hunt and fix.
In the second attempt it probably found a open network (or the network wifi command also has a bug and did store it but then exploded). If it's running you'll need to check if the ssid fields are fillend in at the config page. Please let me know if they're filled in or not (so i know what direction to look for when hunting the bug).
In your logfile also the ssid names are visible, i don't know if you care or not but if you do: replace them with xxxxxx (but not the other data).
The wifi settings are filled in correctly in the config page.
Hmmm, so it saved it and then blew up. Thx! makes it easier to find out what happened.

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

Re: ESP32 boards

#92 Post by AndrewJ » 07 Jan 2018, 21:15

Hi Lisa,
BME280 is basically working for me, on LOLIN32 LITE board. :D And it's stable (touch wood!).
Temperature and pressure look fine,
but unfortunately Humidity is stuck on zero all the time, which seems unlikely here in Shropshire UK. ;)

I also noticed a few "cosmetic" points.
1, The Humidity value is displaced to the left compared with the others.
Capture BME280.PNG
Capture BME280.PNG (22.83 KiB) Viewed 4550 times
2. if I narrow the window in which uPyEasy is displayed, the page-tab headings go onto the second line (as expected) but the rest of the page does not move down to make extra space, so the second line tabs try to overlap the screen display and are partly hidden.
Capture Tabs hidden.PNG
Capture Tabs hidden.PNG (13.53 KiB) Viewed 4550 times
3. I have the same problem with the Decimals fields as I found with the DS18 (not being saved/re-displayed, and not controlling the values shown.)

Cheers
Andrew

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

Re: ESP32 boards

#93 Post by AndrewJ » 07 Jan 2018, 21:25

Hi Lisa,
On a more general note, regarding issues or bugs that we testers may find. :shock:

Do you prefer to continue to have them through this forum, or to use Github issues now that the repository is set up? Seems to me that Github has possible advantage of keeping all issues together, so maybe easier to track. Possible disadvantage is that not everyone is accustomed to Github. A third way is to mention them on the forum, and then create an issue in Github.

How do you see it?
Andrew

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

Re: ESP32 boards

#94 Post by LisaM » 08 Jan 2018, 14:46

AndrewJ wrote:
07 Jan 2018, 21:25
Hi Lisa,
On a more general note, regarding issues or bugs that we testers may find. :shock:

Do you prefer to continue to have them through this forum, or to use Github issues now that the repository is set up? Seems to me that Github has possible advantage of keeping all issues together, so maybe easier to track. Possible disadvantage is that not everyone is accustomed to Github. A third way is to mention them on the forum, and then create an issue in Github.

How do you see it?
Andrew
I'm slowly but steadily losing track of all reported bugs here, so i'm definitely moving towards Github. I really prefer that bugs are logged in Github now that the repository is up and running. If you don't have a github account then this post is the alternative, but will be secondary to Github (meaning that your bugreport might not be answered, especially if it takes longer to solve the bug).

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

Re: ESP32 boards

#95 Post by AndrewJ » 08 Jan 2018, 18:19

Thanks, that's fine, I have an account already so shouldn't be a problem. I'm still fairly new to it but getting there!

I'll put the ones I reported already into Github, and use it for any future issues.

Cheers
Andrew

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

Re: ESP32 boards

#96 Post by TD-er » 09 Jan 2018, 09:24

AndrewJ wrote:
07 Jan 2018, 21:15
Hi Lisa,
BME280 is basically working for me, on LOLIN32 LITE board. :D And it's stable (touch wood!).
Temperature and pressure look fine,
but unfortunately Humidity is stuck on zero all the time, which seems unlikely here in Shropshire UK. ;)

I also noticed a few "cosmetic" points.
1, The Humidity value is displaced to the left compared with the others.
Capture BME280.PNG
2. if I narrow the window in which uPyEasy is displayed, the page-tab headings go onto the second line (as expected) but the rest of the page does not move down to make extra space, so the second line tabs try to overlap the screen display and are partly hidden.
Capture Tabs hidden.PNG
3. I have the same problem with the Decimals fields as I found with the DS18 (not being saved/re-displayed, and not controlling the values shown.)

Cheers
Andrew
Do you know for sure you have the BME280 and not the BMP280?
They are almost the same, but the BME version also measures humidity.

And are the 1-wire sensor and the BME/BMP measuring the same? Then the displayed temperature of the Bosch sensor is about 9 degrees off.

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

Re: ESP32 boards

#97 Post by AndrewJ » 09 Jan 2018, 09:33

TD-er wrote:
09 Jan 2018, 09:24
AndrewJ wrote:
07 Jan 2018, 21:15
Hi Lisa,
BME280 is basically working for me, on LOLIN32 LITE board. :D And it's stable (touch wood!).
Temperature and pressure look fine,
but unfortunately Humidity is stuck on zero all the time, which seems unlikely here in Shropshire UK. ;)

I also noticed a few "cosmetic" points.
1, The Humidity value is displaced to the left compared with the others.
Capture BME280.PNG
2. if I narrow the window in which uPyEasy is displayed, the page-tab headings go onto the second line (as expected) but the rest of the page does not move down to make extra space, so the second line tabs try to overlap the screen display and are partly hidden.
Capture Tabs hidden.PNG
3. I have the same problem with the Decimals fields as I found with the DS18 (not being saved/re-displayed, and not controlling the values shown.)

Cheers
Andrew
Do you know for sure you have the BME280 and not the BMP280?
They are almost the same, but the BME version also measures humidity.

And are the 1-wire sensor and the BME/BMP measuring the same? Then the displayed temperature of the Bosch sensor is about 9 degrees off.
Hi TD-er,
I think you may have pointed out the explanation of the zero humidity values. I checked the identification on the module, and it actually says "BME/P 280" :roll: So it's possible that in reality is BMP. Chinese clone.
I'll check later, but I may have another module which is definitely a BME and which has given humidity values when connected to a ESP8266 nodemcu. If so, I'll test it with the ESP32 and report back.
Thanks for your input! :)
Andrew

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

Re: ESP32 boards

#98 Post by TD-er » 09 Jan 2018, 09:36

If you test the latest Mega build of ESPeasy (not the one Lisa made, but for the ESP8266), you'll see what version it is. (use the BMx280 plugin)
I've added a detection routine to show immediately what version is detected.

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

Re: ESP32 boards

#99 Post by AndrewJ » 09 Jan 2018, 10:18

TD-er wrote:
09 Jan 2018, 09:36
If you test the latest Mega build of ESPeasy (not the one Lisa made, but for the ESP8266), you'll see what version it is. (use the BMx280 plugin)
I've added a detection routine to show immediately what version is detected.
Thanks, TD-er, I'll try that. BTW, did you mean test the latest Mega build on ESP32, or ESP8266?

Meantime, I found my other BMx sensor module and checked it on a nodemcu running ESPeasy Mega (but not yet the latest build). It gives non-zero humidity values which look "sensible". (Even though that one is also labelled "BME/P 280"!)
So, I connected it to my ESP32 and it is also working there, including the humidity value. So the uPyeasy BME280 plugin is fine. :)
Thanks again for your suggestion.

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

Re: ESP32 boards

#100 Post by AndrewJ » 09 Jan 2018, 16:25

BertB wrote:
07 Jan 2018, 14:29
To avoid the errno 2 message, I created a main.py file, containing:
import upyeasy
upyeasy.main()

Is this the way to go?
Hello @BertB,
Thanks for this suggestion, I tried it and it worked. It now starts automatically without typing these commands each time. :) (LOLIN32 Lite board).
AndrewJ

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest