openshwprojects / OpenBK7231T_App

Open source firmware (Tasmota/Esphome replacement) for BK7231T, BK7231N, BL2028N, T34, XR809, W800/W801, W600/W601, BL602 and LN882H
https://openbekeniot.github.io/webapp/devicesList.html
1.42k stars 249 forks source link

Feature/help request, Domoticz MQTT support #391

Open Jasper2991 opened 1 year ago

Jasper2991 commented 1 year ago

My appologies if this is not the correct way of asking for help, my Git-skills and experience are limited.

I managed to Flash OpenBK7231T/OpenBeken to a whitelabel tuya smartplug unit from my local ‘Kruidvat’ and managed to figure out the pinout for the functioning (i would love to add this to the collection of knowledge if this is helpful btw).

Now I wanted to integrate this unit in my Domoticz system and came to the conclusion I do not have the faintest idea how to manage this with OpenBreken. Until now I used Tasmota which I can directly link to my MQTT server, it is basically plug-and-play.

With the awesome work you all have done I was very hopeful you could point me to a source of info to get me started. I also read a few more comments (like 5) regarding domoticz support, and it may be coming in the future?

All help is welcome, Thanks!

ReanuKeeves01 commented 1 year ago

You should be able to do almost exactly the same thing in OpenBeken, if you go into the config you should see the MQTT option there, select that and configure it from there.

Screenshot 2022-11-02 at 17 45 21

Then perhaps use something like MQTT Explorer to check if all is working as it should in regards to the mqtt side. As a Home Assistant user I can't speak of the final integration in Domoticz..

Jasper2991 commented 1 year ago

So, I managed to get OpenBreken to be detected in Domoticz.

I updated my Domoticz to 2022.1 and added the “MQTT Auto Discovery Client Gateway with LAN interface” plugin, this made the auto discovery work.

however, i do not have bi-directional control Currently when I change the relay/channel in OpenBreken directly it shows in Domotics but with a strange value. It shows as “1%” while the definition of Domotics is ON/OFF. This also means that when i try to toggle in domotics nothing happens on the OpenBreken side. Schermafbeelding 2022-11-02 205341

where i would expect somthing like: Schermafbeelding 2022-11-02 205416

When i look at the MQTT command from Domotics it is given in MQQT topic "Domotics/out/1/set" as a 1 or 0 .

The command from OpenBreken is given in MQQT topic "Domotics/out/1/get" as a 1 or 0 .

Out of the box this seems to be a great start, However Open breken dos not seem to act on the "Set" value given by Domoticz. Schermafbeelding 2022-11-02 210943

Pointers and tips are welkome

Also, I am going to be looking in to changing the topic to something a bit more unique than .../1/... which is the set channel number. as I am planning to utilize more units.

GravityRZ commented 1 year ago

i tried this as well for an RGB light. i think the correct way of doing this is

on domoticz enable MQTT autodiscovery Accept new hardware devices to ON

on OpenBK configure MQTT home assistant configuration start home assistant discovery(this will broadcast the parameters through MQTT) after that switch the light on/off

the device should be created with dirirectional control

Now with a light which has no PWM, relay or powerdriver running you can not do this because you get this error image This should be fixed. workaround is to add a relay to p0 to skip this message.(but then you get an extra light generated)

i however could not get the RGBWW light to work because everything was working except for the colors dim WORKS ON DOES NOT WORK OFF WORKS selecting colors DOES NOT WORK, Light switches to cold white only maybe this is because led_basecolor_rgbcw is not implemented yet

vinibali commented 7 months ago

My feature request for somewhat the same topic: https://github.com/openshwprojects/OpenBK7231T_App/issues/1100