logo elektroda
logo elektroda
X
logo elektroda

Touch glass 10-button light switch [SB3S] from Aliexpress - setup with Domoticz

Honsu 906 13
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 20803685
    Honsu
    Level 3  

    I bought a touch glass light switch from AliExpress
    link
    https://pl.aliexpress.com/item/10050058448255...t_main.29.17b71c24lgSfCF&gatewayAdapt=glo2pol
    I connected it with Domoticz using the plug.
    Domoticz found 7 buttons out of 10. One of the found switches does not work.
    Is there perhaps a way to make Domoticz department in all 10 buttons?
    Maybe there are already procedures for this type of switch to change the software to disconnect from the cloud?
    I mention that when switching all the switches switch in turn with a delay. Maybe due to the current capacity of the inverter.
    Is it possible in the alternative software to assign one of the buttons to light up e.g. 5 buttons?
    Touch switch PCB with ESP module and integrated circuit. Close-up of a touch light switch circuit board with a CB3S module. Touch panel with ten square buttons on a PCB. . 10-channel relay module with visible labels and components. Touch light switch circuit board with visible soldered components and screw terminals. Rear view of a glass touch WiFi light switch with technical label. @ElektrodaBot
  • ADVERTISEMENT
  • #2 20803691
    ElektrodaBot
    AI OpenAI ChatGPT4
    Honsu wrote:
    Hi,

    From your description, I understand that you are having trouble fully integrating the 10-button glass switch with your domoticz system. It seems that domoticz can only detect 7 of the 10 buttons and one of them is not working properly. Additionally, you notice some delay when switching all the lights.

    Based on this information, let me suggest some potential solutions:

    1. Upgrade the domoticz software: There may be a newer version of the software that better supports this particular type of switch. It is always a good idea to check its latest version.

    2. Review the configuration of your device in domoticz: Make sure you have configured the device correctly in domoticz. There may be some configuration that will allow all 10 buttons to be read.

    3. Use alternative software: There are many alternatives to domoticz that may better support this particular type of switch. Examples include Home Assistant, openHAB and Node-RED. Many of these tools have a wealth of resources and online communities that can help you set up your device.

    When it comes to the latency problem, this can be caused by a number of factors. It could be due to the limitations of the inverter, as you suggest, but it could also be due to network link limitations or delays in the software itself.

    When it comes to assigning one button to light 5 buttons, this is possible with many home automation systems, but the exact instructions will depend on the software you are using. In the case of domoticz, you will probably need to create a scene or group that contains these five buttons and then assign this scene or group to one of the buttons.

    I hope you find this information useful. If you have any more questions, please feel free to ask.
    You can call me in any topic by writing @ElektrodaBot. Disclaimer: Some answers provided by the ElektrodaBot may be inaccurate. Elektroda not responsible for accuracy, reliability or completeness of the information presented. All ElektrodaBot responses should be verified by the user. OpenAI can monitor and save information entered after calling ElektrodaBot.
  • ADVERTISEMENT
  • #3 20804364
    xury
    Automation specialist
    It will probably work with OpenBeken by colleague p.kaczmarek2 Read about how to change the software in CB3S.
    Probably because of the number of relays, it is not directly operated via the BK7231N pins - because that is the circuit there, but via TuyaMCU.
    After changing the software to OpenBeken, you only have to find which dpId correspond to which relays and map them in OpenBeken. Then using mqtt you can do whatever you want e.g. in Domoticz
    Perhaps someone has already done this before and the dpId are known.
    I recommend by changing to backup CB3S so that in case of emergency you can return to the original firmware.
  • ADVERTISEMENT
  • #4 20804744
    Honsu
    Level 3  

    So I have to read what the CB3S transmits to the TuyaMCU myself.
    Does the program to read is the TuyaMCU Analyzer?
    Do I read only the operation of the buttons or also the communication of establishing a network connection?
    Does the OpenBeken program have the possibility to handle some scripts. So that it turns off the switches after a certain period of time, for example.
    Or access to the source and handling of such an event in the code?
    In this switch the TuyaMCU processor has a burnt marking. Secret by secret.
  • #5 20809064
    Honsu
    Level 3  

    I have read the communication between the CPUTuya and the SB3S
    The button numbers are numbered from 1 to 6 and then from 102 to 105.
    How do I configure the alternative software?
  • #6 20810045
    Honsu
    Level 3  

    Can you help me create an autoexec.bat file for the OpenBeken platform? @ElektrodaBot
  • #7 20810052
    ElektrodaBot
    AI OpenAI ChatGPT4
    Honsu wrote:
    can you help me create an autoexec.bat file for the OpenBeken platform ?
    I understand that you want to create an `autoexec.bat` configuration file for the OpenBeken platform. OpenBeken is an open-source software project that allows you to flash and program devices based on Beken chips, which are widely used in low-cost IoT devices such as your glass touch switches.

    The `autoexec.bat` file, however, is not something you typically encounter in the context of OpenBeken or other IoT projects. The name `autoexec.bat` is a remnant of older systems, such as MS-DOS, where it was a batch file executed at system start-up.

    In the case of OpenBeken and similar projects, instead of `autoexec.bat`, start-up scripts or configuration files specific to the software that manages the device are usually configured. To create a suitable configuration file or script for OpenBeken, you would need to follow the OpenBeken project documentation.

    Here are some general steps you can take:

    1. Check the OpenBeken documentation : Look in the OpenBeken documentation for information on device configuration and boot scripts.

    2. Understand the device configuration : You need to understand what the configuration options are for your device, what options you have available and what the appropriate commands are for your case.

    3. Tailor the configuration to your needs : Based on this knowledge, tailor the configuration file to your device and needs.

    4. Test in a secure environment : Always test configuration changes on one device before deploying them on a larger scale.

    5. Seek help from the OpenBeken community : If you encounter difficulties, seek help from the OpenBeken community who may have experience with similar devices.

    If you need more detailed instructions, I will need more information about what exactly you want to achieve with the configuration file, what the specific requirements are for your device and what steps you have already taken. Once I have more data, I will be able to try to help you more specifically.
    You can call me in any topic by writing @ElektrodaBot. Disclaimer: Some answers provided by the ElektrodaBot may be inaccurate. Elektroda not responsible for accuracy, reliability or completeness of the information presented. All ElektrodaBot responses should be verified by the user. OpenAI can monitor and save information entered after calling ElektrodaBot.
  • ADVERTISEMENT
  • #8 20811276
    Honsu
    Level 3  

    I managed to get my 10 field switch working
    Programming in the device did not follow which prompted me to solder out. The programming of the soldered out chip went smoothly
    All switches are working.
    Configuration
    
    startDriver TuyaMCU
    setChannelType 1 toggle
    setChannelType 2 toggle
    setChannelType 3 toggle
    setChannelType 4 toggle
    setChannelType 5 toggle
    setChannelType 6 toggle
    setChannelType 7 toggle
    setChannelType 8 toggle
    setChannelType 9 toggle
    setChannelType 10 toggle
    linkTuyaMCUOutputToChannel 1 1 1
    linkTuyaMCUOutputToChannel 2 1 2
    linkTuyaMCUOutputToChannel 3 1 3
    linkTuyaMCUOutputToChannel 4 1 4
    linkTuyaMCUOutputToChannel 5 1 5
    linkTuyaMCUOutputToChannel 6 1 6
    linkTuyaMCUOutputToChannel 102 1 7
    linkTuyaMCUOutputToChannel 103 1 8
    linkTuyaMCUOutputToChannel 104 1 9
    linkTuyaMCUOutputToChannel 105 1 10
    SetChannelLabel 1 1

    Is it possible to change the button name from Toggle to another?
    Is it possible to set the buttons on the page in 2 lines aUser interface with switches and channel settings.
    I still have channel 14 inserted. Where is it set if the autoexec.bat file does not contain its declaration?
    How to remove it?
    It hangs up when I enter the Config session and click Configure Module or Configure General/Flags.
    Is it some program error or something in me?
  • #9 20811787
    ElektrodaBot
    AI OpenAI ChatGPT4
    Honsu wrote:
    Added after 45 :

    How to configure OpenBeken to connect to Domoticz
    Configuring OpenBeken to connect to Domoticz is based on setting the appropriate parameters in the OpenBeken software configuration to allow communication with the Domoticz server. Here are the steps you should follow to configure OpenBeken with Domoticz:

    1. Install OpenBeken : You must first install OpenBeken on your device if you have not already done so. Detailed instructions for flashing the OpenBeken software onto Beken chips can be found in the project's documentation or on dedicated websites.

    2. Find the documentation : Check the OpenBeken documentation to understand the available configuration options. Look for information on MQTT integration, as this is a common way to integrate various devices with Domoticz.

    3. Configure MQTT : Domoticz supports the MQTT protocol, which is commonly used for communication between IoT devices. OpenBeken should also offer the ability to configure an MQTT client. You need to configure the following parameters:
    - MQTT server address (IP address or hostname of your Domoticz server).
    - MQTT server port (default 1883 if you are not using SSL/TLS, 8883 for MQTT over SSL/TLS).
    - User and password (if you are using authentication).
    - MQTT client ID (clientId), which will be unique to your device.
    - Topics (topics) to which the device will publish data and from which it will subscribe to commands.

    4. Configure OpenBeken : Set the appropriate MQTT parameters in the OpenBeken configuration. You may need to adjust scripts or configuration files so that the device sends information to Domoticz in the correct format.

    5. Add the device to Domoticz : In Domoticz you need to add an MQTT device:
    - Go to "Settings" > "Hardware" in Domoticz.
    - Add new hardware by selecting the type "MQTT Client Gateway with LAN interface".
    - Enter the appropriate configuration details.

    6. Create virtual sensors and switches : In Domoticz, create virtual sensors or switches that correspond to the data published by the device from OpenBeken.

    7. Automation and scenes : You can now create scenes or automation rules in Domoticz that will respond to data received from the device or send commands to the device.

    8. Testing : Make sure everything is working correctly, testing publishing and subscribing to MQTT topics using an MQTT client, for example mosquitto_pub and mosquitto_sub.

    9. Debugging : If you encounter problems, use tools such as MQTT.fx or other MQTT client for communication monitoring and debugging.

    Please note that details may vary depending on the version of Domoticz, the specific OpenBeken firmware and the specifics of your device. You will need to adapt the above steps to your specific situation. If you don't find the information you need in the OpenBeken documentation, it's a good idea to seek help on forums and community groups related to IoT and home automation.
    You can call me in any topic by writing @ElektrodaBot. Disclaimer: Some answers provided by the ElektrodaBot may be inaccurate. Elektroda not responsible for accuracy, reliability or completeness of the information presented. All ElektrodaBot responses should be verified by the user. OpenAI can monitor and save information entered after calling ElektrodaBot.
  • #10 20811788
    Honsu
    Level 3  

    How to configure OpenBeken to connect to Domoticz @ElektrodaBot
  • #11 20811795
    ElektrodaBot
    AI OpenAI ChatGPT4
    Honsu wrote:
    How to configure OpenBeken to connect to Domoticz
    Integration of OpenBeken-based devices with Domoticz can be achieved using the MQTT protocol, which is a common communication standard for IoT devices. Domoticz has a built-in MQTT broker and can also connect to an external MQTT broker. Below you will find the steps needed for configuration:

    1. Install and configure an MQTT broker:
    - If you do not already have an MQTT broker, install one, such as Mosquitto.
    - Configure the broker according to its documentation, including authentication and encryption if needed.

    2. Configure Domoticz to use MQTT:
    - In Domoticz, go to "Settings" -> "Hardware" and add new hardware of type "MQTT Client Gateway with LAN interface".
    - Enter the data required to connect to the MQTT broker (IP address, port, user, password).

    3. Configure OpenBeken to communicate with the MQTT broker:
    - In the OpenBeken software, set the MQTT connection parameters to point to the MQTT broker you have configured in Domoticz.
    - These settings can include the broker's IP address, port, login details (user and password), and the topic on which the device will publish its states, and the topic from which it will receive commands.

    4. MQTT publishing and subscription:
    - The device should publish messages to the topic in a way that Domoticz understands, i.e. according to the accepted MQTT topic convention in Domoticz.
    - Also the device should subscribe to the topic on which Domoticz will send commands.

    5. Create virtual devices in Domoticz:
    - In the Domoticz user interface, add virtual devices that replicate the physical buttons and switches of your device with OpenBeken.
    - Assign each virtual device an MQTT topic under which it will publish or from which it will receive commands.

    6. Automation and rules:
    - Using scripts in Domoticz or creating "Scenes" and "Groups", you can set up automation rules, such as turning on lights at certain times, responding to other sensors, etc.

    7. Test the configuration:
    - Test the entire configuration, checking that the communication between OpenBeken and Domoticz works correctly. Verify that MQTT messages are correctly published and subscribed to, and that virtual devices in Domoticz respond appropriately to state changes.

    Please note that configuration details may vary depending on the specific OpenBeken implementation, Domoticz version and specific MQTT broker. The steps above are general guidelines that you should adapt to your specific configuration. If OpenBeken does not have direct support for MQTT, you may have to use some indirect communication mechanism or use additional scripts for integration.
    You can call me in any topic by writing @ElektrodaBot. Disclaimer: Some answers provided by the ElektrodaBot may be inaccurate. Elektroda not responsible for accuracy, reliability or completeness of the information presented. All ElektrodaBot responses should be verified by the user. OpenAI can monitor and save information entered after calling ElektrodaBot.
  • #12 20811808
    Honsu
    Level 3  

    4. publishing and subscribing to MQTT:
    Write something more about how to configure OpenBeken MQTT to work with domoticz.... @ElectrodBot
  • #13 20811814
    ElektrodaBot
    AI OpenAI ChatGPT4
    Honsu wrote:
    4. Publish and subscribe to MQTT:
    Honsu wrote:
    4. Publish and subscribe to MQTT:
    Speak more about how to configure OpenBeken MQTT to work with Domoticz.
    OpenBeken's MQTT integration with Domoticz requires that OpenBeken-based devices publish data in a format that Domoticz understands, and subscribe to the relevant MQTT topics so that they can receive commands from Domoticz. Here is a detailed description of the configuration process:

    ## OpenBeken MQTT configuration for data publication:

    1. Select MQTT topics for publication and subscription:
    - Specify which MQTT topics will be used for communication. Domoticz uses a specific topic structure, for example:
    - `domoticz/in` - for commands sent to devices
    - `domoticz/out` - for data published by devices

    2. Message format:
    - Messages published to `domoticz/out` should be in JSON format and must contain the IDX, which is the device identifier in Domoticz, and the state or value we want to communicate. Example of a message:
    Code: JSON
    Log in, to see the code

    - `idx` is the identifier of the virtual device in Domoticz.
    - `nvalue` is a numeric state value, for example 0 or 1 for a switch.
    - `svalue` is a value as a string, it could be e.g. temperature or other measurement.

    3. Configure OpenBeken to publish:
    - Configure OpenBeken to publish MQTT messages to the broker according to the agreed topics and format. The exact instructions depend on the software you are running on OpenBeken, but generally you will need to set up scripts or configuration to send data at specific intervals or at specific events.

    ## OpenBeken MQTT configuration for command subscription:

    1. Subscribe to command topics:
    - Configure OpenBeken to subscribe to the `domoticz/in` topic to receive commands from Domoticz.
    2. Command handling:
    - Upon receiving a command in JSON format, your OpenBeken device should interpret this message and perform the appropriate action. For example, if it receives a command to turn on a light, it should activate the appropriate relay.

    ## Integration with Domoticz:

    1. Add devices in Domoticz:
    - In Domoticz, add virtual devices that correspond to your physical devices from OpenBeken. Each device will receive a unique IDX.

    2. Synchronise IDX:
    - Ensure that the IDX assigned in Domoticz to the virtual device is used in the MQTT messages sent by the OpenBeken device.

    3. Automate operation: .
    - You can now configure Domoticz to either respond to data received from the OpenBeken device or send commands to the device based on different rules or scenes.

    ## Debugging and testing:

    - Once everything is configured, test the system by sending test messages from OpenBeken to the MQTT broker and checking that Domoticz receives and correctly processes this data.
    - Use tools such as MQTT Explorer to monitor MQTT traffic and make sure that messages are being published and subscribed to correctly.

    The above steps assume that OpenBeken has MQTT support implemented. If this is not the case, you may need to implement an MQTT client in your OpenBeken software first. In any case, the implementation details will depend on the specific firmware you are using with OpenBeken.
    You can call me in any topic by writing @ElektrodaBot. Disclaimer: Some answers provided by the ElektrodaBot may be inaccurate. Elektroda not responsible for accuracy, reliability or completeness of the information presented. All ElektrodaBot responses should be verified by the user. OpenAI can monitor and save information entered after calling ElektrodaBot.
  • #14 20812006
    Honsu
    Level 3  

    After configuring the MQTT Auto Discovery client gateway with LAN interface in Domoticz, all switches were found in Domoticz.
    Only the label at switch on is displayed 1% at switch off is shortened to Off.
    How to correct this?
    How to program the openbk to time the switch on and switch off afterwards?

Topic summary

The discussion revolves around integrating a 10-button touch glass light switch (SB3S) purchased from AliExpress with the Domoticz home automation system. The user reports that Domoticz detects only 7 out of the 10 buttons, with one button malfunctioning and a delay in switching. Suggestions include upgrading Domoticz, reviewing device configuration, and using alternative software like OpenBeken, which allows for more extensive control. Users discuss the process of flashing OpenBeken onto the device, configuring MQTT for communication with Domoticz, and successfully mapping all buttons. The conversation also touches on creating scripts for timed operations and adjusting button labels in the interface.
Summary generated by the language model.
ADVERTISEMENT