Elektroda.com
Elektroda.com
X

OpenBeken and TuyaMCU dimmer - configuration guide/tutorial

p.kaczmarek2 13434 66
This content has been translated flag-pl » flag-en View the original version here.
  • #62
    jrhenk
    Level 10  
    My last attempt was with 1.17.118

    Added after 2 [minutes]:

    Oh and just to share as much as possible, I'm still using this autoexec.bat from far up in this thread... guess it doesn't effect this but just wanted to share in case it does

    Quote:
    startDriver TuyaMCU
    setChannelType 1 toggle
    setChannelType 2 dimmer
    tuyaMcu_setDimmerRange 0 1000
    linkTuyaMCUOutputToChannel 1 1 1
    linkTuyaMCUOutputToChannel 2 2 2
    tuyaMcu_defWiFiState 4
    // when channel 1 changes, save it to flash channel 201
    addEventHandler OnChannelChange 1 setChannel 201 $CH1
    // when channel 2 changes, save it to flash channel 202
    addEventHandler OnChannelChange 2 setChannel 202 $CH2
    PowerSave 1
    // On start
    // addRepeatingEvent [RepeatTime] [RepeatCount]
    // This should fire once due to RepeatCount 1
    addRepeatingEvent 1 1 backlog setChannel 1 $CH201; setChannel 2 $CH202
  • #63
    jrhenk
    Level 10  
    I finally found out why it was not working and made an interesting discovery! Before, I activated "Flag 34 - [MQTT] In HA discovery, add relays as lights" and while the MQTT broadcasts with the topic "homeassistant/light/DEVICE" featured the brightness value, HA only saw it as on/off light. After deactivating flag 34 the dimmer finally shows up with a brightness option via HA autodiscovery!
  • #64
    p.kaczmarek2
    Moderator Smart Home
    Thank you! I would never expect this issue. You have brought up a good point. I will check why that flag breaks. I was testing without that flag several times and it always worked well.
  • #65
    jrhenk
    Level 10  
    And more interestingly, with it deactivated, I actually get a second icon as if I had activated flag 34
    OpenBeken and TuyaMCU dimmer - configuration guide/tutorial
  • #66
    p.kaczmarek2
    Moderator Smart Home
    I don't think I experienced that. Maybe there is some kind of leftover from previous config?
  • #67
    jrhenk
    Level 10  
    Just deleted the device in the HA MQTT Integration, renamed it and let HA discover it again but it still looks the same. Really doesn't matter to me though since the major issue is solved now :)
    Regarding another much more annoying issue: I finally had some time to tinker again and since we are at troubleshooting I was trying to find out why some of my openbeken flashed devices fell off the network and others did not. I think I found out why and this discovery might be a good extra information on the Ping Watchdog page: My ISP provided router seems to not react to pings for quite a while sometimes. Might have to do with the pingflooding firewall feature that should only work with traffic coming from outside or something else. No matter what, I changed the IP to my PI that is also always on and suddenly the devices that kept reconnecting are fully stable. No idea if others have experienced the same, but if so it might be good to recommend the IP of another device that's always online.