ESP32 boards

Moderators: Voyager, BertB, grovkillen, Stuntteam, LisaM

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

Re: ESP32 boards

#221 Post by AndrewJ » 24 Mar 2018, 22:14

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:

Code: Select all

import  upyeasy 
import network
station = network.WLAN(network.STA_IF)
station.active(True)
station.connect("your_ssid", "your_pass")
upyeasy.main()
If there is no errors you should have working board :)
Hello raptor,
Many thanks for posting this. :) I gave it a try on my Lolin32 Lite board, and this is how it went for me....
- I erased flash, then flashed your binary with esptool.py - no problems.
- started the board and put in the commands you recommended - all good, no errors.
- on first run of upyeasy.main() it ended with OSError 128 - this is "normal" for me, for some reason running on port 80 for more than a few seconds doesn't work for me, but i haven't been able to diagnose it. Anyway, corrected by changing port to 9000, then running stable.
- Configured Domoticz MQTT controller and enabled it.
- set hardware for I2C
- Added BME280, working
- Async processes are running as seen in the log (Domoticz, BME) but I'm not seeing mqtt data in MQTTspy.
- Tried to add DS18B20, Got further than with Lisa's version, was able to configure the device and save, but it keeps giving an error "Onewire.py line 22 in reset, Onewire Error: " and data value is wrong (75 degrees in my room! ).

So in summary it's getting there but not yet quite all the way.

Best wishes, Andrew

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

Re: ESP32 boards

#222 Post by karl222 » 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):

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: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 (450) 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 (472) 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 (55) 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.
>>> import upyeasy
I (11577) modsocket: Initializing
>>> import network
>>>
>>> station = network.WLAN(network.STA_IF)
I (30677) wifi: wifi firmware version: ebd3e5d
I (30677) wifi: config NVS flash: enabled
I (30677) wifi: config nano formating: disabled
I (30677) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (30687) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (30717) wifi: Init dynamic tx buffer num: 32
I (30717) wifi: Init data frame dynamic rx buffer num: 64
I (30717) wifi: Init management frame dynamic rx buffer num: 64
I (30717) wifi: wifi driver task: 3ffc9780, prio:23, stack:4096
I (30727) wifi: Init static rx buffer num: 10
I (30727) wifi: Init dynamic rx buffer num: 0
I (30727) wifi: wifi power manager task: 0x3ffcfb04 prio: 21 stack: 2560
W (30737) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration
I (30897) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 2
I (30907) wifi: mode : null
>>> station.active(True)
I (43367) wifi: mode : sta (30:ae:a4:1f:27:94)
I (43367) wifi: STA_START
True
>>> station.connect("xxxxxx", "yyyyyyyyy")
>>> I (77617) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (78177) wifi: state: init -> auth (b0)
I (78187) wifi: state: auth -> assoc (0)
I (78187) wifi: state: assoc -> run (10)
I (78207) wifi: connected with xxxxxx, channel 1
I (78207) network: event 4
I (79157) event: sta ip: 10.0.0.64, mask: 255.255.255.0, gw: 10.0.0.138
I (79157) network: GOT_IP
I (81187) wifi: pm start, type:0


>>> upyeasy.main()
loaded sink log
loaded sink console
loaded sink syslog
2000-01-01T00:02:12.005 [debug] uPyEasy: Init: Init constructor
2000-01-01T00:02:12.005 [debug] uPyEasy: Init: Entering init
2000-01-01 00:02:12 [debug] uPyEasy: Init: Create directory config
2000-01-01 00:02:13 [debug] uPyEasy: Init: Create directory plugins
2000-01-01 00:02:13 [debug] uPyEasy: Init: Create directory protocols
2000-01-01 00:02:13 [debug] uPyEasy: Init: Create directory scripts
2000-01-01 00:02:13 [debug] uPyEasy: Init: Create directory rules
2000-01-01 00:02:13 [debug] uPyEasy: Init: config Table
2000-01-01 00:02:13 [debug] uPyEasy: Init: network Table
2000-01-01 00:02:14 [debug] uPyEasy: Init: protocol Table
2000-01-01 00:02:14 [debug] uPyEasy: Init: controller Table
2000-01-01 00:02:14 [debug] uPyEasy: Init: hardware Table
2000-01-01 00:02:14 [debug] uPyEasy: Init: dxpin Table
2000-01-01 00:02:14 [debug] uPyEasy: Init: dxmap Table
2000-01-01 00:02:14 [debug] uPyEasy: Init: plugin Table
2000-01-01 00:02:15 [debug] uPyEasy: Init: pluginstore Table
2000-01-01 00:02:15 [debug] uPyEasy: Init: device Table
2000-01-01 00:02:15 [debug] uPyEasy: Init: service Table
2000-01-01 00:02:15 [debug] uPyEasy: Init: notification Table
2000-01-01 00:02:15 [debug] uPyEasy: Init: advanced Table
2000-01-01 00:02:15 [debug] uPyEasy: Init: script Table
2000-01-01 00:02:16 [debug] uPyEasy: Init: rule Table
2000-01-01 00:02:16 [debug] uPyEasy: Init: Create Config Record
2000-01-01 00:02:16 [debug] uPyEasy: Init: Create Network Record
2000-01-01 00:02:16 [debug] uPyEasy: Init: Create Hardware Record
2000-01-01 00:02:16 [debug] uPyEasy: Hal: hardwaredb init
2000-01-01 00:02:16 [debug] uPyEasy: Hal: hardwaredb esp32
2000-01-01 00:02:17 [debug] uPyEasy: Init: Create dxpin Record
2000-01-01 00:02:17 [debug] uPyEasy: Hal: dxpins_init
2000-01-01 00:02:17 [debug] uPyEasy: Hal: dxpins_init esp32
2000-01-01 00:02:17 [debug] uPyEasy: Init: Create advanced Record
2000-01-01 00:02:17 [debug] uPyEasy: Hal: Init
2000-01-01 00:02:17 [debug] uPyEasy: Hal: init, network record present
2000-01-01 00:02:18 [debug] uPyEasy: Hal: esp32
2000-01-01 00:02:18 [debug] uPyEasy: Hal: esp32, ssid empty
I (146227) network: event 1
2000-01-01 00:02:20 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: xxxxxx Strength: -79 dBm Security: 4
2000-01-01 00:02:20 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: xxxxxx Strength: -80 dBm Security: 3
2000-01-01 00:02:20 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: xxxxxxGast Strength: -82 dBm Security: 4
2000-01-01 00:02:20 [debug] uPyEasy: Hal: esp32, Scan: Ssid found: A1-1cfeb1 Strength: -92 dBm Security: 3
2000-01-01 00:02:20 [debug] uPyEasy: Protocols: Load
2000-01-01 00:02:20 [debug] uPyEasy: Protocols: Init protocol records
2000-01-01 00:02:20 [debug] uPyEasy: Protocols: Load protocol domoticz_mqtt
2000-01-01 00:02:20 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_mqtt
2000-01-01 00:02:21 [debug] uPyEasy: Protocols: Load protocol domoticz_http
2000-01-01 00:02:21 [debug] uPyEasy: Protocols: Create protocol Record: domoticz_http
2000-01-01 00:02:21 [debug] uPyEasy: Protocols: Init protocol records, run async loop
2000-01-01 00:02:21 [debug] uPyEasy: Plugins: Load
2000-01-01 00:02:21 [debug] uPyEasy: Plugins: init plugin records
2000-01-01 00:02:21 [debug] uPyEasy: Plugins: Register frozen plugin switch
2000-01-01 00:02:21 [debug] uPyEasy: Plugin: switch contruction
2000-01-01 00:02:21 [debug] uPyEasy: Plugins: Create frozen plugin Record: switch
2000-01-01 00:02:21 [debug] uPyEasy: Plugins: Register frozen plugin bme280
2000-01-01 00:02:22 [debug] uPyEasy: Plugins: Create frozen plugin Record: bme280
2000-01-01 00:02:22 [debug] uPyEasy: Plugins: Register frozen plugin test
2000-01-01 00:02:22 [debug] uPyEasy: Plugins: Create frozen plugin Record: test
2000-01-01 00:02:22 [debug] uPyEasy: Plugins: Register frozen plugin ds18
2000-01-01 00:02:22 [debug] uPyEasy: Plugin: ds18 contruction
2000-01-01 00:02:22 [debug] uPyEasy: Plugins: Create frozen plugin Record: ds18
2000-01-01 00:02:22 [debug] uPyEasy: Plugins: Init plugin records, run async loop
2000-01-01 00:02:22 [debug] uPyEasy: Scripts: Load
2000-01-01 00:02:23 [debug] uPyEasy: Scripts: Init
2000-01-01 00:02:23 [debug] uPyEasy: Plugins: GetQueue
2000-01-01 00:02:23 [debug] uPyEasy: Scripts: init scripts records
2000-01-01 00:02:23 [debug] uPyEasy: Scripts: init rules records
2000-01-01 00:02:23 [debug] uPyEasy: Scripts: Init script/rule records, run async loop
2000-01-01 00:02:23 [debug] uPyEasy: Utils: Sys hostname
2000-01-01 00:02:23 [debug] uPyEasy: Utils: uPyEasy Name
Set syslog hostname 0.0.0.0
reloaded sink syslog
2000-01-01 00:02:23 [debug] uPyEasy-uPyEasy: Hal: Entering SetTime
2000-01-01 00:02:23 [debug] uPyEasy-uPyEasy: Hal: Entering GetNtpTime
2000-01-01 00:02:23 [debug] uPyEasy-uPyEasy: Hal: network Table
2000-01-01 00:02:23 [debug] uPyEasy-uPyEasy: Hal: Using NTP Hostname: pool.ntp.org
2000-01-01 00:02:24 [debug] uPyEasy-uPyEasy: Hal: TimeZome offset: 60
2000-01-01 00:02:24 [debug] uPyEasy-uPyEasy: Hal: Received UTC NTP Time: 575243202
2000-01-01 00:02:24 [debug] uPyEasy-uPyEasy: Hal: Timezone corrected NTP Time: 575246802
2000-01-01 00:02:24 [debug] uPyEasy-uPyEasy: Hal: DST corrected NTP Time: 575246802
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!
>>>

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

Re: ESP32 boards

#223 Post by LisaM » 25 Mar 2018, 01:31

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!
>>>
Don't do the import network stuff, uPyEasy has it's own.
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 in the code (not done yet!):
>>> upyeasy.main()
to this (the first time):
>>> upyeasy.main('<YOUR_SSID>', '<YOUR_SSID_PW>')
Would that be be easier?

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

Re: ESP32 boards

#224 Post by budman1758 » 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.

Code: Select all

esptool.py --port COM5 write_flash 0x1000 upyeasy-esp32.bin --compress 
Was able to start with "import upyeasy" and "upyeasy.main()" on the first try!
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.... :D
Please show/tell me how to get it to autostart. Once we get there I will start hanging some hardware on it.
Thanks.
"The glass is twice as big as it needs to be".

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

Re: ESP32 boards

#225 Post by karl222 » 25 Mar 2018, 10:53

LisaM wrote: 25 Mar 2018, 01:31
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!
>>>
Don't do the import network stuff, uPyEasy has it's own.
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?
Hi Lisa,

I tried it your way, left out the network stuff and just went ahead with "Import upyeasy" but it didn't work.

also getting Errors when trying to set wifi credentials wit upyeasy.main(xxxx)

Lisa, are you really sure you've got it up and running on your Hardware :P

Thanks to everyone for being Patient...!

>>> import upyeasy
I (10677) modsocket: Initializing
>>> station = network.WLAN(network.STA_IF)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'network' is not defined
>>> station.active(True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'station' is not defined
>>> import network
>>> station = network.WLAN(network.STA_IF)
I (73137) wifi: wifi firmware version: ebd3e5d
I (73147) wifi: config NVS flash: enabled
I (73147) wifi: config nano formating: disabled
I (73147) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (73157) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (73177) wifi: Init dynamic tx buffer num: 32
I (73177) wifi: Init data frame dynamic rx buffer num: 64
I (73177) wifi: Init management frame dynamic rx buffer num: 64
I (73177) wifi: wifi driver task: 3ffc9780, prio:23, stack:4096
I (73187) wifi: Init static rx buffer num: 10
I (73187) wifi: Init dynamic rx buffer num: 0
I (73197) wifi: wifi power manager task: 0x3ffcfb04 prio: 21 stack: 2560
W (73197) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration
I (73357) phy: phy_version: 383.0, 79a622c, Jan 30 2018, 15:38:06, 0, 2
I (73367) wifi: mode : null
>>> station.active(True)
I (78847) wifi: mode : sta (30:ae:a4:1f:27:94)
I (78847) wifi: STA_START
True
>>> station.connect("xxxxxx", "yyyyyyy")
>>> I (85617) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (86177) wifi: state: init -> auth (b0)
I (86187) wifi: state: auth -> assoc (0)
I (86187) wifi: state: assoc -> run (10)
I (86207) wifi: connected with xxxxxx, channel 1
I (86207) network: event 4
I (86757) event: sta ip: 10.0.0.64, mask: 255.255.255.0, gw: 10.0.0.138
I (86757) network: GOT_IP
I (89187) wifi: pm start, type:0


>>> 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

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

Re: ESP32 boards

#226 Post by BertB » 25 Mar 2018, 11:51

LisaM 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.
Let's go thru this step by step, cause I am loosing it :?

First I do:
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>
So far so good:
Then I do:
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>
Also good.

Then I open a com port session with PuTTY:
It says:
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, I do the follwing steps, according to the first post. I think ...
>>> 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
>>>
So, now I think the device is not connected to any network.

So, I enter the setwifi thing:
>>> upyeasy.setwifi('xxxxx','xxxxxxx')
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
>>>

Don't know what to do now.

Martinus

Re: ESP32 boards

#227 Post by Martinus » 25 Mar 2018, 13:45

I also decided to give uPyEasy a try on one of my ESP32 modules. Using a Wemos Lolin32 Lite module.
Install was quite easy:

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')
I was able to read the connected DS18B20 sensor. So far so good.

But after reboot, it does not start automatically. It is mentioned to put the startup commands in boot.py.
But how? Pressing the edit button in the webgui does nothing.

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

Re: ESP32 boards

#228 Post by BertB » 25 Mar 2018, 14:23

Happy to see this working, but it is yet another approach of getting started. :?

Martinus

Re: ESP32 boards

#229 Post by Martinus » 25 Mar 2018, 14:24

Figured out how:
created boot.py on desktop, then:

Code: Select all

ampy --port COM3 put boot.py
But there might be an easier way?

Martinus

Re: ESP32 boards

#230 Post by Martinus » 25 Mar 2018, 14:27

BertB wrote: 25 Mar 2018, 14:23 Happy to see this working, but it is yet another approach of getting started. :?
Is it? I just followed instructions from the initial post in this thread.

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

Re: ESP32 boards

#231 Post by LisaM » 25 Mar 2018, 15:15

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
Hi Karl222,

To fast! I haven't changed this yet. My question was whether this was a good idea or not... ;)
For now you can start upyeasy by using:

Code: Select all

>>> import upyeasy
upyeasy.main()
IF upyeasy comes back with the error:
Exiting: Network not available, set network values!
THEN use this command:

Code: Select all

>>> upyeasy.setwifi('<your ssid>', '<your ssid password>','<your backup ssid, if any>', '<your backup ssid pw>',<your port>)
where <your ssid> and others are to be replaced with your info.

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

Re: ESP32 boards

#232 Post by LisaM » 25 Mar 2018, 15:19

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.

Code: Select all

esptool.py --port COM5 write_flash 0x1000 upyeasy-esp32.bin --compress 
Was able to start with "import upyeasy" and "upyeasy.main()" on the first try!
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.... :D
Please show/tell me how to get it to autostart. Once we get there I will start hanging some hardware on it.
Thanks.
It should have created an autostart entry in boot.py, but due to a bug it was ommitted (and fixed currently).
Autostart can be done by adding this:

Code: Select all

import upyeasy
upyeasy.main()
at the end of the file boot.py in the root directory of the ESP32.

For those of you building your own firmware, please change in the ports/esp32/modules directory the file initsetup.py!
From this:

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
To this:

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

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

Re: ESP32 boards

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

Martinus

Re: ESP32 boards

#234 Post by Martinus » 25 Mar 2018, 15:33

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.
Noticed same here. DS sensor is working, but no data to Domoticz. Log does not reveal any clue.

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

Re: ESP32 boards

#235 Post by LisaM » 25 Mar 2018, 15:33

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, now I think the device is not connected to any network.

So, I enter the setwifi thing:
>>> upyeasy.setwifi('xxxxx','xxxxxxx')
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
>>>

Don't know what to do now.
[/quote]
Hi Bert,

Actually everything is now working at your ESP32. But... you seem to have run into a bug (of all things!). Which is good and bad, good because it means finally everything is working at your ESP32, bad because seems to be a bug in there. I'll give it a look and fix it right now. The setwifi error you can ignore, that's another bug also fixed (which doesn't have any impact on setting the wifi parameters).
Just a sec, and i'll fix this bug for you and upload a new firmware version.

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

Re: ESP32 boards

#236 Post by LisaM » 25 Mar 2018, 15:40

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
So it's running (you can connect to the upyeasy webserver) but no updates are send to domoticz? Neither using http or mqtt?

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

Re: ESP32 boards

#237 Post by LisaM » 25 Mar 2018, 15:41

Martinus wrote: 25 Mar 2018, 15:33
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.
Noticed same here. DS sensor is working, but no data to Domoticz. Log does not reveal any clue.
Can you post the tail of your log? Let's say 20 lines?

Martinus

Re: ESP32 boards

#238 Post by Martinus » 25 Mar 2018, 15:44

LisaM wrote: 25 Mar 2018, 15:41
Martinus wrote: 25 Mar 2018, 15:33
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.
Noticed same here. DS sensor is working, but no data to Domoticz. Log does not reveal any clue.
Can you post the tail of your log? Let's say 20 lines?
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

Martinus

Re: ESP32 boards

#239 Post by Martinus » 25 Mar 2018, 15:51

Config:
uPyEasy_Dallas.png
uPyEasy_Dallas.png (68.61 KiB) Viewed 64247 times

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

Re: ESP32 boards

#240 Post by LisaM » 25 Mar 2018, 16:14

Martinus wrote: 25 Mar 2018, 14:24 Figured out how:
created boot.py on desktop, then:

Code: Select all

ampy --port COM3 put boot.py
But there might be an easier way?
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)
when flashing,the filesystem with your config files will not be deleted, so no need to redo config!

The easy way:
Select tools menu, filessystem/files:
boot.JPG
boot.JPG (86.38 KiB) Viewed 64243 times
klik on boot.py's edit button:
boot2.JPG
boot2.JPG (56.55 KiB) Viewed 64243 times
Add the two lines into the text field:
boot3.JPG
boot3.JPG (63.03 KiB) Viewed 64243 times
Click on the submit button:
boot4.JPG
boot4.JPG (69.46 KiB) Viewed 64243 times
done!

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

Re: ESP32 boards

#241 Post by LisaM » 25 Mar 2018, 16:30

Martinus wrote: 25 Mar 2018, 15:44
LisaM wrote: 25 Mar 2018, 15:41
Martinus wrote: 25 Mar 2018, 15:33
Noticed same here. DS sensor is working, but no data to Domoticz. Log does not reveal any clue.
Can you post the tail of your log? Let's say 20 lines?
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
I have the same thing, the asyncio timing is NOT kicking off. Searching for the cause!

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&param=switchlight&idx=1245&switchcmd=On
2018-03-25 17:14:54 [debug] uPyEasy-Ubuntu: Protocol Domoticz HTTP response: {
   "status" : "OK",
   "title" : "SwitchLight"
}

Martinus

Re: ESP32 boards

#242 Post by Martinus » 25 Mar 2018, 16:37

Just did a fresh install of the latest firmware. Now it automatically connects to my neighbors Wifi printer (!).
It does not seem to listen to serial input. How to get it connect to my network again?

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

Re: ESP32 boards

#243 Post by LisaM » 25 Mar 2018, 16:47

Martinus wrote: 25 Mar 2018, 16:37 Just did a fresh install of the latest firmware. Now it automatically connects to my neighbors Wifi printer (!).
It does not seem to listen to serial input. How to get it connect to my network again?
Oops, :oops: , that's because in absence of the network config uPyEasy connects to the strongest open wifi network.
Just do a crtl-c so you end up on the REPL interface ( the '>>>') and do the setwifi command again. Reboot after that.

uPyEasy connects to the strongest open wifi network as part of an experiment i was conducting: if you make an open wifi network on your phone, uPyEasy connects to that one. Maybe that would make first time config easier.

Martinus

Re: ESP32 boards

#244 Post by Martinus » 25 Mar 2018, 17:15

Ok, i fixed it using crtl-c to get into repl again.

But wouldn't it be easier to launch an AP if no SSID is set, like we do with ESPEasy?

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

Re: ESP32 boards

#245 Post by LisaM » 25 Mar 2018, 17:17

Martinus wrote: 25 Mar 2018, 17:15 Ok, i fixed it using crtl-c to get into repl again.

But wouldn't it be easier to launch an AP if no SSID is set, like we do with ESPEasy?
In hindsight, that might very well be the case... :)

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

Re: ESP32 boards

#246 Post by LisaM » 25 Mar 2018, 17:23

LisaM wrote: 25 Mar 2018, 16:30
Martinus wrote: 25 Mar 2018, 15:44
LisaM wrote: 25 Mar 2018, 15:41
Can you post the tail of your log? Let's say 20 lines?
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
I have the same thing, the asyncio timing is NOT kicking off. Searching for the cause!

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&param=switchlight&idx=1245&switchcmd=On
2018-03-25 17:14:54 [debug] uPyEasy-Ubuntu: Protocol Domoticz HTTP response: {
   "status" : "OK",
   "title" : "SwitchLight"
}
UPDATE2: I suspect this has something to do with the problem:

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
The async loops for plugins and protocols are scheduled to start one seconds later then 2000-01-01, but... due to the ntp time switch this moment never materilizes because the main async loop is started later then that moment. Testing if this is true.

UPDATE3: Nope, didn't work.... :cry:

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

Re: ESP32 boards

#247 Post by BertB » 25 Mar 2018, 18:34

What version is uploaded last? What time was that?
Just installed a version, say 10 minutes back.
It had the boot.py stuff on board :-)

First created a BME280. That went fine.
Then I wanted to create a DS18B20 and, right after the submit the browser told me that the connection got re inititialized.
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'
After reboot (reset button) the browser continued in the DS18B20 config page and I could complete the setup.

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

Re: ESP32 boards

#248 Post by karl222 » 25 Mar 2018, 20:28

Can you pls post your steps to success ;)

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

Re: ESP32 boards

#249 Post by BertB » 25 Mar 2018, 21:41

What can I say. It looks good, but there are no updates.
Probable has something to do with beta testing ;-)

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

Re: ESP32 boards

#250 Post by karl222 » 25 Mar 2018, 21:48

Yeah, I have a running esp32!!!!! :D :D :D
Here are the steps that got my esp32 up and running:

press RST button before plugging in usb
Cmd window:
esptool.py --port COM4 erase_flash

esp32>esptool.py --port COM4 write_flash --compress 0x1000 upyeasy_v021_20180325_test_esp32_4096.bin

putty:
import upyeasy
upyeasy.main()
upyeasy.setwifi('xxx', 'yyy')

Thanks to all and Special thanks to Lisa!!!!!!

regards
Karl

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

Re: ESP32 boards

#251 Post by karl222 » 25 Mar 2018, 21:55

It is not possible to set IP Settings in Config tab. Can this somehow be changed.

regards
karl

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

Re: ESP32 boards

#252 Post by AndrewJ » 25 Mar 2018, 22:10

Hi Karl,
Great news! :D
Out of interest, which ESP32 model is it you are using there?

I agree with you, special thanks to LisaM for all her hard work on this! :D

Andrew

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

Re: ESP32 boards

#253 Post by LisaM » 25 Mar 2018, 23:30

karl222 wrote: 25 Mar 2018, 21:55 It is not possible to set IP Settings in Config tab. Can this somehow be changed.

regards
karl
Hmmm, checking...

@karl: can you verify the correct values are written in the config?
To verify:
- Goto webgui
- tools
- filesystem - files
- click on config
- click on network
- click the edit button
"ssid": and "key": should have the right values!

After changing the ssid values, a reboot is necessary.

I'm also busy with finding out why on all platforms async is work, except for the esp32... :x

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

Re: ESP32 boards

#254 Post by karl222 » 26 Mar 2018, 06:34

Hi
Ssid and pw do have the right values, but i can’t enter values in ip settings field, they are greyed out...

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

Re: ESP32 boards

#255 Post by karl222 » 26 Mar 2018, 08:28

AndrewJ wrote: 25 Mar 2018, 22:10 Hi Karl,
Great news! :D
Out of interest, which ESP32 model is it you are using there?

I agree with you, special thanks to LisaM for all her hard work on this! :D

Andrew
it is running on a NODEMCU ESP-32S V1 but i haven’t checked the other one yet.

regards
karl

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

Re: ESP32 boards

#256 Post by LisaM » 26 Mar 2018, 09:50

karl222 wrote: 26 Mar 2018, 06:34 Hi
Ssid and pw do have the right values, but i can’t enter values in ip settings field, they are greyed out...
So far, when using wifi uPyEasy is using dhcp to get the ip-address. Do you have a need to specify a specific ip-address?

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

Re: ESP32 boards

#257 Post by karl222 » 26 Mar 2018, 10:05

Generally yes, i do most of stuff with fixed ip but i can do it via fixing on router level as well...

Regards
Karl

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

Re: ESP32 boards

#258 Post by AndrewJ » 26 Mar 2018, 18:36

LisaM wrote: 26 Mar 2018, 09:50
karl222 wrote: 26 Mar 2018, 06:34 Hi
Ssid and pw do have the right values, but i can’t enter values in ip settings field, they are greyed out...
So far, when using wifi uPyEasy is using dhcp to get the ip-address. Do you have a need to specify a specific ip-address?
Hi Lisa,
Just chipping in here if I may. In my case I would like to specify a fixed IP-address within the ESP32, please, as my wireless router only allows a limited number of fixed addresses in its table. :cry:
Cheers
Andrew

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

Re: ESP32 boards

#259 Post by LisaM » 26 Mar 2018, 22:26

V0.2.2 released, firmware can be found in the release section.

Issues solved:
- Async ESP32 not working (work-around implemented: devices should be sending data to domoticz now)

Features added:
- Fixed IP Address possible for ESP32

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

Re: ESP32 boards

#260 Post by BertB » 26 Mar 2018, 23:12

LisaM wrote: 26 Mar 2018, 22:26 V0.2.2 released, firmware can be found in the release section.

Issues solved:
- Async ESP32 not working (work-around implemented: devices should be sending data to domoticz now)

Features added:
- Fixed IP Address possible for ESP32
yep, it works :D
But there still is something funny going on.
When I first create a BME280 device and then a Dallas device, right after the selection of the dallas and clicking submit, the WEB connection with the ESP is broken and a have to reset the ESP board.
After that, I can continue setting up the dallas device.

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

Re: ESP32 boards

#261 Post by BertB » 26 Mar 2018, 23:34

Update:
The Dallas show up correctly in Domoticz.
The BME has two devices in Domoticz, one for temp and one for weather.
Neither one sohwas values, but 'last seen' is correct.

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

Re: ESP32 boards

#262 Post by LisaM » 27 Mar 2018, 00:07

BertB wrote: 26 Mar 2018, 23:34 Update:
The Dallas show up correctly in Domoticz.
The BME has two devices in Domoticz, one for temp and one for weather.
Neither one sohwas values, but 'last seen' is correct.
BME should be one device:
1244 VirtualSwitches 1452C 1 uPyEasy Test Temp_Hum_Baro Temp + Humidity + Baro THB1 - BTHR918, BTHGN129 0, 25.9326.24707;0;1014.779;0

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

Re: ESP32 boards

#263 Post by AndrewJ » 27 Mar 2018, 16:34

LisaM wrote: 26 Mar 2018, 22:26 V0.2.2 released, firmware can be found in the release section.

Issues solved:
- Async ESP32 not working (work-around implemented: devices should be sending data to domoticz now)

Features added:
- Fixed IP Address possible for ESP32
Hi Lisa,
Thanks for all your hard work on this! :)
I just tried the latest (20180326) binaries for ESP32 on my Lolin32 Lite board. Getting closer but still some issues.

2048.bin:
Working with only the BME280 and DomoticzMQTT, can see Async processes running, values being updated - all good.
BUT, when I tried to add DS18B20, after clicking Submit to select DS18B20 the bottom two thirds of the screen was the one for BME280 (I2C address, three value settings (Temp, Press, Hum)!
I tried 'Submit' at the bottom anyway...
The main Devices page showed the "real" BME280, plus a device with three values (Temperature, Pressue, Humidity)! (It's a mutant!! :o )

4096.bin:
Similar to above. OK with Domoticz and BME280, Async process running, values being updated, all good.
This time when I tried to add DS18B20, it crashed as soon as I clicked 'Submit' to select it. See log below.

Code: Select all

2018-03-27 15:06:20 [debug] uPyEasy-uPyEasy: Pages: Entering Device Settings Page
2018-03-27 15:06:20 [debug] uPyEasy-uPyEasy: Pages: POST
2018-03-27 15:06:20 [debug] uPyEasy-uPyEasy: id
2018-03-27 15:06:20 [debug] uPyEasy-uPyEasy: 0
2018-03-27 15:06:20 [debug] uPyEasy-uPyEasy: New Plugin: 4
2018-03-27 15:06:20 [debug] uPyEasy-uPyEasy: Pages: Create Device
2018-03-27 15:06:20 [debug] uPyEasy-uPyEasy: Pages: New Device and plugin choosen: 4
2018-03-27 15:06:21 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-03-27 15:06:22 [debug] uPyEasy-uPyEasy: Plugins: Init device: dummy with plugin: 4
2018-03-27 15:06:22 [debug] uPyEasy-uPyEasy: Protocols: GetQueue controller 192.168.1.12-Domoticz MQTT-1
2018-03-27 15:06:22 [debug] uPyEasy-uPyEasy: Plugin: ds18 contruction
2018-03-27 15:06:23 [debug] uPyEasy-uPyEasy: Plugin: ds18 contruction
2018-03-27 15:06:23 [debug] uPyEasy-uPyEasy: Plugins: Init device: dummy ,instantiate plugin: DS18B20
2018-03-27 15:06:23 [debug] uPyEasy-uPyEasy: Utils: uPyEasy Name
2018-03-27 15:06:23 [debug] uPyEasy-uPyEasy: Plugin: ds18 init
2018-03-27 15:06:23 [debug] uPyEasy-uPyEasy: Plugins: Read device store: dummy
2018-03-27 15:06:23 [debug] uPyEasy-uPyEasy: Plugin: ds18 init, pin used: 
2018-03-27 15:06:23 [debug] uPyEasy-uPyEasy: Hal: pin = 
Traceback (most recent call last):
  File "boot.py", line 3, in <module>
  File "upyeasy/__init__.py", line 65, in main
  File "picoweb/__init__.py", line 298, in run
  File "uasyncio/core.py", line 146, in run_forever
  File "uasyncio/core.py", line 101, in run_forever
  File "picoweb/__init__.py", line 210, in _handle
  File "picoweb/__init__.py", line 210, in _handle
AttributeError: 'Log' object has no attribute 'exc'
OSError: [Errno 2] ENOENT
MicroPython v1.9.3-479-gb63cc1e-dirty on 2018-03-26; ESP32 module with ESP32
Type "help()" for more information.
>>> 
Hope this helps to hunt down the problem.
So it looks like Async processes are fixed now, but an issue with DS18B20.
I really appreciate all the work you are doing on this. If there's any more information you'd like, let me know. Can I help in any way with debugging?

Cheers
Andrew

Martinus

Re: ESP32 boards

#264 Post by Martinus » 27 Mar 2018, 16:59

With the latest firmware, the Dallas sensor is working towards Domoticz and has been running for several hours.

One strange thing however:

This module has previously been used to check Dallas on ESPEasy32 and it has two dallas sensors attached (same pin).
uPyEasy has only 1 device configured but it seems to read both sensors anyway and it sends them both to Domoticz using the same IDX.

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

Re: ESP32 boards

#265 Post by LisaM » 27 Mar 2018, 17:17

Martinus wrote: 27 Mar 2018, 16:59 With the latest firmware, the Dallas sensor is working towards Domoticz and has been running for several hours.

One strange thing however:

This module has previously been used to check Dallas on ESPEasy32 and it has two dallas sensors attached (same pin).
uPyEasy has only 1 device configured but it seems to read both sensors anyway and it sends them both to Domoticz using the same IDX.
The ds18b20 plugin was a rush job to get it working, it was never intended to read two dallas sensors. I'm amazed it can actually do that... ;)
It definitely needs some improvements...

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

Re: ESP32 boards

#266 Post by BertB » 27 Mar 2018, 19:49

LisaM wrote: 27 Mar 2018, 00:07
BertB wrote: 26 Mar 2018, 23:34 Update:
The Dallas show up correctly in Domoticz.
The BME has two devices in Domoticz, one for temp and one for weather.
Neither one sohwas values, but 'last seen' is correct.
BME should be one device:
1244 VirtualSwitches 1452C 1 uPyEasy Test Temp_Hum_Baro Temp + Humidity + Baro THB1 - BTHR918, BTHGN129 0, 25.9326.24707;0;1014.779;0
I created a dummy device in Domotic, type: TEMP+HUM+BARO
upyeasy1 Ja Dummy (Does nothing, use for virtual switches only) Maak virtuele sensoren

And it appears like this in the devices list:
361 upyeasy1 141B9 1 UPYEASy Temp + Humidity + Baro THB1 - BTHR918, BTHGN129 0, 18.045.31738;0;1005.792;0
Attachments
UPYEASY2.PNG
UPYEASY2.PNG (9.07 KiB) Viewed 40679 times
UPYEASY1.PNG
UPYEASY1.PNG (7.32 KiB) Viewed 40681 times

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

Re: ESP32 boards

#267 Post by LisaM » 27 Mar 2018, 20:01

Looks like a Domoticz bug... The values are there...
bme1.JPG
bme1.JPG (17.83 KiB) Viewed 40677 times
bme2.JPG
bme2.JPG (18.53 KiB) Viewed 40677 times

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

Re: ESP32 boards

#268 Post by AndrewJ » 27 Mar 2018, 21:38

LisaM wrote: 26 Mar 2018, 22:26 V0.2.2 released, firmware can be found in the release section.

Issues solved:
- Async ESP32 not working (work-around implemented: devices should be sending data to domoticz now)

Features added:
- Fixed IP Address possible for ESP32
Update:
I forgot to mention before, the Fixed IP Address is working for me. Thanks! :D :D
Andrew

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

Re: ESP32 boards

#269 Post by BertB » 27 Mar 2018, 22:08

LisaM wrote: 27 Mar 2018, 20:01 Looks like a Domoticz bug... The values are there...
bme1.JPG

bme2.JPG
Probably not.
This is with the BME on a ESPEasy:
364 ESP16 141BC 1 BME1 Temp + Humidity + Baro THB1 - BTHR918, BTHGN129 22.0 C, 37 %, 1005 hPa

It looks like the string has a different format then.
Attachments
ESPEASY2.PNG
ESPEASY2.PNG (11.02 KiB) Viewed 40664 times
ESPEASY1.PNG
ESPEASY1.PNG (12.05 KiB) Viewed 40664 times

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

Re: ESP32 boards

#270 Post by LisaM » 27 Mar 2018, 22:22

BertB wrote: 27 Mar 2018, 22:08
LisaM wrote: 27 Mar 2018, 20:01 Looks like a Domoticz bug... The values are there...
bme1.JPG

bme2.JPG
Probably not.
This is with the BME on a ESPEasy:
364 ESP16 141BC 1 BME1 Temp + Humidity + Baro THB1 - BTHR918, BTHGN129 22.0 C, 37 %, 1005 hPa

It looks like the string has a different format then.
Owwwww, then it must be a uPyEasy domoticz http controller bug! I'll check this out...

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests