Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9.1.0.2 Wemo and Alexa group problem #10165

Closed
4 of 15 tasks
Duffy77 opened this issue Dec 17, 2020 · 10 comments
Closed
4 of 15 tasks

9.1.0.2 Wemo and Alexa group problem #10165

Duffy77 opened this issue Dec 17, 2020 · 10 comments
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended

Comments

@Duffy77
Copy link

Duffy77 commented Dec 17, 2020

PROBLEM DESCRIPTION

I have flashed some Devices with 9.1.0.2 and enabled WeMo Emulation.
Devices where found by Alexa with the right friendly Name (Stehlampe, Vitrine, Ventilator, Blume ...)
When i try to group the devices (Alexa App or at the PC) the wrong device is grouped and some devices are not possible to group.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

  • Read the Contributing Guide and Policy and the Code of Conduct
  • Searched the problem in issues
  • Searched the problem in the docs
  • Searched the problem in the forum
  • Searched the problem in the chat
  • Device used (e.g., Sonoff Basic): Teckin sp22_
  • Tasmota binary firmware version number used: 9.1.0.2 and 9.2.0.1
    • Pre-compiled
    • Self-compiled
      • IDE / Compiler used: _____
  • Flashing tools used: OTA
  • Provide the output of command: Backlog Template; Module; GPIO 255:
  Configuration output here:


  • If using rules, provide the output of this command: Backlog Rule1; Rule2; Rule3:
  Rules output here:


  • Provide the output of this command: Status 0:
  STATUS 0 output here:


  • Provide the output of the Console log output when you experience your issue; if applicable:
    (Please use weblog 4 for more debug information)
  Console output here:


TO REPRODUCE

  1. let discover alexa new devices with WeMo emulation
  2. min. 2 devices (i have used 6 devices) (Stehlampe, Vitrine, Ventilator, Blume,...)
  3. go to alexa app or alexa.amazon.de and create a new group
  4. put the first device in the new group and save (e.g. Stehlampe)
  5. save the group
  6. open the group and look which devices are in there. if you have luck, then Stehlampe is in your group. But if you have no luck, another device (e.g. Vitrine) is in your group. in my szenario with 6 devices i only can put 2 devices in the group. the other devices are displayed but never put in the group.

so you can not put the device vitrine in one group, because Stehlampe is always used when you choose Vitrine.
seems, that there is a unique id in the device, which is discovered by alexa and when you group the device, the first device with that id is used...?

EXPECTED BEHAVIOUR

i would like to group devices in rooms, but some devices are not groupable

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

@ascillato2 ascillato2 added the duplicated Result - Duplicated Issue label Dec 17, 2020
@s-hadinger
Copy link
Collaborator

I've never seen this issue. Do your Tasmota devices have fixed IP addresses?

@ascillato2 ascillato2 reopened this Dec 17, 2020
@ascillato2 ascillato2 added awaiting feedback Action - Waiting for response or more information troubleshooting Type - Troubleshooting and removed duplicated Result - Duplicated Issue labels Dec 17, 2020
@Duffy77
Copy link
Author

Duffy77 commented Dec 17, 2020 via email

@Duffy77
Copy link
Author

Duffy77 commented Dec 17, 2020 via email

@peterchs
Copy link
Contributor

peterchs commented Dec 18, 2020

I have same/similar issue unable to add wemo emu switch from tasmota to routine or group, yet it can be turned on and off from alexa. New wemo emu switch from node-red works fine so there is something different about tasmota wemo emu. Was fine until recent updates. I have gen2 dot. Tried setoption109 0 and 1 same issue.

@peterchs
Copy link
Contributor

peterchs commented Dec 18, 2020

I rolled back and upgraded/tested each build from 8.5.1 deleting the device from alexa, updating tasmota build, discovering devices in alexa and then testing the newly added plug to add to a routine.

Previous builds were ok including 9.1.0 tasmota.bin so not seeing the same problem as the OP here on that version. But 9.2.0 for some reason the wemo plug even though its listed in the main devices list, doesnt come up in the 'add to routine' dialog. It does come up for group edits.

Perhaps not exactly the same issue as the OP (my device isnt showing up in routine adds but it is in group adds) but it would indicate some sort of issue with wemo emu.

Something to do with 742171c perhaps?

@s-hadinger
Copy link
Collaborator

I will have a look but apart from minot maintenance changes, wemo code hasn't changed for a while. The wemo multi is not enabled unless you self compile.

@peterchs
Copy link
Contributor

Are you sure about multi being only self compile?

Looks to me that USE_EMULATION_WEMO (flag that seems to be in most builds) was changed so that xdrv_21_wemo_multi.ino was included instead of xdrv_21_wemo.ino as part of this commit:

742171c

@arendst
Copy link
Owner

arendst commented Dec 19, 2020

Alas, multi is enabled by default as it was promissed to be a direct replacement for the single version.

How ignorent I could be....

@peterchs
Copy link
Contributor

peterchs commented Dec 19, 2020

Maybe needs a new issue but..

I've tested with a bin from the original multi wemo PR discussion, and it too has the issue with the device not appearing in the routines list, confirming that it is the multi wemo causing my issue.
#9208 (comment)

I have also noted that a duplicate device appears during upgrades from original single wemo to multi wemo emu when doing discovery post upgrade. I expect this duplicate device is because the multi code now uses the device id in the generation of the serial number and uuid returned to alexa during discovery. That would suggest all users of wemo emu upgrading to 9.2.0, who do a subsquent Alexa discovery will end up with duplicate devices. I have single relay/switch devices (mini, TH10).

I would say the presented wemo serial/uuid needs to be consistent through upgrades - for single/first devices that would mean disabling the involvement of the device id in the friendly name/serial number/uuid introduced by multi wemo emu PR. Additionally this may fix the problem for device 1 not turning up in routines device list - it could be the serial number change from the standard wemo format causes problems.

@peterchs
Copy link
Contributor

I confirm my suspicions are right.

I compiled a binary from dev branch with the wemo multi code lines reverted so the setup xml friendly name, uuid and serial number no longer included the device id - i.e. the same generation of these strings as from single wemo.

This has resolved my issues, no duplicates following upgrade from < 9.1.0 and no issues adding the device to routines. I'll raise a PR which does this only for 1st switch and for switch 2+ it'll have the current behaviour. I think that the current behaviour is flawed given my routine problems, but its better than simply reverting back to single only I guess.

@peterchs peterchs mentioned this issue Dec 19, 2020
6 tasks
arendst added a commit that referenced this issue Dec 20, 2020
Fix Wemo single device backward compatibility (#10165, #10194)
@arendst arendst added fixed Result - The work on the issue has ended and removed awaiting feedback Action - Waiting for response or more information troubleshooting Type - Troubleshooting labels Dec 21, 2020
@ascillato2 ascillato2 added the enhancement Type - Enhancement that will be worked on label Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants