logo elektroda
logo elektroda
X
logo elektroda

Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!

p.kaczmarek2 120456 485
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #271 20402855
    p.kaczmarek2
    Moderator Smart Home
    @Zain00 do you have any BK7231 devices? That would be better touse for testing to minimalize the potential other platform differences testing impact...

    All drivers are first done for BKs because they are more popular, then enabled on other platforms.

    Or, maybe should I say, all drivers are first done on Windows - because, as you may know, our firmware runs on Windows which makes the development lighting fast!
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #273 20402872
    p.kaczmarek2
    Moderator Smart Home
    The following process will work on BK and not on BL, but I will enable it on BL when it's stable enough.

    We are trying to emulate Belkin WEMO Single Device integration, just as in Tasmota, under the same hacky logic. Let me quote their docs:
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!

    On OpenBeken device, run:
    
    backlog startDriver WEMO; startDriver SSDP
    


    WEMO works in the following way
    1. first there is UDP MSEARCH just like in SSDP
    2. then wemo devices responds with its page link
    3. then there is a HTTP get call to XML
    4. and finally, to set state, the HTTP post is called

    I don't have alexa and i am unable to check if my code works. I need to know how much works and when it fails.

    This should show WEMO stats:
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    What do you get here?

    Do you get any POST EVENTs in log?
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    The event processing is not implemented yet, I need to know at the moment if it even is able to reach to that point.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #274 20403407
    Zain00
    Level 11  
    @p.kaczmarek2

    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!

    I ran device discovery on Alexa and this is the log
    
    Info:MAIN:Time 43, idle 187263/s, free 74792, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 44, idle 185164/s, free 74792, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 45, idle 189371/s, free 74704, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 46, idle 189477/s, free 74792, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Debug:API:POST to api/cmnd
    Debug:CMD:cmd [backlog startDriver WEMO; startDriver SSDP]
    Debug:CMD:backlog [startDriver WEMO; startDriver SSDP]
    Debug:CMD:cmd [startDriver WEMO]
    Info:MAIN:Started WEMO.
    Debug:CMD:cmd [startDriver SSDP]
    Info:HTTP:DRV_SSDP_Init
    Info:HTTP:DRV_SSDP_CreateSocket_Receive: Socket created, waiting for packets
    Debug:CMD:Adding command obkDeviceList
    Info:MAIN:Started SSDP.
    Debug:CMD:backlog executed 2
    Info:MAIN:Time 47, idle 185133/s, free 73640, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 48, idle 184721/s, free 73424, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 4/38 
    Info:MAIN:Time 49, idle 186838/s, free 73640, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 50, idle 185812/s, free 73640, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:GEN:dhcp=0 ip=192.168.0.7 gate=192.168.0.1 mask=255.255.255.0 mac=*********** 
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-69,ssid=***********,bssid=*********** ,channel=11,cipher_type:CCMP
    Info:MAIN:Time 51, idle 182287/s, free 73640, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 52, idle 186531/s, free 73640, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 53, idle 188223/s, free 73640, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 54, idle 193597/s, free 73640, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 55, idle 381536/s, free 73640, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 56, idle 183260/s, free 73640, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    ExtraDebug:HTTP:Received 94 bytes from 192.168.0.206
    ExtraDebug:HTTP:data: M-SEARCH * HTTP/1.1
    HOST: 239.255.255.250:1900
    ST: ssdp:all
    MAN: "ssdp:discover"
    MX: 3
    
    ExtraDebug:HTTP:Is MSEARCH - responding
    ExtraDebug:HTTP:WEMO - sends reply upnp:rootdevice
    ExtraDebug:HTTP:WEMO - Sending HTTP/1.1 200 OK
    CACHE-CONTROL: max-age=86400
    DATE: Fri, 15 Apr 2016 04:56:29 GMT
    EXT:
    LOCATION: http://192.168.0.7:80/setup.xml
    OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
    01-NLS: b9200ebb-736d-4b93-bf03-835149d13983
    SERVER: Unspecified, UPnP/1.0, Unspecified
    ST: upnp:rootdevice
    USN: uuid:Socket-1_0-201612FF2EE81B::upnp:rootdevice
    X-User-Agent: redsonic
    
    ExtraDebug:HTTP:Received 101 bytes from 192.168.0.206
    ExtraDebug:HTTP:data: M-SEARCH * HTTP/1.1
    HOST: 239.255.255.250:1900
    ST: upnp:rootdevice
    MAN: "ssdp:discover"
    MX: 3
    
    ExtraDebug:HTTP:Is MSEARCH - responding
    ExtraDebug:HTTP:WEMO - sends reply upnp:rootdevice
    ExtraDebug:HTTP:WEMO - Sending HTTP/1.1 200 OK
    CACHE-CONTROL: max-age=86400
    DATE: Fri, 15 Apr 2016 04:56:29 GMT
    EXT:
    LOCATION: http://192.168.0.7:80/setup.xml
    OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
    01-NLS: b9200ebb-736d-4b93-bf03-835149d13983
    SERVER: Unspecified, UPnP/1.0, Unspecified
    ST: upnp:rootdevice
    USN: uuid:Socket-1_0-201612FF2EE81B::upnp:rootdevice
    X-User-Agent: redsonic
    
    Info:MAIN:Time 57, idle 166275/s, free 73056, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 58, idle 186429/s, free 73056, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 59, idle 186245/s, free 73056, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    ExtraDebug:HTTP:Received 94 bytes from 192.168.0.206
    ExtraDebug:HTTP:data: M-SEARCH * HTTP/1.1
    HOST: 239.255.255.250:1900
    ST: ssdp:all
    MAN: "ssdp:discover"
    MX: 3
    
    ExtraDebug:HTTP:Is MSEARCH - responding
    ExtraDebug:HTTP:WEMO - sends reply upnp:rootdevice
    ExtraDebug:HTTP:WEMO - Sending HTTP/1.1 200 OK
    CACHE-CONTROL: max-age=86400
    DATE: Fri, 15 Apr 2016 04:56:29 GMT
    EXT:
    LOCATION: http://192.168.0.7:80/setup.xml
    OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
    01-NLS: b9200ebb-736d-4b93-bf03-835149d13983
    SERVER: Unspecified, UPnP/1.0, Unspecified
    ST: upnp:rootdevice
    USN: uuid:Socket-1_0-201612FF2EE81B::upnp:rootdevice
    X-User-Agent: redsonic
    
    ExtraDebug:HTTP:Received 101 bytes from 192.168.0.206
    ExtraDebug:HTTP:data: M-SEARCH * HTTP/1.1
    HOST: 239.255.255.250:1900
    ST: upnp:rootdevice
    MAN: "ssdp:discover"
    MX: 3
    
    ExtraDebug:HTTP:Is MSEARCH - responding
    ExtraDebug:HTTP:WEMO - sends reply upnp:rootdevice
    ExtraDebug:HTTP:WEMO - Sending HTTP/1.1 200 OK
    CACHE-CONTROL: max-age=86400
    DATE: Fri, 15 Apr 2016 04:56:29 GMT
    EXT:
    LOCATION: http://192.168.0.7:80/setup.xml
    OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
    01-NLS: b9200ebb-736d-4b93-bf03-835149d13983
    SERVER: Unspecified, UPnP/1.0, Unspecified
    ST: upnp:rootdevice
    USN: uuid:Socket-1_0-201612FF2EE81B::upnp:rootdevice
    X-User-Agent: redsonic
    
    Info:MAIN:Time 60, idle 348011/s, free 72840, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 4/38 
    Info:GEN:dhcp=0 ip=192.168.0.7 gate=192.168.0.1 mask=255.255.255.0 mac=*********** 
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-63,ssid=***********,bssid=*********** ,channel=11,cipher_type:CCMP
    Info:MAIN:Time 61, idle 183953/s, free 72968, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 62, idle 188144/s, free 73056, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    ExtraDebug:HTTP:Received 94 bytes from 192.168.0.206
    ExtraDebug:HTTP:data: M-SEARCH * HTTP/1.1
    HOST: 239.255.255.250:1900
    ST: ssdp:all
    MAN: "ssdp:discover"
    MX: 3
    
    ExtraDebug:HTTP:Is MSEARCH - responding
    ExtraDebug:HTTP:WEMO - sends reply upnp:rootdevice
    ExtraDebug:HTTP:WEMO - Sending HTTP/1.1 200 OK
    CACHE-CONTROL: max-age=86400
    DATE: Fri, 15 Apr 2016 04:56:29 GMT
    EXT:
    LOCATION: http://192.168.0.7:80/setup.xml
    OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
    01-NLS: b9200ebb-736d-4b93-bf03-835149d13983
    SERVER: Unspecified, UPnP/1.0, Unspecified
    ST: upnp:rootdevice
    USN: uuid:Socket-1_0-201612FF2EE81B::upnp:rootdevice
    X-User-Agent: redsonic
    
    ExtraDebug:HTTP:Received 101 bytes from 192.168.0.206
    ExtraDebug:HTTP:data: M-SEARCH * HTTP/1.1
    HOST: 239.255.255.250:1900
    ST: upnp:rootdevice
    MAN: "ssdp:discover"
    MX: 3
    
    ExtraDebug:HTTP:Is MSEARCH - responding
    ExtraDebug:HTTP:WEMO - sends reply upnp:rootdevice
    ExtraDebug:HTTP:WEMO - Sending HTTP/1.1 200 OK
    CACHE-CONTROL: max-age=86400
    DATE: Fri, 15 Apr 2016 04:56:29 GMT
    EXT:
    LOCATION: http://192.168.0.7:80/setup.xml
    OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
    01-NLS: b9200ebb-736d-4b93-bf03-835149d13983
    SERVER: Unspecified, UPnP/1.0, Unspecified
    ST: upnp:rootdevice
    USN: uuid:Socket-1_0-201612FF2EE81B::upnp:rootdevice
    X-User-Agent: redsonic
    
    Info:MAIN:Time 63, idle 163976/s, free 73056, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    ExtraDebug:HTTP:Received 125 bytes from 192.168.0.181
    ExtraDebug:HTTP:data: M-SEARCH * HTTP/1.1
    HOST: 239.255.255.250:1900
    MAN: "ssdp:discover"
    MX: 1
    ST: urn:dial-multiscreen-org:service:dial:1
    
    ExtraDebug:HTTP:Is MSEARCH - responding
    Debug:HTTP:DRV_SSDP_Send_Advert_To: sent message
    Info:MAIN:Time 64, idle 179097/s, free 72472, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 4/38 
    Info:MAIN:Time 65, idle 185020/s, free 72688, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 66, idle 189387/s, free 72688, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 67, idle 184195/s, free 72688, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 68, idle 181961/s, free 72688, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 69, idle 187891/s, free 72688, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 70, idle 185537/s, free 72688, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:GEN:dhcp=0 ip=192.168.0.7 gate=192.168.0.1 mask=255.255.255.0 mac=*********** 
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-63,ssid=***********,bssid=*********** ,channel=11,cipher_type:CCMP
    ExtraDebug:HTTP:Received 90 bytes from 192.168.0.11
    ExtraDebug:HTTP:data: M-SEARCH * HTTP/1.1
    HOST:239.255.255.250:1900
    MAN:"ssdp:discover"
    MX:4
    ST:ssdp:all
    
    ExtraDebug:HTTP:Is MSEARCH - responding
    ExtraDebug:HTTP:WEMO - sends reply upnp:rootdevice
    ExtraDebug:HTTP:WEMO - Sending HTTP/1.1 200 OK
    CACHE-CONTROL: max-age=86400
    DATE: Fri, 15 Apr 2016 04:56:29 GMT
    EXT:
    LOCATION: http://192.168.0.7:80/setup.xml
    OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
    01-NLS: b9200ebb-736d-4b93-bf03-835149d13983
    SERVER: Unspecified, UPnP/1.0, Unspecified
    ST: upnp:rootdevice
    USN: uuid:Socket-1_0-201612FF2EE81B::upnp:rootdevice
    X-User-Agent: redsonic
    
    ExtraDebug:HTTP:Received 90 bytes from 192.168.0.11
    ExtraDebug:HTTP:data: M-SEARCH * HTTP/1.1
    HOST:239.255.255.250:1900
    MAN:"ssdp:discover"
    MX:4
    ST:ssdp:all
    
    ExtraDebug:HTTP:Is MSEARCH - responding
    ExtraDebug:HTTP:WEMO - sends reply upnp:rootdevice
    ExtraDebug:HTTP:WEMO - Sending HTTP/1.1 200 OK
    CACHE-CONTROL: max-age=86400
    DATE: Fri, 15 Apr 2016 04:56:29 GMT
    EXT:
    LOCATION: http://192.168.0.7:80/setup.xml
    OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
    01-NLS: b9200ebb-736d-4b93-bf03-835149d13983
    SERVER: Unspecified, UPnP/1.0, Unspecified
    ST: upnp:rootdevice
    USN: uuid:Socket-1_0-201612FF2EE81B::upnp:rootdevice
    X-User-Agent: redsonic
    
    Info:MAIN:Time 71, idle 160288/s, free 72688, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    ExtraDebug:HTTP:Received 325 bytes from 192.168.0.11
    ExtraDebug:HTTP:data: NOTIFY * HTTP/1.1
    NTS:ssdp:alive
    HOST:239.255.255.250:1900
    CACHE-CONTROL:max-age=1800
    SERVER:async-upnp-client/0.33.0 UPnP/2.0 Server/1.0
    BOOTID.UPNP.ORG:1674581048
    CONFIGID.UPNP.ORG:1
    LOCATION:http://192.168.0.11:40000/device.xml
    NT:upnp:rootdevice
    USN:UUID:AA3D581A-0324-41B7-8A94-90CD367A6DB0::upnp:rootdevice
    
    Info:MAIN:Time 72, idle 183626/s, free 64080, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 4/38 
    Info:MAIN:Time 73, idle 185139/s, free 72688, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 74, idle 192449/s, free 72688, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 75, idle 184232/s, free 72688, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    ExtraDebug:HTTP:DRV_SSDP_Send_Notify: space: 298 msg:241
    ExtraDebug:HTTP:DRV_SSDP_Send_Notify: 
    NOTIFY * HTTP/1.1
    SERVER: OpenBk
    HOST: 239.255.255.250:1900
    CACHE-CONTROL: max-age=1800
    LOCATION: http://192.168.0.7:80/ssdp.xml
    NTS: ssdp:alive
    NT: upnp:rootdevice
    USN: uuid:323e3825-3ece-2522-99d1-1314477dfea9::upnp:rootdevice
    
    
    
    ExtraDebug:HTTP:DRV_SSDP_Send_Notify: sent message 241 bytes
    Info:MAIN:Time 76, idle 184047/s, free 72168, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Debug:HTTP:DRV_SSDP_Service_Http
    Info:MAIN:Time 77, idle 177754/s, free 71048, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Debug:HTTP:DRV_SSDP_Service_Http
    Info:MAIN:Time 78, idle 183394/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    ExtraDebug:HTTP:Received 90 bytes from 192.168.0.132
    ExtraDebug:HTTP:data: M-SEARCH * HTTP/1.1
    HOST:239.255.255.250:1900
    MAN:"ssdp:discover"
    MX:4
    ST:ssdp:all
    
    ExtraDebug:HTTP:Is MSEARCH - responding
    ExtraDebug:HTTP:WEMO - sends reply upnp:rootdevice
    ExtraDebug:HTTP:WEMO - Sending HTTP/1.1 200 OK
    CACHE-CONTROL: max-age=86400
    DATE: Fri, 15 Apr 2016 04:56:29 GMT
    EXT:
    LOCATION: http://192.168.0.7:80/setup.xml
    OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
    01-NLS: b9200ebb-736d-4b93-bf03-835149d13983
    SERVER: Unspecified, UPnP/1.0, Unspecified
    ST: upnp:rootdevice
    USN: uuid:Socket-1_0-201612FF2EE81B::upnp:rootdevice
    X-User-Agent: redsonic
    
    Info:MAIN:Time 79, idle 363906/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    ExtraDebug:HTTP:Received 90 bytes from 192.168.0.132
    ExtraDebug:HTTP:data: M-SEARCH * HTTP/1.1
    HOST:239.255.255.250:1900
    MAN:"ssdp:discover"
    MX:4
    ST:ssdp:all
    
    ExtraDebug:HTTP:Is MSEARCH - responding
    ExtraDebug:HTTP:WEMO - sends reply upnp:rootdevice
    ExtraDebug:HTTP:WEMO - Sending HTTP/1.1 200 OK
    CACHE-CONTROL: max-age=86400
    DATE: Fri, 15 Apr 2016 04:56:29 GMT
    EXT:
    LOCATION: http://192.168.0.7:80/setup.xml
    OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
    01-NLS: b9200ebb-736d-4b93-bf03-835149d13983
    SERVER: Unspecified, UPnP/1.0, Unspecified
    ST: upnp:rootdevice
    USN: uuid:Socket-1_0-201612FF2EE81B::upnp:rootdevice
    X-User-Agent: redsonic
    
    Info:MAIN:Time 80, idle 171129/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:GEN:dhcp=0 ip=192.168.0.7 gate=192.168.0.1 mask=255.255.255.0 mac=*********** 
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-63,ssid=***********,bssid=*********** ,channel=11,cipher_type:CCMP
    Info:MAIN:Time 81, idle 182530/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 82, idle 368162/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 83, idle 188963/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 84, idle 183578/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 85, idle 192926/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 86, idle 381857/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 87, idle 192538/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 88, idle 183750/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 89, idle 184743/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 90, idle 187492/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:GEN:dhcp=0 ip=192.168.0.7 gate=192.168.0.1 mask=255.255.255.0 mac=*********** 
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-63,ssid=***********,bssid=*********** ,channel=11,cipher_type:CCMP
    Info:MAIN:Time 91, idle 185378/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 92, idle 183123/s, free 71136, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 93, idle 186673/s, free 71048, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 94, idle 182970/s, free 71136, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 95, idle 186308/s, free 71136, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 96, idle 187866/s, free 71136, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 97, idle 183699/s, free 62528, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 4/38 
    Info:MAIN:Time 98, idle 187059/s, free 71136, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 99, idle 187407/s, free 71136, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 100, idle 186053/s, free 62528, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 4/38 
    Info:GEN:dhcp=0 ip=192.168.0.7 gate=192.168.0.1 mask=255.255.255.0 mac=*********** 
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-68,ssid=***********,bssid=*********** ,channel=11,cipher_type:CCMP
    Info:MAIN:Time 101, idle 365301/s, free 62528, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 4/38 
    ExtraDebug:HTTP:Received 334 bytes from 192.168.0.11
    ExtraDebug:HTTP:data: NOTIFY * HTTP/1.1
    NTS:ssdp:alive
    HOST:239.255.255.250:1900
    CACHE-CONTROL:max-age=1800
    SERVER:async-upnp-client/0.33.0 UPnP/2.0 Server/1.0
    BOOTID.UPNP.ORG:1674581048
    CONFIGID.UPNP.ORG:1
    LOCATION:http://192.168.0.11:40000/device.xml
    NT:UUID:AA3D581A-0324-41B7-8A94-90CD367A6DB0
    USN:UUID:AA3D581A-0324-41B7-8A94-90CD367A6DB0
    
    Info:MAIN:Time 102, idle 179293/s, free 71136, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 103, idle 187825/s, free 71136, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 104, idle 184465/s, free 71136, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 105, idle 183302/s, free 71136, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    ExtraDebug:HTTP:DRV_SSDP_Send_Notify: space: 298 msg:241
    ExtraDebug:HTTP:DRV_SSDP_Send_Notify: 
    NOTIFY * HTTP/1.1
    SERVER: OpenBk
    HOST: 239.255.255.250:1900
    CACHE-CONTROL: max-age=1800
    LOCATION: http://192.168.0.7:80/ssdp.xml
    NTS: ssdp:alive
    NT: upnp:rootdevice
    USN: uuid:323e3825-3ece-2522-99d1-1314477dfea9::upnp:rootdevice
    
    
    
    ExtraDebug:HTTP:DRV_SSDP_Send_Notify: sent message 241 bytes
    Info:MAIN:Time 106, idle 185467/s, free 71136, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Debug:HTTP:DRV_SSDP_Service_Http
    Info:MAIN:Time 107, idle 176955/s, free 71136, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Debug:HTTP:DRV_SSDP_Service_Http
    Info:MAIN:Time 108, idle 183934/s, free 71136, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 109, idle 182005/s, free 71048, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 110, idle 186312/s, free 71136, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:GEN:dhcp=0 ip=192.168.0.7 gate=192.168.0.1 mask=255.255.255.0 mac=*********** 
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-63,ssid=***********,bssid=*********** ,channel=11,cipher_type:CCMP
    Info:MAIN:Time 111, idle 182494/s, free 71136, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 112, idle 185534/s, free 71136, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 113, idle 185939/s, free 71136, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 114, idle 186328/s, free 71136, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 115, idle 198402/s, free 71136, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 116, idle 186852/s, free 71136, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 117, idle 186165/s, free 71136, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 118, idle 184826/s, free 71136, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 3/38 
    
  • #275 20403428
    p.kaczmarek2
    Moderator Smart Home
    So MSEARCH is seen, but the reply doesn't seem to satisfy Alexa so it don't go further.

    Ok, I'll let you know once the driver is updated.
    Helpful post? Buy me a coffee.
  • #276 20404694
    droege
    Level 10  
    Hi again,

    I flashed on my RGBW BL602 the v.1.15.384, and the errors are the same as with .342.

    It seems, that the issue is the access to the web-page.
    With serial line, I got the following out of it:

    Info:MQTT:channelSet channel 0
    Info:MQTT:channelSet NOT 'set'
    Info:MQTT:channelSet part topic led_dimmer/get
    Info:MQTT:channelSet channel 0
    Info:MQTT:channelSet NOT 'set'
    Info:MAIN:Time 25, idle 0/s, free 104424, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Time 26, idle 0/s, free 104424, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Time 27, idle 0/s, free 104424, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Time 28, idle 0/s, free 104424, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Time 29, idle 0/s, free 104424, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Time 30, idle 0/s, free 104424, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/21
    [ 31788][WARN : bl_mtd.c: 201] addr@0x230adb98 is xip flash, size 8
    Info:MAIN:Time 31, idle 0/s, free 104424, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Boot complete time reached (30 seconds)
    Info:MAIN:Time 32, idle 0/s, free 104424, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/21
    Info:MAIN:Time 33, idle 0/s, free 104424, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/21
    Current task sp data:
    RA:30303030, mstatus:80007880
    A0:4202a470 A1:00000000 A2:00000000 A3:00000000 A4:00000000 A5:00000000 A6:00000000 A7:00000000
    T0:98000000 T1:000007ff T2:00000000 T3:00000000 T4:00000000 T5:00000000 T6:33333200
    S0:30303030 S1:30303030 S2:30303030 S3:30303030 S4:30303030 S5:30303030 S6:30303030 S7:30303030
    S8:30303030 S9:30303030 S10:30303030 S11:30303030
    Exception Entry--->>>
    mcause 38000002, mepc 30303030, mtval 00000000
    Exception code: 2
    msg: Illegal instruction

    The exceptions occurs, when my browser tried to access the web-page.

    Before that, it seems, that all the tasks, incl. MQTT are working.

    Hope that helps.

    And again, going back to .284 is fine and everything works.
    Cheers

    Got additional information:
    After restart with .384 the device listens to MQTT correctly.
    What I got from MQTT is that all channels were set to FF and dimmer was set to -1.

    This is true after EACH RESTART.
    So maybe the storage of last value isn't working correctly?
    I have enabled Flag12 to store all states.
    I've set the startup-values even to 0 instead of -1, but nothing changes.

    When I correct these values via MQTT, which is possible, I can also access the web-page correctly.
    After a new restart, with an opened web-page from last session, the crash happens again, and the values, which I got via MQTT are the same as above.

    What works is:
    No web-page at boot/restart time => correct values of channels and dimmer via MQTT and then opening a web-page.

    But each restart of the device produces the same strange behavious, and switches on all channels.

    That's what I found.
  • #277 20404726
    p.kaczmarek2
    Moderator Smart Home
    Can you please narrow a bit more the versions and tell me which update is breaking?

    Can you try disabling some flags? I have a feeling that "remember last led state" might be problematic on this platform, but I'm not sure yet.

    Can you show which flags do you have enabled? Is the page breaking also in safe mode?
    Helpful post? Buy me a coffee.
  • #278 20404733
    droege
    Level 10  
    Yep, you are right.
    Disabling Flag 12 seems to solve the issue.
    Interestingly enough .284 did a correct job on that.

    Beyond that, I got the following:
    [ 708][WARN : bl_mtd.c: 201] addr@0x230adb98 is xip flash, size 8

    After reboot, without Flag12 all channels are again at FF, because saturation is set to 0.
    When restting it to 100 via MQTT everything is fine, until next restart.
  • #279 20404740
    p.kaczmarek2
    Moderator Smart Home
    Can you (or some other user) narrow down which revision breaks flag 12 on BL602?
    Helpful post? Buy me a coffee.
  • #280 20404744
    droege
    Level 10  
    As said, it's somewhere between .284 and .342.
    I wil try to investigate:

    It's before .316
    it's even before .312

    Added after 6 [hours] 58 [minutes]:

    OK,
    I figured it out, partially.
    .302 breaks it definitely.
    .301 works, but already reports -1 on dimmer value after restart for MQTT.
    This doesn't seem to be the problem, but it's not nice.
    So:
    .302 breaks the functionality of Flag12 and before that between .301 and .284 the dimmer value after restart (at least via MQTT) jumps to -1.

    Hope that helps.
  • #281 20406155
    spin55
    Level 17  
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!

    Both RGB drivers were updated via OTA to BL602 version 1.15.383 without any problems.
    They are integrated into Home Assistant and they are controlled well from here and they update the data on the web correctly, but not the other way around. When I control from the web, the data is not updated in Home Assistant, only on and off, the other brightness and color controls are not.
    Does this happen to anyone else?

    [
    mqtt:
      light:
      - unique_id: "OpenBL602_429A0BD6_light"
        name: "obl429A0BD6"
        rgb_command_template: "{{ '#%02x%02x%02x0000' | format(red, green, blue)}}"
        rgb_value_template: "{{ value[0:2] | int(base=16) }},{{ value[2:4] | int(base=16) }},{{ value[4:6] | int(base=16) }}"
        rgb_state_topic: "obl429A0BD6/led_basecolor_rgb/get"
        rgb_command_topic: "cmnd/obl429A0BD6/led_basecolor_rgb"
        command_topic: "cmnd/obl429A0BD6/led_enableAll"
        state_topic: "obl429A0BD6/led_enableAll/get"
        availability_topic: "obl429A0BD6/connected"
        payload_on: 1
        payload_off: 0
        brightness_command_topic: "cmnd/obl429A0BD6/led_dimmer"
        brightness_state_topic: "obl429A0BD6/led_dimmer/get"
        brightness_scale: 100
  • #283 20413308
    nemo700
    Level 1  
    benek194 wrote:
    I've flashed 2 devices Magic Home Led Controller ZJ-BWCE-RGBW V1.0 to BL602,
    I was able also to link them both with Home Assistant but only one in a time.
    Both can not work together because the MAC address duplication, I am getting the error while trying to change it even in newest build. (OpenBL602_1.15.296)


    I have the same problem as benek194.

    I flashed two (switch-sw) relay devices with bl602 with the current version 1.15.398 and both get the same MAC address. (C0:50:43:C9:00:01)

    All attempts to change this have failed. Is there a way to customize this?

    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
  • ADVERTISEMENT
  • #284 20413320
    p.kaczmarek2
    Moderator Smart Home
    I'll look into it, at the moment I am not sure if the BL602 SDK has MAC operation implemented
    Helpful post? Buy me a coffee.
  • #285 20423619
    droege
    Level 10  
    Hi there,
    are there any news for the BL602?

    Thanks
  • #286 20431261
    Zain00
    Level 11  
    @p.kaczmarek2

    Good Work with Alexa!

    I tried Alexa discovery with the latest build, with a plug and a bulb.
    They show up on Alexa app and I can turn them on/off with voice commands
    But with the bulb I can't control the brightness only on/off, I think Tasmota uses Hue Bridge for lights.
    I hope we see Alexa next for BL602 chips.
  • #287 20432368
    omelchuk890
    Level 11  
    nemo700 wrote:
    benek194 wrote:
    I've flashed 2 devices Magic Home Led Controller ZJ-BWCE-RGBW V1.0 to BL602,
    I was able also to link them both with Home Assistant but only one in a time.
    Both can not work together because the MAC address duplication, I am getting the error while trying to change it even in newest build. (OpenBL602_1.15.296)

    I have the same problem as benek194.
    I flashed two (switch-sw) relay devices with bl602 with the current version 1.15.398 and both get the same MAC address. (C0:50:43:C9:00:01)
    All attempts to change this have failed. Is there a way to customize this?

    4 devices were waiting in the wings - OTA mode, and waited. There is a fifth, but I'm too lazy to reopen it, let it work on 1.14.35.
    The firmware was carried out in three stages to eliminate the possibility of problems with mac addresses, which appeared in colleagues on the topic, as they wrote above.
    1.14.35->1.15.396->1.15.407
    Everything went fine. OTA ->1.15.415
    Thank you so much, Dear @pkaczmarek2 for your hard work!!!
    Spoiler:
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working! Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working! Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working! Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
  • #288 20433598
    p.kaczmarek2
    Moderator Smart Home
    Nice update @omelchuk890 , you have much more BL devices than me.

    Well, currently we have done a little refactor of I2C and LED drivers and reduced binary size for all platforms. No new features, just a maintenance work:
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    Better Alexa support is on a TODO list.

    Nothing BL602-specific yet, but I have received a Sonoff bulb as a donation, so we will be making a video about it soon and I will also try to use it to diagnose and fix reported issues.

    In a meantime, please take a look at our channel:
    https://www.youtube.com/@elektrodacom
    We have released OBK guides for HA and ioBroker, soon we will release full OBK guide.

    I still need to get the BL602+CSE power metering chip device somehow.
    Helpful post? Buy me a coffee.
  • #289 20435353
    Zain00
    Level 11  
    p.kaczmarek2 wrote:
    Due to the larger number of BL602 device reports, OTA has been added to BL602.
    The problems I am aware of so far is:
    - Sonoff CSE power metering chip device (but I would need to get that one myself for testing)
    - Zain LED driver issues report (but I don't have any devices with LED drivers on BL602...)
    - the LED blink on the device during startup (will try to check)
    - BL0942 driver works, but BL0937 driver is missing a hardware counter
    - new BLs issue (will investigate)

    If you want to help with project and support buying new devices, please tip at: https://paypal.me/openshwprojects


    I'm also noticing connection issues with BL602 bulbs it drops of the network after several hours and I have to manually turn it OFF/ON to make it connect to the network. When it losses connection the bulb stay at last state before losing the connection but I can't access the web page and it's not listed as connected in the router.

    This happens with 2 Sonoff bulb and both of them loss connection. I have a 3rd BL602 bulb from other manufacturer but haven’t used it much, I will try to connect it and test if its losses connection or not
  • #290 20435518
    p.kaczmarek2
    Moderator Smart Home
    It would be very useful to get a TX/RX log for that issue, but I understand that it is very hard with bulbs.

    Maybe someone with BL602 dev board can help.

    If not, I will try to run my dev board overnight.

    Okay, we have started working on YT video featuring a Sonoff Bulb (a donation from one of the users), so far only recording part is done:
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    I will also try to use this bulb to find out potential issues with LED driver.
    Helpful post? Buy me a coffee.
  • #291 20438377
    p.kaczmarek2
    Moderator Smart Home
    I have identified one issue that appears when using I2C LED driver along with non-default colours remap (Like SM2135_Map) and a "Remember last LED state flag"
    There was a logical error which caused remap to be applied after the color is restored, so first color was wrong (it was created without remap).
    I have fixed it and now all remaps for LED drivers are saved in flash automatically, so from now on, you can just execute SM2135_Map once and the device will remember it, you don't have to put it in short startup command anymore.

    NOTE: if you already have that command in short startup command, you don't have to do anything, it won't hurt.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #293 20443278
    nomek
    Level 18  
    Hello all.
    What could be the reason that OTA is not working?
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!

    There is info starting OTA ... and nothing more...
    Maybe im doing something wrong>?
  • #294 20443284
    p.kaczmarek2
    Moderator Smart Home
    According the commits history, the BL602 OTA was added on January 22 and you have build from Jan 12.
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    Ten days.


    EDIT: I will also post it here - thanks to the donor sending us a bulb we finally made BL602 programming video:


    ]Link[/url]
    Helpful post? Buy me a coffee.
  • #295 20443433
    nomek
    Level 18  
    Yes, You are right.. probably i was blind yesterday.. :-)
    now is the newest Build on Feb 17 2023 06:32:35 version 1.15.454

    Dodano po 4 [godziny] 19 [minuty]:

    Successfully flashed 2 devices but im facing the same MAC problem.
    Both starts with the same MAC (C0:50:43:C9:00:01) so without MAC change they cannot be both in the network :-( ....

    Dodano po 21 [minuty]:

    And one more - device should remember last Relay state - now after power down is always OFF.
  • #296 20448812
    Zain00
    Level 11  
    Zain00 wrote:
    This is the log before BL602 lost connection


    @p.kaczmarek2
    Did the log give you anything useful?
    This was obtained by connecting the same BL602 module to external 3.3V source and Tx/Rx readings from BLDevCube
  • #297 20448837
    p.kaczmarek2
    Moderator Smart Home
    Hello @Zain00, does the log stops printing after the deauth event?

    By stop printing, I mean, does this message stops appearing?
    
    Info:MAIN:Time 129263, idle 0/s, free 99568, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 3/21
    

    It seems I must look into the BL602 watchdog, so the BL602 can restart itself automatically in case of the issue.

    @nomek I will look into that MAC address stuff. You are not the first one to report it, but I didn't experience it yet.
    Helpful post? Buy me a coffee.
  • #298 20448873
    Zain00
    Level 11  
    Yes, it stops printing.
    But if you make it automatically restart it will trigger the startup commands right ?
    Because the problem sometimes occur when the light is off and that will trigger the startup light on commands at a time you wouldn't want lights on
  • #299 20449984
    p.kaczmarek2
    Moderator Smart Home
    Zain00 wrote:

    But if you make it automatically restart it will trigger the startup commands right ?

    Good point, it would execute them again. Unless... there is an API to get reboot reason. I will check.


    I have looked into MAC change, but there seems to be some kind of the issue with SDK.
    If anyone is trying some coding with BL602, here's a word of warning.
    Better don't use this function:
    
    EF_Ctrl_Write_MAC_Address_Opt
    

    it just most likely broke something into my BL602 Efuse and it has WiFi issues now (it's unable to get past DHCP stage and the access point mode is not accepting connections). I will investigate it tomorrow, but just to be safe, I am ordering next dev board from Aliexpress.

    Suprisingly, the problem persists even after "Erase All" option is enabled. EF must not be affected by this erase.
    Helpful post? Buy me a coffee.
  • #300 20458374
    p.kaczmarek2
    Moderator Smart Home
    SSDP driver on BL602 is enabled (DDP for xLights as well)
    In short startup command do "startDriver SSDP", Windows will now detect your device:
    Tasmota replacement for BL602, programming, pairing with Home Assistant, now with OTA working!
    Helpful post? Buy me a coffee.

Topic summary

The discussion centers on a custom Tasmota-like firmware replacement for the BL602 platform by Bouffalo Lab, enabling integration with Home Assistant via MQTT. Key topics include flashing the firmware using USB to UART converters, SDK compilation, and device pairing. Users report successful flashing on MagicHome LED controllers (RGB, RGBW, single color) and Sonoff devices, with detailed guidance on GPIO pin identification and configuration for PWM and relay functions. MQTT integration supports commands for color, dimmer, hue, saturation, and device control, with ongoing improvements to MQTT topic naming, discovery, and feedback reporting. Challenges addressed include MQTT buffer limitations causing device instability, startup behavior with LED blinking, and the absence of OTA updates for BL602 (unlike Beken platforms). The firmware supports saving and restoring channel states, configurable MQTT reporting flags, and plans for Alexa Hue emulation. Users share troubleshooting steps for flashing errors, network connectivity, and device crashes, with developer responses including bug fixes, feature additions, and testing requests. The project emphasizes open-source collaboration, aiming to free IoT devices from manufacturer servers, enhance privacy, and unify multi-vendor ecosystems under a single firmware solution.
Summary generated by the language model.
ADVERTISEMENT