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
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!
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.
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.