ESP32 boards

Moderators: Voyager, BertB, grovkillen, Stuntteam, LisaM

Message
Author
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: 90
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: 281
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: 1049
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: 1049
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: 1049
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: 1049
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: 1049
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 67962 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 67962 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: 8739
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: 8739
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

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

Re: ESP32 boards

#101 Post by AndrewJ » 09 Jan 2018, 17:25

Hi Lisa,
Just thought I'd post a screen shot of uPyEasy on my Lolin32 Lite board, working with three DS18B20 sensors (it seems these have to be on separate pins) and a BME280 showing all three readings (temperature, humidity, and pressure) and running nice and stable. :)
It starts automatically, thanks to BertB for his suggestion to add a main.py file. :)
Still using port 9000.

Thanks for all the hard work you have been putting in. :) Please continue, within the time you have available, and let me know if I can help at all.

AndrewJ

Devices with 3xDS18B20 and BME280.PNG
Devices with 3xDS18B20 and BME280.PNG (33.36 KiB) Viewed 79134 times

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

Re: ESP32 boards

#102 Post by LisaM » 09 Jan 2018, 18:38

AndrewJ wrote: 09 Jan 2018, 17:25 Hi Lisa,
Just thought I'd post a screen shot of uPyEasy on my Lolin32 Lite board, working with three DS18B20 sensors (it seems these have to be on separate pins) and a BME280 showing all three readings (temperature, humidity, and pressure) and running nice and stable. :)
It starts automatically, thanks to BertB for his suggestion to add a main.py file. :)
Still using port 9000.

Thanks for all the hard work you have been putting in. :) Please continue, within the time you have available, and let me know if I can help at all.

AndrewJ


Devices with 3xDS18B20 and BME280.PNG
Cool!!! :D

The DS's should be able to run on one pin, but maybe the plugin can't handle that yet. I haven't tested that out so far.
I'm busy documenting the architecture and database contents, so that you'll understand how uPyEasy operates.

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

Re: ESP32 boards

#103 Post by AndrewJ » 09 Jan 2018, 19:18

The DS's should be able to run on one pin, but maybe the plugin can't handle that yet. I haven't tested that out so far.
I tried this first time around, with just two DS's, but they interfered with each other and both ended up looking at the same ROM address and reporting the same value as each other. It would be good to do that eventually, to match the ESP8266 version (it would simplify wiring, and use less pins too ;) ) but it is probably best to spend time on developing the rest of uPyEasy, unless someone particularly needs that extra functionality.
I'll raise an Issue on Github for this so it doesn't get lost.
I'm busy documenting the architecture and database contents, so that you'll understand how uPyEasy operates.
That sounds good. :)

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

Re: ESP32 boards

#104 Post by LisaM » 13 Jan 2018, 13:20

Version v54 has been created op put in the releases dir of the uPyEasy github: https://github.com/letscontrolit/uPyEas ... /tag/ALPHA
The following functionality has been added:
  • Config page
Added admin password (password protected uPyEasy!)
  • Tools page
Added Load Settings (restoring your config)
Added Save Settings (saving your config)
Added Files (Files Explorer, see all dirs/files in the ESP32 flash area, where you can edit/delete/add them)

This is the LAST alpha, the coming week(s) i'm busy documenting uPyEasy (including Togaf 9.1 based Architecture Guidelines, since i'm certified and working as a Data Architect) and transferring the source code to the Github repository. The first new version will then be BETA-1.

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

Re: ESP32 boards

#105 Post by BertB » 13 Jan 2018, 15:57

This is getting better each time I look.

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

Re: ESP32 boards

#106 Post by LisaM » 13 Jan 2018, 17:01

BertB wrote: 13 Jan 2018, 15:57 This is getting better each time I look.
Thx! :D

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

Re: ESP32 boards

#107 Post by AndrewJ » 13 Jan 2018, 19:02

Thanks for all your hard work on this! :D

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

Re: ESP32 boards

#108 Post by BertB » 13 Jan 2018, 21:42

Knipsel.PNG
Knipsel.PNG (16.5 KiB) Viewed 79000 times
Knipsel2.PNG
Knipsel2.PNG (28.92 KiB) Viewed 78999 times

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

Re: ESP32 boards

#109 Post by AndrewJ » 13 Jan 2018, 21:50

I like it!
:)

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

Re: ESP32 boards

#110 Post by AndrewJ » 15 Jan 2018, 21:58

LisaM wrote: 13 Jan 2018, 13:20 Version v54 has been created op put in the releases dir of the uPyEasy github: https://github.com/letscontrolit/uPyEas ... /tag/ALPHA
The following functionality has been added:
  • Config page
Added admin password (password protected uPyEasy!)
  • Tools page
Added Load Settings (restoring your config)
Added Save Settings (saving your config)
Added Files (Files Explorer, see all dirs/files in the ESP32 flash area, where you can edit/delete/add them)

This is the LAST alpha, the coming week(s) i'm busy documenting uPyEasy (including Togaf 9.1 based Architecture Guidelines, since i'm certified and working as a Data Architect) and transferring the source code to the Github repository. The first new version will then be BETA-1.
Hi Lisa,
Many thanks for that. It's working on my LOLIN32 LITE board with no immediate problems. :)
(I'm still finding that I need to change to port to 9000 to avoid the 128 error, but I've got it off to a fine art now!) ;)
I'll give it a try on my recently-arrived LOLIN32 Pro soon.

Regarding the DOIT devkit v1 - revision 0 chip, I've more or less given up on it. It just seems very unreliable, I think there may be issues with the power supply end but even attempts to use it with an external supply failed.

Looking forward to the BETA-1 when it's ready!
Andrew

Jeff
Normal user
Posts: 26
Joined: 18 Nov 2016, 18:35

Re: ESP32 boards

#111 Post by Jeff » 15 Jan 2018, 22:55

Hello, thank you for your development :D
I try the upyeasy for amusing on my Wemos ESP32 lolin oled and that work :mrgreen:
If i use a AP wifi open without key, it's ok, on the other hand if i tried an other AP with WPA_PSK, i lost the connexion and i must reset the esp32, an idea :?
I ested the command upyeasy.setwifi with more combination, but error

Code: Select all

>>> upyeasy.setwifi ('IOT','xxxxxxxxxx','','',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
I tested a switch with domoticz, doesn't work, it was fast test.
I you want, i can test a oled plugin :?

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

Re: ESP32 boards

#112 Post by waspie » 16 Jan 2018, 14:30

when attempting to flash using :
esptool.py --port COM9 write_flash --baud 460800 --compress 0x1000 upyeasy_v54_20180113_test_esp32_2048.bin

i get:
esptool write_flash: error: argument <address> <filename>: Must be pairs of an address and the binary filename to write there

any tips?

scratch that, removed the "baud" statement and it flashed. leaving this here in case it's helpful to someone else

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

Re: ESP32 boards

#113 Post by BertB » 28 Jan 2018, 16:17

I hate it when stuff does not work reliably.
I think I followed all the steps in the books.
I have Python36 and pip and ampy and pyserial.
When I start pyton i get the >>> signs
when I enter import serial, again I get >>>

But when I enter esptool.py --port COM6 erase_flash in the shell, I get

Traceback (most recent call last):
File "D:\Program Files\Python\Python36\esptool.py", line 34, in <module>
import serial
ImportError: No module named serial

What stupid thin am I forgetting?

Oh, by the way, some week ago I got it working.
And I really want to play with upyeasy Beta ....

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

Re: ESP32 boards

#114 Post by LisaM » 28 Jan 2018, 16:26

BertB wrote: 28 Jan 2018, 16:17 I hate it when stuff does not work reliably.
I think I followed all the steps in the books.
I have Python36 and pip and ampy and pyserial.
When I start pyton i get the >>> signs
when I enter import serial, again I get >>>

But when I enter esptool.py --port COM6 erase_flash in the shell, I get

Traceback (most recent call last):
File "D:\Program Files\Python\Python36\esptool.py", line 34, in <module>
import serial
ImportError: No module named serial

What stupid thin am I forgetting?

Oh, by the way, some week ago I got it working.
And I really want to play with upyeasy Beta ....
Espressif instructions: https://github.com/espressif/esptool
More help on installation of esptool: https://diyprojects.io/esp-easy-flash-f ... y-esp8266/

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

Re: ESP32 boards

#115 Post by BertB » 28 Jan 2018, 16:46

Thanks, but i did that:

Code: Select all

D:\Program Files>cd python\python36

D:\Program Files\Python\Python36>esptool.py --port COM6 erase_flash
Traceback (most recent call last):
  File "D:\Program Files\Python\Python36\esptool.py", line 34, in <module>
    import serial
ImportError: No module named serial

D:\Program Files\Python\Python36>pip install esptool
Requirement already satisfied: esptool in d:\program files\python\python36\lib\site-packages
Requirement already satisfied: ecdsa in d:\program files\python\python36\lib\site-packages (from esptool)
Requirement already satisfied: pyserial>=2.5 in d:\program files\python\python36\lib\site-packages (from esptool)
Requirement already satisfied: pyaes in d:\program files\python\python36\lib\site-packages (from esptool)

D:\Program Files\Python\Python36>esptool.py --port COM6 flash_id
Traceback (most recent call last):
  File "D:\Program Files\Python\Python36\esptool.py", line 34, in <module>
    import serial
ImportError: No module named serial

D:\Program Files\Python\Python36>mode

Status for device COM6:
-----------------------
    Baud:            115200
    Parity:          None
    Data Bits:       8
    Stop Bits:       1
    Timeout:         OFF
    XON/XOFF:        OFF
    CTS handshaking: OFF
    DSR handshaking: OFF
    DSR sensitivity: OFF
    DTR circuit:     OFF
    RTS circuit:     OFF

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

Re: ESP32 boards

#116 Post by LisaM » 28 Jan 2018, 16:55

BertB wrote: 28 Jan 2018, 16:46 Thanks, but i did that:

Code: Select all

D:\Program Files>cd python\python36

D:\Program Files\Python\Python36>esptool.py --port COM6 erase_flash
Traceback (most recent call last):
  File "D:\Program Files\Python\Python36\esptool.py", line 34, in <module>
    import serial
ImportError: No module named serial

D:\Program Files\Python\Python36>pip install esptool
Requirement already satisfied: esptool in d:\program files\python\python36\lib\site-packages
Requirement already satisfied: ecdsa in d:\program files\python\python36\lib\site-packages (from esptool)
Requirement already satisfied: pyserial>=2.5 in d:\program files\python\python36\lib\site-packages (from esptool)
Requirement already satisfied: pyaes in d:\program files\python\python36\lib\site-packages (from esptool)

D:\Program Files\Python\Python36>esptool.py --port COM6 flash_id
Traceback (most recent call last):
  File "D:\Program Files\Python\Python36\esptool.py", line 34, in <module>
    import serial
ImportError: No module named serial

D:\Program Files\Python\Python36>mode

Status for device COM6:
-----------------------
    Baud:            115200
    Parity:          None
    Data Bits:       8
    Stop Bits:       1
    Timeout:         OFF
    XON/XOFF:        OFF
    CTS handshaking: OFF
    DSR handshaking: OFF
    DSR sensitivity: OFF
    DTR circuit:     OFF
    RTS circuit:     OFF
Path set correctly?:

Code: Select all

Python -V
Esptool version?:

Code: Select all

esptool.py -h
Re-installing?:

Code: Select all

pip uninstall esptool
pip install esptool

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

Re: ESP32 boards

#117 Post by BertB » 28 Jan 2018, 17:41

LisaM wrote: 28 Jan 2018, 16:55 Path set correctly?:
I can start python from everywhere on the pc
after issuing Path, I get a lot of stuff, including:
D:\Program Files\Python\Python36\Scripts;D:\Program Files\Python\Python36

Code: Select all

Python -V
C:\Users\berbe>python -V
Python 3.6.2
Esptool version?:

Code: Select all

esptool.py -h
D:\Tools\uPython>esptool.py -h
Traceback (most recent call last):
File "D:\Program Files\Python\Python36\esptool.py", line 34, in <module>
import serial
ImportError: No module named serial
Re-installing?:

Code: Select all

pip uninstall esptool
pip install esptool
Does not seem to help at all ...

But when I first start python and then import serial:
D:\Tools\uPython>python
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import serial
>>>

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

Re: ESP32 boards

#118 Post by BertB » 28 Jan 2018, 18:46

Solved it ... I got one esptool.py to many ...
:oops: :mrgreen:

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

Re: ESP32 boards

#119 Post by LisaM » 28 Jan 2018, 18:48

BertB wrote: 28 Jan 2018, 18:46 Solved it ... I got one esptool.py to many ...
:oops: :mrgreen:
:D Cool! Next step...

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

Re: ESP32 boards

#120 Post by BertB » 28 Jan 2018, 18:53

yeah ... growing up hurts ...
But, I had a esptool in the directory of Python36.
And one in Lib/site-packages.

When I run esptool from site-packages, there is no nagging about serial.
So, I removed esptool from the home directory of Python.

Now I have the following:
D:\Program Files\Python\Python36>esptool.py --port COM6 erase_flash
'esptool.py' is not recognized as an internal or external command,
operable program or batch file.

So, that was the wrong de-fuse wire :-)
In site-packages is also the serial directory.


So, where do I put all this stuff?

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests