Hi, I'm juste trying to write a little script that get the status of my robot but I always receiving "None"
this is my code so far :
`from sucks import *
config = {
'device_id': EcoVacsAPI.md5(str(time.time())),
'email': '******', # Email you use to login to Ecovacs
'password_hash': EcoVacsAPI.md5(''), # Password you use to login to Ecovacs
'country': 'CA', # Two character country code
'continent': 'NA' # Two character continent code, can you ww if have issues
}
api = EcoVacsAPI(
config['device_id'],
config['email'],
config['password_hash'],
config['country'],
config['continent']
)
vacs = api.devices()
my_vac = vacs[0] # Assuming we want to get the first Deebot
vacbot = VacBot(
api.uid,
api.REALM,
api.resource,
api.user_access_token,
my_vac,
config['continent']
)
vacbot.connect_and_wait_until_ready()
test = vacbot.run(GetChargeState())
print(test)
vacbot.disconnect(wait=True)
`
Hi, I'm juste trying to write a little script that get the status of my robot but I always receiving "None"
this is my code so far :
`from sucks import *
config = {
'device_id': EcoVacsAPI.md5(str(time.time())),
'email': '******', # Email you use to login to Ecovacs
'password_hash': EcoVacsAPI.md5(''), # Password you use to login to Ecovacs
'country': 'CA', # Two character country code
'continent': 'NA' # Two character continent code, can you ww if have issues
}
api = EcoVacsAPI(
config['device_id'],
config['email'],
config['password_hash'],
config['country'],
config['continent']
)
vacs = api.devices()
my_vac = vacs[0] # Assuming we want to get the first Deebot
vacbot = VacBot(
api.uid,
api.REALM,
api.resource,
api.user_access_token,
my_vac,
config['continent']
)
vacbot.connect_and_wait_until_ready()
test = vacbot.run(GetChargeState())
print(test)
vacbot.disconnect(wait=True)
`