Elektroda.com
Elektroda.com
X

[BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

p.kaczmarek2 100524 1210
This content has been translated flag-pl » flag-en View the original version here.
  • #962
    p.kaczmarek2
    Moderator Smart Home
    Well, do you have the device open? Maybe can you show photos?
    Do you know the pinout of WB2S?
    Do you know the pinout of BL0937?
    Do you have a multimeter?
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    Pin No.SymbolI/O typeFunction
    1VBATPPower supply pin (3.3 V), which is connected to the VBAT pin on the internal IC
    2PWM2I/OCommon GPIO, which is connected to the P8 pin on the internal IC
    3GNDPPower supply reference ground pin
    4PWM1I/OCommon GPIO, which is connected to the P7 pin on the internal IC
    51RXI/OUART1_RXD, which is used as a user-side serial interface pin and is connected to the P10 pin on the internal IC
    6PWM0I/OCommon GPIO, which is connected to the P6 pin on the internal IC
    71TXI/OUART1_TXD, which is used as a user-side serial interface pin and is connected to the P11 pin on the internal IC
    8ADAIADC pin, which is connected to the P23 pin on the internal IC
    9PWM4I/OCommon GPIO, which is connected to the P24 pin on the internal IC
    10CENILow-level reset, high-level active (internally pulled high) Docking IC-CEN
    11PWM5I/OCommon GPIO, which is connected to the P26 pin on the internal IC
  • #963
    svobodaelektroda
    Level 2  
    Images attached and multimeter I have, so happy to check anything 😁

    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
  • #965
    p.kaczmarek2
    Moderator Smart Home
    @rupertst now I understand...
    rupertst wrote:

    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic cmnd/obk060D1E8D/led_dimmer
    Info:MQTT:MQTT in topic cmnd/obk060D1E8D/led_dimmer
    Info:CMD: dimmer (led_dimmer) received with args {"brightness":38,"state":"ON"}
    Info:MQTT:Publishing val 0 to obk060D1E8D/led_dimmer/get retain=0

    Any ideas? Is it a bug?

    This is NOT a bug. It's just that OpenBeken simply expects to get a simple numerical value on "led_dimmer" topic and you are sending Domoticz json there:
    
    Info:CMD: dimmer (led_dimmer) received with args {"brightness":38,"state":"ON"}
    

    This is simply NOT supported.

    I can add a special topic for domoticz users, that will handle JSON.... or maybe even modify that one, but you'll have to wait a moment. Is this the only change you need for Domoticz?



    @svobodaelektroda well, now, find the BL0937 chip, and find the pin called CF.... put one probe there.... and then probe pins of WB2S... you can see which pin is on images posted earlier.... and tell me where does the CF goes?
    Then the same.... for CF1.... and then... for SEL... and that's it.
    You have both pinouts posted by me above, both BL0937 pins and WB2S.

    Dodano po 3 [godziny] 53 [minuty]:

    @rupertst
    
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic cmnd/obk060D1E8D/led_dimmer
    Info:MQTT:MQTT in topic cmnd/obk060D1E8D/led_dimmer
    Info:CMD: dimmer (led_dimmer) received with args {"brightness":52,"state":"ON"}
    Info:MQTT:Publishing val 0 to obk060D1E8D/led_dimmer/get retain=0
    

    I have added parsing for
    
     {"brightness":52,"state":"ON"}
    

    Can you check?
    https://github.com/openshwprojects/OpenBK7231...mmit/23b68fc670b227b753ef8fdda27ab0ffe49a661c
    
    Debug:CMD:cmd [led_dimmer {"brightness":52,"state":"ON"}]
    Info:CMD: dimmer (led_dimmer) received with args {"brightness":52,"state":"ON"}
    Info:CMD:Dimmer - cJSON_Parse says brightness is 52
    Info:CMD:Dimmer - cJSON_Parse says state is ON
    

    https://github.com/openshwprojects/OpenBK7231T_App/releases/tag/1.12.102
  • #966
    rupertst
    Level 6  
    Thanks, but something is still wrong. Logs are better, but behavior is the same.

    Logs:
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic cmnd/obk060D1E8D/led_dimmer
    Info:MQTT:MQTT in topic cmnd/obk060D1E8D/led_dimmer
    Info:CMD: dimmer (led_dimmer) received with args {"brightness":32,"state":"ON"}
    Info:CMD:Dimmer - cJSON_Parse says brightness is 32
    Info:MQTT:Publishing val 32 to obk060D1E8D/led_dimmer/get retain=0
    Info:CMD:Dimmer - cJSON_Parse says state is ON
    Info:MQTT:Publishing val 1 to obk060D1E8D/led_enableAll/get retain=0


    More investigation tomorrow
  • #967
    p.kaczmarek2
    Moderator Smart Home
    All I can say is that I tested the following changes by typing in console:
    
    led_dimmer {"brightness":32,"state":"ON"}
    

    and also with "OFF" and with different values, and in case of my LED strip, it works, it sets the brightness and state correctly.
    I do not know anything beyond that.

    I think there are more topics that are needed to be set, but I would need to hear from you, what is the expected input and output format.
  • #968
    rupertst
    Level 6  
    After closer look:
    1) It works without flag "3" on. With flag "3" on the behavior is like before - it's turn of after switching anything in Domoticz.
    2) With flag "3" off, there are two working sliders in Domoticz, but moving one of them automatic sets the same value to another one. Moving them makes light brighter and darker, but not the whole scale. Here is how it behave:

    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

    3) Sliders in web interface (not web app) are sliding together, without any sense to me (not connected to Domoticz). Here are some examples (look at values - bar stays in place):
    Moving brightness slider:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

    Moving teperature slider:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant

    In webapp sliders works ok, separate. Max value 100.
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
  • #969
    brianandrus
    Level 5  
    So, I have successfully flashed the board inside the new FEIT Wall dimmer from Costco. Now, I am not sure of the steps to figure out what the configuration should be. It looks like I need to trace what pins go where or such.
    Anyone have any insight on next steps? I have it connected to my wifi, can connect to it via the IP and web app and have it successfully connecting to my HA MQTT.
  • #970
    p.kaczmarek2
    Moderator Smart Home
    @rupertst I don't think it's a correct way to solve that. Can you rather tell me what Domoticz version are you using? Is this a correct link for documentation of your Domoticz MQTT?
    https://www.domoticz.com/wiki/MQTT#Domoticz_MQTT_protocol
    Are you able to specify which keywords from that protocol are you using?
    Or maybe can you log exactly what requests is your Domoticz sending and receiving?

    @brianandrus there are two ways.... either look at the PCB with multimeter (when it's disconnected from mains) and probe connections or just try each pin, try setting each one to relay, button and everytime check and see if it reacts
  • #971
    rupertst
    Level 6  
    Domoticz Version: 2022.1
    1) The second part of my last post - the two sliders moving together in web interface (not webapp) is not connected with Domoticz at all. I solved it by setting flag 8 on. Now the sliders are moving separately.

    2) I changed the name of device to "lampa_szopa". The homeassistant config is:
    mqtt:
      light:
      - unique_id: "Lampa_szopa_060D1E8D_light_1"
        name: "Lampa_szopa 1"
        state_topic: "Lampa_szopa/1/get"
        command_topic: "Lampa_szopa/1/set"
        brightness_command_topic: "Lampa_szopa/1/set"
        on_command_type: "brightness"
        brightness_scale: 99
        qos: 1
        payload_on: 99
        payload_off: 0
        retain: true
        optimistic: true
        availability:
          - topic: "Lampa_szopa/connected"
      - unique_id: "Lampa_szopa_060D1E8D_light_2"
        name: "Lampa_szopa 2"
        state_topic: "Lampa_szopa/2/get"
        command_topic: "Lampa_szopa/2/set"
        brightness_command_topic: "Lampa_szopa/2/set"
        on_command_type: "brightness"
        brightness_scale: 99
        qos: 1
        payload_on: 99
        payload_off: 0
        retain: true
        optimistic: true
        availability:
          - topic: "Lampa_szopa/connected"
    


    What I see in MQTT autodiscovery prefix are two topics:
    first:
    homeassistant/light/Lampa_szopa_060D1E8D_light_1/config =
    {
    "dev": {
           "ids":["Lampa_szopa_060D1E8D"],
         "name":"Lampa_szopa",
         "sw":"23b68fc6",
          "mf":"Beken Corporation",
          "mdl":"BK7231T",
           "cu":"http://10.0.0.29/index"
             },
    "name":"Lampa_szopa 1",
    "~":"Lampa_szopa",
    "avty_t":"~/connected",
    "pl_on":"99",
    "pl_off":"0",
    "uniq_id":"Lampa_szopa_060D1E8D_light_1",
    "on_cmd_type":"brightness",
    "bri_scl":99,
    "opt":true,
    "qos":1,
    "bri_stat_t":"~/led_dimmer/get",
    "bri_cmd_t":"cmnd/Lampa_szopa/led_dimmer",
    "stat_t":"~/1/get",
    "cmd_t":"~/1/set"
    }
    


    second:
    homeassistant/light/Lampa_szopa_060D1E8D_light_2/config = {
    "dev":{
           "ids":["Lampa_szopa_060D1E8D"],
           "name":"Lampa_szopa",
            "sw":"23b68fc6",
            "mf":"Beken Corporation",
            "mdl":"BK7231T",
            "cu":"http://10.0.0.29/index"},
    "name":"Lampa_szopa 2",
    "~":"Lampa_szopa",
    "avty_t":"~/connected",
    "pl_on":"99",
    "pl_off":"0",
    "uniq_id":"Lampa_szopa_060D1E8D_light_2",
    "on_cmd_type":"brightness",
    "bri_scl":99,
    "opt":true,
    "qos":1,
    "bri_stat_t":"~/led_dimmer/get",
    "bri_cmd_t":"cmnd/Lampa_szopa/led_dimmer",
    "stat_t":"~/2/get",
    "cmd_t":"~/2/set"
    }
    


    Domoticz "finds" two devices:
    Lampa_szopa 1
    Lampa_szopa 2


    Setting value in Domoticz of ANY of this devices triggers folowing command in MQTT:
    cmnd/Lampa_szopa/led_dimmer = {"brightness":44,"state":"ON"}


    and its working - the lamp brightness is set. The logs of lamp are:
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic cmnd/Lampa_szopa/led_dimmer
    Info:MQTT:MQTT in topic cmnd/Lampa_szopa/led_dimmer
    Info:CMD: dimmer (led_dimmer) received with args {"brightness":62,"state":"ON"}
    Info:CMD:Dimmer - cJSON_Parse says brightness is 62
    Info:MQTT:Publishing val 62 to Lampa_szopa/led_dimmer/get retain=0
    Info:CMD:Dimmer - cJSON_Parse says state is ON
    Info:MQTT:Publishing val 1 to Lampa_szopa/led_enableAll/get retain=0


    Both Domoticz sliders change brightness and none of them change light temperature.
    I can not find any interesting in Domoticz logs:
    Status: Mosquitto: discovered: Lampa_szopa/Lampa_szopa 1 (unique_id: Lampa_szopa_060D1E8D_light_1)
    Status: Mosquitto: discovered: Lampa_szopa/Lampa_szopa 2 (unique_id: Lampa_szopa_060D1E8D_light_2)
    
    Status: User: Admin (IP: 10.0.0.11) initiated a switch command (686/Lampa_szopa 1/Set Level)
    Status: User: Admin (IP: 10.0.0.11) initiated a switch command (687/Lampa_szopa 2/Set Level)


    When I send the Domoticz MQTT command from console, also only brightness is set
    Maybe it's some simple name mismatch that prevents "Lampa_szopa 2" from setting value for channel 2??

    Here is what I see in MQTT Explorer:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
  • #972
    p.kaczmarek2
    Moderator Smart Home
    It's a mess, but for example this:
    
        state_topic: "Lampa_szopa/1/get"
        command_topic: "Lampa_szopa/1/set"
        brightness_command_topic: "Lampa_szopa/1/set"
    

    is not a correct way of accessing a LED device in OpenBeken. This is an old method, it's a direct access to channels, that skips the led driver. This won't update LED driver sliders, etc. You should not be using the /1/set and /1/get for LEDs, you should use:
    - led_enableAll
    - led_dimmer
    - led_temperature
    This is how a correct HA config for color temperature looks like:
    
        color_temp_command_topic: "cmnd/obk8D38570E/led_temperature"
        color_temp_state_topic: "obk8D38570E/led_temperature/get"
    


    There might be some issue with HA discovery as well, I forwarded the information to HA D contributor
  • #973
    rupertst
    Level 6  
    You do not use HA config in Domoticz manualy. Domoticz gets it by HA autodiscovery. There is no way to add MQTT device manualy.
    Are the autodiscovery MQTT entries are genereted basing on device HA config?
    So the problem is mainly in HA autodiscovery? How can I correct HA config as its auto-genereted by soft?
  • #974
    p.kaczmarek2
    Moderator Smart Home
    I have forwarded the issue to HASS discovery author so he can look into it.

    As far I have assumed that Domoticz is using a single MQTT topics like "domoticz/in" and "domoticz/out", so it's a news to me.

    Anyway, in a meantime, can you update to latest version, then type "loglevel 5" in console and then try using Domoticz again?
    Are you getting that one in log?
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    what does it say for you? What kind of argument it gets?

    NOTE: you won't get LOG_DEBUG messages unless you enable "loglevel 5" in console
  • #975
    rupertst
    Level 6  
    There are two different plugins for Domoticz:
    1) "MQTT Client Gateway with LAN interface" - makes Domoticz publish everything in it's own topics eg. domoticz/in or out. Its not useful in our case. I tried before, and there is no way to make it working with other MQTT devices. Its almost not configurable.

    2) "MQTT Auto Discovery Client Gateway" - this is the one I'm using. It finds and add devices by autodiscovery - like in HA (at least should be). It has nothing to do with the first plugin.

    Isn't the problem in autodiscovery messages? Correcting HA config won't help Domoticz to add another device (led temperature)? As far as I understand Domoticz is sending correct command to led driver (led_dimmer in topic). Only missing thing is another Domoticz device to send command to led_temperature. Am I right?

    Domoticz selected logs:
    
    Debug: Mosquitto: Topic: homeassistant/light/Lampa_szopa_060D1E8D_light_1/config, Message: {"dev":{"ids":["Lampa_szopa_060D1E8D"],"name":"Lampa_szopa","sw":"23b68fc6","mf":"Beken Corporation","mdl":"BK7231T","cu":"http://10.0.0.29/index"},"name":"Lampa_szopa 1","~":"Lampa_szopa","avty_t":"~/connected","pl_on":"99","pl_off":"0","uniq_id":"Lampa_szopa_060D1E8D_light_1","on_cmd_type":"brightness","bri_scl":99,"opt":true,"qos":1,"bri_stat_t":"~/led_dimmer/get","bri_cmd_t":"cmnd/Lampa_szopa/led_dimmer","stat_t":"~/1/get","cmd_t":"~/1/set"}
    2022-10-13 10:15:09.297  [a83f5200] Debug: Query:SELECT ID, Name, nValue, sValue, Color, SubType, SwitchType FROM DeviceStatus WHERE (HardwareID==15) AND (DeviceID=='Lampa_szopa_060D1E8D_light_1') AND (Unit==1)
    2022-10-13 10:15:09.398  [a83f5200] Debug: Mosquitto: Topic: homeassistant/light/Lampa_szopa_060D1E8D_light_2/config, Message: {"dev":{"ids":["Lampa_szopa_060D1E8D"],"name":"Lampa_szopa","sw":"23b68fc6","mf":"Beken Corporation","mdl":"BK7231T","cu":"http://10.0.0.29/index"},"name":"Lampa_szopa 2","~":"Lampa_szopa","avty_t":"~/connected","pl_on":"99","pl_off":"0","uniq_id":"Lampa_szopa_060D1E8D_light_2","on_cmd_type":"brightness","bri_scl":99,"opt":true,"qos":1,"bri_stat_t":"~/led_dimmer/get","bri_cmd_t":"cmnd/Lampa_szopa/led_dimmer","stat_t":"~/2/get","cmd_t":"~/2/set"}
    2022-10-13 10:15:09.400  [a83f5200] Debug: Query:SELECT ID, Name, nValue, sValue, Color, SubType, SwitchType FROM DeviceStatus WHERE (HardwareID==15) AND (DeviceID=='Lampa_szopa_060D1E8D_light_2') AND (Unit==1)
    2022-10-13 10:15:09.602  [a83f5200] Debug: Mosquitto: Topic: homeassistant/status, Message: online
    
    .......
    
    Debug: Mosquitto: Topic: homeassistant/light/Lampa_szopa_060D1E8D_light_1/config, Message: {"dev":{"ids":["Lampa_szopa_060D1E8D"],"name":"Lampa_szopa","sw":"23b68fc6","mf":"Beken Corporation","mdl":"BK7231T","cu":"http://10.0.0.29/index"},"name":"Lampa_szopa 1","~":"Lampa_szopa","avty_t":"~/connected","pl_on":"99","pl_off":"0","uniq_id":"Lampa_szopa_060D1E8D_light_1","on_cmd_type":"brightness","bri_scl":99,"opt":true,"qos":1,"bri_stat_t":"~/led_dimmer/get","bri_cmd_t":"cmnd/Lampa_szopa/led_dimmer","stat_t":"~/1/get","cmd_t":"~/1/set"}
    2022-10-13 10:16:02.427  [a83f5200] Debug: Query:SELECT ID, Name, nValue, sValue, Color, SubType, SwitchType FROM DeviceStatus WHERE (HardwareID==15) AND (DeviceID=='Lampa_szopa_060D1E8D_light_1') AND (Unit==1)
    2022-10-13 10:16:02.427  [a83f5200] Debug: Query:INSERT INTO DeviceStatus (HardwareID, DeviceID, Unit, Type, SubType, switchType, SignalLevel, BatteryLevel, Name, Used, nValue, sValue) VALUES (15, 'Lampa_szopa_060D1E8D_light_1', 1, 244, 73, 7, 12, 255, 'Lampa_szopa 1', 1, 0, '0')
    2022-10-13 10:16:02.428  [a83f5200] Debug: Query:SELECT ID,Name,nValue,sValue,Color,SubType, SwitchType FROM DeviceStatus WHERE (HardwareID==15) AND (DeviceID=='Lampa_szopa_060D1E8D_light_1') AND (Unit==1)
    2022-10-13 10:16:02.529  [a83f5200] Debug: Mosquitto: Topic: homeassistant/light/Lampa_szopa_060D1E8D_light_2/config, Message: {"dev":{"ids":["Lampa_szopa_060D1E8D"],"name":"Lampa_szopa","sw":"23b68fc6","mf":"Beken Corporation","mdl":"BK7231T","cu":"http://10.0.0.29/index"},"name":"Lampa_szopa 2","~":"Lampa_szopa","avty_t":"~/connected","pl_on":"99","pl_off":"0","uniq_id":"Lampa_szopa_060D1E8D_light_2","on_cmd_type":"brightness","bri_scl":99,"opt":true,"qos":1,"bri_stat_t":"~/led_dimmer/get","bri_cmd_t":"cmnd/Lampa_szopa/led_dimmer","stat_t":"~/2/get","cmd_t":"~/2/set"}
    2022-10-13 10:16:02.529  [a83f5200] Debug: Query:SELECT ID, Name, nValue, sValue, Color, SubType, SwitchType FROM DeviceStatus WHERE (HardwareID==15) AND (DeviceID=='Lampa_szopa_060D1E8D_light_2') AND (Unit==1)
    2022-10-13 10:16:02.530  [a83f5200] Debug: Query:INSERT INTO DeviceStatus (HardwareID, DeviceID, Unit, Type, SubType, switchType, SignalLevel, BatteryLevel, Name, Used, nValue, sValue) VALUES (15, 'Lampa_szopa_060D1E8D_light_2', 1, 244, 73, 7, 12, 255, 'Lampa_szopa 2', 1, 0, '0')
    2022-10-13 10:16:02.530  [a83f5200] Debug: Query:SELECT ID,Name,nValue,sValue,Color,SubType, SwitchType FROM DeviceStatus WHERE (HardwareID==15) AND (DeviceID=='Lampa_szopa_060D1E8D_light_2') AND (Unit==1)
    2022-10-13 10:16:02.984  [b23a6200] Debug: web: Host:::1 Uri;/json.htm?type=command¶m=udevice&idx=14&nvalue=0&svalue=24.0
    2022-10-13 10:16:02.984  [b23a6200] Debug: WEBS GetJSon :udevice :/json.htm?type=command¶m=udevice&idx=14&nvalue=0&svalue=24.0 
    
    ......
    
    while moving lamp 1 bar:
    
    MAIN SwitchLightInt : switchcmd:Set Level level:48 HWid:15  sd:15 Lampa_szopa_060D1E8D_light_1 1 244 73 7
    2022-10-13 10:16:27.599  [a83f5200] Debug: Mosquitto: Topic: Lampa_szopa/led_dimmer/get, Message: 47
    2022-10-13 10:16:27.599  [a83f5200] Debug: Query:SELECT ID, Name, nValue, sValue, Color, SubType, SwitchType FROM DeviceStatus WHERE (HardwareID==15) AND (DeviceID=='Lampa_szopa_060D1E8D_light_1') AND (Unit==1)
    2022-10-13 10:16:27.599  [a83f5200] Debug: Query:SELECT ID, Name, Used, SwitchType, nValue, sValue, LastUpdate, Options FROM DeviceStatus WHERE (HardwareID=15 AND DeviceID='Lampa_szopa_060D1E8D_light_1' AND Unit=1 AND Type=244 AND SubType=73)
    
    while moving lamp 2 bar:
    
    Query:SELECT HardwareID,DeviceID,Unit,Type,SubType,SwitchType,AddjValue2,nValue,sValue,Name,Options FROM DeviceStatus WHERE (ID == 693)
    2022-10-13 10:16:52.838  [b23a6200] Debug: MAIN SwitchLightInt : switchcmd:Set Level level:44 HWid:15  sd:15 Lampa_szopa_060D1E8D_light_2 1 244 73 7
    2022-10-13 10:16:53.039  [a83f5200] Debug: Mosquitto: Topic: Lampa_szopa/led_dimmer/get, Message: 43
    2022-10-13 10:16:53.039  [a83f5200] Debug: Query:SELECT ID, Name, nValue, sValue, Color, SubType, SwitchType FROM DeviceStatus WHERE (HardwareID==15) AND (DeviceID=='Lampa_szopa_060D1E8D_light_1') AND (Unit==1)
    2022-10-13 10:16:53.039  [a83f5200] Debug: Query:SELECT ID, Name, Used, SwitchType, nValue, sValue, LastUpdate, Options FROM DeviceStatus WHERE (HardwareID=15 AND DeviceID='Lampa_szopa_060D1E8D_light_1' AND Unit=1 AND Type=244 AND SubType=73)
    2022-10-13 10:16:53.040  [a83f5200] Debug: Query:UPDATE DeviceStatus SET SignalLevel=12, BatteryLevel=255, nValue=2, sValue='43', LastUpdate='2022-10-13 10:16:53' WHERE (ID = 692)
    


    complete log attached.
  • #976
    rupertst
    Level 6  
    Have You made any progress in Domoticz support? I saw changes on github, but I do not know if they are related to it.

    I also have question how do the buttons work. I have set two buttons on WB3S. I can see in logs when I press them, but I do not know how to make it trigger anything. They are not seen in MQTT broker. I have two PWM channels (1 and 2) and buttons 1 and 2.

    Another question is how to set channel type? What is the command? readme.md is not clear to that.
  • #977
    botioni
    Level 11  
    @p.kaczmarek2 Hi and first congrats nice work i done mine first swich working it is a konyks vollo max easy it is working now as a swich not like a vollo but is what i wanted (probably you dident implement yet vollo strutcture but ewrything is working right ) .
    i see on your git you imported tuya rt repostery you will make it as well ? and last and not the last how can i swich wifi led behavior to stay off when conected , wher is a documention for commands ?
  • #978
    p.kaczmarek2
    Moderator Smart Home
    @botioni it's almost ready, stay tuned, I just have some other things with higher priority to handle first.

    What is a vollo structure?

    @rupertst Domoticz support is TODO, but regarding your issue, I'd like to improve it now but as said earlier, I would need to know exact publish and data format you need.

    @rupertst by the way, the Hass Discovery was improved during last week

    @botioni Do you want wifi led to blink when connected and stay off when connected? Well, then consider using "WifiLed_n", with the "_n" suffix, it's a negated output that way. Inversed. The documentation for some of the commands is in readme, newer commands will be added there as well.

    I will be posting another Tuya Dimmer teardown soon and also a teardown of RGB led strip that has multiple buttons with an explanation how to setup those buttons (button for color selection, button for brightness adjust)
  • #979
    botioni
    Level 11  
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    Buttons should do up stop down or for left stop down for 120 sec and configurable the time and stop
    Now it is working like a 3way swich but only has 2 relays for me it is ok for others not

    Added after 2 [minutes]:

    It is the same thing as @leecher1337 s

    Added after 11 [hours] 27 [minutes]:

    Do we have suport for motion sensor?
  • #981
    p.kaczmarek2
    Moderator Smart Home
    @botioni good job on getting that running
    @anderson007104 hello, can you provide more information about that? Do you at least get the OpenBeken access point?
  • #982
    anderson007104
    Level 3  
    p.kaczmarek2 wrote:
    @botioni good job on getting that running
    @anderson007104 hello, can you provide more information about that? Do you at least get the OpenBeken access point?


    I used the BKwriter 1.60 and I tested all openbk firmware variants, and none starts the openbeken access point.
  • #983
    botioni
    Level 11  
    New project ldv sensor movement [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    Prob I will need some help
  • #985
    anderson007104
    Level 3  
    kalayda wrote:
    Please suggest how to flash this module?

    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant


    Try using the pins U1_TX, U1_RX, VCC and GND.

    Connect EN to GND when flashing [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
  • #986
    botioni
    Level 11  
    Is ther some settigs for power saving?
    (IT drains battery)?
  • #987
    rupertst
    Level 6  
    p.kaczmarek2 wrote:

    @rupertst by the way, the Hass Discovery was improved during last week
    [/b]


    Yes, It has changed a bit. Now domoticz finds one device: "Color switch, RGB, Dimmer". The problem is my lamp has only C/W regulation. If I try to change color it turns off.

    Here is how it looks in web interface (from this point it works ok):
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant[/url]


    If I move brightness slider in Domoticz it sends:
    cmnd/Lampa_smietnik/led_dimmer = {"brightness":29,"state":"ON"}


    and the log of lamp is:
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic cmnd/Lampa_smietnik/led_dimmer
    Info:MQTT:MQTT in topic cmnd/Lampa_smietnik/led_dimmer
    Info:CMD: dimmer (led_dimmer) received with args {"brightness":29,"state":"ON"}
    Info:CMD:Dimmer - cJSON_Parse says brightness is 29
    Info:MQTT:Publishing val 29 to Lampa_smietnik/led_dimmer/get retain=0
    Info:CMD:Dimmer - cJSON_Parse says state is ON
    Info:MQTT:Publishing val 1 to Lampa_smietnik/led_enableAll/get retain=0


    ...then the brightness slider in Domoticz is set to "1", but brightness level stays as set (eg.:29)


    When I try to change color it sends:
    cmnd/Lampa_smietnik/led_enableAll = {"color":{"b":255,"g":255,"r":255},"state":"1"}


    Then the lamp log is:
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic cmnd/Lampa_smietnik/led_enableAll
    Info:MQTT:MQTT in topic cmnd/Lampa_smietnik/led_enableAll
    Info:CMD: enableAll (led_enableAll) received with args {"color":{"b":127,"g":255,"r":146},"state":"1"}


    ...and the lamp turns off.
  • #988
    botioni
    Level 11  
    done the sensor but it drains battery i need some setings to put ic in sleep until i get movment on digital pin state changes
    is it posible to do it?
  • #989
    ExploWare
    Level 10  
    Hi,
    I've successfully flashed some lsc 970716 WarmWhite/ColdWhite bulbs via tuya-Cloudcutter
    The webapp allowes to control channel 4 and 5, sliding 4 for cold white, 5 for warm white.
    The normal web interface does not work.
    Also, there is an option to set some Reboot with Previous values, but it isn't supported yet.
    Any ETA on that feature?
    And also, any chance to expose an on/off dimmerslider and balance slider for Home Assistant on this?
    Thanks!
  • #990
    p.kaczmarek2
    Moderator Smart Home
    @ExploWare all of that shall work.
    Option to remember LED state:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    pins config CW:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    gui for CW:
    [BK7231T] My HTTP server, configurator, MQTT support from Home Assistant
    I will update comment on the Relay saving page.

    @botioni I have forwarded the question to dev team, we will look into it

    @kalayda it seems I have answered you in your separate topic. At the current state of things, you'd have to take off the metal shield to see the chip marking.