logo elektroda
logo elektroda
X
logo elektroda

OpenBeken DS-101JL 3-Gang Switch: Alexa Integration, Wemo Limitations & Hue Emulation

jkwim 3783 9
Best answers LABEL_AI_GENERATED

Can OpenBeken’s Wemo emulation control multiple relays from Alexa on one device, or do I need Hue emulation like Tasmota?

OpenBeken’s current Wemo emulation only exposes one controllable device per physical IP, so Alexa will discover one switch and usually control only the first relay; multi-device Wemo support is still on the TODO list [#20583903][#21837104][#21837455] Alexa can list multiple virtual plugs, but control still collapses to channel 1 when everything shares the same IP:port, and Tasmota’s multi-Wemo approach uses separate TCP ports per virtual device rather than just different URL paths [#21837104] The current OpenBeken Wemo driver therefore behaves as a single-device integration and picks the first relay-like channel it finds [#21837104] As a workaround, one user made switch 1 work directly with Wemo, then used a Tasmota device with Hue Bridge Multiple Device Emulation and dummy relays for the extra Alexa devices, forwarding those relay states to OpenBeken via MQTT for switch 2 and switch 3 [#20623298]
AI summary based on the discussion. May contain errors.
ADVERTISEMENT
  • Wemo exposes only one Alexa device per IP

    #1 20582848
    jkwim
    Level 13  
    Posts: 186
    Help: 4
    Rate: 25
    I have successfully openbekened a DS-101JL 3-Gang Switch.
    https://www.elektroda.com/rtvforum/topic3978184.html

    I wanted to integrate with Alexa.

    Added following startup commands :
    
    backlog startDriver SSDP; startDriver Wemo
     


    Tried to integrate with Alexa. Alexa detects a single device.

    And only Switch one can be controlled via Alexa.

    Is this a limitation of Wemo that only one friendly name for one IP address?

    If so, is it possible to implement Hue Emulation like in Tasmota where there can be multiple friendly names, therefore multiple devices within a single IP address?

    Added after 3 [hours] 30 [minutes]:

    Tasmota does support multiple swithes:

    https://github.com/arendst/Tasmota/blob/development/tasmota/tasmota_xdrv_driver/xdrv_21_wemo_multi.ino
  • ADVERTISEMENT
  • #2 20583903
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14793
    Help: 659
    Rate: 12938
    You are correct. The multiple wemo integration is on the TODO list. I was going to do it some time ago, but my tester with Alexa was not available. Do you have some free time and are you willing to test if it works (most likely several times) and potentially help debug issues with that? The Wemo protocol is known, but I don't have Alexa myself so I don't really know how to test it myself.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20589816
    jkwim
    Level 13  
    Posts: 186
    Help: 4
    Rate: 25
    Certainly I would like to help with testing. I have access to an Echo Dot.
  • Hue emulation workaround for Alexa control of 3-gang switch

    #4 20623298
    jkwim
    Level 13  
    Posts: 186
    Help: 4
    Rate: 25
    As a workaround to make the 3-gang switch fully controllable from Alexa, I did the following:

    1. Switch 1 could be directly integrated with Alexa using Wemo driver (StartDriver Wemo)

    2. Used a smart plug running Tasmota with Hue Bridge Multiple Device Emulation

    a. Defined two Dummy Relays using spare GPIOs.
    b. They appear in Hue emulation page and gave some names

    OpenBeken DS-101JL 3-Gang Switch: Alexa Integration, Wemo Limitations & Hue Emulation

    Now the additional two devices can be discovered in Alexa.

    On Tasmota device, using scripting language, detected the POWER status of these Dummy Relays and triggered MQTT publish commands towards OpenBK 3-Gang switch for switch2 and switch3.

    So until Wemo Multi Device Driver is implemented I have a working setup for the 3-gang switch.
  • ADVERTISEMENT
  • #5 20726870
    bcole1977
    Level 1  
    Posts: 1

    Hi, has there been any progress with adding the option for hue emulation like Tasmota? If any testing is needed, I can help.
  • #6 21091831
    chabalalasmike
    Level 6  
    Posts: 7
    Rate: 1
    any progress on this please?
  • #7 21427725
    rustynail1
    Level 4  
    Posts: 6
    No news about wemo multiple device?
  • Wemo emulation still maps Alexa to relay 1

    #8 21837104
    divadiow
    Level 38  
    Posts: 5234
    Help: 449
    Rate: 918
    p.kaczmarek2 wrote:
    You are correct. The multiple wemo integration is on the TODO list.


    I've been playing with the OpenBeken Wemo driver in an attempt to get multiple 'plugs' to be independently controllable from one physical device. I can get as far as detection of all configured rel/btn channels, but Alexa will always just toggle controls for the first channel.

    Alexa app screenshot showing devices Plug1Lounge, Plug2Lounge, Plug3Bedroom1, Plug4Bedroom2 with Off toggles Alexa app setup screen showing “4 devices found and connected” with a “Next” button.

    It can advertise multiple controllees, and Alexa will happily list multiple 'plugs', each with its own name. The problem shows up at the control layer: whichever plug I press in Alexa, the HTTP/SOAP requests arriving at OpenBeken always resolve to device/channel 1, so everything ends up toggling the first relay.

    I tried to distinguish devices by URL path (/wemo/2/..., /wemo/3/...) and making each virtual device present its own setup.xml and control URLs. That makes the XML look correct, but still Alexa seems to collapse control to a single endpoint when everything shares the same IP:port.

    That's when I took a look at how Tasmota does it. Their line is basically - use Wemo emulation for single relay devices, and for anything with multiple relays / lights, use Hue emulation instead. Their multi-Wemo approach isn’t different URL paths on one port — it’s separate TCP ports per virtual device.

    To replicate with OpenBeken I don't know what would mean for http listener, sockets, memory use etc - development beyond drv_wemo.c I assumed, and maybe not worth the effort. Hue should probably be developed instead.

    So instead I refocused on making single-device Wemo emulation as correct and faithful as possible, because that is still genuinely useful for a lot of simple plug/relay devices.

    Changes I've tried to make to the Wemo driver:

    -Fixed up setup.xml so fields like serialNumber and presentationURL are correct and consistent
    -Made SSDP replies more “Wemo-ish” and tolerant for scanners by responding to both:

    urn:Belkin:device:** and
    urn:Belkin:device:controllee:1


    -Improved SOAP parsing for GetBinaryState / SetBinaryState so it’s not relying on one very specific substring.
    -XML-escaped the friendly name so labels don’t break XML.
    -Kept the classic level state variable in eventservice.xml for better compatibility.
    -implemented stop/start function

    So the driver now will only present one device for discovery - the selection logic is this:

    Scan channels from lowest index upwards (Channel 1, then 2, then 3…).
    Pick the first channel that is considered a relay, i.e. it matches either:

    CHANNEL_IsPowerRelayChannel(idx) or
    h_isChannelRelay(idx) (relay-ish channel type)

    If no relay channel is found, fall back to the first channel of type ChType_Toggle.
    If nothing matches, Wemo effectively has no controllable channel (no “plug” state).

    Upgrade from general release doesn't seem to affect operation. If the channel has a label when added to Alexa, that name will be used.

    So, I'm not sure if this a worthwhile change. PR's here anyway: https://github.com/openshwprojects/OpenBK7231T_App/pull/1989
    Just thought I'd share my experiences/thoughts.
  • ADVERTISEMENT
  • Separate TCP ports needed for multi-Wemo devices

    #9 21837455
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14793
    Help: 659
    Rate: 12938
    I don't have Alexa to try but if it works better, then I can merge.

    divadiow wrote:

    It can advertise multiple controllees, and Alexa will happily list multiple 'plugs', each with its own name. The problem shows up at the control layer: whichever plug I press in Alexa, the HTTP/SOAP requests arriving at OpenBeken always resolve to device/channel 1, so everything ends up toggling the first relay.

    I tried to distinguish devices by URL path (/wemo/2/..., /wemo/3/...) and making each virtual device present its own setup.xml and control URLs. That makes the XML look correct, but still Alexa seems to collapse control to a single endpoint when everything shares the same IP:port.


    Is it even possible to do it on single port? I mean, supported by protocol? Or straight up impossible?


    divadiow wrote:

    That's when I took a look at how Tasmota does it. Their line is basically - use Wemo emulation for single relay devices, and for anything with multiple relays / lights, use Hue emulation instead. Their multi-Wemo approach isn’t different URL paths on one port — it’s separate TCP ports per virtual device.

    To replicate with OpenBeken I don't know what would mean for http listener, sockets, memory use etc - development beyond drv_wemo.c I assumed, and maybe not worth the effort. Hue should probably be developed instead.

    I think this using TCP socket instead of HTTP server is very, very simple. I assume they don't fragmentate packets? Still, separate sockets is the easiest part for me.

    HTTP header can be parsed just with few lines, there is not match there, sockets can be kept in array, and with enough luck, you can use single buffer for received and sent data - no need for separate buffers. I know that OBK HTTP server has separate buffers, but I would try with single buffer first. It should work as long as packets are not long...

    I could help more with it if issue arise, depending on free time, currently I am finish ESP32 support for flasher.

    I could also try to make a minimal "multi port server demo"... I mean, I don't know Wemo protocol, but if you are asking just about HTTP overheat, then I think it's very low. I wouldn't worry about this extra layer. You basically create TCP socket, and for read and write operations, you just handle HTTP Header.
    Helpful post? Buy me a coffee.
  • #10 21869062
    divadiow
    Level 38  
    Posts: 5234
    Help: 449
    Rate: 918
    optimised wemo and ssdp a bit to try to save a few bytes. it works OK but driver is only made better for 1 wemo device per physical OBK device.

    not sure if you'll consider it worth the file size changes.
    Attachments:
    • wemo_960cac6360e5_vs_1.18.278_matched_file_size_report.csv (17.87 KB) You must be logged in to download this attachment.

Topic summary

LABEL_AI_GENERATED
The discussion concerns integrating an OpenBeken-flashed DS-101JL 3-gang switch with Alexa using the Wemo and SSDP drivers. Alexa initially discovers only one device, and only the first relay can be controlled, suggesting a limitation in the current Wemo implementation for multiple channels per IP/device. Multiple-device Wemo support is identified as a TODO item, and testing with an Echo Dot is requested. As a workaround, a Tasmota smart plug with Hue Bridge multiple-device emulation is used to expose additional virtual devices to Alexa, then MQTT and scripting are used to control the remaining OpenBeken switch channels. Later posts report continued attempts to make OpenBeken’s Wemo driver advertise multiple independently controllable plugs, but Alexa still routes control to channel 1 even when multiple endpoints and setup.xml entries are exposed. Development notes indicate the Wemo/SSDP code was optimized for size but remains limited to one Wemo device per physical OpenBeken device.
AI summary based on the discussion. May contain errors.
ADVERTISEMENT