Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shitf595 dynamic device count #22543

Merged

Conversation

jziolkowski
Copy link
Contributor

Description:

Related issue (if applicable): fixes #

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.8
  • The code change is tested and works with Tasmota core ESP32 V.3.1.0.241117
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@barbudor
Copy link
Contributor

What if not all your relays are on the 595 ?
Like if you have a display which has an on/off on the same device ?

@arendst
Copy link
Owner

arendst commented Nov 24, 2024

Once I receive my 595 based relay board I will look at the code, haven’t seen it yet, and make it work like the mcp23xxx one with virtual relays.

@barbudor
Copy link
Contributor

@arendst Which board have you ordered ?

@jziolkowski
Copy link
Contributor Author

@jziolkowski
Copy link
Contributor Author

What if not all your relays are on the 595 ? Like if you have a display which has an on/off on the same device ?

That's why I reference devices_present in the condition. Since to my knowledge GPIO-configured relays take precedence over drivers, that should be enough to check if the driver can add more relays (especially that if used together with PCF and MCP which have lower driver number and I assume will bump the devices_present counter before 595 init)

@jziolkowski
Copy link
Contributor Author

make it work like the mcp23xxx one with virtual relays.

What do you mean by that? Like a configurable driver, or being able to use only a part of the outputs?

@arendst
Copy link
Owner

arendst commented Nov 24, 2024

As said, I haven’t looked at the driver yet, but it should just add relays like extending normal gpuo relays. Come to think about it I may be misguided by the fact thaat the 595 driver only supports outputs. In that case forget my remarks.

@Noschvie
Copy link
Contributor

https://www.aliexpress.com/item/1005007370916864.html this one

this board uses an ESP8266, is there a board with an ESP32 too? Thanks!

@jziolkowski
Copy link
Contributor Author

jziolkowski commented Nov 24, 2024

https://www.aliexpress.com/item/1005007370916864.html this one

this board uses an ESP8266, is there a board with an ESP32 too? Thanks!

@Noschvie
Short answer: no.

I replaced it with an ESP32-C3-12F. But I did that because I need ESP32 with its 16 shutters support.

If you want to only have a ton of relays, you're fine with ESP8266

@barbudor
Copy link
Contributor

barbudor commented Nov 24, 2024

@Noschvie There are the Dingtian boards
Up to 32 inputs and 32 outputs but they are more expensives
https://www.aliexpress.com/item/1005007002132841.html

There's a Tasmota driver for it

Beware that if you want to flash Tasmota you need to tell them when ordering otherwise they ship with their own firmware and they blow the fuses to prevent reflashing.

Discussions on these boards : #16797

@jziolkowski
Copy link
Contributor Author

jziolkowski commented Nov 24, 2024

16 vs 32 relays, tho

yea nvm i'm blind as usual

@barbudor
Copy link
Contributor

barbudor commented Nov 24, 2024

8, 16 or 32 relays

32: https://www.aliexpress.com/item/1005007014656093.html

@jziolkowski
Copy link
Contributor Author

37312343mm

wow... almost 40cm.

@arendst
Copy link
Owner

arendst commented Nov 25, 2024

I'll merge this now.

@arendst arendst merged commit 3ab8727 into arendst:development Nov 25, 2024
59 checks passed
@jziolkowski jziolkowski deleted the shitf595_dynamic_device_count branch November 25, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants