Re: ESP32 boards
Posted: 23 Mar 2018, 20:29
That makes two of us
Have fun with controlling everything!
https://www.letscontrolit.com/forum/
The bin is good, but some ESP32's want to have the 4096 version and others the 2048. Can you try to do an erase before using the 2048 version?
Code: Select all
import upyeasy
import network
station = network.WLAN(network.STA_IF)
station.active(True)
station.connect("your_ssid", "your_pass")
upyeasy.main()
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:4416
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:11816
entry 0x4007a9fc
I (450) cpu_start: Pro cpu up.
I (450) cpu_start: Single core mode
I (451) heap_init: Initializing. RAM available for dynamic allocation:
I (454) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (460) heap_init: At 3FFC4E80 len 0001B180 (108 KiB): DRAM
I (466) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (473) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (479) heap_init: At 4008DE34 len 000121CC (72 KiB): IRAM
I (485) cpu_start: Pro cpu start user code
I (56) cpu_start: Starting scheduler on PRO CPU.
Traceback (most recent call last):
File "_boot.py", line 10, in <module>
File "inisetup.py", line 28, in setup
File "inisetup.py", line 6, in check_bootsec
File "flashbdev.py", line 13, in readblocks
OSError: [Errno 5] EIO
OSError: [Errno 1] EPERM
OSError: [Errno 1] EPERM
MicroPython v1.9.3-473-g22c693a-dirty on 2018-03-22; ESP32 module with ESP32
Type "help()" for more information.
>>>
After you flashed with the 2048 firmware, can you post the start log after a reset?karl222 wrote: ↑23 Mar 2018, 21:39 I erased, then flashed with 2048 but no success....
E:\esp32>esptool.py --port COM7 erase_flash
esptool.py v2.3.2-dev
Connecting........_
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 9.2s
Hard resetting via RTS pin...
E:\esp32>esptool.py --chip esp32 --port COM7 --baud 460800 write_flash --flash_freq 40m --flash_mode dio --flash_size 2MB -z 0x1000 upyeasy_v021_20180321_test_esp32_2048.bin
esptool.py v2.3.2-dev
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Compressed 1207952 bytes to 698892...
Wrote 1207952 bytes (698892 compressed) at 0x00001000 in 21.5 seconds (effective 450.4 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
and 4096:
rst:0x1 (POWERON_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4364
load:0x40078000,len:0
load:0x40078000,len:10992
entry 0x4007a6c4
I (442) cpu_start: Pro cpu up.
I (442) cpu_start: Single core mode
I (443) heap_init: Initializing. RAM available for dynamic allocation:
I (446) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (452) heap_init: At 3FFDCDD0 len 00003230 (12 KiB): DRAM
I (458) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (464) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (471) heap_init: At 4009005C len 0000FFA4 (63 KiB): IRAM
I (477) cpu_start: Pro cpu start user code
I (47) cpu_start: Starting scheduler on PRO CPU.
Traceback (most recent call last):
File "_boot.py", line 10, in <module>
File "inisetup.py", line 28, in setup
File "inisetup.py", line 6, in check_bootsec
File "flashbdev.py", line 13, in readblocks
OSError: [Errno 5] EIO
OSError: [Errno 1] EPERM
OSError: [Errno 1] EPERM
MicroPython v1.9.3-255-g979c688-dirty on 2018-03-21; ESP32 module with ESP32
Type "help()" for more information.
>>>
I used this line to program. I changed the name of the bin somewhat.ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4364
load:0x40078000,len:0
load:0x40078000,len:10992
entry 0x4007a6c4
I (442) cpu_start: Pro cpu up.
I (442) cpu_start: Single core mode
I (442) heap_init: Initializing. RAM available for dynamic allocation:
I (446) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (452) heap_init: At 3FFDCDD0 len 00003230 (12 KiB): DRAM
I (458) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (464) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (471) heap_init: At 4009005C len 0000FFA4 (63 KiB): IRAM
I (477) cpu_start: Pro cpu start user code
I (47) cpu_start: Starting scheduler on PRO CPU.
Traceback (most recent call last):
File "_boot.py", line 10, in <module>
File "inisetup.py", line 28, in setup
File "inisetup.py", line 6, in check_bootsec
File "flashbdev.py", line 13, in readblocks
OSError: [Errno 5] EIO
OSError: [Errno 1] EPERM
OSError: [Errno 1] EPERM
MicroPython v1.9.3-255-g979c688-dirty on 2018-03-21; ESP32 module with ESP32
Type "help()" for more information.
>>>
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x3f (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:4416
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:11816
entry 0x4007a9fc
I (452) cpu_start: Pro cpu up.
I (452) cpu_start: Single core mode
I (452) heap_init: Initializing. RAM available for dynamic allocation:
I (456) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (462) heap_init: At 3FFC4E80 len 0001B180 (108 KiB): DRAM
I (468) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (474) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (481) heap_init: At 4008DE34 len 000121CC (72 KiB): IRAM
I (487) cpu_start: Pro cpu start user code
I (57) cpu_start: Starting scheduler on PRO CPU.
OSError: [Errno 2] ENOENT
MicroPython v1.9.3-473-g22c693a-dirty on 2018-03-22; ESP32 module with ESP32
Type "help()" for more information.
>>>
So, that means the 2048 is NOT working for you. But the 4096 firmware is! The esptool should not override the flash_size baked in the 4096 firmware, but apparently it does.BertB wrote: ↑24 Mar 2018, 20:26 Now ... maybe of interest ...
When I use this:D:\Program Files>python python\python36\esptool-master\esptool.py --port COM6 write_flash --compress 0x1000 D:\Tools\uPython\upyeasy-esp32\upyeasy_un4096.bin
This is the kind of same command as in the very beginning of this item, page 1
I get this:ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x3f (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:4416
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:11816
entry 0x4007a9fc
I (452) cpu_start: Pro cpu up.
I (452) cpu_start: Single core mode
I (452) heap_init: Initializing. RAM available for dynamic allocation:
I (456) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (462) heap_init: At 3FFC4E80 len 0001B180 (108 KiB): DRAM
I (468) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (474) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (481) heap_init: At 4008DE34 len 000121CC (72 KiB): IRAM
I (487) cpu_start: Pro cpu start user code
I (57) cpu_start: Starting scheduler on PRO CPU.
OSError: [Errno 2] ENOENT
MicroPython v1.9.3-473-g22c693a-dirty on 2018-03-22; ESP32 module with ESP32
Type "help()" for more information.
>>>
Hello raptor,raptor wrote: ↑24 Mar 2018, 14:54 Hello, guys! You can try my 4096 binary https://drive.google.com/file/d/1p1JFrk ... sp=sharing
It work for my esp-wroom-32 v2 board. If flashing is successful then insert these commands:
If there is no errors you should have working boardCode: Select all
import upyeasy import network station = network.WLAN(network.STA_IF) station.active(True) station.connect("your_ssid", "your_pass") upyeasy.main()
Don't do the import network stuff, uPyEasy has it's own.karl222 wrote: ↑24 Mar 2018, 22:54 hi,
i have tried on both platforms but was not able to get it running. I have no clue to identify why it doesn't work. Installation of firmware obviously worked but I can't reach it via browser. I am concerned by the last line of the protocol (see below):
2000-01-01 00:02:24 [debug] uPyEasy-uPyEasy: Hal: Received NTP Time: 575246802
2000-01-01 00:02:24 [debug] uPyEasy-uPyEasy: Hal: StartTime: 575246802
2018-03-24 22:46:42 [debug] uPyEasy-uPyEasy: Set time: 2018-03-24T22:46:42
Exiting: Network not available, set network values!
>>>
Code: Select all
esptool.py --port COM5 write_flash 0x1000 upyeasy-esp32.bin --compress
Hi Lisa,LisaM wrote: ↑25 Mar 2018, 01:31Don't do the import network stuff, uPyEasy has it's own.karl222 wrote: ↑24 Mar 2018, 22:54 hi,
i have tried on both platforms but was not able to get it running. I have no clue to identify why it doesn't work. Installation of firmware obviously worked but I can't reach it via browser. I am concerned by the last line of the protocol (see below):
2000-01-01 00:02:24 [debug] uPyEasy-uPyEasy: Hal: Received NTP Time: 575246802
2000-01-01 00:02:24 [debug] uPyEasy-uPyEasy: Hal: StartTime: 575246802
2018-03-24 22:46:42 [debug] uPyEasy-uPyEasy: Set time: 2018-03-24T22:46:42
Exiting: Network not available, set network values!
>>>
Just do:
>>> import upyeasy
>>> upyeasy.main()
...
Exiting: Network not available, set network values!
>>> upyeasy.setwifi('<YOUR_SSID>', '<YOUR_SSID_PW>','', '')
Replace <your_ssid> and <your_ssid_pw> with your own ssid and pw, reboot and it should work.
Just maybe... i should change this:
>>> upyeasy.main()
to this (the first time):
>>> upyeasy.main('<YOUR_SSID>', '<YOUR_SSID_PW>')
Would that be be easier?
Let's go thru this step by step, cause I am loosing itLisaM wrote: ↑24 Mar 2018, 20:48 Ok, so use this command to flash the firmware:
esptool.py --port YYYY write_flash --compress 0x1000 xxxx.bin where YYYY is your comport (unix: /dev/ttyUSBx, windows COMx) and xxxx is your firmware name. Don't specify any other parameters as stated earlier in these post in this topic, but follow the first post in the topic.
So far so good:D:\Program Files\Python\Python36>python esptool-master\esptool.py --port COM6 erase_flash
esptool.py v2.3-dev
Connecting.....
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 4.9s
Hard resetting...
D:\Program Files\Python\Python36>
Also good.D:\Program Files\Python\Python36>python esptool-master\esptool.py --port COM6 write_flash --compress 0x1000 D:\Tools\uPython\upyeasy-esp32\upyeasy_v021_20180321_test_esp32_2048.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 1207952 bytes to 698892...
Wrote 1207952 bytes (698892 compressed) at 0x00001000 in 61.6 seconds (effective 156.8 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting...
D:\Program Files\Python\Python36>
So, I do the follwing steps, according to the first post. I think ...ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4364
load:0x40078000,len:0
load:0x40078000,len:10992
entry 0x4007a6c4
I (442) cpu_start: Pro cpu up.
I (442) cpu_start: Single core mode
I (442) heap_init: Initializing. RAM available for dynamic allocation:
I (446) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (452) heap_init: At 3FFDCDD0 len 00003230 (12 KiB): DRAM
I (458) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (464) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (471) heap_init: At 4009005C len 0000FFA4 (63 KiB): IRAM
I (477) cpu_start: Pro cpu start user code
I (47) cpu_start: Starting scheduler on PRO CPU.
OSError: [Errno 2] ENOENT
MicroPython v1.9.3-255-g979c688-dirty on 2018-03-21; ESP32 module with ESP32
Type "help()" for more information.
>>>
So, now I think the device is not connected to any network.>>> import upyeasy
I (198213) modsocket: Initializing
>>> upyeasy.main()
loaded sink log
loaded sink console
loaded sink syslog
2000-01-01T00:03:28.005 [debug] uPyEasy: Init: Init constructor
2000-01-01T00:03:28.005 [debug] uPyEasy: Init: Entering init
2000-01-01 00:03:28 [debug] uPyEasy: Init: Create directory config
2000-01-01 00:03:28 [debug] uPyEasy: Init: Create directory plugins
2000-01-01 00:03:28 [debug] uPyEasy: Init: Create directory protocols
2000-01-01 00:03:29 [debug] uPyEasy: Init: Create directory scripts
2000-01-01 00:03:29 [debug] uPyEasy: Init: Create directory rules
2000-01-01 00:03:29 [debug] uPyEasy: Init: config Table
2000-01-01 00:03:29 [debug] uPyEasy: Init: network Table
2000-01-01 00:03:30 [debug] uPyEasy: Init: protocol Table
2000-01-01 00:03:30 [debug] uPyEasy: Init: controller Table
2000-01-01 00:03:30 [debug] uPyEasy: Init: hardware Table
2000-01-01 00:03:30 [debug] uPyEasy: Init: dxpin Table
2000-01-01 00:03:31 [debug] uPyEasy: Init: dxmap Table
2000-01-01 00:03:31 [debug] uPyEasy: Init: plugin Table
2000-01-01 00:03:31 [debug] uPyEasy: Init: pluginstore Table
2000-01-01 00:03:32 [debug] uPyEasy: Init: device Table
2000-01-01 00:03:32 [debug] uPyEasy: Init: service Table
2000-01-01 00:03:32 [debug] uPyEasy: Init: notification Table
2000-01-01 00:03:32 [debug] uPyEasy: Init: advanced Table
2000-01-01 00:03:33 [debug] uPyEasy: Init: script Table
2000-01-01 00:03:33 [debug] uPyEasy: Init: rule Table
2000-01-01 00:03:33 [debug] uPyEasy: Init: Create Config Record
2000-01-01 00:03:34 [debug] uPyEasy: Init: Create Network Record
2000-01-01 00:03:34 [debug] uPyEasy: Init: Create Hardware Record
2000-01-01 00:03:34 [debug] uPyEasy: Hal: hardwaredb init
2000-01-01 00:03:34 [debug] uPyEasy: Hal: hardwaredb esp32
2000-01-01 00:03:34 [debug] uPyEasy: Init: Create dxpin Record
2000-01-01 00:03:35 [debug] uPyEasy: Hal: dxpins_init
2000-01-01 00:03:35 [debug] uPyEasy: Hal: dxpins_init esp32
2000-01-01 00:03:35 [debug] uPyEasy: Init: Create advanced Record
2000-01-01 00:03:36 [debug] uPyEasy: Hal: Init
2000-01-01 00:03:36 [debug] uPyEasy: Hal: init, network record present
2000-01-01 00:03:36 [debug] uPyEasy: Hal: esp32
I (225953) wifi: wifi firmware version: 111e74d
I (225953) wifi: config NVS flash: enabled
I (225953) wifi: config nano formating: disabled
I (225963) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (225973) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (225993) wifi: Init dynamic tx buffer num: 32
I (225993) wifi: Init data frame dynamic rx buffer num: 64
I (225993) wifi: Init management frame dynamic rx buffer num: 64
I (225993) wifi: wifi driver task: 3ffde13c, prio:23, stack:4096
I (226003) wifi: Init static rx buffer num: 10
I (226003) wifi: Init dynamic rx buffer num: 0
I (226013) wifi: Init rx ampdu len mblock:7
I (226013) wifi: Init lldesc rx ampdu entry mblock:4
I (226023) wifi: wifi power manager task: 0x3ffe8734 prio: 21 stack: 2560
W (226023) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration
I (226183) phy: phy_version: 362.0, 61e8d92, Sep 8 2017, 18:48:11, 0, 2
I (226193) wifi: mode : null
I (226193) wifi: mode : sta (30:ae:a4:22:e8:1c)
I (226193) wifi: STA_START
2000-01-01 00:03:36 [debug] uPyEasy: Hal: esp32, ssid empty
I (228633) network: event 1
2000-01-01 00:03:39 [debug] uPyEasy: Hal: esp32, Scan: Ssid found:xxxxxx Strength: -79 dBm Security: 3
2000-01-01 00:03:39 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: xxxxxx Strength: -79 dBm Security: 3
2000-01-01 00:03:39 [debug] uPyEasy: Hal: esp32, Scan: Ssid found:xxxxxxxxx Strength: -88 dBm Security: 5
2000-01-01 00:03:39 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: xxxxxxxx Strength: -88 dBm Security: 5
2000-01-01 00:03:39 [debug] uPyEasy: Hal: esp32, Scan: Ssid found:xxxxxxxxx Strength: -89 dBm Security: 3
2000-01-01 00:03:39 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: xxxxxxxxx Strength: -90 dBm Security: 3
2000-01-01 00:03:39 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: xxxxxxxxxx Strength: -90 dBm Security: 3
2000-01-01 00:03:39 [debug] uPyEasy: Protocols: Load
2000-01-01 00:03:39 [debug] uPyEasy: Protocols: Init protocol records
2000-01-01 00:03:39 [debug] uPyEasy: Protocols: Load protocol domoticz_mqtt
2000-01-01 00:03:39 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_mqtt
2000-01-01 00:03:40 [debug] uPyEasy: Protocols: Load protocol domoticz_http
2000-01-01 00:03:40 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_http
2000-01-01 00:03:40 [debug] uPyEasy: Protocols: Init protocol records, run async loop
2000-01-01 00:03:40 [debug] uPyEasy: Plugins: Load
2000-01-01 00:03:40 [debug] uPyEasy: Plugins: init plugin records
2000-01-01 00:03:40 [debug] uPyEasy: Plugins: Register frozen plugin switch
2000-01-01 00:03:40 [debug] uPyEasy: Plugin: switch contruction
2000-01-01 00:03:40 [debug] uPyEasy: Plugins: Create frozen plugin Record: switch
2000-01-01 00:03:41 [debug] uPyEasy: Plugins: Register frozen plugin bme280
2000-01-01 00:03:41 [debug] uPyEasy: Plugins: Create frozen plugin Record: bme280
2000-01-01 00:03:41 [debug] uPyEasy: Plugins: Register frozen plugin test
2000-01-01 00:03:41 [debug] uPyEasy: Plugins: Create frozen plugin Record: test
2000-01-01 00:03:42 [debug] uPyEasy: Plugins: Register frozen plugin ds18
2000-01-01 00:03:42 [debug] uPyEasy: Plugin: ds18 contruction
2000-01-01 00:03:42 [debug] uPyEasy: Plugins: Create frozen plugin Record: ds18
2000-01-01 00:03:42 [debug] uPyEasy: Plugins: Init plugin records, run async loop
2000-01-01 00:03:42 [debug] uPyEasy: Init: Init devices
2000-01-01 00:03:42 [debug] uPyEasy: Scripts: Load
2000-01-01 00:03:42 [debug] uPyEasy: Scripts: Init
2000-01-01 00:03:42 [debug] uPyEasy: Plugins: GetQueue
2000-01-01 00:03:42 [debug] uPyEasy: Scripts: init scripts records
2000-01-01 00:03:42 [debug] uPyEasy: Scripts: init rules records
2000-01-01 00:03:43 [debug] uPyEasy: Scripts: Init script/rule records, run async loop
2000-01-01 00:03:43 [debug] uPyEasy: Utils: Sys hostname
2000-01-01 00:03:43 [debug] uPyEasy: Utils: uPyEasy Name
Set syslog hostname 0.0.0.0
reloaded sink syslog
2000-01-01 00:03:43 [debug] uPyEasy-uPyEasy: Hal: Entering SetTime
2000-01-01 00:03:43 [debug] uPyEasy-uPyEasy: Hal: Entering GetNtpTime
2000-01-01 00:03:43 [debug] uPyEasy-uPyEasy: Hal: network Table
2000-01-01 00:03:43 [debug] uPyEasy-uPyEasy: Hal: Using NTP Hostname: pool.ntp.org
2000-01-01 00:03:43 [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 249, in init
File "upyeasy/hal.py", line 338, in settime
File "upyeasy/hal.py", line 272, in getntptime
File "upyeasy/hal.py", line 264, in getntptime
IndexError: list index out of range
>>>
Code: Select all
esptool.py --port COM3 erase_flash
esptool.py --port COM3 write_flash --compress 0x1000 upyeasy_v021_20180321_test_esp32_4096.bin
import upyeasy
upyeasy.main()
upyeasy.setwifi('xxx', 'yyy')
Code: Select all
ampy --port COM3 put boot.py
Hi Karl222,karl222 wrote: ↑25 Mar 2018, 10:53 >>> upyeasy.main('xxxxxx', 'yyyyyy')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: function takes 0 positional arguments but 2 were given
>>> upyeasy.main("xxxxxx", "yyyyyyy")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: function takes 0 positional arguments but 2 were given
Code: Select all
>>> import upyeasy
upyeasy.main()
THEN use this command:Exiting: Network not available, set network values!
Code: Select all
>>> upyeasy.setwifi('<your ssid>', '<your ssid password>','<your backup ssid, if any>', '<your backup ssid pw>',<your port>)
It should have created an autostart entry in boot.py, but due to a bug it was ommitted (and fixed currently).budman1758 wrote: ↑25 Mar 2018, 05:37 OK. Installed ESP tool on a different computer. (non win 10) Windows 7 ult.
Got pyserial working ok.
Set up a brand new module on a protoboard.
https://www.ebay.com/itm/ESP-WROOM-32-E ... 2749.l2649
https://www.ebay.com/itm/5X7-7X9CM-Prot ... 2749.l2649
Was able to erase flash the first try!
Was able to flash the firmware the first try! Latest ESP32 firmware from the release page on git. Renamed the file to upyeasy-esp32.bin.
Used this command from post 31 in this thread. The command for Windows from post 1 does NOT work.Was able to start with "import upyeasy" and "upyeasy.main()" on the first try!Code: Select all
esptool.py --port COM5 write_flash 0x1000 upyeasy-esp32.bin --compress
Was able to set wifi creds the first try!
Module starts up and after using "import upyeasy" and "upyeasy.main()" each and every time it connects to wifi and web config pages are up and running every time!
Now..... How do I get it to autostart each time?
Tried the Ampy method to upload a main file to autostart. No workie
The tools page that shows the file system shows the file system ok. Edit and upload buttons take me to blank web pages. No workie.
Want to continue testing but don't want to have to manual start each time.
Methinks that if we have easy in the name it should start easily.... Just sayin....
Please show/tell me how to get it to autostart. Once we get there I will start hanging some hardware on it.
Thanks.
Code: Select all
import upyeasy
upyeasy.main()
Code: Select all
def setup():
check_bootsec()
print("Performing initial setup")
uos.VfsFat.mkfs(bdev)
vfs = uos.VfsFat(bdev)
uos.mount(vfs, '/flash')
uos.chdir('/flash')
with open("boot.py", "w") as f:
f.write("""\
# This file is executed on every boot (including wake-boot from deepsleep)
""")
return vfs
Code: Select all
def setup():
check_bootsec()
print("Performing initial setup")
uos.VfsFat.mkfs(bdev)
vfs = uos.VfsFat(bdev)
uos.mount(vfs, '/flash')
uos.chdir('/flash')
with open("boot.py", "w") as f:
f.write("""\
# This file is executed on every boot (including wake-boot from deepsleep)
import upyeasy
upyeasy.main()
""")
return vfs
stack: 2032 out of 15360
GC: total: 96000, used: 75856, free: 20144
No. of 1-blocks: 1295, 2-blocks: 154, max blk sz: 902, max free sz: 185
575303220.748 <HTTPRequest object at 3ffbc640> <StreamWriter <socket>> "GET /devices"
2018-03-25 14:27:43 [debug] uPyEasy-uPyEasy: Pages: Authorize User!?
2018-03-25 14:27:43 [debug] uPyEasy-uPyEasy: Pages: Entering Devices Page
2018-03-25 14:27:43 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-03-25 14:27:43 [debug] uPyEasy-uPyEasy: Plugins: Read device DS1
2018-03-25 14:27:44 [debug] uPyEasy-uPyEasy: Plugin: ds18 read
2018-03-25 14:27:44 [debug] uPyEasy-uPyEasy: Plugins: Read device BME1
2018-03-25 14:27:44 [debug] uPyEasy-uPyEasy: Plugin: bme280 read
stack: 2032 out of 15360
GC: total: 96000, used: 85072, free: 10928
No. of 1-blocks: 1307, 2-blocks: 158, max blk sz: 902, max free sz: 408
575303316.116 <HTTPRequest object at 3ffbd430> <StreamWriter <socket>> "GET /static/upyeasy.css"
stack: 2032 out of 15360
GC: total: 96000, used: 86624, free: 9376
No. of 1-blocks: 1352, 2-blocks: 165, max blk sz: 902, max free sz: 385
575303316.116 <HTTPRequest object at 3ffc2ed0> <StreamWriter <socket>> "GET /static/upyeasy.js"
static/upyeasy.css
static/upyeasy.js
So, now I think the device is not connected to any network.BertB wrote: ↑25 Mar 2018, 11:51 2000-01-01 00:03:43 [debug] uPyEasy-uPyEasy: Hal: Entering SetTime
2000-01-01 00:03:43 [debug] uPyEasy-uPyEasy: Hal: Entering GetNtpTime
2000-01-01 00:03:43 [debug] uPyEasy-uPyEasy: Hal: network Table
2000-01-01 00:03:43 [debug] uPyEasy-uPyEasy: Hal: Using NTP Hostname: pool.ntp.org
2000-01-01 00:03:43 [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 249, in init
File "upyeasy/hal.py", line 338, in settime
File "upyeasy/hal.py", line 272, in getntptime
File "upyeasy/hal.py", line 264, in getntptime
IndexError: list index out of range
>>>
So it's running (you can connect to the upyeasy webserver) but no updates are send to domoticz? Neither using http or mqtt?BertB wrote: ↑25 Mar 2018, 15:29 Seems its running again, with the 4096 bin.
But, it does not pass the data to Domoticz, using HTTP, nor does it auto update once every 60 seconds.
After a manual update (by clicking Devices) I getnew values, as expected and this:stack: 2032 out of 15360
GC: total: 96000, used: 75856, free: 20144
No. of 1-blocks: 1295, 2-blocks: 154, max blk sz: 902, max free sz: 185
575303220.748 <HTTPRequest object at 3ffbc640> <StreamWriter <socket>> "GET /devices"
2018-03-25 14:27:43 [debug] uPyEasy-uPyEasy: Pages: Authorize User!?
2018-03-25 14:27:43 [debug] uPyEasy-uPyEasy: Pages: Entering Devices Page
2018-03-25 14:27:43 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-03-25 14:27:43 [debug] uPyEasy-uPyEasy: Plugins: Read device DS1
2018-03-25 14:27:44 [debug] uPyEasy-uPyEasy: Plugin: ds18 read
2018-03-25 14:27:44 [debug] uPyEasy-uPyEasy: Plugins: Read device BME1
2018-03-25 14:27:44 [debug] uPyEasy-uPyEasy: Plugin: bme280 read
stack: 2032 out of 15360
GC: total: 96000, used: 85072, free: 10928
No. of 1-blocks: 1307, 2-blocks: 158, max blk sz: 902, max free sz: 408
575303316.116 <HTTPRequest object at 3ffbd430> <StreamWriter <socket>> "GET /static/upyeasy.css"
stack: 2032 out of 15360
GC: total: 96000, used: 86624, free: 9376
No. of 1-blocks: 1352, 2-blocks: 165, max blk sz: 902, max free sz: 385
575303316.116 <HTTPRequest object at 3ffc2ed0> <StreamWriter <socket>> "GET /static/upyeasy.js"
static/upyeasy.css
static/upyeasy.js
The web log only shows this:
Code: Select all
2018-03-25 14:34:04 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-03-25 14:34:14 [debug] uPyEasy-uPyEasy: Pages: Authorize User!?
2018-03-25 14:34:14 [debug] uPyEasy-uPyEasy: Pages: Entering Devices Page
2018-03-25 14:34:14 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-03-25 14:34:14 [debug] uPyEasy-uPyEasy: Plugins: Read device test
2018-03-25 14:34:15 [debug] uPyEasy-uPyEasy: Plugin: ds18 read
2018-03-25 14:34:16 [debug] uPyEasy-uPyEasy: Plugins: Read device demo
2018-03-25 14:34:16 [debug] uPyEasy-uPyEasy: Plugin: switch read
2018-03-25 14:34:20 [debug] uPyEasy-uPyEasy: Pages: Authorize User!?
2018-03-25 14:34:20 [debug] uPyEasy-uPyEasy: Pages: Entering Advanced Page
2018-03-25 14:34:20 [debug] uPyEasy-uPyEasy: Pages: Display Advanced Page
2018-03-25 14:34:20 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-03-25 14:42:59 [debug] uPyEasy-uPyEasy: Pages: Authorize User!?
2018-03-25 14:43:00 [debug] uPyEasy-uPyEasy: Pages: Display Rules Page
2018-03-25 14:43:00 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-03-25 14:43:02 [debug] uPyEasy-uPyEasy: Pages: Authorize User!?
2018-03-25 14:43:03 [debug] uPyEasy-uPyEasy: Pages: Entering Tools Page
2018-03-25 14:43:03 [debug] uPyEasy-uPyEasy:
2018-03-25 14:43:03 [debug] uPyEasy-uPyEasy: Pages: Display Tools Page
2018-03-25 14:43:03 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-03-25 14:43:05 [debug] uPyEasy-uPyEasy: Pages: Authorize User!?
2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: Pages: Entering Tools Page
2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: ucmd
2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: Pages: cmd: log
2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: Pages: Log command given
2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
close
PLEASE note that due to an header bug the file edit only works with the firmware release 20180325 and higher (put in the releases section a few minutes ago)Martinus wrote: ↑25 Mar 2018, 14:24 Figured out how:
created boot.py on desktop, then:
But there might be an easier way?Code: Select all
ampy --port COM3 put boot.py
I have the same thing, the asyncio timing is NOT kicking off. Searching for the cause!Martinus wrote: ↑25 Mar 2018, 15:44The web log only shows this:Code: Select all
2018-03-25 14:34:04 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name 2018-03-25 14:34:14 [debug] uPyEasy-uPyEasy: Pages: Authorize User!? 2018-03-25 14:34:14 [debug] uPyEasy-uPyEasy: Pages: Entering Devices Page 2018-03-25 14:34:14 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name 2018-03-25 14:34:14 [debug] uPyEasy-uPyEasy: Plugins: Read device test 2018-03-25 14:34:15 [debug] uPyEasy-uPyEasy: Plugin: ds18 read 2018-03-25 14:34:16 [debug] uPyEasy-uPyEasy: Plugins: Read device demo 2018-03-25 14:34:16 [debug] uPyEasy-uPyEasy: Plugin: switch read 2018-03-25 14:34:20 [debug] uPyEasy-uPyEasy: Pages: Authorize User!? 2018-03-25 14:34:20 [debug] uPyEasy-uPyEasy: Pages: Entering Advanced Page 2018-03-25 14:34:20 [debug] uPyEasy-uPyEasy: Pages: Display Advanced Page 2018-03-25 14:34:20 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name 2018-03-25 14:42:59 [debug] uPyEasy-uPyEasy: Pages: Authorize User!? 2018-03-25 14:43:00 [debug] uPyEasy-uPyEasy: Pages: Display Rules Page 2018-03-25 14:43:00 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name 2018-03-25 14:43:02 [debug] uPyEasy-uPyEasy: Pages: Authorize User!? 2018-03-25 14:43:03 [debug] uPyEasy-uPyEasy: Pages: Entering Tools Page 2018-03-25 14:43:03 [debug] uPyEasy-uPyEasy: 2018-03-25 14:43:03 [debug] uPyEasy-uPyEasy: Pages: Display Tools Page 2018-03-25 14:43:03 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name 2018-03-25 14:43:05 [debug] uPyEasy-uPyEasy: Pages: Authorize User!? 2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: Pages: Entering Tools Page 2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: ucmd 2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: Pages: cmd: log 2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: Pages: Log command given 2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name close
Code: Select all
2018-03-25 17:14:53 [debug] uPyEasy-Ubuntu: Plugin: test process
2018-03-25 17:14:53 [debug] uPyEasy-Ubuntu: Plugins: Scheduling Async processing plugin: Test
2018-03-25 17:14:54 [debug] uPyEasy-Ubuntu: Protocol Domoticz HTTP
2018-03-25 17:14:54 [debug] uPyEasy-Ubuntu: Protocol Domoticz HTTP: send SENSOR_TYPE_SWITCH
2018-03-25 17:14:54 [debug] uPyEasy-Ubuntu: Protocol Domoticz HTTP: SENSOR_TYPE_SWITCH
2018-03-25 17:14:54 [debug] uPyEasy-Ubuntu: Protocol Domoticz HTTP message: http://192.168.178.115:8000/json.htm?type=command¶m=switchlight&idx=1245&switchcmd=On
2018-03-25 17:14:54 [debug] uPyEasy-Ubuntu: Protocol Domoticz HTTP response: {
"status" : "OK",
"title" : "SwitchLight"
}
Oops, , that's because in absence of the network config uPyEasy connects to the strongest open wifi network.
UPDATE2: I suspect this has something to do with the problem:LisaM wrote: ↑25 Mar 2018, 16:30I have the same thing, the asyncio timing is NOT kicking off. Searching for the cause!Martinus wrote: ↑25 Mar 2018, 15:44The web log only shows this:Code: Select all
2018-03-25 14:34:04 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name 2018-03-25 14:34:14 [debug] uPyEasy-uPyEasy: Pages: Authorize User!? 2018-03-25 14:34:14 [debug] uPyEasy-uPyEasy: Pages: Entering Devices Page 2018-03-25 14:34:14 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name 2018-03-25 14:34:14 [debug] uPyEasy-uPyEasy: Plugins: Read device test 2018-03-25 14:34:15 [debug] uPyEasy-uPyEasy: Plugin: ds18 read 2018-03-25 14:34:16 [debug] uPyEasy-uPyEasy: Plugins: Read device demo 2018-03-25 14:34:16 [debug] uPyEasy-uPyEasy: Plugin: switch read 2018-03-25 14:34:20 [debug] uPyEasy-uPyEasy: Pages: Authorize User!? 2018-03-25 14:34:20 [debug] uPyEasy-uPyEasy: Pages: Entering Advanced Page 2018-03-25 14:34:20 [debug] uPyEasy-uPyEasy: Pages: Display Advanced Page 2018-03-25 14:34:20 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name 2018-03-25 14:42:59 [debug] uPyEasy-uPyEasy: Pages: Authorize User!? 2018-03-25 14:43:00 [debug] uPyEasy-uPyEasy: Pages: Display Rules Page 2018-03-25 14:43:00 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name 2018-03-25 14:43:02 [debug] uPyEasy-uPyEasy: Pages: Authorize User!? 2018-03-25 14:43:03 [debug] uPyEasy-uPyEasy: Pages: Entering Tools Page 2018-03-25 14:43:03 [debug] uPyEasy-uPyEasy: 2018-03-25 14:43:03 [debug] uPyEasy-uPyEasy: Pages: Display Tools Page 2018-03-25 14:43:03 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name 2018-03-25 14:43:05 [debug] uPyEasy-uPyEasy: Pages: Authorize User!? 2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: Pages: Entering Tools Page 2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: ucmd 2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: Pages: cmd: log 2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: Pages: Log command given 2018-03-25 14:43:06 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name close
UPDATE 1: It is working on linux, there a sensor is read and kicked to domoticz every 10 seconds. Investigating why it doesn't work on a ESP32...Code: Select all
2018-03-25 17:14:53 [debug] uPyEasy-Ubuntu: Plugin: test process 2018-03-25 17:14:53 [debug] uPyEasy-Ubuntu: Plugins: Scheduling Async processing plugin: Test 2018-03-25 17:14:54 [debug] uPyEasy-Ubuntu: Protocol Domoticz HTTP 2018-03-25 17:14:54 [debug] uPyEasy-Ubuntu: Protocol Domoticz HTTP: send SENSOR_TYPE_SWITCH 2018-03-25 17:14:54 [debug] uPyEasy-Ubuntu: Protocol Domoticz HTTP: SENSOR_TYPE_SWITCH 2018-03-25 17:14:54 [debug] uPyEasy-Ubuntu: Protocol Domoticz HTTP message: http://192.168.178.115:8000/json.htm?type=command¶m=switchlight&idx=1245&switchcmd=On 2018-03-25 17:14:54 [debug] uPyEasy-Ubuntu: Protocol Domoticz HTTP response: { "status" : "OK", "title" : "SwitchLight" }
Code: Select all
2000-01-01 00:00:16 [debug] uPyEasy-ESP32-DOIT: Hal: StartTime: 575307160
2018-03-25 15:32:40 [debug] uPyEasy-ESP32-DOIT: Set time: 2018-03-25T15:32:40
After reboot (reset button) the browser continued in the DS18B20 config page and I could complete the setup.stack: 2032 out of 15360
GC: total: 96000, used: 73984, free: 22016
No. of 1-blocks: 1253, 2-blocks: 153, max blk sz: 902, max free sz: 128
575313997.268 <HTTPRequest object at 3ffba410> <StreamWriter <socket>> "GET /dev ice_setting?id=0"
2018-03-25 17:26:39 [debug] uPyEasy-uPyEasy: Pages: Authorize User!?
2018-03-25 17:26:39 [debug] uPyEasy-uPyEasy: Pages: Entering Device Settings Pag e
2018-03-25 17:26:40 [debug] uPyEasy-uPyEasy: Pages: GET
2018-03-25 17:26:40 [debug] uPyEasy-uPyEasy: id
2018-03-25 17:26:40 [debug] uPyEasy-uPyEasy: 0
2018-03-25 17:26:40 [debug] uPyEasy-uPyEasy: Pages: id: 0
2018-03-25 17:26:40 [debug] uPyEasy-uPyEasy: Pages: New Device, choose plugin
2018-03-25 17:26:40 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
stack: 2032 out of 15360
GC: total: 96000, used: 80368, free: 15632
No. of 1-blocks: 1297, 2-blocks: 162, max blk sz: 902, max free sz: 238
575313997.268 <HTTPRequest object at 3ffc0d50> <StreamWriter <socket>> "GET /sta tic/upyeasy.css"
stack: 2032 out of 15360
GC: total: 96000, used: 81920, free: 14080
No. of 1-blocks: 1342, 2-blocks: 169, max blk sz: 902, max free sz: 238
575313997.268 <HTTPRequest object at 3ffc4e00> <StreamWriter <socket>> "GET /sta tic/upyeasy.js"
static/upyeasy.css
static/upyeasy.js
stack: 2032 out of 15360
GC: total: 96000, used: 92864, free: 3136
No. of 1-blocks: 1520, 2-blocks: 191, max blk sz: 902, max free sz: 195
575313997.268 <HTTPRequest object at 3ffc9ca0> <StreamWriter <socket>> "POST /de vice_setting?id=0"
2018-03-25 17:26:47 [debug] uPyEasy-uPyEasy: Pages: Authorize User!?
2018-03-25 17:26:47 [debug] uPyEasy-uPyEasy: Pages: Entering Device Settings Pag e
2018-03-25 17:26:47 [debug] uPyEasy-uPyEasy: Pages: POST
2018-03-25 17:26:47 [debug] uPyEasy-uPyEasy: id
2018-03-25 17:26:47 [debug] uPyEasy-uPyEasy: 0
2018-03-25 17:26:47 [debug] uPyEasy-uPyEasy: New Plugin: 4
2018-03-25 17:26:47 [debug] uPyEasy-uPyEasy: Pages: Create Device
2018-03-25 17:26:47 [debug] uPyEasy-uPyEasy: Pages: New Device and plugin choose n: 4
2018-03-25 17:26:48 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-03-25 17:26:49 [debug] uPyEasy-uPyEasy: Plugins: Init device: dummy with pl ugin: 4
2018-03-25 17:26:49 [debug] uPyEasy-uPyEasy: Protocols: GetQueue controller 192. 168.0.243-Domoticz HTTP-1
2018-03-25 17:26:49 [debug] uPyEasy-uPyEasy: Plugin: ds18 contruction
2018-03-25 17:26:49 [debug] uPyEasy-uPyEasy: Plugin: ds18 contruction
2018-03-25 17:26:49 [debug] uPyEasy-uPyEasy: Plugins: Init device: dummy ,instan tiate plugin: DS18B20
2018-03-25 17:26:49 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-03-25 17:26:50 [debug] uPyEasy-uPyEasy: Plugin: ds18 init
2018-03-25 17:26:50 [debug] uPyEasy-uPyEasy: Plugins: Read device store: dummy
2018-03-25 17:26:50 [debug] uPyEasy-uPyEasy: Plugin: ds18 init, pin used:
2018-03-25 17:26:50 [debug] uPyEasy-uPyEasy: Hal: pin =
575313997.268 <HTTPRequest object at 3ffc9ca0> <StreamWriter <socket>> Attribute Error("'NoneType' object has no attribute 'init'",)
Traceback (most recent call last):
File "picoweb/__init__.py", line 186, in _handle
File "upyeasy/pages.py", line 1249, in devicesettingpage
File "upyeasy/plugin.py", line 118, in initdevice
File "upyeasy/plugins/ds18.py", line 88, in init
File "onewire.py", line 17, in __init__
AttributeError: 'NoneType' object has no attribute 'init'