Husqvarna Automower Script

Posted on
Mon Sep 05, 2016 1:29 pm
Gusten offline
Posts: 171
Joined: Dec 30, 2015
Location: Sweden, Gothenburg

Husqvarna Automower Script

Here is a couple of script to control your Husqvarna Automower (With the Connect option)

I am running these scripts as "Execute script" and then linked it as a file.

First of all, i have used this as the starting point when modifying the script.
https://github.com/chrisz/pyhusmow

There are for better way for sure to do this, but this work.

You need requests and xmltodict installed first

You also need to enter your mail and password in the script see the line that start with mow.login

This is the script for starting the mower (Use the same script for stopping and for parking, just change the command in the script, change the line that start with mow.control)

Code: Select all
import requests
import xmltodict



class API:
    _API_IM = 'https://tracker-id-ws.husqvarna.net/imservice/rest/'
    _API_TRACK = 'https://tracker-api-ws.husqvarna.net/services/'

    def __init__(self):
        self.session = requests.Session()
        self.device_id = None
        self.push_id = None

    def login(self, login, password):
        request = ("<login>"
                   "  <email>%s</email>"
                   "  <password>%s</password><language>fr-FR</language>"
                   "</login>") % (login, password)
        response = self.session.post(self._API_IM + 'im/login',
                                     data=request, headers={'Content-type': 'application/xml'})
        response.raise_for_status()

        self.session.headers.update({'Session-Token': response.headers['Session-Token']})

        self.select_first_robot()

    def logout(self):
        response = self.session.post(self._API_IM + 'im/logout')
        response.raise_for_status()
        self.device_id = None
        del (self.session.headers['Session-Token'])

    def list_robots(self):
        response = self.session.get(self._API_TRACK + 'pairedRobots_v2')
        response.raise_for_status()

        result = xmltodict.parse(response.content)
        return result

    def select_first_robot(self):
        result = self.list_robots()
        self.device_id = result['robots']['robot']['deviceId']

    def status(self):
        response = self.session.get(self._API_TRACK + 'robot/%s/status_v2/' % self.device_id)
        response.raise_for_status()

        result = xmltodict.parse(response.content)
        return result

    def geo_status(self):
        response = self.session.get(self._API_TRACK + 'robot/%s/geoStatus/' % self.device_id)
        response.raise_for_status()

        result = xmltodict.parse(response.content)
        return result

    def get_mower_settings(self):
        request = ("<settings>"
                   "    <autoTimer/><gpsSettings/><drivePastWire/>"
                   "    <followWireOut><startPositionId>1</startPositionId></followWireOut>"
                   "    <followWireOut><startPositionId>2</startPositionId></followWireOut>"
                   "    <followWireOut><startPositionId>3</startPositionId></followWireOut>"
                   "    <followWireOut><startPositionId>4</startPositionId></followWireOut>"
                   "    <followWireOut><startPositionId>5</startPositionId></followWireOut>"
                   "    <followWireIn><loopWire>RIGHT_BOUNDARY_WIRE</loopWire></followWireIn>"
                   "    <followWireIn><loopWire>GUIDE_1</loopWire></followWireIn>"
                   "    <followWireIn><loopWire>GUIDE_2</loopWire></followWireIn>"
                   "    <followWireIn><loopWire>GUIDE_3</loopWire></followWireIn>"
                   "    <csRange/>"
                   "    <corridor><loopWire>RIGHT_BOUNDARY_WIRE</loopWire></corridor>"
                   "    <corridor><loopWire>GUIDE_1</loopWire></corridor>"
                   "    <corridor><loopWire>GUIDE_2</loopWire></corridor>"
                   "    <corridor><loopWire>GUIDE_3</loopWire></corridor>"
                   "    <exitAngles/><subareaSettings/>"
                   "</settings>")
        response = self.session.post(self._API_TRACK + 'robot/%s/settings/' % self.device_id,
                                     data=request, headers={'Content-type': 'application/xml'})
        response.raise_for_status()

        result = xmltodict.parse(response.content)
        return result

    def settingsUUID(self):
        response = self.session.get(self._API_TRACK + 'robot/%s/settingsUUID/' % self.device_id)
        response.raise_for_status()

        result = xmltodict.parse(response.content)
        return result

    def control(self, command):
        if command not in ['PARK', 'STOP', 'START']:
            raise Exception("Unknown command")

        request = ("<control>"
                   "   <action>%s</action>"
                   "</control>") % command

        response = self.session.put(self._API_TRACK + 'robot/%s/control/' % self.device_id,
                                    data=request, headers={'Content-type': 'application/xml'})
        response.raise_for_status()

    def add_push_id(self, id):
        request = "id=%s&platform=iOS" % id
        response = self.session.post(self._API_TRACK + 'addPushId', data=request,
                                     headers={'Content-type': 'application/x-www-form-urlencoded; charset=UTF-8'})
        response.raise_for_status()
        self.push_id = id

    def remove_push_id(self):
        request = "id=%s&platform=iOS" % id
        response = self.session.post(self._API_TRACK + 'removePushId', data=request,
                                     headers={'Content-type': 'application/x-www-form-urlencoded; charset=UTF-8'})
        response.raise_for_status()
        self.push_id = None


if __name__ == '__main__':
 

    retry = 5

    while retry > 0:
        try:
            mow = API()

            mow.login("mail@mail.com", "your password")#Here you need to enter your mail and password

            mow.control("START")#Change the word START to STOP or PARK depending of what your command should be
           
            retry = 0
        except Exception as ex:
            retry -= 1
            if retry == 0:
                print("[ERROR] Retrying to send the command")
            else:
                print("[ERROR] Failed to send the command")
                exit(1)

    indigo.server.log("Done")

    mow.logout()

Posted on
Mon Sep 05, 2016 1:44 pm
Gusten offline
Posts: 171
Joined: Dec 30, 2015
Location: Sweden, Gothenburg

Re: Husqvarna Automater Script (The status script)

And here are the script to collect status and put in variables

(I don't know if Husqvarna has some limitations to how often you can collect the status, i run this script every 40sec when the mower is cutting, and once an hour when charging. Its on your one risk)

You will need to enter your mail and password in this as well

And you need to make four variables before running this script

(You can name them what you like)
They will output

Status
Longitude
Latitude
batteri from 0-100

Use the Variable ID and change them in the script where the lines tart with indigo.variable.updateValue


Code: Select all
import requests
import xmltodict



class API:
    _API_IM = 'https://tracker-id-ws.husqvarna.net/imservice/rest/'
    _API_TRACK = 'https://tracker-api-ws.husqvarna.net/services/'

    def __init__(self):
        self.session = requests.Session()
        self.device_id = None
        self.push_id = None

    def login(self, login, password):
        request = ("<login>"
                   "  <email>%s</email>"
                   "  <password>%s</password><language>fr-FR</language>"
                   "</login>") % (login, password)
        response = self.session.post(self._API_IM + 'im/login',
                                     data=request, headers={'Content-type': 'application/xml'})
        response.raise_for_status()

        self.session.headers.update({'Session-Token': response.headers['Session-Token']})

        self.select_first_robot()

    def logout(self):
        response = self.session.post(self._API_IM + 'im/logout')
        response.raise_for_status()
        self.device_id = None
        del (self.session.headers['Session-Token'])

    def list_robots(self):
        response = self.session.get(self._API_TRACK + 'pairedRobots_v2')
        response.raise_for_status()

        result = xmltodict.parse(response.content)
        return result

    def select_first_robot(self):
        result = self.list_robots()
        self.device_id = result['robots']['robot']['deviceId']

    def status(self):
        response = self.session.get(self._API_TRACK + 'robot/%s/status_v2/' % self.device_id)
        response.raise_for_status()

        result = xmltodict.parse(response.content)
        return result

    def geo_status(self):
        response = self.session.get(self._API_TRACK + 'robot/%s/geoStatus/' % self.device_id)
        response.raise_for_status()

        result = xmltodict.parse(response.content)
        return result

    def get_mower_settings(self):
        request = ("<settings>"
                   "    <autoTimer/><gpsSettings/><drivePastWire/>"
                   "    <followWireOut><startPositionId>1</startPositionId></followWireOut>"
                   "    <followWireOut><startPositionId>2</startPositionId></followWireOut>"
                   "    <followWireOut><startPositionId>3</startPositionId></followWireOut>"
                   "    <followWireOut><startPositionId>4</startPositionId></followWireOut>"
                   "    <followWireOut><startPositionId>5</startPositionId></followWireOut>"
                   "    <followWireIn><loopWire>RIGHT_BOUNDARY_WIRE</loopWire></followWireIn>"
                   "    <followWireIn><loopWire>GUIDE_1</loopWire></followWireIn>"
                   "    <followWireIn><loopWire>GUIDE_2</loopWire></followWireIn>"
                   "    <followWireIn><loopWire>GUIDE_3</loopWire></followWireIn>"
                   "    <csRange/>"
                   "    <corridor><loopWire>RIGHT_BOUNDARY_WIRE</loopWire></corridor>"
                   "    <corridor><loopWire>GUIDE_1</loopWire></corridor>"
                   "    <corridor><loopWire>GUIDE_2</loopWire></corridor>"
                   "    <corridor><loopWire>GUIDE_3</loopWire></corridor>"
                   "    <exitAngles/><subareaSettings/>"
                   "</settings>")
        response = self.session.post(self._API_TRACK + 'robot/%s/settings/' % self.device_id,
                                     data=request, headers={'Content-type': 'application/xml'})
        response.raise_for_status()

        result = xmltodict.parse(response.content)
        return result

    def settingsUUID(self):
        response = self.session.get(self._API_TRACK + 'robot/%s/settingsUUID/' % self.device_id)
        response.raise_for_status()

        result = xmltodict.parse(response.content)
        return result

    def control(self, command):
        if command not in ['PARK', 'STOP', 'START']:
            raise Exception("Unknown command")

        request = ("<control>"
                   "   <action>%s</action>"
                   "</control>") % command

        response = self.session.put(self._API_TRACK + 'robot/%s/control/' % self.device_id,
                                    data=request, headers={'Content-type': 'application/xml'})
        response.raise_for_status()

    def add_push_id(self, id):
        request = "id=%s&platform=iOS" % id
        response = self.session.post(self._API_TRACK + 'addPushId', data=request,
                                     headers={'Content-type': 'application/x-www-form-urlencoded; charset=UTF-8'})
        response.raise_for_status()
        self.push_id = id

    def remove_push_id(self):
        request = "id=%s&platform=iOS" % id
        response = self.session.post(self._API_TRACK + 'removePushId', data=request,
                                     headers={'Content-type': 'application/x-www-form-urlencoded; charset=UTF-8'})
        response.raise_for_status()
        self.push_id = None


if __name__ == '__main__':
 
    retry = 5

    while retry > 0:
        try:
            mow = API()

            mow.login("mail@mail.com", "your password")#here you need to enter your mail and password
           
            dic_info = dict(mow.status()['mowerInfo'])
            mowerStatus = dic_info.get('mowerStatus')
            batteryPercent = dic_info.get('batteryPercent')
            latitude = dic_info.get('latitude')
            longitude = dic_info.get('longitude')
           
            indigo.variable.updateValue(214675392, value=mowerStatus)#change the 214675392 to your indigo variable ID
            indigo.variable.updateValue(1295626237, value=batteryPercent)#change the 1295626237 to your indigo variable ID
            indigo.variable.updateValue(1958242952, value=unicode(latitude))#change the 1958242952 to your indigo variable ID
            indigo.variable.updateValue(99148159, value=unicode(longitude))#change the 99148159 to your indigo variable ID                     
                      
            retry = 0
        except Exception as ex:
            retry -= 1
            if retry == 0:
               indigo.server.log("[ERROR] Retrying to send the command")
            else:
                indigo.server.log("[ERROR] Failed to send the command")
                                           
    indigo.server.log("Done")
   
    mow.logout()

Posted on
Mon Sep 05, 2016 1:47 pm
Gusten offline
Posts: 171
Joined: Dec 30, 2015
Location: Sweden, Gothenburg

Re: Husqvarna Automower Script

And if you would like to use the output of the coordinates to make a plot you can see this post
viewtopic.php?f=165&t=16760

/Martin

Posted on
Wed Apr 05, 2017 4:35 am
Gusten offline
Posts: 171
Joined: Dec 30, 2015
Location: Sweden, Gothenburg

Re: Husqvarna Automower Script

Hi, Husqvarna have changed the API so this old script wont work anymore

I have a fix so if someone wants it just let me know

/Martin

Posted on
Fri Jun 02, 2017 11:30 am
guenneguez_t offline
Posts: 1
Joined: Jun 02, 2017

Re: Husqvarna Automower Script

Petition for militating to have an official API ...

https://www.change.org/p/husqvarna-open ... usqvarana/

Posted on
Fri Jun 02, 2017 11:53 am
Gusten offline
Posts: 171
Joined: Dec 30, 2015
Location: Sweden, Gothenburg

Re: Husqvarna Automower Script

Done :)

Posted on
Fri Jul 07, 2017 10:00 pm
kidney offline
Posts: 237
Joined: Jul 15, 2007

Re: Husqvarna Automower Script

Are the above script updated? it's not working for me!

Posted on
Sat Jul 08, 2017 2:01 am
Gusten offline
Posts: 171
Joined: Dec 30, 2015
Location: Sweden, Gothenburg

Re: Husqvarna Automower Script

No, i have the working script at home, will put it up during the week


Skickat från min iPhone med Tapatalk

Posted on
Sun Jul 09, 2017 2:07 am
Gusten offline
Posts: 171
Joined: Dec 30, 2015
Location: Sweden, Gothenburg

Re: Husqvarna Automower Script

Hi

Here are the new scripts

I am not very good in Python, so i have used trial and error to get this to work, i have used this https://github.com/chrisz/pyhusmow and made modification to the script


You will need to install configparser for the script to work

Don't forget to modify the script with your credentials and variable ID



Here are the script for collecting status and battery.

Code: Select all
import json
import logging
import time
from configparser import ConfigParser

import requests

logger = logging.getLogger("main")


class AutoMowerConfig(ConfigParser):
    def __init__(self):
        super(AutoMowerConfig, self).__init__()
        self['husqvarna.net'] = {}
        self.login = ""
        self.password = ""
        self.log_level = 'INFO'
        self.expire_status = "30"

    def load_config(self):
        return self.read('automower.cfg')

    def save_config(self):
        with open('automower.cfg', mode='w') as f:
            return self.write(f)

    @property
    def login(self):
        return self['husqvarna.net']['login']

    @login.setter
    def login(self, value):
        self['husqvarna.net']['login'] = value

    @property
    def password(self):
        return self['husqvarna.net']['password']

    @password.setter
    def password(self, value):
        self['husqvarna.net']['password'] = value

    @property
    def log_level(self):
        return self['husqvarna.net']['log_level']

    @log_level.setter
    def log_level(self, value):
        self['husqvarna.net']['log_level'] = value

    @property
    def expire_status(self):
        return int(self['husqvarna.net']['expire_status'])

    @expire_status.setter
    def expire_status(self, value):
        self['husqvarna.net']['expire_status'] = str(value)


class API:
    _API_IM = 'https://iam-api.dss.husqvarnagroup.net/api/v3/'
    _API_TRACK = 'https://amc-api.dss.husqvarnagroup.net/v1/'
    _HEADERS = {'Accept': 'application/json', 'Content-type': 'application/json'}

    def __init__(self):
        self.logger = logging.getLogger("main.automower")
        self.session = requests.Session()
        self.device_id = None
        self.token = None

    def login(self, login, password):
        response = self.session.post(self._API_IM + 'token',
                                     headers=self._HEADERS,
                                     json={
                                         "data": {
                                             "attributes": {
                                                 "password": password,
                                                 "username": login
                                             },
                                             "type": "token"
                                         }
                                     })

        response.raise_for_status()
        self.logger.info('Logged in successfully')

        json = response.json()
        self.token = json["data"]["id"]
        self.session.headers.update({
            'Authorization': "Bearer " + self.token,
            'Authorization-Provider': json["data"]["attributes"]["provider"]
        })

        self.select_first_robot()

    def logout(self):
        response = self.session.delete(self._API_IM + 'token/%s' % self.token)
        response.raise_for_status()
        self.device_id = None
        self.token = None
        del (self.session.headers['Authorization'])
        self.logger.info('Logged out successfully')

    def list_robots(self):
        response = self.session.get(self._API_TRACK + 'mowers', headers=self._HEADERS)
        response.raise_for_status()

        return response.json()

    def select_first_robot(self):
        result = self.list_robots()
        self.device_id = result[0]['id']

    def status(self):
        response = self.session.get(self._API_TRACK + 'mowers/%s/status' % self.device_id, headers=self._HEADERS)
        response.raise_for_status()

        return response.json()

    def geo_status(self):
        response = self.session.get(self._API_TRACK + 'mowers/%s/geofence' % self.device_id, headers=self._HEADERS)
        response.raise_for_status()

        return response.json()

    def control(self, command):
        if command not in ['PARK', 'STOP', 'START']:
            raise Exception("Unknown command")

        response = self.session.post(self._API_TRACK + 'mowers/%s/control' % self.device_id,
                                    headers=self._HEADERS,
                                    json={
                                        "action": command
                                    })
        response.raise_for_status()


def create_config(args):
    config = AutoMowerConfig()
    config.load_config()
    if args.login:
        config.login = args.login
    if args.password:
        config.password = args.password
    if args.log_level:
        config.log_level = args.log_level
    if hasattr(args, "expire_status") and args.expire_status:
        config.expire_status = args.expire_status

    if not config.login or not config.password:
        logger.error('Missing login or password')
        return None

    if args.save:
        if config.save_config():
            logger.info('Configuration saved in "automower.cfg"')
        else:
            logger.info('Failed to saved configuration in "automower.cfg"')

    return config


def configure_log(config):
    logger.setLevel(logging.INFO)
    if config.log_level == 'ERROR':
        logger.setLevel(logging.ERROR)

    steam_handler = logging.StreamHandler()
    logger.addHandler(steam_handler)

    logger.info('Logger configured')


if __name__ == '__main__':

   
    retry = 5
    while retry > 0:
        try:
            mow = API()


            mow.login("användarnamn", "Lösenord")#Put your credentials here

            dic_info = mow.status()
            batteryPercent = dic_info.get('batteryPercent')
            mowerStatus = dic_info.get('mowerStatus')

            indigo.variable.updateValue(214675392, value=mowerStatus)#Change number to yours variable ID
            indigo.variable.updateValue(1295626237, value=batteryPercent)#Change number to yours variable ID

           


            retry = 0
        except Exception as ex:
            retry -= 1
            if retry > 0:
                print(ex)
                print("[ERROR] Retrying to send the command %d" % retry)
            else:
                print("[ERROR] Failed to send the command")
                exit(1)

    indigo.server.log("Done")

    mow.logout()




And here are the script for different actions, this is the START script, and you need to change in the script depending on what you want to happen, you can use START STOP or PARK

Code: Select all
import argparse
import json
import logging
import pprint
import time
from configparser import ConfigParser

import requests

logger = logging.getLogger("main")


class AutoMowerConfig(ConfigParser):
    def __init__(self):
        super(AutoMowerConfig, self).__init__()
        self['husqvarna.net'] = {}
        self.login = ""
        self.password = ""
        self.log_level = 'INFO'
        self.expire_status = "30"

    def load_config(self):
        return self.read('automower.cfg')

    def save_config(self):
        with open('automower.cfg', mode='w') as f:
            return self.write(f)

    @property
    def login(self):
        return self['husqvarna.net']['login']

    @login.setter
    def login(self, value):
        self['husqvarna.net']['login'] = value

    @property
    def password(self):
        return self['husqvarna.net']['password']

    @password.setter
    def password(self, value):
        self['husqvarna.net']['password'] = value

    @property
    def log_level(self):
        return self['husqvarna.net']['log_level']

    @log_level.setter
    def log_level(self, value):
        self['husqvarna.net']['log_level'] = value

    @property
    def expire_status(self):
        return int(self['husqvarna.net']['expire_status'])

    @expire_status.setter
    def expire_status(self, value):
        self['husqvarna.net']['expire_status'] = str(value)


class API:
    _API_IM = 'https://iam-api.dss.husqvarnagroup.net/api/v3/'
    _API_TRACK = 'https://amc-api.dss.husqvarnagroup.net/v1/'
    _HEADERS = {'Accept': 'application/json', 'Content-type': 'application/json'}

    def __init__(self):
        self.logger = logging.getLogger("main.automower")
        self.session = requests.Session()
        self.device_id = None
        self.token = None

    def login(self, login, password):
        response = self.session.post(self._API_IM + 'token',
                                     headers=self._HEADERS,
                                     json={
                                         "data": {
                                             "attributes": {
                                                 "password": password,
                                                 "username": login
                                             },
                                             "type": "token"
                                         }
                                     })

        response.raise_for_status()
        self.logger.info('Logged in successfully')

        json = response.json()
        self.token = json["data"]["id"]
        self.session.headers.update({
            'Authorization': "Bearer " + self.token,
            'Authorization-Provider': json["data"]["attributes"]["provider"]
        })

        self.select_first_robot()

    def logout(self):
        response = self.session.delete(self._API_IM + 'token/%s' % self.token)
        response.raise_for_status()
        self.device_id = None
        self.token = None
        del (self.session.headers['Authorization'])
        self.logger.info('Logged out successfully')

    def list_robots(self):
        response = self.session.get(self._API_TRACK + 'mowers', headers=self._HEADERS)
        response.raise_for_status()

        return response.json()

    def select_first_robot(self):
        result = self.list_robots()
        self.device_id = result[0]['id']

    def status(self):
        response = self.session.get(self._API_TRACK + 'mowers/%s/status' % self.device_id, headers=self._HEADERS)
        response.raise_for_status()

        return response.json()

    def geo_status(self):
        response = self.session.get(self._API_TRACK + 'mowers/%s/geofence' % self.device_id, headers=self._HEADERS)
        response.raise_for_status()

        return response.json()

    def control(self, command):
        if command not in ['PARK', 'STOP', 'START']:
            raise Exception("Unknown command")

        response = self.session.post(self._API_TRACK + 'mowers/%s/control' % self.device_id,
                                    headers=self._HEADERS,
                                    json={
                                        "action": command
                                    })
        response.raise_for_status()


def create_config(args):
    config = AutoMowerConfig()
    config.load_config()
    if args.login:
        config.login = args.login
    if args.password:
        config.password = args.password
    if args.log_level:
        config.log_level = args.log_level
    if hasattr(args, "expire_status") and args.expire_status:
        config.expire_status = args.expire_status

    if not config.login or not config.password:
        logger.error('Missing login or password')
        return None

    if args.save:
        if config.save_config():
            logger.info('Configuration saved in "automower.cfg"')
        else:
            logger.info('Failed to saved configuration in "automower.cfg"')

    return config


def configure_log(config):
    logger.setLevel(logging.INFO)
    if config.log_level == 'ERROR':
        logger.setLevel(logging.ERROR)

    steam_handler = logging.StreamHandler()
    logger.addHandler(steam_handler)

    logger.info('Logger configured')


if __name__ == '__main__':

   
    retry = 5
    pp = pprint.PrettyPrinter(indent=4)
    while retry > 0:
        try:
            mow = API()


            mow.login("username", "password")#write you credential here

            mow.control("START")#Change to STOP or PARK if you like

           


            retry = 0
        except Exception as ex:
            retry -= 1
            if retry > 0:
                print(ex)
                print("[ERROR] Retrying to send the command %d" % retry)
            else:
                print("[ERROR] Failed to send the command")
                exit(1)

    print("Done")

    mow.logout()

Posted on
Mon Jul 10, 2017 8:07 pm
kidney offline
Posts: 237
Joined: Jul 15, 2007

Re: Husqvarna Automower Script

Thank will try it the minutes I'm done struggling with configparser!

Posted on
Sun Apr 15, 2018 8:59 pm
deuan offline
Posts: 30
Joined: Jan 03, 2018

Re: Husqvarna Automower Script

Hello All,

Does this script still work. I have no idea how to get ConfigParser onto my computer, but I messed around and now I get a timeout error when running the script.

Error because embedded scripts execute sequentially they must complete their execution within 10 seconds.
Error modify the script to exit quickly or convert it to an external file (not embedded).
Stopping embedded script executor host (pid 32651)

Posted on
Tue Apr 17, 2018 4:13 am
Gusten offline
Posts: 171
Joined: Dec 30, 2015
Location: Sweden, Gothenburg

Re: Husqvarna Automower Script

Hi

Yes the script do still work.
I am running the scritp as a file not embedded. The script takes to long to run so it cant be run embedded.

When it comes to installing configparser did i found this

https://techglimpse.com/fix-no-module-n ... ort-error/

/Martin

Posted on
Sun Oct 07, 2018 12:43 pm
Bollar offline
Posts: 528
Joined: Aug 11, 2013

Re: Husqvarna Automower Script

deuan wrote:
Hello All,

Does this script still work. I have no idea how to get ConfigParser onto my computer, but I messed around and now I get a timeout error when running the script.

Error because embedded scripts execute sequentially they must complete their execution within 10 seconds.
Error modify the script to exit quickly or convert it to an external file (not embedded).
Stopping embedded script executor host (pid 32651)

Use the instructions here to get ConfigParser installed: viewtopic.php?f=107&t=19129&p=158963&hilit=pip#p158963

Code: Select all
sudo -s
curl https://bootstrap.pypa.io/get-pip.py | python
pip install configparser

Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts

Posted on
Sun Oct 07, 2018 2:33 pm
Bollar offline
Posts: 528
Joined: Aug 11, 2013

Re: Husqvarna Automower Script

Is this script still working for you on Indigo 7.2?

If I run embedded, I get the following error:
Code: Select all
   Script Error                    Error in plugin execution compileExecuteSource:

Traceback (most recent call last):
  File "plugin.py", line 209, in compileExecuteSource
  File "plugin.py", line 189, in _compileExecuteSource
  File "<string>", line 205, in _dynamicFunc
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 360, in __call__
SystemExit: 1


If I call an external script, I get:
Code: Select all
   Script Error                    Error in plugin execution executeFile:

Traceback (most recent call last):
  File "plugin.py", line 237, in executeFile
  File "plugin.py", line 189, in _compileExecuteSource
  File "<string>", line 205, in _dynamicFunc
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 360, in __call__
SystemExit: 1

Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts

Posted on
Tue Oct 09, 2018 10:38 am
Gusten offline
Posts: 171
Joined: Dec 30, 2015
Location: Sweden, Gothenburg

Re: Husqvarna Automower Script

Hi, mine is working and i am on 7.2 Iam running my script as files if it makes any differents?


Skickat från min iPhone med Tapatalk

Who is online

Users browsing this forum: No registered users and 2 guests