Off-the-shelf HW with digital inputs

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Off-the-shelf HW with digital inputs

#1 Post by jgrad » 06 Apr 2022, 10:23

Hi,

does anybody know for a decent HW with optimal price which have multiple digital INPUT-s (opto isolated) and support (ESP chip onboard) for ESP EASY?

There are a lot of PCB boards on Aliexpress which have digital (relay outputs) and ESP chip onboard, but I havent seen any of them with digital inputs.

BR J.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Off-the-shelf HW with digital inputs

#2 Post by TD-er » 06 Apr 2022, 10:31

You could look at the products made by Shelly.
Please note that lately they seem to differentiate between "hacker friendly" and less "hacker friendly" devices.
The difference is how the enclosures are closed. Either clipped or glued.

sartam
Normal user
Posts: 40
Joined: 13 Mar 2022, 21:25

Re: Off-the-shelf HW with digital inputs

#3 Post by sartam » 07 Apr 2022, 07:15

Hello. If you do not find a suitable solution on the Internet, then in general this is a simple task for self-implementation. Provided that you are familiar with electronic circuits

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Off-the-shelf HW with digital inputs

#4 Post by jgrad » 07 Apr 2022, 08:00

@TDer, thanks for hint. I see that new i4 device seems to be suitable (price around 4EUR/input). Ordered one to check.

@sartam, even-though I am able to build such circuit by my own I rather take a deeper look to the market if something suitable is already available off-the-shelf.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Off-the-shelf HW with digital inputs

#5 Post by TD-er » 07 Apr 2022, 08:19

It seems to support Bluetooth & WiFi, so very likely it is an ESP32.
Please let me know as soon as you have one, which hardware it has and perhaps which GPIO pins are connected to the inputs, then we can document those units too.

sartam
Normal user
Posts: 40
Joined: 13 Mar 2022, 21:25

Re: Off-the-shelf HW with digital inputs

#6 Post by sartam » 08 Apr 2022, 04:46

@igrad, share the link, please.

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Off-the-shelf HW with digital inputs

#7 Post by jgrad » 08 Apr 2022, 09:39

I ordered shelly i4

https://shop.shelly.cloud/shelly-plus-i ... automation

product specification confirms that it uses ESP32. When I get it delivered I will report possibility to flash it with ESPEASY.

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Off-the-shelf HW with digital inputs

#8 Post by jgrad » 19 Apr 2022, 10:45

Hi, my Shelly i4 was delivered. i tried to setup it to deliver changes on inputs to local MQTT (mosquito) but no sucess.

I decided to flash it with ESPeasy - which precompiled BIN shall I use - is ESP_Easy_mega_20220328_normal_ESP32_4M316k-factory right one?

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Off-the-shelf HW with digital inputs

#9 Post by Ath » 19 Apr 2022, 10:49

Shelly seems to have it's product line updated with all kinds of 'plus' models, that use an ESP32 instead of an ESP8266, so if that i4 is a 'plus' then the bin you mention seems the most appropriate.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Off-the-shelf HW with digital inputs

#10 Post by TD-er » 19 Apr 2022, 11:06

Can you access the web interface of ESPEasy and have it connect to WiFi?
If so, then you have the correct bin regarding flash size and processor type.

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Off-the-shelf HW with digital inputs

#11 Post by jgrad » 25 Apr 2022, 09:25

I flashed shelly I4 with above mentioned bin file but after (seem so) successful flashing and reseting device does not establish WIFI AP.

tried multiple times but with no success. Any hints?

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Off-the-shelf HW with digital inputs

#12 Post by jgrad » 25 Apr 2022, 09:48

adding some pictures
IMG_3163.jpeg
IMG_3163.jpeg (394.49 KiB) Viewed 8452 times
IMG_3166.jpeg
IMG_3166.jpeg (291.66 KiB) Viewed 8452 times
IMG_3167.jpeg
IMG_3167.jpeg (303.4 KiB) Viewed 8452 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Off-the-shelf HW with digital inputs

#13 Post by TD-er » 25 Apr 2022, 12:35

Which flash tool do you use?
And if it is a command-line tool, like esptool.py, can you also show the complete command + output?
It is hard to read the exact ESP32 chip used, so maybe the output of esptool.py can give more info on this.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Off-the-shelf HW with digital inputs

#14 Post by TD-er » 25 Apr 2022, 12:38

Hmm found the ESP32-U4WDH mentoined in the datasheet (not the ESP32-U4DW):
• For ESP32 chips that contain an embedded flash or PSRAM, users need to note the logic level of MTDI. For
example, ESP32-U4WDH contains an embedded flash that operates at 3.3 V, therefore, the MTDI should be low
So apparently this is the ESP32 equivalent of the ESP8285, with embedded flash.

Do you know what Shelly states its flash size should be?

Edit:
See page 52 of the datasheet I linked.
The difference between the H and not H is that the H version is meant for high temperatures.
The ESP32-U4WDH is: Dual core (1) with 4 MB embedded flash (80 MHz)
However, there is an asterisk near "Dual core", which means:

(1) Effectively on December 2, 2021, ESP32-U4WDH is produced as dual-core instead of single core, see PCN-2021-021 for more details.

Only thing I don't know is whether some extra pins may not be touched/used since it now has embedded flash.
Also what may be an issue here is how it reacts to calls about information of the 2nd core.
I never had any single core ESP32, so I have never tested what may happen when running on a single core.
Maybe we just start our sketch on the wrong core????

Edit2:
Just reading through this PCN (product change note): https://www.espressif.com/sites/default ... %93%81.pdf
Apparently it was only supporting 160 MHz in the older design and is now supporting dual-core @240 MHz in the new design.
But it looks like you may have an older revision of that chip, which does require a different build to make it work. (date code week 45 of 2020)

Edit 3: Made an issue for it: https://github.com/letscontrolit/ESPEasy/issues/4020

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Off-the-shelf HW with digital inputs

#15 Post by jgrad » 25 Apr 2022, 15:18


TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Off-the-shelf HW with digital inputs

#16 Post by TD-er » 25 Apr 2022, 15:20

jgrad wrote: 25 Apr 2022, 15:18 I use flash tool mentioned here (https://espeasy.readthedocs.io/en/lates ... shing.html)
See also my edits, I already found out what's the problem here.
It is the silicon version of that ESP32 chip.

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Off-the-shelf HW with digital inputs

#17 Post by jgrad » 25 Apr 2022, 16:24

I saw your comments - seems that special version of ESP32 is used.

@TD_ER Do you thing that You can solve this just by creating new version of BIN?

If you will prepare it I can test it imediatelly.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Off-the-shelf HW with digital inputs

#18 Post by TD-er » 25 Apr 2022, 16:35

Yep, this is very likely something that can be changed in ESPEasy, however this is for sure not going to be done today as I'm working on other issues right now.

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Off-the-shelf HW with digital inputs

#19 Post by jgrad » 25 Apr 2022, 21:48

seems that also other Shelly PLUS devices uses ESP32-U4WD chip
https://www.youtube.com/watch?v=eLoOT3mXcMs

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Off-the-shelf HW with digital inputs

#20 Post by TD-er » 25 Apr 2022, 21:53

If these are new enough, then I don't see why ESPEasy will not work on them.

It is quite a strange design decision to add significant design changes to a product and not changing its model nr.

jgrad
Normal user
Posts: 92
Joined: 29 Aug 2016, 22:03
Location: Slovenia

Re: Off-the-shelf HW with digital inputs

#21 Post by jgrad » 16 May 2022, 22:13

@TD_ER have you been able to prepare special version of BIN which support single core ESP32 or this is planned to be part of next regular release?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Off-the-shelf HW with digital inputs

#22 Post by TD-er » 16 May 2022, 22:30

Not yet, and it will for sure take longer than the next 'nightly' build.
Problem is that I'm not sure what issues I might run into and I don't have any such board to test here.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 29 guests