GPIO's for SonOff THR320D
Moderators: grovkillen, Stuntteam, TD-er
GPIO's for SonOff THR320D
Hello again,
I'm trying to control my new toy: a SonOff THR320D for checking if the hot water pump needs to run (controlled by changes in the temperature read)..
I managed to backup the original firmware and was to able to load a new one .. however I haven't manage to find the GPIO's for the three LED's available, nor the one for the temperature sensor and, even more important, also not the one for the relay ..
Can one help?
I'm trying to control my new toy: a SonOff THR320D for checking if the hot water pump needs to run (controlled by changes in the temperature read)..
I managed to backup the original firmware and was to able to load a new one .. however I haven't manage to find the GPIO's for the three LED's available, nor the one for the temperature sensor and, even more important, also not the one for the relay ..
Can one help?
Re: GPIO's for SonOff THR320D
Thanks a lot for your post and link, very informative.
From what I understand TM1621 should be the display - which, for the time being, I won't use. Maybe later after the basics are working
But can you tell what the GPIO for the one relay might be and where to find the temperature sensor?
As far as I can see, there's only one relay in the device, but here I somehow suggest two to three?
GPIO04 Relay 3
GPIO19 Relay_b 1
GPIO22 Relay_b 2
I'm assuming the three LED's visible will somehow be attached to the GPIO's listed:
GPIO13 Led_i 2
GPIO15 LedLinki
GPIO16 Led_i 1
There are also two lines, that I can't match so far:
GPIO25 User <- this then might be the input for the temperature sensor, right?
GPIO27 Output Hi
Do you have any more idea?
From what I understand TM1621 should be the display - which, for the time being, I won't use. Maybe later after the basics are working
But can you tell what the GPIO for the one relay might be and where to find the temperature sensor?
As far as I can see, there's only one relay in the device, but here I somehow suggest two to three?
GPIO04 Relay 3
GPIO19 Relay_b 1
GPIO22 Relay_b 2
I'm assuming the three LED's visible will somehow be attached to the GPIO's listed:
GPIO13 Led_i 2
GPIO15 LedLinki
GPIO16 Led_i 1
There are also two lines, that I can't match so far:
GPIO25 User <- this then might be the input for the temperature sensor, right?
GPIO27 Output Hi
Do you have any more idea?
Re: GPIO's for SonOff THR320D
Not 100% sure about the notation of those labels, but relay_b does look like the button associated with it?
led_i looks like LED inverted?
led_linki looks like LED linkstatus inverted?
output HI looks like output which is pulled up?
Or -this is important- it might be this pin is maybe not isolated from mains voltage?
You need to always (!!!) keep in mind that mains connected devices like those sold by Sonoff may not always be isolated from mains voltage.
Especially the ones which perform enery/voltage measurements on mains voltage are almost never isolated from mains.
This means that if you add some sensors to it, you either have to place them inside the enclosure to be safe, or add components between the board and the sensor to isolate it from mains.
One way to check is by measuring the resistance between either mains voltage pin and ground of the board inside.
If either one (phase or null) of the mains pins are connected, you MUST(!!) take special care when adding external sensors to it.
led_i looks like LED inverted?
led_linki looks like LED linkstatus inverted?
output HI looks like output which is pulled up?
Or -this is important- it might be this pin is maybe not isolated from mains voltage?
You need to always (!!!) keep in mind that mains connected devices like those sold by Sonoff may not always be isolated from mains voltage.
Especially the ones which perform enery/voltage measurements on mains voltage are almost never isolated from mains.
This means that if you add some sensors to it, you either have to place them inside the enclosure to be safe, or add components between the board and the sensor to isolate it from mains.
One way to check is by measuring the resistance between either mains voltage pin and ground of the board inside.
If either one (phase or null) of the mains pins are connected, you MUST(!!) take special care when adding external sensors to it.
Re: GPIO's for SonOff THR320D
THANKS for the warnings, you can't be cautious enough!
I'll stick to the temperature sensor delivered with the device .. especially as this sensor is super close to house water installation and hence almost all metal around everywhere.
I'm also struggling a bit on which mega release to take, most of the ESP32's I've tried report an uploading failure approx. 20seconds after I started flashing.
From ESPEasy_ESP32_mega-20220616.zip I've tried
ESP_Easy_mega_20220616_display_ESP32_4M316k.bin
ESP_Easy_mega_20220616_display_ESP32s2_4M316k.bin
ESP_Easy_mega_20220616_custom_ESP32_4M316k_LittleFS.bin
Arduino.cc did allow me to upload, so usually the device should work.
I'll stick to the temperature sensor delivered with the device .. especially as this sensor is super close to house water installation and hence almost all metal around everywhere.
I'm also struggling a bit on which mega release to take, most of the ESP32's I've tried report an uploading failure approx. 20seconds after I started flashing.
From ESPEasy_ESP32_mega-20220616.zip I've tried
ESP_Easy_mega_20220616_display_ESP32_4M316k.bin
ESP_Easy_mega_20220616_display_ESP32s2_4M316k.bin
ESP_Easy_mega_20220616_custom_ESP32_4M316k_LittleFS.bin
Arduino.cc did allow me to upload, so usually the device should work.
Re: GPIO's for SonOff THR320D
Do you upload the "factory" image file to the unit when flashing via serial?
I saw the Tasmota thread for adding support for this unit and apparently it was quite a lot of work (perhaps also to find out where which sensor was connected)
I saw the Tasmota thread for adding support for this unit and apparently it was quite a lot of work (perhaps also to find out where which sensor was connected)
Re: GPIO's for SonOff THR320D
I'll try the factory ones tonight.
Regarding the temperature sensor GPIO: I thought I just browse through all the GPIO's but that gave my '-127.00' for all of them ..
Regarding the temperature sensor GPIO: I thought I just browse through all the GPIO's but that gave my '-127.00' for all of them ..
Re: GPIO's for SonOff THR320D
You _have_ to use the "factory" ones when flashing via serial as those include the bootloader files.
Later, when updating via WiFi, you can use the bin files without "factory" in the name.
Later, when updating via WiFi, you can use the bin files without "factory" in the name.
Re: GPIO's for SonOff THR320D
That's a rather old release.
That'll surely not work on the ESP32 that's in these units, the ESP32s2 is a different CPU.
/Ton (PayPal.me)
Re: GPIO's for SonOff THR320D
Yep, but 'cause of the lengthy warning for Release mega-20220809 that was the most up to date with no such textThat's a rather old release.
Re: GPIO's for SonOff THR320D
You can pick the latest (completed) builds from the GitHub Actions builds: https://github.com/letscontrolit/ESPEasy/actions
For example this one: https://github.com/letscontrolit/ESPEas ... 3356992715
For example this one: https://github.com/letscontrolit/ESPEas ... 3356992715
Re: GPIO's for SonOff THR320D
not sure if with no access to the project I can see/download those
Re: GPIO's for SonOff THR320D
so I tried with the
ESP_Easy_mega_20221030_normal_ESP32_4M316k.factory.bin
->
######2022-11-01######
#######0.04.007#######
######FLASH INFO######
BIN file: ESP_Easy_mega_20221030_normal_ESP32_4M316k.factory.bin
COM port: (COM3) USB-SERIAL CH340 (Port_#0001.Hub_#0006)
Baud rate: 115200
######POST FLASH######
No post flash information entered...
######FLASH LOG######
[esptool.exe -vv -cd nodemcu -cb 115200 -cp COM3 -ca 0x00000 -cf "O:\Computer Elektronik\ESPEasy\20221030_ESP32\bin\ESP_Easy_mega_20221030_normal_ESP32_4M316k.factory.bin"]
[01.11.2022 17:13:45] esptool v0.4.12 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
...
[01.11.2022 17:13:45] erasing flash
[01.11.2022 17:13:45] size: 153670 address: 000000
[01.11.2022 17:13:45] first_sector_index: 0
[01.11.2022 17:13:45] total_sector_count: 340
[01.11.2022 17:13:45] head_sector_count: 16
[01.11.2022 17:13:45] adjusted_sector_count: 324
[01.11.2022 17:13:45] erase_size: 144000
[01.11.2022 17:13:45] espcomm_send_command: sending command header
[01.11.2022 17:13:45] espcomm_send_command: sending command payload
[01.11.2022 17:13:45] setting serial port timeouts to 15000 ms
[01.11.2022 17:13:45] read 0, requested 1
[01.11.2022 17:13:45] setting serial port timeouts to 1000 ms
[01.11.2022 17:13:45] warning: espcomm_send_command: didn't receive command response
[01.11.2022 17:13:45] warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
[01.11.2022 17:13:45] closing bootloader
[01.11.2022 17:13:45] flush start
[01.11.2022 17:13:45] setting serial port timeouts to 1 ms
[01.11.2022 17:13:45] setting serial port timeouts to 1000 ms
[01.11.2022 17:13:45] flush complete
[01.11.2022 17:13:45] error: espcomm_upload_mem failed
[2022-11-01 17:13:45] DONE! BUT WITH (1) ERRORS!
############################
[2022-11-01 17:13:45] The COM port was already in use... the post-flash did not complete.
[2022-11-01 17:13:45] JOB COMPLETED, over and out!
ESP_Easy_mega_20221030_normal_ESP32_4M316k_ETH.factory.bin -> ditto
ESP_Easy_mega_20221030_normal_ESP32_4M316k_LittleFS.factory.bin > ditto
Flashing stops after less than 20sec.
ESP_Easy_mega_20221030_normal_ESP32_4M316k.factory.bin
->
######2022-11-01######
#######0.04.007#######
######FLASH INFO######
BIN file: ESP_Easy_mega_20221030_normal_ESP32_4M316k.factory.bin
COM port: (COM3) USB-SERIAL CH340 (Port_#0001.Hub_#0006)
Baud rate: 115200
######POST FLASH######
No post flash information entered...
######FLASH LOG######
[esptool.exe -vv -cd nodemcu -cb 115200 -cp COM3 -ca 0x00000 -cf "O:\Computer Elektronik\ESPEasy\20221030_ESP32\bin\ESP_Easy_mega_20221030_normal_ESP32_4M316k.factory.bin"]
[01.11.2022 17:13:45] esptool v0.4.12 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
...
[01.11.2022 17:13:45] erasing flash
[01.11.2022 17:13:45] size: 153670 address: 000000
[01.11.2022 17:13:45] first_sector_index: 0
[01.11.2022 17:13:45] total_sector_count: 340
[01.11.2022 17:13:45] head_sector_count: 16
[01.11.2022 17:13:45] adjusted_sector_count: 324
[01.11.2022 17:13:45] erase_size: 144000
[01.11.2022 17:13:45] espcomm_send_command: sending command header
[01.11.2022 17:13:45] espcomm_send_command: sending command payload
[01.11.2022 17:13:45] setting serial port timeouts to 15000 ms
[01.11.2022 17:13:45] read 0, requested 1
[01.11.2022 17:13:45] setting serial port timeouts to 1000 ms
[01.11.2022 17:13:45] warning: espcomm_send_command: didn't receive command response
[01.11.2022 17:13:45] warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
[01.11.2022 17:13:45] closing bootloader
[01.11.2022 17:13:45] flush start
[01.11.2022 17:13:45] setting serial port timeouts to 1 ms
[01.11.2022 17:13:45] setting serial port timeouts to 1000 ms
[01.11.2022 17:13:45] flush complete
[01.11.2022 17:13:45] error: espcomm_upload_mem failed
[2022-11-01 17:13:45] DONE! BUT WITH (1) ERRORS!
############################
[2022-11-01 17:13:45] The COM port was already in use... the post-flash did not complete.
[2022-11-01 17:13:45] JOB COMPLETED, over and out!
ESP_Easy_mega_20221030_normal_ESP32_4M316k_ETH.factory.bin -> ditto
ESP_Easy_mega_20221030_normal_ESP32_4M316k_LittleFS.factory.bin > ditto
Flashing stops after less than 20sec.
Re: GPIO's for SonOff THR320D
From the error log I see that it failed because the SonOff device did not respond and later it states chosen COM port was already in-use. If you are sure the SonOff device was set to FLASH mode, and you have chosen the correct port (and no other serial service is using it), then reboot your PC and try again.
- Thomas
- Thomas
Re: GPIO's for SonOff THR320D
Also what flash tool do you use?
This one seems to date from way before there even existed ESP32 units.
In the ZIP file containing the releases, there is also a copy of the Espressif download tool.
See the documentation on how to use this tool: https://espeasy.readthedocs.io/en/lates ... nload-tool
This one seems to date from way before there even existed ESP32 units.
In the ZIP file containing the releases, there is also a copy of the Espressif download tool.
See the documentation on how to use this tool: https://espeasy.readthedocs.io/en/lates ... nload-tool
Re: GPIO's for SonOff THR320D
ESP Easy Flasher 0.04.007, not that antique or maybe ..This one seems to date from way before there even existed ESP32 units
esptool v0.4.12 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
ESP8266/ESP32 build and upload helper tool
If I download
ESPEasy_ESP82xx_mega-20220809.zip
and extract ESP_Easy_Falsher as well as esptool I'm receiving the same version .. where's my mistake?
Re: GPIO's for SonOff THR320D
no change unfortunately:then reboot your PC and try again
######2022-11-02######
#######0.04.007#######
######FLASH INFO######
BIN file: ESP_Easy_mega_20221030_normal_ESP32_4M316k.factory.bin
COM port: (COM3) USB-SERIAL CH340 (Port_#0001.Hub_#0006)
Baud rate: 115200
######POST FLASH######
No post flash information entered...
######FLASH LOG######
[esptool.exe -vv -cd nodemcu -cb 115200 -cp COM3 -ca 0x00000 -cf "O:\Computer Elektronik\ESPEasy\20221030_ESP32\bin\ESP_Easy_mega_20221030_normal_ESP32_4M316k.factory.bin"]
[02.11.2022 18:21:21] esptool v0.4.12 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
[02.11.2022 18:21:21] setting board to nodemcu
[02.11.2022 18:21:21] setting baudrate from 115200 to 115200
[02.11.2022 18:21:21] setting port from to COM3
[02.11.2022 18:21:21] setting address from 0x00000000 to 0x00000000
[02.11.2022 18:21:21] espcomm_upload_file
[02.11.2022 18:21:21] espcomm_upload_mem
[02.11.2022 18:21:21] setting serial port timeouts to 1000 ms
[02.11.2022 18:21:21] opening bootloader
[02.11.2022 18:21:21] resetting board
[02.11.2022 18:21:21] trying to connect
[02.11.2022 18:21:21] flush start
[02.11.2022 18:21:21] setting serial port timeouts to 1 ms
[02.11.2022 18:21:21] setting serial port timeouts to 1000 ms
[02.11.2022 18:21:21] flush complete
[02.11.2022 18:21:21] espcomm_send_command: sending command header
[02.11.2022 18:21:21] espcomm_send_command: sending command payload
[02.11.2022 18:21:21] read 0, requested 1
[02.11.2022 18:21:21] trying to connect
[02.11.2022 18:21:21] flush start
[02.11.2022 18:21:21] setting serial port timeouts to 1 ms
[02.11.2022 18:21:21] setting serial port timeouts to 1000 ms
[02.11.2022 18:21:21] flush complete
[02.11.2022 18:21:21] espcomm_send_command: sending command header
[02.11.2022 18:21:21] espcomm_send_command: sending command payload
[02.11.2022 18:21:21] espcomm_send_command: receiving 4 bytes of data
[02.11.2022 18:21:21] trying to connect
[02.11.2022 18:21:21] flush start
[02.11.2022 18:21:21] setting serial port timeouts to 1 ms
[02.11.2022 18:21:21] setting serial port timeouts to 1000 ms
[02.11.2022 18:21:21] flush complete
[02.11.2022 18:21:21] espcomm_send_command: sending command header
[02.11.2022 18:21:21] espcomm_send_command: sending command payload
[02.11.2022 18:21:21] espcomm_send_command: receiving 4 bytes of data
[02.11.2022 18:21:21] espcomm_send_command: receiving 4 bytes of data
[02.11.2022 18:21:21] espcomm_send_command: receiving 4 bytes of data
[02.11.2022 18:21:21] espcomm_send_command: receiving 4 bytes of data
[02.11.2022 18:21:21] espcomm_send_command: receiving 4 bytes of data
[02.11.2022 18:21:21] espcomm_send_command: receiving 4 bytes of data
[02.11.2022 18:21:21] espcomm_send_command: receiving 4 bytes of data
[02.11.2022 18:21:21] espcomm_send_command: receiving 4 bytes of data
[02.11.2022 18:21:21] Uploading 1390192 bytes from O:\Computer Elektronik\ESPEasy\20221030_ESP32\bin\ESP_Easy_mega_20221030_normal_ESP32_4M316k.factory.bin to flash at 0x00000000
[02.11.2022 18:21:21] erasing flash
[02.11.2022 18:21:21] size: 153670 address: 000000
[02.11.2022 18:21:21] first_sector_index: 0
[02.11.2022 18:21:21] total_sector_count: 340
[02.11.2022 18:21:21] head_sector_count: 16
[02.11.2022 18:21:21] adjusted_sector_count: 324
[02.11.2022 18:21:21] erase_size: 144000
[02.11.2022 18:21:21] espcomm_send_command: sending command header
[02.11.2022 18:21:21] espcomm_send_command: sending command payload
[02.11.2022 18:21:21] setting serial port timeouts to 15000 ms
[02.11.2022 18:21:21] read 0, requested 1
[02.11.2022 18:21:21] setting serial port timeouts to 1000 ms
[02.11.2022 18:21:21] warning: espcomm_send_command: didn't receive command response
[02.11.2022 18:21:21] warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
[02.11.2022 18:21:21] closing bootloader
[02.11.2022 18:21:21] flush start
[02.11.2022 18:21:21] setting serial port timeouts to 1 ms
[02.11.2022 18:21:21] setting serial port timeouts to 1000 ms
[02.11.2022 18:21:21] flush complete
[02.11.2022 18:21:21] error: espcomm_upload_mem failed
[2022-11-02 18:21:21] DONE! BUT WITH (1) ERRORS!
############################
[2022-11-02 18:21:21] The COM port was already in use... the post-flash did not complete.
[2022-11-02 18:21:21] JOB COMPLETED, over and out!
Re: GPIO's for SonOff THR320D
That tool has some known flaws, by not recognizing all types of COM ports, and also not flashing all types of ESP32 units...
As said before, please use the Espressif flash download tool, also available in that release you downloaded, as that does flash ESP32 units as intended.
/Ton (PayPal.me)
Re: GPIO's for SonOff THR320D
Let me correct that: The ESPEasy flasher tool does not support flashing ANY ESP32 chip.
Re: GPIO's for SonOff THR320D
I now flashed all the three factory-bin's, and everytime the tablet can connect to the device's WiFi (looks like Android has had changes here, too), however, I dont' manage to get the device out of 'ap mode':
Warning: Connected via AP
Can't connect to the device with the IP shown, obviously
Warning: Connected via AP
Can't connect to the device with the IP shown, obviously
Re: GPIO's for SonOff THR320D
You did reconnect the tablet to the regular WiFi Access Point (AP), I assume? (I always have to do that manually)
The AP doesn't get auto-disconnected after the WiFi of the ESP is configured, only after the last connected client of the AP is disconnected, the AP will be stopped.
And the newly assigned IP is only available on the WiFi AP the ESP is now connected to as a client, there is no internal routing between the AP and STA (client) networks.
The AP doesn't get auto-disconnected after the WiFi of the ESP is configured, only after the last connected client of the AP is disconnected, the AP will be stopped.
And the newly assigned IP is only available on the WiFi AP the ESP is now connected to as a client, there is no internal routing between the AP and STA (client) networks.
/Ton (PayPal.me)
Re: GPIO's for SonOff THR320D
Yes, tablet manually connected to 'standard' WIFi again.
Router is showing same IP address for new ESP device as the device itself.
Router is showing same IP address for new ESP device as the device itself.
Re: GPIO's for SonOff THR320D
What is the exact build you installed (.bin filename)?
/Ton (PayPal.me)
Re: GPIO's for SonOff THR320D
those three:
ESP_Easy_mega_20221030_normal_ESP32_4M316k.factory.bin
ESP_Easy_mega_20221030_normal_ESP32_4M316k_ETH.factory.bin
ESP_Easy_mega_20221030_normal_ESP32_4M316k_LittleFS.factory.bin
Flash Tool:
flash_download_tool_3.9.3
E.g.
ESP_Easy_mega_20221030_normal_ESP32_4M316k.factory.bin
ESP_Easy_mega_20221030_normal_ESP32_4M316k_ETH.factory.bin
ESP_Easy_mega_20221030_normal_ESP32_4M316k_LittleFS.factory.bin
Flash Tool:
flash_download_tool_3.9.3
E.g.
Re: GPIO's for SonOff THR320D
I have been working on those wifi connect/disconnect issues today (especially on ESP32)
You can try this test build: https://github.com/letscontrolit/ESPEas ... 3395425378
Or you can connect via serial (115200 baud rate) to the ESP and enter the WiFi credentials manually:
Then reboot the unit and it should connect to your WiFi.
The things fixed in this build:
- WiFi events were not processed well, especially the ones when the ESP is running in AP mode to configure it
- On the Setup page, the CSS would not load
- When changing/entering the WiFi credentials during initial setup, it would take over 10 minutes before the ESP would try to connect. (that's why I suggest to reboot after entering the credentials via serial using the build on your node)
You can try this test build: https://github.com/letscontrolit/ESPEas ... 3395425378
Or you can connect via serial (115200 baud rate) to the ESP and enter the WiFi credentials manually:
Code: Select all
wifissid,YourWiFiSSID
wifikey,YourSecretWiFiPassword
save
The things fixed in this build:
- WiFi events were not processed well, especially the ones when the ESP is running in AP mode to configure it
- On the Setup page, the CSS would not load
- When changing/entering the WiFi credentials during initial setup, it would take over 10 minutes before the ESP would try to connect. (that's why I suggest to reboot after entering the credentials via serial using the build on your node)
Re: GPIO's for SonOff THR320D
It works, thx!
Tried to access the DS18B20 temperature sensor on GPIO25 quickly, but received 0.00 readings.
Have to take a closer look I guess.
Tried to access the DS18B20 temperature sensor on GPIO25 quickly, but received 0.00 readings.
Have to take a closer look I guess.
Re: GPIO's for SonOff THR320D
Is GPIO-25 on this unit I/O or only output?
Re: GPIO's for SonOff THR320D
Good question but how could I know
Re: GPIO's for SonOff THR320D
Add a switch task and see if its state switches when you connect the pin to GND or 3V3.
Re: GPIO's for SonOff THR320D
If I connected the PIN's properly (no RJ45 jack available at the moment) non of the GPIO's 1 .. 25 change it's state when data is connected to GND or 3V3.
But honestly I can't even get a reading of 3V3 when attaching the multimeter.
But honestly I can't even get a reading of 3V3 when attaching the multimeter.
Re: GPIO's for SonOff THR320D
I have ordered these (and received them a few days ago)
But have not yet found the time to look into these. So right now I have no idea whether you need to toggle something to enable something on these pins.
I also ordered the Dallas sensor for these, so I should be able to see some activity then.... I hope.
But have not yet found the time to look into these. So right now I have no idea whether you need to toggle something to enable something on these pins.
I also ordered the Dallas sensor for these, so I should be able to see some activity then.... I hope.
Re: GPIO's for SonOff THR320D
might be GPIO27 as due to https://templates.blakadder.com/sonoff_THR320D.html
GPIO27 Output Hi
GPIO27 Output Hi
Re: GPIO's for SonOff THR320D
confirmed: /control?cmd=gpio,27,1 gives a temperature reading
Your soft is awesome
Your soft is awesome
Re: GPIO's for SonOff THR320D
Now comes the software part:
if I, e.g., would like to check the sensor's temperature every 5seconds, would you say I leave the 3V3 ON all time or should I switch it ON/off for every reading?
How would you implement detecting a rising temperature ..
if I, e.g., would like to check the sensor's temperature every 5seconds, would you say I leave the 3V3 ON all time or should I switch it ON/off for every reading?
How would you implement detecting a rising temperature ..
Re: GPIO's for SonOff THR320D
I can't see a reason to turn off the power for the sensor with that small interval, as the low power consumption of the sensor isn't going to burn your budget. Burning CPU cycles for turning it on and off could be more expensive...
/Ton (PayPal.me)
Re: GPIO's for SonOff THR320D
there seems to be something more .. as the temperature sensor has gone again.
GPIO's so far:
GPIO,19,1 + GPIO,22,0 -> 'big' relay OFF (seems to be inverted) 19,0+22,1 gives the noisy 'clack' + AC on L Out)
GPIO,4,1 'small' relay ON
GPIO,13,1 // right LED green OFF
GPIO,15,1 // mid LED blue OFF
GPIO,16,1 // left LED red OFF
GPIO's so far:
GPIO,19,1 + GPIO,22,0 -> 'big' relay OFF (seems to be inverted) 19,0+22,1 gives the noisy 'clack' + AC on L Out)
GPIO,4,1 'small' relay ON
GPIO,13,1 // right LED green OFF
GPIO,15,1 // mid LED blue OFF
GPIO,16,1 // left LED red OFF
Re: GPIO's for SonOff THR320D
no idea anymore, posting a screen of when it used to work, maybe that'll help later
- Attachments
-
- ITworkED.png (272.62 KiB) Viewed 17207 times
Re: GPIO's for SonOff THR320D
Maybe easier to start monitoring the pins using the "monitor" command.
Then you can simply see each pin state on the pin state buffer (link on tools page)
You can also see the events in the log when monitor is enabled for these pins.
See: https://espeasy.readthedocs.io/en/lates ... r#commands
Do you have a resistor between data and 3V3?
Maybe the Dallas task should also be re-init when the GPIO-27 was pulled down?
The sensor my need some re-init if it was powered down.
See for the resistor: https://espeasy.readthedocs.io/en/lates ... e-pictures
Then you can simply see each pin state on the pin state buffer (link on tools page)
You can also see the events in the log when monitor is enabled for these pins.
See: https://espeasy.readthedocs.io/en/lates ... r#commands
Do you have a resistor between data and 3V3?
Maybe the Dallas task should also be re-init when the GPIO-27 was pulled down?
The sensor my need some re-init if it was powered down.
See for the resistor: https://espeasy.readthedocs.io/en/lates ... e-pictures
Re: GPIO's for SonOff THR320D
Saw the manual for the resistor, thx, but somehow didn't dare to cut the only one I have at the moment - maybe also as I expected the device to have one integrated and me doing something stupid.
How could I re-init the Dallas task? Disabling/enabling resp. rebooting with GPIO27 set to 1 on boot didn't do.
How could I re-init the Dallas task? Disabling/enabling resp. rebooting with GPIO27 set to 1 on boot didn't do.
Re: GPIO's for SonOff THR320D
you can give the commands
taskdisable,N
taskenable,N
With N being the task index as shown on the Devices page.
You can also try to enable the internal pull-up resistor on that pin on the Hardware tab.
Both on GPIO 27 and 25
taskdisable,N
taskenable,N
With N being the task index as shown on the Devices page.
You can also try to enable the internal pull-up resistor on that pin on the Hardware tab.
Both on GPIO 27 and 25
Re: GPIO's for SonOff THR320D
internal pull-up resistor activated for GPIO27 .. as the Dallas one seem to not own one on its device's tab.
taskdis/enable:
456730: EVENT: Clock#Time=Mon,17:04
456878: ACT : taskdisable,27
456883: ACT : TaskEnable,27
457318: EVENT: TaskExit#ttt=27,0
457329: EVENT: TaskInit#ttt=27,0
475373: static_file: /esp.css
475456: WD : Uptime 8 ConnectFailures 0 FreeMem 201864 WiFiStatus WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
475772: static_file: /favicon.ico
temperature reading still 0.00 unfortunately .. somehow believing I have to cut my own RJ9 to connect multimeter e.a.
taskdis/enable:
456730: EVENT: Clock#Time=Mon,17:04
456878: ACT : taskdisable,27
456883: ACT : TaskEnable,27
457318: EVENT: TaskExit#ttt=27,0
457329: EVENT: TaskInit#ttt=27,0
475373: static_file: /esp.css
475456: WD : Uptime 8 ConnectFailures 0 FreeMem 201864 WiFiStatus WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
475772: static_file: /favicon.ico
temperature reading still 0.00 unfortunately .. somehow believing I have to cut my own RJ9 to connect multimeter e.a.
Re: GPIO's for SonOff THR320D
Does your task 27 enable GPIO 27 to a 1 level? In your last screenshot GPIO27 was on task 22 and the DS18b20 on 23.
Maybe you should just send the gpio,27,1 command to turn GPIO 27 on.
Maybe you should just send the gpio,27,1 command to turn GPIO 27 on.
/Ton (PayPal.me)
Re: GPIO's for SonOff THR320D
GPIO 27 is just for powering the sensor.
Data is GPIO-25 as far as I understood.
So you need to enable the pull-up to GPIO-25.
En put GPIO-27 to "output high"
Only the pull-up isn't strong enough to power the Dallas sensor (at least how I think it is connected electrically)
These "boot states" on the Hardware tab are done before the plugins are initialized.
On top of that you can also place this in the rules:
Data is GPIO-25 as far as I understood.
So you need to enable the pull-up to GPIO-25.
En put GPIO-27 to "output high"
Only the pull-up isn't strong enough to power the Dallas sensor (at least how I think it is connected electrically)
These "boot states" on the Hardware tab are done before the plugins are initialized.
On top of that you can also place this in the rules:
Code: Select all
on System#Boot do
GPIO,27,1
endon
Re: GPIO's for SonOff THR320D
loosing track, I have to admit ..
(super silly, I know ..)
(super silly, I know ..)
- Attachments
-
- GPIO27-OutputHI.png (8.02 KiB) Viewed 17131 times
Re: GPIO's for SonOff THR320D
Can you measure the voltage on the 3V3 pin?
Perhaps it is slightly less than 3V3 and then some Dallas sensors may not like it?
Also to make sure this pin 27 isn't inverted or something like that (e.g. you need to set it to "0" to output 3V3)
Perhaps it is slightly less than 3V3 and then some Dallas sensors may not like it?
Also to make sure this pin 27 isn't inverted or something like that (e.g. you need to set it to "0" to output 3V3)
Re: GPIO's for SonOff THR320D
I meanwhile rasped my own RJ9 jack, not super good but should do.
left and right pins are 3V3 and GND or the other way round, depending on how you look at it. The multimeter gives a correct display of 3.341V.
If I connect data and GND or data and 3V3 nothing changes, output in the device's tab remains at 0.00
I just wonder: was it by accident that it worked for let's say half an hour or am I do something wrong now ..
left and right pins are 3V3 and GND or the other way round, depending on how you look at it. The multimeter gives a correct display of 3.341V.
If I connect data and GND or data and 3V3 nothing changes, output in the device's tab remains at 0.00
I just wonder: was it by accident that it worked for let's say half an hour or am I do something wrong now ..
Re: GPIO's for SonOff THR320D
I erased and flashed the device again with HEAD_1f690ef version (20221104) ..
Warning: Connected via AP ..
Groundhog day?
Warning: Connected via AP ..
Groundhog day?
Re: GPIO's for SonOff THR320D
This?:
Ath wrote: ↑04 Nov 2022, 20:02 You did reconnect the tablet to the regular WiFi Access Point (AP), I assume? (I always have to do that manually)
The AP doesn't get auto-disconnected after the WiFi of the ESP is configured, only after the last connected client of the AP is disconnected, the AP will be stopped.
And the newly assigned IP is only available on the WiFi AP the ESP is now connected to as a client, there is no internal routing between the AP and STA (client) networks.
/Ton (PayPal.me)
Re: GPIO's for SonOff THR320D
Yes, ESP Easy Hotspot and setting up credentials for normal WiFi worked fine again.
I put my mobile to flight mode, restarted the Sonoff but no connection possible. Some half hour later I checked with my mobile and the ESP hotspot was still available and the device willing to connect in AP mode
I put my mobile to flight mode, restarted the Sonoff but no connection possible. Some half hour later I checked with my mobile and the ESP hotspot was still available and the device willing to connect in AP mode
Who is online
Users browsing this forum: No registered users and 0 guests