logo elektroda
logo elektroda
X
logo elektroda

OpenBK on roller shutter switch: Communication with TuyaMCU and control programming

housertelmstein 1299 4
ADVERTISEMENT
Treść została przetłumaczona german » english Zobacz oryginalną wersję tematu
  • #1 20716234
    housertelmstein
    Level 3  
    Hi,

    I have flashed OpenBK on my shutter switch and found out the GPIO config. So I can control everything. What I'm still struggling with is the autoexec.bat

    How can I communicate with the TuyaMCU and how can I program a rule that prevents relay 2 from being switched on when relay 1 is switched on?

    I would be grateful for any information.

    Greetings Silas
  • ADVERTISEMENT
  • #2 20717196
    p.kaczmarek2
    Moderator Smart Home
    On the subject of shutter control, we have a good example of a configuration developed by our English-speaking user:
    https://www.elektroda.com/rtvforum/topic3972935.html
    The above example is based on scripts, we have not yet written a special controller in C, but we plan to create one. This controller also ensures that two relays are not switched on at the same time.

    As far as the autoexec.bat is concerned, it is worth taking a look at our examples:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md
    In general, all the documentation from here is helpful:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/README.md
    We also have documentation of the commands:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
    Every entry from the documentation also links to the forum via the search engine, so you can find more information on Elektroda.

    As far as TuyaMCU is concerned, there were two topics:
    https://www.elektroda.de/rtvforum/topic3983631.html
    https://www.elektroda.de/rtvforum/topic3985009.html
    In addition, we will soon publish a general tutorial on this topic, and try to translate it into German, but in general it is worth looking here:
    https://www.elektroda.com/rtvforum/find.php?q=linkTuyaMCUOutputToChannel
    https://www.elektroda.com/rtvforum/find.php?q=tuyaMcu_defWiFiState
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20718113
    housertelmstein
    Level 3  
    Hi,

    Thank you for the answer. It has helped me a lot. I have now successfully flashed the 2nd device! Unfortunately, I now have the problem that the child lock is active:-(


    Has anyone got any ideas on how I can deactivate it?

    According to Tuya IOT, pressing a physical button (4x) within 5 seconds should deactivate the child lock on switches; unfortunately it doesn't work or I'm doing it wrong.

    Is it perhaps possible to send a command via TuyaMCU?

    Best regards
    Silas
  • ADVERTISEMENT
  • #4 20718347
    p.kaczmarek2
    Moderator Smart Home
    Do you mean the parental control integrated in OBK? If so, open Config and then Flags, search for the lock flag and deactivate it.

    I recommend reading the documentation on the flags:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/flags.md


    Fragment of a configuration flags table from OpenBK7231T, featuring the child lock button option.

    Or is it the Tuya child lock that runs on the TuyaMCU? If so, you must send the corresponding variable with the specified value, type and dpID. For this, tuyaMcu_sendState is used:
    
    tuyaMcu_sendState	[dpID][dpType][dpValue]
    

    You can find out more here:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
    Do you know the dpID and type of the variable you want to change?
    Helpful post? Buy me a coffee.
  • #5 20718516
    housertelmstein
    Level 3  
    Hi
    Thanks for the quick reply. It was the flags!!!

    Thanks again for the help and the general work of openBK and the forum!!! TOP!
    I will also try to contribute something in the future!

    Greetings Silas
ADVERTISEMENT