logo elektroda
logo elektroda
X
logo elektroda

[Solved] Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method

smkassist 3504 33
ADVERTISEMENT
  • #1 20528489
    smkassist
    Level 4  
    So... I am new to this place.

    I have a tuya aubess mini smart switch (Belon2028N)

    And I have a 16 channel relay board from aliexpress:
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method

    I also have some electronic junk that's useful for something.

    I managed to flash OpenBK on the tuya module and it's working well, but the module has only around 9 IO pins...

    My idea: use some shift registers, create 16 channels in the module and output these channels status sequentially so the shift registers can control all the relays.
    Is this possible? Is there any script that could help?
  • ADVERTISEMENT
  • Helpful post
    #2 20528766
    p.kaczmarek2
    Moderator Smart Home
    Hello, I have did a similiar thing in the past with I2C port expander that provides up to 16 GPIO able to drive relays.
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    I2C port expanders are cheap:
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    And they are already supported.

    Still, I can make that work for you with a shift register as well. Which approach do you prefer?
    Helpful post? Buy me a coffee.
  • #3 20529270
    smkassist
    Level 4  
    Thanks for the reply.
    Do you have any thread about using those i2c modules?

    Still, I would really like to have an option using the shift registers...
    You see: I am Brazilian and the new president and his friends fucked up importing things from China for everyone. Shift registers I can buy for cheap in any electronics components store...
    And I think that would be a cool option since using shift registers there's theoretically no limit to the number of outputs using only three IO in the processor
  • Helpful post
    #4 20529378
    p.kaczmarek2
    Moderator Smart Home
    I can create an example with shift register for you, which one shift register are you buying?
    Helpful post? Buy me a coffee.
  • #5 20529380
    smkassist
    Level 4  
    I have some of 74hc595

    And the relay board is active low
  • ADVERTISEMENT
  • Helpful post
    #6 20529426
    p.kaczmarek2
    Moderator Smart Home
    It seems that I have them in stock:
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    Yes, here it is:
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    I will try to get it running with OBK. Please remind me tomorrow if I forget.
    Helpful post? Buy me a coffee.
  • #7 20529430
    smkassist
    Level 4  
    Ok. Thanks.
    Is there any scripting examples for OBK?
    I would like to analyze some to see if I can make some custom scripts
    I know a little programming and I think it would be cool trying to make some custom codes for different modules
  • #8 20529763
    p.kaczmarek2
    Moderator Smart Home
    Hmm, have you visited our auto-generated docs MD page?
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/README.md
    What would you like to create?
    Helpful post? Buy me a coffee.
  • #9 20529785
    smkassist
    Level 4  
    I am thinking about multichannel modules ...
    I am studying the possibility of automating an entire home with only one smart module...
    Tomorrow I plan on explaining better my plan, when I am in my shop with some of the modules I already have ..

    I already made another thread about using RF 433Mhz modules...
    Other things I am studying are:
    I2C, UART, or other types of serial communication multichannel PWM controllers (for LED strips and dimmers)
    Sending IR signals (to control TVs, and other devices that use IR sensors)
    Using multiple buttons in one ADC (I already saw a thread talking about this one)
    I am thinking about other options that might be useful while using the limited I/O I have in the Tuya module...

    Later I will get some photos of what I have and explain better...
  • #10 20530051
    p.kaczmarek2
    Moderator Smart Home
    Yes, it should be possible to use one WiFi module to control lots of relays, but keep in mind that you will need a better power supply to driver those relays.

    Let's do one feature at time.

    I will look into that RF later, remind me if I forget.

    For now, I am testing 74hc595:



    So far hardcoded blink, but I will add a channels remap to 74HC595 now.

    One 74HC595 has 8 outputs, but multiple 74HC595 can be chained. Are you going to chain 2 of them to get 16 IO?
    Helpful post? Buy me a coffee.
  • #11 20530169
    smkassist
    Level 4  
    Yes. I understand the need for a power supply that matches the usage of my modules...
    Doing one feature at a time is the way to go when making this kind of system.
    At this moment I am going to chain just two registers... But I think it would be a good feature if we could chain more.

    I am going to have a general look in openBK source to see if I assimilate how it works... And if I figure it out I could even help coding some of the features I'm throwing here
    I didn't see much of the documentation on the system too... But I imagine I could help with it too if you want
  • #12 20530215
    p.kaczmarek2
    Moderator Smart Home
    You can easily fork OpenBeken and get it running with Github online builds on your fork. You don't even have to compile on your PC. It's very easy, you're welcome to help.

    Currently port shift out function is working on 32 bit integer, so we can have 4 registers chained together

    I have working basic driver, but only for a single register. Tomorrow I will add support to multiple ones.

    There is a slight issue with HTML page style:
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    The current config approach for driver is following:
    
    // startDriver ShiftRegister [DataPin] [LatchPin] [ClkPin] [FirstChannel] [Order] [TotalRegisters]
    startDriver ShiftRegister 24 6 7 10 1 1
    // If given argument is not present, default value is used
    // First channel is a first channel that is mapped to first output of shift register.
    // The total number of channels mapped is equal to TotalRegisters * 8, because every register has 8 pins.
    // Order can be 0 or 1, MSBFirst or LSBFirst
    
    // To make channel appear with Toggle, please also set the type:
    setChannelType 10 Toggle
    setChannelType 11 Toggle
    setChannelType 12 Toggle
    setChannelType 13 Toggle
    setChannelType 14 Toggle
    setChannelType 15 Toggle
    setChannelType 16 Toggle
    setChannelType 17 Toggle
    

    More details tomorrow.

    What would you like to know when it comes to source code? Do you know that OBK runs on Windows as well?
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    Helpful post? Buy me a coffee.
  • #13 20530245
    smkassist
    Level 4  
    Since you told it can run in Windows... My first step would be setting it in my Windows machine. The I would figure your style of programming so I can keep the same style of code in my additions.

    Assuming you are using C or C: You could set port shift to use a byte pointer so it could be used in any size the user wants.

    I discovered OpenBK yesterday half an hour before going home, so I only managed to flash it in my module and didn't really get in the git page yet... Today is a holiday and I had to do the family visiting thing, so I am really limited in my studying. All my electronic and programming stuff is in my shop and I will only come back Thursday... So I will try to read what I can during the weekend so I can get to the shop and start doing hardware tests and building a decent PCB to house the shift registers and fix them in the relay board input.

    Added after 9 [minutes]:

    >>20530215 I saw that you set the command: startDriver ShiftRegister [DataPin] [LatchPin] [ClkPin] [FirstChannel] [Order] [TotalRegisters]

    I think it would be better if you set the number of channels instead of the number of registers. Or set the start and end channels... Like: startDriver ShiftRegister [DataPin] [LatchPin] [ClkPin] [FirstChannel] [last channel][order] Or startDriver ShiftRegister [DataPin] [LatchPin] [ClkPin] [FirstChannel] [TotalChannels] [order]

    Also, it should have a parameter to set it to active high or active low. Or can I set this in the channels individually?

    Imagine if I have just 6 channels... It should be simpler to manage this way, I think.

    And like in the relay board I am using: it is active low... So a parameter for that should be a good option
  • #14 20530381
    p.kaczmarek2
    Moderator Smart Home
    smkassist wrote:

    Assuming you are using c or c++:
    You could set port shift to use a byte pointer so it could be used in any size the user wants.

    It's C, and it's of course possible. I just have a habit of doing everything as simple as possible because OBK is multiplatform now and so platforms are limited by available flash size. I am trying to reduce the number of instructions in the binary ,etc.

    smkassist wrote:

    I think it would be better if you set the number of channels instead of the number of registers.
    Or set the start and end channels...
    Like:
    startDriver ShiftRegister [DataPin] [LatchPin] [ClkPin] [FirstChannel] [last channel][order]
    Or
    startDriver ShiftRegister [DataPin] [LatchPin] [ClkPin] [FirstChannel] [TotalChannels] [order]

    Hmm okay I will think about that, the number of registers was for the sake of simplicity, because when shifting out, the number of bits has to be a multiply of 8, and when user gives a number of shift register chips, it's easier to calculate.

    smkassist wrote:

    Also, it should have a parameter to set it to active high or active low. Or can I set this in the channels individually?

    Is there a need to have per-bit swap flags? A global one could be added in a much more simple way.

    There is still a lot of memory left on BK7231 platforms, but on WinnerMicro, which has only 1 MB flash, and on BL602 seemingly as well, we are pretty limited. Soon we will have to use the approach common in other firmwares and just create separate builds with separate features.

    I have pushed a basic version:
    https://github.com/openshwprojects/OpenBK7231...mmit/1d5a00fe82d2cffac96e81d37cf43e86cbc38e1c
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #15 20530675
    smkassist
    Level 4  
    I think a global bit swap is enough... Keeps the code simple too
  • #16 20531528
    smkassist
    Level 4  
    So. I got some time to talk about my project.

    Some time ago I bought some units of this tuya module: tuya aubess mini smart switch (Belon2028N). I used some of them in my shop for testing and they work well.
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    Then, one day, I got a lightning strike in one of the external lights that were using the module and it fried.
    So, last week I decided to analyse the damage and it turns out just the power supply part of the board is gone, and the wifi chip still works fine.
    I decided to remove the wifi module from the relay board and tried to power it and it worked and I figured it had some IO not being used in the original board.
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    So I googled for some hacking for its chip (BL2028N). That's when I got to the OpenBK guide for the module
    Since I had one of those 16 channel relay boards laying around, I thought of reprogramming the tuya wifi module to drive it.
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    But tuya module hadn't enough IO and I remembered of the shift registers... That's when I started this thread.

    I was thinking about starting a project using ESP32 to drive the relay board using home assistant and RF controller, but I think OpenBK plus the module from tuya is going to be a better and easier option.

    @pkaczmarek262 You mentioned the possibility to run OpenBK in windows. Is there a guide for that?
    Nevermind. I found the git page for building

    Added after 1 [hours] 8 [minutes]:

    So. I started trying to build it and I already see some missing important information on the guide:
    First:
    new_builtin_devices.c - this file is needed for building and VS gave me a missing file error... I saved a blank file and it stopped.
    Second:
    windows debug build uses SDL - I am familiar with the lib but it is not installed in my actual system. I will setup SDL in my machine and see if there's something else missing in the guide[/align]

    Added after 6 [minutes]:

    Third:
    Glut lib is being used too

    Added after 12 [minutes]:

    Fourth:
    Native File Dialog lib[/quote]

    Added after 3 [minutes]:

    Fifth:
    Libdevil...

    Added after 2 [hours] 8 [minutes]:

    So... I managed to set all those dependencies, but I still have some problems to compile the windows test version.
    looks like you linked some files that are in paths that are not in the project folder...
    I got some undefined symbol errors and some files in solution manager are with the missing icon.
    I inspected those files and they are referenced to paths outside of the project folder... So I don't have them...

    Quote:
    dd.c
    ethernetif.c
    main.c
    mqtt.c
    mqtt.h
    multi_button.c
    multi_button.h
    net_param.c
    net_param_pub.h
    sockets.c
    tcp.c

    I tried finding those files manually and had no success...
    Maybe there's something set differently in your system?

    Added after 43 [minutes]:

    That's the dependency OpenBK7231T...
  • #17 20531606
    p.kaczmarek2
    Moderator Smart Home
    Hello, sorry for the late reply, but it's 8AM morning in my country and I was sleeping earlier.

    I can upload all dependencies to separate repository to make it easier, if you need it.

    The important part is here:
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    You need to select Win32 build. This is because the posted list of files are not needed for Win32. They were just included in project for a reference.

    Added after 48 [seconds]:

    See how it looks for me:
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    they are excluded from build

    Added after 1 [minutes]:

    On windows, MQTT from Beken SDK is not used:
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    Windows has separate MQTT stub that works with Winsock (non-blocking sockets, single threaded):
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    Helpful post? Buy me a coffee.
  • #18 20532018
    smkassist
    Level 4  
    So. I think I got all the right dependencies:
    Freeglut
    LibDevil
    NFD
    SDL

    VS is not asking for include or lib files anymore.
    But it still throws me some errors:
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
  • ADVERTISEMENT
  • #19 20532035
    p.kaczmarek2
    Moderator Smart Home
    Hmm can I just push the dependencies to the separate Github repository and let you use that? It will be faster, I think.
    Helpful post? Buy me a coffee.
  • #20 20532072
    smkassist
    Level 4  
    let's try that.
    If it works I'll try to figure out what went wrong in my setup later.
  • #21 20532101
    p.kaczmarek2
    Moderator Smart Home
    1. Get this repo:
    https://github.com/openshwprojects/OpenBK7231T_App
    2. Get this repo:
    https://github.com/openshwprojects/obkSimulator/
    3. Copy content of "simulator" to base dir from previous repo
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    Make sure that "libs_for_simulator" are in the same dir that vcxproj is
    4. build project - select Win32 build
    Helpful post? Buy me a coffee.
  • #22 20532130
    smkassist
    Level 4  
    Severity Code Description Project File Line Suppression State
    Error LNK1104 cannot open file 'nfd_d.lib' openBeken_win32_mvsc2017 C:leyedOpenBK_devOpenBK7231T_App-mainLINK 1

    copying nfd_d.lib from the build I tried resolved the issue

    trying to figure the gui now
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method

    In the setup there's some self test errors too:
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method

    at the end localhost is working and i have OpenBK to manage.
    Finally it works. Thanks
  • #23 20532156
    p.kaczmarek2
    Moderator Smart Home
    There are tools bound to key 1, 2, 3, etc. Unfortunatelly there is no readme about it yet, and no icons for tools. I can try to write one today or tomorrow for you. In general, official release of simulator is on our TODO list. We are hoping to create a simulator tutorial for our Youtube channel someday:
    https://www.youtube.com/@elektrodacom
    I will push shift register update today or tomorrow.

    Can you tell me how do you get self test errors? I can see they relate to addClockEvent self test, but how? I tested right now and I get no self test errors.
    Helpful post? Buy me a coffee.
  • #24 20532166
    smkassist
    Level 4  
    I understand you made this tool, right?
    The number for the tools is 1 through 7.
    There's no component for simulating shift register yet

    those self test errors appear as soon as the compilation is done... Before the SDL window starts
  • #25 20532301
    p.kaczmarek2
    Moderator Smart Home
    Yes, I made OpenBeken and I made the simulator. It's my tool used to speed up development of OpenBeken.

    I don't get self test errors, so it's strange, it's worth investigating, but maybe we can do it later.

    There is no shift register component in the simulator indeed, but you can still play around with all other features of OBK, including MQTT and Hass Discovery. And you can test how scripts behave, etc.

    And of course ShiftRegister driver is still running on Windows, so you can put breakpoints, etc, to debug and check how it works. It's very useful for the development.
    Helpful post? Buy me a coffee.
  • #26 20532729
    smkassist
    Level 4  
    I think those self test errors are not really important for now... The system seems to be running ok. I see that the simulator part is coded in C. I am reviewing the code and I think I can be useful with it.
  • #27 20532809
    p.kaczmarek2
    Moderator Smart Home
    I would really want to know why those self test errors happen. Maybe somehow your build is missing "addClockEvent" function?

    The main idea of the simulator is to help speed up testing, development and debugging. Most of the issues we encounter are multiplatform and happen even on windows. Only a very tiny fraction of problems is BK7231-specific. That's why we can benefit from running OBK on Windows.

    The ShiftRegister can now handle up to 4 registers, it should work well, although I haven't yet changed the number of registers to number of channels. I think that it doesn't give us much difference, especially that we have 64 channels (as far as I know) and I can't imagine a scenario where someone must use non-multiply-of-8 number of channels with shift register because he's running out of channels.... but maybe later I will change it, you can also do the change if you want (open a pull request).
    It seems to work well:




    I also saw your topic about RF addon, I will look into it.

    What else can I do for you now? Is there any other peripheral you've got in mind?

    Added after 30 [minutes]:

    I am looking into why HTML breaks:
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method

    Added after 7 [minutes]:

    EDIT: I have improved HTML a bit:
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    Helpful post? Buy me a coffee.
  • #28 20533112
    smkassist
    Level 4  
    I am focused on your simulator right now. I can try to track those errors and explain them to you later.
    About the number of registers, I think it's not a really important change. The way it's working seems to be exactly what I had in mind when I started the thread.

    About the RF:
    I used my free time this weekend to understand better the usage of IR and RF and I concluded that the coding and encoding of them is practically the same.
    I didn't really test the IR option of OpenBK yet. But if it clones the remote codes like I've seen some Arduino examples I think I understand it.
    So, I think that turning the already existing IR in the system into a "remote-IR" and a "remote-RF", using mostly the same functions could be the way to go. It would be simple and wouldn't generate much more code

    Added after 9 [minutes]:

    Other than the RF integration, I think that's all for now.
    I am thinking of making some type of manager for Gate opening motors, but it's priority 0 right now...
    Maybe make a module to replace the entire board with some extra options, or simply sending the RF signal to mimic its RF remote... But it's just a popped idea with no importance for now
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
  • #29 20533238
    p.kaczmarek2
    Moderator Smart Home
    How is simulator working for you? Have you experienced any bugs? Any feedback is welcome.

    I submitted some Obk Sim examples:
    https://github.com/openshwprojects/obkSimulat...mmit/82037eb517c2bfcf49e9b53c83d6291cd5282592

    Our IR tries to mimic Tasmota behaviour. You can see an example here:



    I don't know about RF behaviour. We would need to look how Tasmota handles it, I assume that it would require a single GPIO and some kind of driver. Probably an interrupt-based one, It's on my TODO list.

    My clock has IR receiver:
    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method
    
    
    
    startDriver MAX72XX
    MAX72XX_Setup 0 1 26
    startDriver NTP
    startDriver MAX72XX_Clock
    ntp_timeZoneOfs 2
    
    alias my_ledStrip_off SendGet http://192.168.0.200/cm?cmnd=POWER%20OFF
    alias my_ledStrip_plus SendGet http://192.168.0.200/cm?cmnd=backlog%20POWER%20ON;add_dimmer%2010
    alias my_ledStrip_minus SendGet http://192.168.0.200/cm?cmnd=backlog%20POWER%20ON;add_dimmer%20-10
    alias main_switch_off SendGet http://192.168.0.159/cm?cmnd=POWER%20OFF
    alias main_switch_on SendGet http://192.168.0.159/cm?cmnd=POWER%20ON
    
    alias my_send_style_cold SendGet http://192.168.0.210/cm?cmnd=backlog%20CT%20153;%20POWER%20ON
    alias my_send_style_warm SendGet http://192.168.0.210/cm?cmnd=backlog%20CT%20500%20POWER%20ON
    alias my_send_style_red SendGet http://192.168.0.210/cm?cmnd=backlog%20color%20FF0000%20POWER%20ON
    alias my_send_style_green SendGet http://192.168.0.210/cm?cmnd=backlog%20color%2000FF00%20POWER%20ON
    alias my_send_style_blue SendGet http://192.168.0.210/cm?cmnd=backlog%20color%200000FF%20POWER%20ON
    alias my_send_style_plus SendGet http://192.168.0.210/cm?cmnd=backlog%20POWER%20ON;add_dimmer%2010
    alias my_send_style_minus SendGet http://192.168.0.210/cm?cmnd=backlog%20POWER%20ON;add_dimmer%20-10
    
    // 1
    addEventHandler2 IR_Samsung 0x707 0x4 my_ledStrip_off
    // 2
    addEventHandler2 IR_Samsung 0x707 0x5 my_ledStrip_plus
    // 3
    addEventHandler2 IR_Samsung 0x707 0x6 my_ledStrip_minus
    // 4
    addEventHandler2 IR_Samsung 0x707 0x8 main_switch_off
    // 5
    addEventHandler2 IR_Samsung 0x707 0x9 main_switch_on
    // 6
    addEventHandler2 IR_Samsung 0x707 0xA startScript autoexec.bat next_light_style
    // 7
    addEventHandler2 IR_Samsung 0x707 0xC my_send_style_plus
    // 8
    addEventHandler2 IR_Samsung 0x707 0xD my_send_style_minus
    
    // stop autoexec execution here
    return
    
    // this is function for scrolling light styles
    next_light_style:
    
    // add to ch 10, wrap within range [0,5]
    addChannel 10 1 0 5 1
    
    // start main switch
    //main_switch_on
    
    if $CH10==0 then my_send_style_cold
    if $CH10==1 then my_send_style_warm
    if $CH10==2 then my_send_style_red
    if $CH10==3 then my_send_style_green
    if $CH10==4 then my_send_style_blue
    
    Helpful post? Buy me a coffee.
  • #30 20533292
    smkassist
    Level 4  
    From my research, RF receiver sets its data pin the same way IR receiver data pin.

    When receiving data, it sends the data through the data pin and the processor decodes it to a specific code that's bound to the pressed button... Really simple. I think it's even possible to just use your IR mode directly. Connecting RF data pin to where it would be the IR data pin.

    The simulator seems to be working well. I am tracking the functions to draw things in the code so I can modify some things I see might be better. I had some issues with its resolution (my pc uses 1090x1080) but I found the line that sets the SDL resolution and changed it to fit my case.

    The simulation surface is being rendered with an offset that makes part of it render outside my screen but I am already working around it too.

    Using Tuya Aubess Mini Smart Switch (Belon2028N) with 16-Channel Relay Board: Shift Register Method [

    Info tool was listing subshapes index from 0 to last-1 and I changed the code so it's from 1 to last too.

    Self-test error continues to appear every time I start the simulator. But nothing crashes or gets a strange behavior.

    just to be sure: Which one is the root file for the simulator? Is it "sim_sdl.cpp"?

    also: I think it would be a good practice to close this thread and start another to discuss the simulator, since shift register is done.

Topic summary

The discussion revolves around integrating a Tuya Aubess Mini Smart Switch (Belon2028N) with a 16-channel relay board using shift registers. The user successfully flashed OpenBK firmware onto the Tuya module but faced limitations due to the limited number of IO pins. Suggestions included using I2C port expanders or shift registers, with a preference for the latter due to local availability. The 74HC595 shift register was identified as a suitable component for expanding IO capabilities. The conversation included technical details on wiring, scripting examples for OpenBK, and the potential for chaining multiple shift registers to control more outputs. The user also expressed interest in exploring other communication protocols and automation possibilities for home systems.
Summary generated by the language model.
ADVERTISEMENT