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

[wemo] Refactoring WeMo Insight Switch parser #12105

Closed
jlaur opened this issue Jan 24, 2022 · 0 comments · Fixed by #12120 or #12380
Closed

[wemo] Refactoring WeMo Insight Switch parser #12105

jlaur opened this issue Jan 24, 2022 · 0 comments · Fixed by #12120 or #12380
Labels
enhancement An enhancement or new feature for an existing add-on

Comments

@jlaur
Copy link
Contributor

jlaur commented Jan 24, 2022

This issue described some possible next step after #12100.

Suggestions/plan:

  • Create new subclasses from WemoHandler targeting each thing type: Insight, Motion and Switch/Socket.
  • Make WemoHandler abstract.
  • Extract relevant onValueReceived parts into each handler.
  • For WemoInsightHandler method onValueReceived(): Extract parser to separate class and provide unit test for this. The unit test must cover variables EnergyPerUnitCost (currently not supported), BinaryState and InsightParams.

Service variables

Example data to support in parser:

Received pair 'EnergyPerUnitCost':'4|2000|4' (service 'basicevent1') for thing 'wemo:insight:insight1'
Received pair 'BinaryState':'0|1642884254|0|0|0|1209600|13|0|0|0' (service 'basicevent1') for thing 'wemo:insight:insight1'
Received pair 'InsightParams':'1|1632573998|10371148|52746|1174820|1209600|39|26440|28068134|548930560|8000' (service 'insight1') for thing 'wemo:insight:insight2'
@jlaur jlaur added the enhancement An enhancement or new feature for an existing add-on label Jan 24, 2022
jlaur added a commit to jlaur/openhab-addons that referenced this issue Jan 25, 2022
No logic/code changes yet, just extraction/separation.

Fixes openhab#12105

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
jlaur added a commit to jlaur/openhab-addons that referenced this issue Jan 25, 2022
No logic/code changes yet, just extraction/separation.

Fixes openhab#12105

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
lolodomo pushed a commit that referenced this issue Jan 28, 2022
…#12120)

No logic/code changes yet, just extraction/separation.

Fixes #12105

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
NickWaterton pushed a commit to NickWaterton/openhab-addons that referenced this issue Apr 27, 2022
…openhab#12120)

No logic/code changes yet, just extraction/separation.

Fixes openhab#12105

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Nick Waterton <n.waterton@outlook.com>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this issue Jun 29, 2022
…openhab#12120)

No logic/code changes yet, just extraction/separation.

Fixes openhab#12105

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
andan67 pushed a commit to andan67/openhab-addons that referenced this issue Nov 6, 2022
…openhab#12120)

No logic/code changes yet, just extraction/separation.

Fixes openhab#12105

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
andrasU pushed a commit to andrasU/openhab-addons that referenced this issue Nov 12, 2022
…openhab#12120)

No logic/code changes yet, just extraction/separation.

Fixes openhab#12105

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
1 participant