Author Topic: Tado Heating Control With Robo Browser Help Needed Getting Error To Update  (Read 7598 times)

0 Members and 4 Guests are viewing this topic.

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Hi There,

I need some help, I am trying to control and update my tado thermostat at the url:

https://my.tado.com/webapp/#/home-control/control-panel

I just need Robo Browser to navigate to the page, login and then select one of 3 options which I think I just need to do with Robo Browser code match and Robo Browser click to select the option directly from the following url:

https://my.tado.com/webapp/#/home-control/control-panel

But Robo Browser isn't loading instead it is giving me the following error message:
You are using an outdated browser. Please upgrade your browser to improve your experience.

I have the latest versions of all browsers and even redownloaded them all yesterday and I am still getting the error message, it seems to be something to do with my url type that is causing the issue because Robo Browser works fine for other urls.

Not sure if its the webapp style url causing the problem.

https://my.tado.com/webapp/#/home-control/control-panel

Any help you can give to help me use the RoboB.Navigate command to load the url would be greatly appreciated.

My steps for Robo Browser will be to
Navigate to and login to the following url and save login info:
https://my.tado.com/webapp/#/account/sign-in

Then navigate to the page where I have 3 settings to control my heating:
https://my.tado.com/webapp/#/home-control/control-panel
Off - NO FREEZE
Auto - AUTO
Manual - MANUAL

Below is the code from the page, so where it says MANUAL is what I am guessing I would just need to use RoboB.ElementByID, followed by RoboB.Click to select one of the above 3 options after navigating to the page.


<label class="btn btn-default ng-pristine ng-untouched ng-valid" ng-model="thermostat.setMode" btn-radio="'MANUAL'" ng-model-options="{ getterSetter: true }"> <div class="icon-setMode tado-icon-hand"></div> <div class="ng-binding">Manual</div> </label>

Having just checked the page source for my control page I see the following code at the top:

https://my.tado.com/webapp/#/home-control/control-panel

Has this source code at the top:
<!doctype html> <html class="no-js" ng-app="webapp"> <head> <meta charset="utf-8"> <title ng-bind="title">tado°</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width,initial-scale=1"> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <link rel="stylesheet" href="styles/vendor.a3dbb0b9.css"> <link rel="stylesheet" href="styles/custom-bootstrap.a4b4848c.css"> <link rel="stylesheet" href="styles/main.19a5a22f.css"> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> <script src="env.js"></script>  <body state="{{$state.current.name}}"> <!--[if lte IE 8]>
<p class="browsehappy alert alert-warning">You are using an <strong>outdated</strong> browser. Please upgrade
   your browser
to improve your experience.</p>

Is there anyway to select Chrome as the default for Robo Browser this may help my issue since I am getting the error message with IE latest version which should be fine but due to that code above is stopping me navigating to my thermostat control page and scraping the url.

I did try changing my default browser to chrome but that didn't change anything with the Robo Browser error.

Thanks in advance for your help.
Sim
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
By default Windows runs browser controls in .Net apps using compatibility mode for IE version 7.

Fortunately there is a very simple fix:
http://voxcommando.com/mediawiki/index.php?title=Use_latest_version_of_Internet_Explorer_in_RoboBrowser

Please let us know if this solves the problem for you.
« Last Edit: June 25, 2015, 11:42:04 AM by jitterjames »

Foggy

  • $upporter
  • Contributor
  • *****
  • Posts: 86
  • Karma: 4
    • View Profile
Please let us know how you get on. I am very interested in this.

You may be interested in this.

http://techcrunch.com/2015/03/16/the-tado-smart-thermostat-just-got-smarter/

Best wishes.

James.

Foggy

  • $upporter
  • Contributor
  • *****
  • Posts: 86
  • Karma: 4
    • View Profile

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Thanks James, the registry update fixed the Robo Browser issue, I just need to work out now how to get it to click one of the three options from the page I login to with saved settings:

Then navigate to the page where I have 3 settings to control my heating:
https://my.tado.com/webapp/#/home-control/control-panel

I have tried inputting the 3 variables under different commands using RoboB.ElementByName and tried RoboB.ElementByID for NO FREEZE, MANUAL and AUTO and then had the RoboB.Click followed by VC.Pause 1800 s I am using a slight modified version of the OurGroceries command as a working framework until I get my head around it all but it's got me stumped.

Off - NO FREEZE
Auto - AUTO
Manual - MANUAL

When I open Robo Browser INVESTIGATOR and CTRL over the NO FREEZE option I get:
<div class="icon-setMode tado-icon-standby"></div>


When I open Robo Browser, investigator and CTRL over the AUTO option I get:
<i class="tado-icon-sleep ng-scope" ng-switch-when="SLEEP">

When I open Robo Browser, investigator and CTRL over the MANUAL option I get:
<div class="icon-setMode tado-icon-hand"></div>

Hope someone can help me figure this out to get Robo Browser to click one of the 3 options, I just need to know how to do it with one of the options and then I can clone it for the others.

Foggy, thanks for the links, it was only a month or 2 ago I e-mailed Tado asking if they had an API and they told me they didn't for day to day consumers, but it is good it looks like they now have and making integration open for other things.

I did see the page of the guy who has his tado updating its status over twitter, he does include lots of variables and info which I will probably use at a later date, but for the mo I just want to get mine working with on and off commands.

After a night out on the town when I hit the sofa instead of bed and then realise how cold it is half way through the night, it would be nice to just say heating on, instead of having to reach for and pick up my phone if it has any juice left, open the tado app and turn it on and same for turning it off when I start to cook and don't have the coordination to make the fridge to rehydrate, lol.  8)
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Hi Simeon, you can try following in investigator window:


When you use the CRTL and mouse over the element you want to use. Then you will see it marked in the "tree" on the right in the investigator window - click on the marked entry in the tree and now you will get the ID for the element which you can use with "RoboB.ElementByID" and "RoboB.Click" action.


See example pictures - maybe this will help you.
« Last Edit: June 27, 2015, 02:38:17 AM by Kalle »
***********  get excited and make things  **********

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Thanks Kalle, all my TAG IDs are coming back blank when doing the above even with script and highlighting enabled. I know there are labels from doing Google inspect element but the Robo Browser isn't showing any tags for the 3 buttons so I can't set any as triggers for my button click actions. Any ideas? Cheers. Sim  8)
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Explore the tree.  Climb to a parent element in the tree.

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Hi guys, I got it working by going for tags instead of ID or name. Thanks for the help Kalle.  8)
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
nice to hear you figured it out  :)
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Here's a more or less complete solution for setting your 3 Tado modes.  It includes logging in automatically, and letting you set the mode to off, auto, or manual.

You'll need to edit the "Sign in to Tado" command to use your username and password.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.5.0-->
<commandGroup open="True" name="Tado" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="582" name="Tado startup" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>tado</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Navigate</cmdType>
      <params>
        <param>http://my.tado.com/webapp/#/home-control/</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Wait</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Show</cmdType>
      <params />
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Navigate</cmdType>
      <params>
        <param>http://my.tado.com/webapp/#/home-control/control-panel</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>VC.Loaded</event>
  </command>
  <command id="605" name="sign in to Tado" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>Logging in to Tay-doe</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>tado</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>500</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByName</cmdType>
      <params>
        <param>username</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Focus</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.SetText</cmdType>
      <params>
        <param>test@voxcommando.com</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByName</cmdType>
      <params>
        <param>password</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Robob.Focus</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Robob.SetText</cmdType>
      <params>
        <param>testtest</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByName</cmdType>
      <params>
        <param>rememberMe</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Focus</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Click</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementByTag</cmdType>
      <params>
        <param>BUTTON</param>
        <param>0</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Focus</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Click</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>tado.sign-in</event>
  </command>
  <command id="604" name="++Turn thermostat {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>tado</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Show</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.SetWinSize</cmdType>
      <params>
        <param>800</param>
        <param>900</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.GetURL</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)Contains(B)</ifType>
      <ifParams>{LastResult}&amp;&amp;control-panel</ifParams>
      <then />
      <else>
        <action>
          <cmdType>RoboB.Navigate</cmdType>
          <params>
            <param>http://my.tado.com/webapp/#/home-control/control-panel</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>VC.Pause</cmdType>
          <params>
            <param>3000</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.Wait</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>VC.Pause</cmdType>
          <params>
            <param>3000</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <action>
      <cmdType>RoboB.GetURL</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)Contains(B)</ifType>
      <ifParams>{LastResult}&amp;&amp;sign-in</ifParams>
      <then>
        <action>
          <cmdType>VC.TriggerEvent</cmdType>
          <params>
            <param>tado.sign-in</param>
            <param>{1}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>VC.Pause</cmdType>
          <params>
            <param>1000</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.Navigate</cmdType>
          <params>
            <param>https://my.tado.com/webapp/#/home-control/control-panel</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>VC.Pause</cmdType>
          <params>
            <param>3000</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>RoboB.Wait</cmdType>
          <params />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>Switching to {1} mode.</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.ElementRegex</cmdType>
      <params>
        <param>div</param>
        <param>{1}&lt;/div&gt;$</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Click</cmdType>
      <params />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Turn thermostat </phrase>
    <phrase optional="true">to</phrase>
    <payloadList>Off, Auto, Manual</payloadList>
    <phrase>mode</phrase>
  </command>
</commandGroup>
« Last Edit: June 27, 2015, 04:47:04 PM by nime5ter »

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Thanks for this James, appreciated. I did try it on both versions of vox but it takes me to the tado sign in page and doesn't log in with my credentials, any ideas?

Cheers.
Sim  8)
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
We would need to see your Vox log showing what happens when you try to use the commands.

http://voxcommando.com/mediawiki/index.php?title=Log
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
You can edit the log to put a placeholder [myusername] and [mypassword] in place of your real log-in information, if that's why you deleted part of the log,but we can't help diagnose the problem unless we can see the full log documenting everything that took place.

What's important is what is happening directly before the portion that you posted.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Hi @ nime5ter I only deleted the other stuff because the log was huge and all the other stuff was before running the tado command, I grabbed the portion that starts the tado command and ends it. It is only the login which is the issue it is not entering the text for my username and password into the fields on the tado login page in robo browser.

If I have tado as saved login already it works but that is the set up I already have from when I set robo browser to login to the saved page and click one of the three options.

I like James idea of saving the password and username because when I delete my internet history or cache it means I have to set robo browser up for saved login again, James option would save that step.

Because of the length of the log wasn't sure whether it would be showing private login, username and passwords to things I have set up and it is way to long to manually go through to check if my security details are being included in it.

Does the log file output username, password details etc?

Cheers.
Sim  8)
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.