2 ProMiniExtender on 1 ESP possible?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Tobi993
Normal user
Posts: 18
Joined: 08 Nov 2017, 08:03

2 ProMiniExtender on 1 ESP possible?

#1 Post by Tobi993 » 26 Dec 2017, 21:08

Hello all

At the moment I have an Arduino as o ProMiniExtender on a Wemos Board by I2C
At the PME Board I'm measuring Currents by SCT013 current sensors.
But 4 pieces are not enough.
Is it possible to connect 2 or 3 PMEs at one Wemos?

I have the PME I2C adress 0x7f and two ports, 90 and 100 for two sensors at the moment.

Thank you!

waaslandwolf
New user
Posts: 2
Joined: 06 Mar 2018, 10:05

Re: 2 ProMiniExtender on 1 ESP possible?

#2 Post by waaslandwolf » 06 Mar 2018, 10:08

I was wondering the same thing. Is it possible to daisy-chain multiple PME's to one ESP module?

The I²C bus allows daisy-chaining provided each PME has a unique I²C address, however I see no way to set an I²C address for each PME. I think the current soft assumes a single PME with a default I²C address?

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: 2 ProMiniExtender on 1 ESP possible?

#3 Post by toffel969 » 06 Mar 2018, 10:34

waaslandwolf wrote: 06 Mar 2018, 10:08 I was wondering the same thing. Is it possible to daisy-chain multiple PME's to one ESP module?

The I²C bus allows daisy-chaining provided each PME has a unique I²C address, however I see no way to set an I²C address for each PME. I think the current soft assumes a single PME with a default I²C address?
I think you can set the adress of the Pro Mini Extender in the ProMiniExtender Sketch for the Arduino, (check wire.begin)

The plugin must be modified in such a way, that the adress is selectable, maybe that can be carried over from other plug-ins
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

waaslandwolf
New user
Posts: 2
Joined: 06 Mar 2018, 10:05

Re: 2 ProMiniExtender on 1 ESP possible?

#4 Post by waaslandwolf » 06 Mar 2018, 11:33

Thanks for the quick reply. That would confirm that currently multiple, daisy-chained, PME's are not provisioned for in the current firmware.

I might attempt to modify the code to allow for this. Changing the PME sketch would be quite straightforward, only the I²C address should be changed. Modifying the ESPeasy code would be a bit more involved. The following would need to be modified:

- a way to select from multiple PME's. Perhaps the easiest way would be to keep the current hardware device selection (selecting the ProMini Expander), and within the configuration of this device add an address field which would allow addressing of an individual PME in a daisy-chained multiple PME scenario.
- an extension of the current PME port numbering scheme.
- The easiest would be to keep the current numbering scheme, so effectively each concurrent PME has the same port numbers. This would mean that any triggers adressing a certain PME would need to include a mechanism to select an individual PME (using the I²C address would be easiest).
- Alternatively one could imagine numbering all PME's ports' in a consecutive fasion using a sort of mapping so that the port addressing mechanism higher up doesn't need to be modified.

Does that make sense?

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: 2 ProMiniExtender on 1 ESP possible?

#5 Post by toffel969 » 06 Mar 2018, 19:03

waaslandwolf wrote: 06 Mar 2018, 11:33 Thanks for the quick reply. That would confirm that currently multiple, daisy-chained, PME's are not provisioned for in the current firmware.

I might attempt to modify the code to allow for this. Changing the PME sketch would be quite straightforward, only the I²C address should be changed. Modifying the ESPeasy code would be a bit more involved. The following would need to be modified:

- a way to select from multiple PME's. Perhaps the easiest way would be to keep the current hardware device selection (selecting the ProMini Expander), and within the configuration of this device add an address field which would allow addressing of an individual PME in a daisy-chained multiple PME scenario.
- an extension of the current PME port numbering scheme.
- The easiest would be to keep the current numbering scheme, so effectively each concurrent PME has the same port numbers. This would mean that any triggers adressing a certain PME would need to include a mechanism to select an individual PME (using the I²C address would be easiest).
- Alternatively one could imagine numbering all PME's ports' in a consecutive fasion using a sort of mapping so that the port addressing mechanism higher up doesn't need to be modified.

Does that make sense?
It probably makes sense to use same logic as with pcf and mcp i2c port expanders -->use a i2c adress to pin number table. Adress 1 --> D1 to d13, adress 2 d14 to d26) That would allow to keep old command set.
But otherwise makes sense
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

Post Reply

Who is online

Users browsing this forum: No registered users and 45 guests