control 12 devices with EspEasy

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mjdb
New user
Posts: 3
Joined: 28 Apr 2020, 19:04

control 12 devices with EspEasy

#1 Post by mjdb » 28 Apr 2020, 19:10

I want to control 12 devices with one module/board using EspEasy.
Each device/switch should be used from Domoticz to turn on or off.
So I need a module with 12 usable GPIO ports that runs EspEasy.
Is this possible?
What module/board can be used for this purpose?

Marco de Bruijn

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

Re: control 12 devices with EspEasy

#2 Post by Ath » 28 Apr 2020, 19:38

This feels like a quiz :D

A NodeMcu V1 board does have quite a couple of available GPIO's, and it looks like it even provides 13, and an ESP32 has even more, and ESPEasy also allows for 32 devices on that chip.
Both boards allow for using GPIO extender boards via I2C like the MCP23017, that provide 16 GPIO's each on a single I2C address, and 8 can be connected, is that enough ports? :shock:
When using that extender, a mere ESP01S would be enough to control your 12 devices.
/Ton (PayPal.me)

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

Re: control 12 devices with EspEasy

#3 Post by TD-er » 29 Apr 2020, 01:44

Ath wrote: 28 Apr 2020, 19:38 [...]
When using that extender, a mere ESP01S would be enough to control your 12 devices.
Sure, but let's not suggest anyone to use an ESP01S in any new project :)
Although your statement is correct, those ESP01S ones are a pain to flash and upgrade.

mjdb
New user
Posts: 3
Joined: 28 Apr 2020, 19:04

Re: control 12 devices with EspEasy

#4 Post by mjdb » 29 Apr 2020, 10:43

Thank you for your reactions.

@Ath: You write 'it looks like it even provides 13'. So, you are not sure? I read that some pins (9 and 10) better should not be used. That is why I hope someone could 'testify' he/she has used a specific board before.

My shop suggests https://www.tinytronics.nl/shop/nl/comm ... nodemcu-v2, but they don't know about EspEasy.
Would this work with EspEasy (out of the box) and provide 12 useable outputs? On the picture I see connectors D0-D8 which make 9 GPIO's. There are also S00, S01, S02 and S03 pins. Can these be used as digital output pins?

About the MCP23017 extender. That looks like an interesting alternative. Does a MCP23017 work 'out of the box' with EspEasy? Since the ESP01S is discouraged, What board could I use?

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

Re: control 12 devices with EspEasy

#5 Post by TD-er » 29 Apr 2020, 11:21

mjdb wrote: 29 Apr 2020, 10:43 [...]
About the MCP23017 extender. That looks like an interesting alternative. Does a MCP23017 work 'out of the box' with EspEasy? Since the ESP01S is discouraged, What board could I use?
Sorry if I caused any confusion here.

The ESP01S is a very very small board, with just 8 pins including 2 for programming over serial, power and a reset.
So you can only use it for very specific use cases.

The NodeMCU you linked will work with ESPEasy just fine and it has an USB connector and 2 buttons to start with, so that's a very good choice to start with.

The extenders work by configuring a task to act as a GPIO pin connected to such an extender.
Support for it is included in all builds (except the ones labeled "minimal").

You cannot use all pins.
To see which ones can be used, see the documentation: https://espeasy.readthedocs.io/en/lates ... on-esp8266

N.B. the naming between braces (e.g. GPIO 5(D1)) is referring to the labels on the NodeMCU board next to the pins.

mjdb
New user
Posts: 3
Joined: 28 Apr 2020, 19:04

Re: control 12 devices with EspEasy

#6 Post by mjdb » 02 May 2020, 18:27

For everyone who is interested, this is what I have done.

I installed EspEasy on a ESP8266 NodeMCU V2. I connected a MCP23017 with two i2C wires. I connected 12 relay-ports to GPA0..GPA7 and GPB0..GPB3.

For Devices I selected "Swith input - MCP23017". Enabled: ON. First device(=GPA0): Port 1 (second device (=GPA1): port 2 etc. until 12 (=GPB3)). Send boot state: ON. Delay: 0. For the controller IDX I used the index-numbers from Domoticz:

In Domoticz I made twelve dummy devices. On-action: "http://10.0.1.122/control?cmd=MCPGPIO,x,1". Off-action: "http://10.0.1.122/control?cmd=MCPGPIO,x,0". Where the x is the Port-number on the MSP23017; so from 1 to 12.

This works. I can use twelve devices with EspEasy. By the way, this is also the max. Theoretically you can modify/compile EspEasy to use more then twelve devices, but in the manual this is discouraged.

Thanks everyone who gave input.

By the way... If someone has an idea to use more then twelve devices without compiling EspEasy I would like to hear it.

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

Re: control 12 devices with EspEasy

#7 Post by Ath » 02 May 2020, 20:10

mjdb wrote: 02 May 2020, 18:27 By the way... If someone has an idea to use more then twelve devices without compiling EspEasy I would like to hear it.
Well, that's quite easy, get an ESP32, ESPEasy allows 32 devices on that hardware :)
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 42 guests