3

WiWo is an app for controlling a WiFi socket. Unfortunately it has no Tasker integration or even a widget.

I was therefore wondering whether I could hook into any of the app's activities (image below) in order to toggle the switch for the socket on/off out with the app?

Other ideas/options welcome.

Wiwo - Activities

| improve this question | | | | |
0

I seem to be a bit late to the party, but here is my implementation for it.

https://youtu.be/lD4yFAB3s40

What it does, is:

  1. Unlocking my phone if it's locked.
  2. Opening the WIWO app.
  3. Manually touching the toggle.
  4. Closing the app.
  5. Setting the display time-out to 15
  6. Wait for 15
  7. Set the display time-out back to 2

And here is the code (excluding the unlock part)

<TaskerData sr="" dvi="1" tv="4.8u1m">
<Task sr="task3">
    <cdate>1452450027774</cdate>
    <edate>1458814566803</edate>
    <id>3</id>
    <nme>Wiwo</nme>
    <pri>100</pri>
    <Kid sr="Kid">
        <launchID>3</launchID>
        <pkg>com.wiwo.for.tasker</pkg>
        <vnme>1.0</vnme>
        <vnum>2</vnum>
    </Kid>
    <Action sr="act0" ve="7">
        <code>20</code>
        <App sr="arg0">
            <appClass>com.orvibo.irhost.LoadActivity</appClass>
            <appPkg>com.orvibo.irhost</appPkg>
            <label>WiWo</label>
        </App>
        <Str sr="arg1" ve="3"/>
        <Int sr="arg2" val="1"/>
        <Int sr="arg3" val="0"/>
    </Action>
    <Action sr="act1" ve="7">
        <code>30</code>
        <Int sr="arg0" val="0"/>
        <Int sr="arg1" val="1"/>
        <Int sr="arg2" val="0"/>
        <Int sr="arg3" val="0"/>
        <Int sr="arg4" val="0"/>
    </Action>
    <Action sr="act2" ve="7">
        <code>123</code>
        <Str sr="arg0" ve="3">input tap 1270 370</Str>
        <Int sr="arg1" val="0"/>
        <Int sr="arg2" val="1"/>
        <Str sr="arg3" ve="3"/>
        <Str sr="arg4" ve="3"/>
        <Str sr="arg5" ve="3"/>
    </Action>
    <Action sr="act3" ve="7">
        <code>25</code>
        <Int sr="arg0" val="0"/>
    </Action>
    <Action sr="act4" ve="7">
        <code>812</code>
        <Int sr="arg0" val="15"/>
        <Int sr="arg1" val="0"/>
        <Int sr="arg2" val="0"/>
    </Action>
    <Action sr="act5" ve="7">
        <code>30</code>
        <Int sr="arg0" val="0"/>
        <Int sr="arg1" val="15"/>
        <Int sr="arg2" val="0"/>
        <Int sr="arg3" val="0"/>
        <Int sr="arg4" val="0"/>
    </Action>
    <Action sr="act6" ve="7">
        <code>812</code>
        <Int sr="arg0" val="0"/>
        <Int sr="arg1" val="2"/>
        <Int sr="arg2" val="0"/>
    </Action>
    <Img sr="icn" ve="2">
        <cls>com.orvibo.irhost.LoadActivity</cls>
        <pkg>com.orvibo.irhost</pkg>
    </Img>
</Task>

PLEASE NOTE!: It does require root permissions.

| improve this answer | | | | |
  • Pretty sure your input taps will be device specific, at least to a specific resolution. What is your screen resolution, for reference? – Aaron Gillion Mar 24 '16 at 10:49
  • Yes it is, sorry I forgot to mention it. You should find yours by going to the developers settings and enable Pointer Location, then set the input tap location to the location of the toggle in the WIWO app. I have a Nexus 6P 2560x1440 – Rosenpin Mar 25 '16 at 14:18
  • Ok. That resolution is 4K and only the latest flagships have it. The most popular resolution is 1080x1920 currently. Useful tip: if the app renders exactly the same on all screen sizes, you can use percentage coordinates for cross-device compatibility when emulating taps, but you'll have to calculate them at runtime. Ex: button centered on the screen: input tap {1080*0.5} {1920*0.5} – Aaron Gillion Mar 25 '16 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.