Dingtian IOT Relay
Moderators: grovkillen, Stuntteam, TD-er
Dingtian IOT Relay
Season Greetings !!
I bought one of these a few days ago
https://www.aliexpress.com/item/4001232 ... 4c4dIETQ8P
A board with either 2+2, 4+4 or 8+8 IOs, WiFi, LAN. and/or either RS485 or CAN, supports Http, Https, MQTT, CoAP has Domoticz plugin and an extensive how-to Home Assistant support.
Initially those boards came with an STM processor + LAN chip and used an ESP-O1 for wifi.
In the last hardware revision both have been replaced by an ESP32 + LAN chip
I got the 8 I/O version (8xRelays + 8xInputs) but there are also 2 SPI chips (1 for the 8xOUT and another for the 8xIN) most likely due to the GPIO count of the ESP32 is less than the previously used STM
The so called SDK from the manufacturer is here :
http://www.dingtian-tech.com/sdk/
The User Manual (in the .zip) goes in depth about all aspects.
At a first glance seems to be a product targeted to "our crowd" well priced for what it does out of the box.
Of course ESPEasy is our goal, so in the next couple of days will see what needs to be supported before flashing it.
Time for some turkey left overs
I bought one of these a few days ago
https://www.aliexpress.com/item/4001232 ... 4c4dIETQ8P
A board with either 2+2, 4+4 or 8+8 IOs, WiFi, LAN. and/or either RS485 or CAN, supports Http, Https, MQTT, CoAP has Domoticz plugin and an extensive how-to Home Assistant support.
Initially those boards came with an STM processor + LAN chip and used an ESP-O1 for wifi.
In the last hardware revision both have been replaced by an ESP32 + LAN chip
I got the 8 I/O version (8xRelays + 8xInputs) but there are also 2 SPI chips (1 for the 8xOUT and another for the 8xIN) most likely due to the GPIO count of the ESP32 is less than the previously used STM
The so called SDK from the manufacturer is here :
http://www.dingtian-tech.com/sdk/
The User Manual (in the .zip) goes in depth about all aspects.
At a first glance seems to be a product targeted to "our crowd" well priced for what it does out of the box.
Of course ESPEasy is our goal, so in the next couple of days will see what needs to be supported before flashing it.
Time for some turkey left overs
-D
Re: Dingtian IOT Relay
Hmm strange board.
Ethernet alone does need quite a lot of pins on an ESP32, so if it needs only an ESP-01 then I wonder what is running on that large chip next to the lan chip.
There are pictures too of a version with an ESP32 on it, which looks like it might be easy to make it work in ESPEasy.
But the one for ESP-01 is very likely not going to work without an incredible amount of work.
Ethernet alone does need quite a lot of pins on an ESP32, so if it needs only an ESP-01 then I wonder what is running on that large chip next to the lan chip.
There are pictures too of a version with an ESP32 on it, which looks like it might be easy to make it work in ESPEasy.
But the one for ESP-01 is very likely not going to work without an incredible amount of work.
Re: Dingtian IOT Relay
The version I have is the ESP32 one. As quoted on the image as "Version 2" (the one on the right)TD-er wrote: ↑25 Dec 2021, 21:27 Hmm strange board.
Ethernet alone does need quite a lot of pins on an ESP32, so if it needs only an ESP-01 then I wonder what is running on that large chip next to the lan chip.
There are pictures too of a version with an ESP32 on it, which looks like it might be easy to make it work in ESPEasy.
But the one for ESP-01 is very likely not going to work without an incredible amount of work.
This is ESP32 only (no STM, no ESP-01) therefore I assume they used the SPI chips for the 8+8 GPIOs
-D
Re: Dingtian IOT Relay
Hmm apparently they ship at random either a version with ESP32 or the 8-pin header for an ESP-01.
You can't select the one with ESP32 to be shipped.
From an ESPEasy point of view, only the ESP32 version could be useful.
You can't select the one with ESP32 to be shipped.
From an ESPEasy point of view, only the ESP32 version could be useful.
Re: Dingtian IOT Relay
Those are the 8 x Input and 8 x output chips. We support those ?
- Attachments
-
- Pinout-74HC595-Shift-Register.png (18.22 KiB) Viewed 35525 times
-
- Pinout-74HC165-Shift-Register.png (174.22 KiB) Viewed 35525 times
-D
Re: Dingtian IOT Relay
74hc595 and 74HC165 are shift register chips, not really a GPIO extender.
Not supported though.
Those can be useful, but are rather tricky to use.
For example if you want to update 1 output you may need to rewrite all of them, depending on their current state.
This means they may toggle their state during update.
They can also be used to store a burst of serial bits, but I doubt that's how they are connected.
Not supported though.
Those can be useful, but are rather tricky to use.
For example if you want to update 1 output you may need to rewrite all of them, depending on their current state.
This means they may toggle their state during update.
They can also be used to store a burst of serial bits, but I doubt that's how they are connected.
Re: Dingtian IOT Relay
For those shift registers there was a request a couple of months back, and if we add that, also the 74HC151 series of input registers should be considered (there is already a start in the Playgound) (thought they do not have much resemblance, other than also being shift registers but then for input )
These output shift registers are latched, so the state has to be kept in memory to be able to update a single output, and all outputs are updated simultaneously after the data is shifted in.
These output shift registers are latched, so the state has to be kept in memory to be able to update a single output, and all outputs are updated simultaneously after the data is shifted in.
/Ton (PayPal.me)
Re: Dingtian IOT Relay
While investigation the possible use of 74HC595, a couple of months back, I already found this Arduino library (OSS) that supports these chips quite comfortably.
/Ton (PayPal.me)
Re: Dingtian IOT Relay
I would like to see hoe these are being used in this board first.
So if you can dig up some schematic, that would be the first step I guess.
So if you can dig up some schematic, that would be the first step I guess.
Re: Dingtian IOT Relay
Information from Dingtian direct
Hope this helps with the implementation
- Attachments
-
- 8ch_pinout.png (31.12 KiB) Viewed 35222 times
-D
Re: Dingtian IOT Relay
Hmm the one that seems a bit scary is GPIO-0.
A reset pin on the ethernet interface is very welcome, but that can also be done via a pwr pin
Not sure if it is essentially the same.
If not, then it might be a bit problematic to flash these units as the eth module does easilly take 100 mA if powered.
This may be too much for most USB flash boards.
A reset pin on the ethernet interface is very welcome, but that can also be done via a pwr pin
Not sure if it is essentially the same.
If not, then it might be a bit problematic to flash these units as the eth module does easilly take 100 mA if powered.
This may be too much for most USB flash boards.
Re: Dingtian IOT Relay
Hello, do somebody has news on this topic ?
I'm also wondering if this board could be used with ESP Easy.
I'm also wondering if this board could be used with ESP Easy.
Re: Dingtian IOT Relay
See the progress on the support for the shift registers used on this board: https://github.com/letscontrolit/ESPEasy/pull/3917
So even though Ton doesn't have such a board (yet?), nor those chips, he still managed to make a very usable plugin for it.
So even though Ton doesn't have such a board (yet?), nor those chips, he still managed to make a very usable plugin for it.
Re: Dingtian IOT Relay
Does this plugin support the 74HC165 as well ?TD-er wrote: ↑24 Jan 2022, 11:48 See the progress on the support for the shift registers used on this board: https://github.com/letscontrolit/ESPEasy/pull/3917
So even though Ton doesn't have such a board (yet?), nor those chips, he still managed to make a very usable plugin for it.
Shall I try to flash the sample on hand or is it not time for this yet ?
-D
Re: Dingtian IOT Relay
Didn't order the board, and probably won't as you can't select having the ESP32 version explicitly (it's not even listed on their site ), and that's the only one I'd want (though it is a bit pricey).
Do have a 74HC595 chip laying around, and can obtain a 74HC165 easily, so, OK, I'll bite, I'll reserve Plugin ID P129 for the Input - 74HC165 Shiftregisters, and create a plugin for that soon.
/Ton (PayPal.me)
Re: Dingtian IOT Relay
No, the 74HC595 plugin is for output only.
Yes, if you can test your board with P126, I'm very interested in your findings.
/Ton (PayPal.me)
Re: Dingtian IOT Relay
This will be going over UART, so will require an ETH-factory.bin that I can not locate in the plugin's Actions builds ?
-D
Re: Dingtian IOT Relay
The factory bin file is included with every ESP32 build, so you can just pick the TEST_E build (or MAX if the ESP has 16 MB Flash), with _ETH in the name.
Just download the Binaries.zip file from here: https://github.com/letscontrolit/ESPEas ... 1737088879
/Ton (PayPal.me)
Re: Dingtian IOT Relay
I got in touch with "dtwonder Store" on Aliexpress regarding the random delivery between v1 or v2 of the board. They explained that if we send them a message, they will send v2.
Of course if it's not the case, I believe you're just out of luck, and not sure you could expect an exchange...
Of course if it's not the case, I believe you're just out of luck, and not sure you could expect an exchange...
- Attachments
-
- aliexpress-relay-board-esp32.png (30.62 KiB) Viewed 34372 times
-
- Normal user
- Posts: 10
- Joined: 17 Feb 2022, 20:49
Re: Dingtian IOT Relay
Now serial is loopping:
rst:0x10 (RTCWDT_RTC_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57
Trying next with stronger 3.3V source..
Re: Dingtian IOT Relay
If no previous install of ESPEasy was flashed on the device, then it might be helpful to first flash blank_4MB.bin onto it, and after that has succeeded, flash the factory.bin you mentioned.
It might find incompatible configuration data during boot in places that are not overwritten by a normal flash write/update action.
It might find incompatible configuration data during boot in places that are not overwritten by a normal flash write/update action.
/Ton (PayPal.me)
-
- Normal user
- Posts: 10
- Joined: 17 Feb 2022, 20:49
Re: Dingtian IOT Relay
Erase, blank_4MB.bin, factory.bin. Same problem.
esptool verify_flash passes ok.
esptool verify_flash passes ok.
Re: Dingtian IOT Relay
Does that error persist after a power-cycle? Sometimes the reboot doesn't work as intended
/Ton (PayPal.me)
-
- Normal user
- Posts: 10
- Joined: 17 Feb 2022, 20:49
Re: Dingtian IOT Relay
IO0 is used by LAN (RMII_RST) so I tend to believe my failed attempts are due to this
https://docs.espressif.com/projects/esp ... ction.html
Steven's (Dingtian guy) exact words were :
"...For current relay board in your hand, it cannot support develop and program to your firmware by UART..."
I now, after many failed attempts, tend to believe he knows what he is talking about but I am still wondering what he does in his driver the get away with it ?
https://docs.espressif.com/projects/esp ... ction.html
Steven's (Dingtian guy) exact words were :
"...For current relay board in your hand, it cannot support develop and program to your firmware by UART..."
I now, after many failed attempts, tend to believe he knows what he is talking about but I am still wondering what he does in his driver the get away with it ?
-D
-
- Normal user
- Posts: 10
- Joined: 17 Feb 2022, 20:49
Re: Dingtian IOT Relay
Looks like the LAN crystal is connected to GPIO-0.
But then there must be another pin on the ESP to delay starting the LAN (or the crystal) or else the ESP will boot in flash mode about half of the time.
Maybe you can also pull down that pin?
Not sure how the crystal is connected to GPIO-0.
Some would include a resistor in series, so you can pull down the pin without pulling down the crystal clock output too hard.
But then there must be another pin on the ESP to delay starting the LAN (or the crystal) or else the ESP will boot in flash mode about half of the time.
Maybe you can also pull down that pin?
Not sure how the crystal is connected to GPIO-0.
Some would include a resistor in series, so you can pull down the pin without pulling down the crystal clock output too hard.
Re: Dingtian IOT Relay
But Steven's software design works in this hardware setup.
I have been meaning to remove the ESP32 and flash it as a standard unit, then solder it back but not found the time yet.
I think once the node is initialized apart from the main PCB, then it will boot as expected.
I have been meaning to remove the ESP32 and flash it as a standard unit, then solder it back but not found the time yet.
I think once the node is initialized apart from the main PCB, then it will boot as expected.
-D
Re: Dingtian IOT Relay
But I think that's not needed.
As long as you can prevent the external crystal for the LAN adapter to start, you can flash it.
Maybe hard short circuit GPIO-0 and GND (or use a 470 Ohm resistor to be sure) and then power it on.
This will turn the ESP into flash mode for sure.
You then need to remove (or disconnect) this short to boot into normal mode again.
ESP32 does act different on the state of GPIO 0 at boot, when power cycled or during a warm boot.
As long as you can prevent the external crystal for the LAN adapter to start, you can flash it.
Maybe hard short circuit GPIO-0 and GND (or use a 470 Ohm resistor to be sure) and then power it on.
This will turn the ESP into flash mode for sure.
You then need to remove (or disconnect) this short to boot into normal mode again.
ESP32 does act different on the state of GPIO 0 at boot, when power cycled or during a warm boot.
Re: Dingtian IOT Relay
Makes sense and will prove this point (or not).
Will try to make the time for this tomorrow.
Will try to make the time for this tomorrow.
-D
-
- Normal user
- Posts: 10
- Joined: 17 Feb 2022, 20:49
Re: Dingtian IOT Relay
Also after a power cycle?
Eventually you have to get it to boot, as there is a 50/50 chance it will boot with the GPIO-0 in a high state.
I assume you have flashed the "factory" build?
You can also try to flash a build from this pending PR: https://github.com/letscontrolit/ESPEasy/pull/3845
Those will have a new bootloader and the flash frequency is set to 40 MHz instead of 80 MHz.
Eventually you have to get it to boot, as there is a 50/50 chance it will boot with the GPIO-0 in a high state.
I assume you have flashed the "factory" build?
You can also try to flash a build from this pending PR: https://github.com/letscontrolit/ESPEasy/pull/3845
Those will have a new bootloader and the flash frequency is set to 40 MHz instead of 80 MHz.
-
- Normal user
- Posts: 10
- Joined: 17 Feb 2022, 20:49
Re: Dingtian IOT Relay
No luck. And yes, with a factory build. Tested both with and without ETH. Tested build with WT32-ETH01 -> ok.TD-er wrote: ↑21 Feb 2022, 20:19 Also after a power cycle?
Eventually you have to get it to boot, as there is a 50/50 chance it will boot with the GPIO-0 in a high state.
I assume you have flashed the "factory" build?
You can also try to flash a build from this pending PR: https://github.com/letscontrolit/ESPEasy/pull/3845
Those will have a new bootloader and the flash frequency is set to 40 MHz instead of 80 MHz.
Tested also simple Arduino serial program that works with WT32-ETH01. Both Arduino IDE and PlatformIO can flash the relay board.
Flashed all kind of projects with separate bootloader.bin and partitiontable.bin without success.
EDIT: What I'm trying to say is, whatever I flash to the relay unit, I get same error after power cycle.
I'll try PR..
-
- Normal user
- Posts: 10
- Joined: 17 Feb 2022, 20:49
Re: Dingtian IOT Relay
Tested pull/3845:TD-er wrote: ↑21 Feb 2022, 20:19 You can also try to flash a build from this pending PR: https://github.com/letscontrolit/ESPEasy/pull/3845
Those will have a new bootloader and the flash frequency is set to 40 MHz instead of 80 MHz.
esptool.exe --chip esp32 --port COM7 --baud 115200 write_flash 0x00000 ESPEasy\dist\bin\blank_4MB.bin
esptool.py v3.1
Serial port COM7
Connecting.....
Chip is ESP32-D0WD (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 94:xx:xx:xx:xx:xx
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x003fffff...
Compressed 4194304 bytes to 4086...
Wrote 4194304 bytes (4086 compressed) at 0x00000000 in 27.0 seconds (effective 1240.8 kbit/s)...
Hash of data verified.
esptool.exe --chip esp32 --port COM7 --baud 115200 write_flash 0x00000 ESPEasy\build_output\bin\ESP_Easy_mega_20220221_normal_ESP32_4M316k_ETH.factory.bin
esptool.py v3.1
Serial port COM7
Connecting...
Chip is ESP32-D0WD (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 94:xx:xx:xx:xx:xx
Stub is already running. No upload is necessary.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00142fff...
Compressed 1321808 bytes to 864828...
Wrote 1321808 bytes (864828 compressed) at 0x00000000 in 76.3 seconds (effective 138.6 kbit/s)...
Hash of data verified.
Power Cycle (IO0 pull down & programming header removed)
Power On
Serial cable attached:
rst:0x10 (RTCWDT_RTC_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
Re: Dingtian IOT Relay
Could it be that the fuses are set to only accept a signed bin file?
Not sure how to read the fuses using the esptool.py, but I've read about those fuses.
Simply put, if you flash a signed image, the next signed fuse (one time programmable bit) is burned.
If the nr of "signed" fuses is odd, then you can only boot a bin which is signed with the same key as the current one.
To remove this, you need to burn the next fuse.
Only you can do this a (very) limited number of times.
Not sure, but I think there are like 6 or 8 of those bits/fuses to burn.
Not sure how to read the fuses using the esptool.py, but I've read about those fuses.
Simply put, if you flash a signed image, the next signed fuse (one time programmable bit) is burned.
If the nr of "signed" fuses is odd, then you can only boot a bin which is signed with the same key as the current one.
To remove this, you need to burn the next fuse.
Only you can do this a (very) limited number of times.
Not sure, but I think there are like 6 or 8 of those bits/fuses to burn.
-
- Normal user
- Posts: 10
- Joined: 17 Feb 2022, 20:49
Re: Dingtian IOT Relay
DT-R008 Fuse summary
Code: Select all
espefuse.py v3.2
EFUSE_NAME (Block) Description = [Meaningful Value] [Readable/Writeable] (Hex Value)
----------------------------------------------------------------------------------------
Calibration fuses:
BLK3_PART_RESERVE (BLOCK0): BLOCK3 partially served for ADC calibration data = False R/W (0b0)
ADC_VREF (BLOCK0): Voltage reference calibration = 1121 R/W (0b00011)
Config fuses:
XPD_SDIO_FORCE (BLOCK0): Ignore MTDI pin (GPIO12) for VDD_SDIO on reset = False R/W (0b0)
XPD_SDIO_REG (BLOCK0): If XPD_SDIO_FORCE, enable VDD_SDIO reg on reset = False R/W (0b0)
XPD_SDIO_TIEH (BLOCK0): If XPD_SDIO_FORCE & XPD_SDIO_REG = 1.8V R/W (0b0)
CLK8M_FREQ (BLOCK0): 8MHz clock freq override = 52 R/W (0x34)
SPI_PAD_CONFIG_CLK (BLOCK0): Override SD_CLK pad (GPIO6/SPICLK) = 0 R/W (0b00000)
SPI_PAD_CONFIG_Q (BLOCK0): Override SD_DATA_0 pad (GPIO7/SPIQ) = 0 R/W (0b00000)
SPI_PAD_CONFIG_D (BLOCK0): Override SD_DATA_1 pad (GPIO8/SPID) = 0 R/W (0b00000)
SPI_PAD_CONFIG_HD (BLOCK0): Override SD_DATA_2 pad (GPIO9/SPIHD) = 0 R/W (0b00000)
SPI_PAD_CONFIG_CS0 (BLOCK0): Override SD_CMD pad (GPIO11/SPICS0) = 0 R/W (0b00000)
DISABLE_SDIO_HOST (BLOCK0): Disable SDIO host = False R/W (0b0)
Efuse fuses:
WR_DIS (BLOCK0): Efuse write disable mask = 388 R/W (0x0184)
RD_DIS (BLOCK0): Efuse read disable mask = 3 R/W (0x3)
CODING_SCHEME (BLOCK0): Efuse variable block length scheme
= NONE (BLK1-3 len=256 bits) R/W (0b00)
KEY_STATUS (BLOCK0): Usage of efuse block 3 (reserved) = False R/W (0b0)
Identity fuses:
MAC (BLOCK0): Factory MAC Address
= 94:3c:c6:9b:e1:5c (CRC 0xd8 OK) R/W
MAC_CRC (BLOCK0): CRC8 for factory MAC address = 216 R/W (0xd8)
CHIP_VER_REV1 (BLOCK0): Silicon Revision 1 = True R/W (0b1)
CHIP_VER_REV2 (BLOCK0): Silicon Revision 2 = False R/W (0b0)
CHIP_VERSION (BLOCK0): Reserved for future chip versions = 2 R/W (0b10)
CHIP_PACKAGE (BLOCK0): Chip package identifier = 1 R/W (0b001)
MAC_VERSION (BLOCK3): Version of the MAC field = 0 R/W (0x00)
Security fuses:
FLASH_CRYPT_CNT (BLOCK0): Flash encryption mode counter = 1 R/- (0b0000001)
UART_DOWNLOAD_DIS (BLOCK0): Disable UART download mode (ESP32 rev3 only) = False R/- (0b0)
FLASH_CRYPT_CONFIG (BLOCK0): Flash encryption config (key tweak bits) = 15 R/W (0xf)
CONSOLE_DEBUG_DISABLE (BLOCK0): Disable ROM BASIC interpreter fallback = True R/W (0b1)
ABS_DONE_0 (BLOCK0): Secure boot V1 is enabled for bootloader image = True R/W (0b1)
ABS_DONE_1 (BLOCK0): Secure boot V2 is enabled for bootloader image = False R/W (0b0)
JTAG_DISABLE (BLOCK0): Disable JTAG = True R/W (0b1)
DISABLE_DL_ENCRYPT (BLOCK0): Disable flash encryption in UART bootloader = True R/W (0b1)
DISABLE_DL_DECRYPT (BLOCK0): Disable flash decryption in UART bootloader = True R/W (0b1)
DISABLE_DL_CACHE (BLOCK0): Disable flash cache in UART bootloader = True R/W (0b1)
BLOCK1 (BLOCK1): Flash encryption key
= ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? -/-
BLOCK2 (BLOCK2): Secure boot key
= ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? -/-
BLOCK3 (BLOCK3): Variable Block 3
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
Flash voltage (VDD_SDIO) determined by GPIO12 on reset (High for 1.8V, Low/NC for 3.3V).
-
- Normal user
- Posts: 10
- Joined: 17 Feb 2022, 20:49
Re: Dingtian IOT Relay
Well, It seems that the chip is programmed in Release Mode with Secure Boot V1, Flash Encryption and Fuse Write protection set.
https://docs.espressif.com/projects/esp ... lease-mode
I'm giving up with original chip, going to replace it with a fresh one. Just ordered some ESP32-WROOM-32D chips and programmer with a socket.
https://docs.espressif.com/projects/esp ... lease-mode
I'm giving up with original chip, going to replace it with a fresh one. Just ordered some ESP32-WROOM-32D chips and programmer with a socket.
Re: Dingtian IOT Relay
While you're at it, order them with 16M flash
Re: Dingtian IOT Relay
I have replaced ESp32 by a new one on Dingtian IOT relay 8 and upload EPSEasy with Add 74HC595 Shiftregisters plugin. Somebody can explain me how work?
- Attachments
-
- ESPEasy1.PNG (53.76 KiB) Viewed 32357 times
Re: Dingtian IOT Relay
The pin configuration is shown here (above)
DS: GPIO 13
SH_CP: GPIO 14
ST_CP: GPIO 15
AFAIK, there is only 1 74HC595 on the board, so "Number of Chips: 1" seems correct.
After setting that up and enabling the plugin, you can use the commands as documented in the pull request. These commands can be entered in a rule, submitted from the Tools page or via a browser-url command to the ESP.
/Ton (PayPal.me)
Re: Dingtian IOT Relay
Hello, It's not easy to use rule on ESPeasy, but I try this sample and the output of 74hc595 doesn't high level.
Could you help me pleaseRe: Dingtian IOT Relay
Your syntax is incorrect, you can't do a compare on the value in the event definition.
Your event could look like:
This requires the Interval setting to be > 0 to generate the State_A event for the entree task.
But I don't understand what you want to achieve with that logic, maybe you can explain on what 'entree' condition all output pins on 'Sortie' should be set to high?
Your event could look like:
Code: Select all
on entree#State_A do
if %eventvalue1% < 0xFF // Hex numbers can be prefixed with 0x, binary with 0b
ShiftOut,SetAllHigh
endif
endon
But I don't understand what you want to achieve with that logic, maybe you can explain on what 'entree' condition all output pins on 'Sortie' should be set to high?
/Ton (PayPal.me)
Re: Dingtian IOT Relay
Merci pour la réponse, J'essaye de comprendre comment fonctionne cette carte relais et la fonction règle de l'ESPEasy. Le plus facile est d'actionner tous les relais, pour voir, mais les sorties du 74hc595 restent au niveau bas. Le log me dit qu'ils sont à 1. Je mets juste l'entrée 1 au 0 de la carte relais. Entree state_A passe à 0x3F
Re: Dingtian IOT Relay
Can you please respond in English, the common language on this forum is English (besides a few exceptions in the RFLink section).
I do not own this hardware board, so am unable to validate if it works, though previous reports have indicated successful use of these plugins.
A peculiarity is that both chips have their OE pin connected to the same GPIO, according to the pinout list in reply #10, can't see if you configured that for the 74HC165?
Have you configured both plugins to support the correct number of chips?
/Ton (PayPal.me)
Re: Dingtian IOT Relay
Looking at the logs there are several possible causes for the strange values:
- Are you using a sufficient power supply for the board? Powering that number of relays can draw quite some current, so when the power supply isn't powerful enough can cause the chips to not respond
- Are the inputs of the 74HC165 supplied with pull-up resistors? (10 kOhm should be fine) Else the inputs may have an undefined/floating state, especially then the power isn't stable
An answer to the previous questions is also appreciated.
- Are you using a sufficient power supply for the board? Powering that number of relays can draw quite some current, so when the power supply isn't powerful enough can cause the chips to not respond
- Are the inputs of the 74HC165 supplied with pull-up resistors? (10 kOhm should be fine) Else the inputs may have an undefined/floating state, especially then the power isn't stable
An answer to the previous questions is also appreciated.
/Ton (PayPal.me)
Re: Dingtian IOT Relay
Hello, with what did you describe the ESP 32 Wroom 32D bring nothing on it and what image?timokovanen wrote: ↑22 Feb 2022, 13:47 Well, It seems that the chip is programmed in Release Mode with Secure Boot V1, Flash Encryption and Fuse Write protection set.
https://docs.espressif.com/projects/esp ... lease-mode
I'm giving up with original chip, going to replace it with a fresh one. Just ordered some ESP32-WROOM-32D chips and programmer with a socket.
I can't bring it up (ESP32 DevKitC V4 with ESP32 WROOM 32D)
Greetings Otto
Re: Dingtian IOT Relay
You will have to do the initial flash of an ESP32 using the Espressif flash download tool as included in the ESPEasy Release download, and not the Esp.Easy.Flasher.exe. (You can also download the latest release from the Espressif site if desired)
Then you can select an ESP32 .bin file, that has '.factory.bin' as extension, as that includes the boot loader and partitioning of the unit, and it has to be flashed at address 0. (Later updates via the Update Firmware feature should use the .bin file without factory in it) The checkbox "DoNotChgBin" should be checked, the rest of the options can be left in the default state.
Depending on the board, either starting the flash will automatically enable the flash mode, or that should be manually enabled by holding the Boot button, and pressing the EN or Reset button shortly. After that the Boot button can be released.
The Start button in the Flash download tool can then be used to load the bin file on the ESP.
Once that's completed, the unit can be reset (or power cycled), and should boot ESPEasy, enabling the ESPEasy AP (you can use your smartphone, tablet or WiFi-enabled PC to connect to that AP, it can be named differently, but you'll recognize it when you see it) that you can log in to using the password: configesp
After that, you should be able to configure the WiFi AP the unit should connect to, so you can access it from your regular network connection.
/Ton (PayPal.me)
Re: Dingtian IOT Relay
Thanks,
I don't know what was wrong, I had 3 pieces, the first one took over half an hour to flash (I just let it continue) the others went straight away
Greetings Otto
I don't know what was wrong, I had 3 pieces, the first one took over half an hour to flash (I just let it continue) the others went straight away
Greetings Otto
Re: Dingtian IOT Relay
Sometimes, wiring is kind of critical, it seems to work, but in fact it only partially does.
Great it all worked out eventually.
Great it all worked out eventually.
/Ton (PayPal.me)
Re: Dingtian IOT Relay
Hey Otto
How did you flash this boards then? Did you have to replace the installed ESP32 or just the firmware?
Do you have a work around somewhere
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests