Git Product home page Git Product logo

Comments (18)

mrbungle64 avatar mrbungle64 commented on July 25, 2024

@matrix1233

The move commands are not working on every device.
For example none of them is working on my T8 AIVI.
They are actually for older models with remote control.

I still need to figure out the move commands for the newer models, but that's honestly not high on my priority list 😉
I'll let you know when I implemented new move commands.

from ecovacs-deebot.js.

scognito avatar scognito commented on July 25, 2024

I have the same problem. Is there a way to debug?

from ecovacs-deebot.js.

mrbungle64 avatar mrbungle64 commented on July 25, 2024

@scognito

I have the same problem. Is there a way to debug?

What model are you using?

from ecovacs-deebot.js.

scognito avatar scognito commented on July 25, 2024

from ecovacs-deebot.js.

mrbungle64 avatar mrbungle64 commented on July 25, 2024

@scognito

Please try if the move commands of this branch are working:
https://github.com/mrbungle64/ecovacs-deebot.js/tree/test/2023-04

from ecovacs-deebot.js.

scognito avatar scognito commented on July 25, 2024

Unfortunately this didn't work (forward and backward commands work though, like the master branch).
This is the relevant part of the code (it's mainly the example):

        console.log("Devices:", JSON.stringify(devices));

        let vacuum = devices[deviceID];
        let vacbot = api.getVacBot(api.uid, EcoVacsAPI.REALM, api.resource, api.user_access_token, vacuum, continent);

        // Once the session has started the bot will fire a 'ready' event.
        // At this point you can request information from your vacuum or send actions to it.
        vacbot.on("ready", (event) => {
            console.log("vacbot ready");

            vacbot.run("RotateLeft");

            vacbot.on("BatteryInfo", (battery) => {
                console.log("Battery level: " + Math.round(battery));
            });
            vacbot.on('CleanReport', (value) => {
                console.log("Clean status: " + value);
            });
            vacbot.on('ChargeState', (value) => {
                console.log("Charge status: " + value);
            });
        });
        vacbot.connect();

This is the log (I removed a lot of information I think it is private, let me know if you need other info).

 info  Setting up EcovacsAPI instance
 function  connect(accountId,passwordHash)
 function  callUserAuthApi('user/login',{account:accountId,password:passwordHash})
 info  portalUrl.href: 'https://gl-it-api.ecovacs.com/v1/private/IT/EN/XXX/global_e/2.2.3/google_play/1/user/login'
 info  searchParams: 'account=XXX&password=1XXX&authTimespan=1682347383844&requestId=XXX&authTimeZone=GMT-8&authAppkey=XXX&authSign=XXX'
 payload 
{
  code: '0000',
  msg: '操作成功',
  time: 1682347384003,
  data: {
    uid: 'XXX',
    accessToken: 'XXXX',
    userName: 'XXX',
    email: 'XXX',
    mobile: null,
    isNew: null,
    loginName: 'XXX',
    ucUid: 'XXX'
  },
  success: true
}
 function  callUserAuthApi('user/getAuthCode',{"uid":"XXX","accessToken":"XXX"})
 info  portalUrl.href: 'https://gl-it-openapi.ecovacs.com/v1/global/auth/getAuthCode'
 info  searchParams: 'uid=XXX&accessToken=XXX&authTimespan=1682347384181&bizType=&deviceId=XXX&openId=global&authAppkey=XXX&authSign=XXX'
 payload 
{
  code: '0000',
  msg: '操作成功',
  time: 1682347384318,
  data: {
    authCode: 'XXX',
    ecovacsUid: 'XXX'
  },
  success: true
}
 function  callPortalApi('users/user.do','loginByItToken','{"edition":"ECOGLOBLE","userId":"XXX","token":"GLOBAL_APP__XXX","realm":"ecouser.net","resource":"XXX","org":"ECOWW","last":"","country":"IT"}')
 info  params: {"todo":"loginByItToken","edition":"ECOGLOBLE","userId":"XXX","token":"XXX","realm":"ecouser.net","resource":"XXX","org":"ECOWW","last":"","country":"IT"}
 info  portalUrl: 'https://api-app.dc-eu.ww.ecouser.net/api/users/user.do'
 payload 
{
  todo: 'result',
  result: 'ok',
  userId: 'XXX',
  resource: 'XXX',
  token: 'XXX',
  last: 604800000
}
 success  user authentication complete
 function  callPortalApi('users/user.do','GetDeviceList','{"userid":"XXX","auth":{"with":"users","userid":"XXX","realm":"ecouser.net","token":"XXX","resource":"XXX"}}')
 info  params: {"todo":"GetDeviceList","userid":"XXX","auth":{"with":"users","userid":"XXX","realm":"ecouser.net","token":"XXX","resource":"XXX"}}
 info  portalUrl: 'https://api-app.dc-eu.ww.ecouser.net/api/users/user.do'
 payload 
{
  todo: 'result',
  result: 'ok',
  devices: [
    {
      did: 'XXX',
      name: 'XXX',
      class: '7bryc5',
      resource: '8ukt',
      nick: 'Alfred',
      company: 'eco-ng',
      bindTs: 1643315113556,
      service: [Object]
    }
  ]
}
 function  callPortalApi('appsvr/app.do','GetGlobalDeviceList','{"userid":"XXX","auth":{"with":"users","userid":"XXX","realm":"ecouser.net","token":"XXX","resource":"XXX"}}')
 info  params: {"todo":"GetGlobalDeviceList","userid":"XXX","auth":{"with":"users","userid":"XXX","realm":"ecouser.net","token":"XXX","resource":"XXX"}}
 info  portalUrl: 'https://api-app.dc-eu.ww.ecouser.net/api/appsvr/app.do'
 payload 
{
  code: 0,
  todo: 'result',
  ret: 'ok',
  devices: [
    {
      did: 'XXX',
      name: 'XXX',
      class: '7bryc5',
      resource: '8ukt',
      nick: 'Alfred',
      company: 'eco-ng',
      bindTs: 1643315113556,
      service: [Object],
      homeId: 'XXX',
      homeSort: 9999,
      deviceName: 'DEEBOT N8+',
      icon: 'https://portal-ww.ecouser.net/api/pim/file/get/5fb474d4d16a99000667edd9',
      ota: true,
      UILogicId: 'N8_PLUS',
      materialNo: 'XXX',
      pid: 'XXX',
      product_category: 'DEEBOT',
      model: 'N8_PLUS_WHITE',
      updateInfo: [Object],
      status: 1,
      offmap: true
    }
  ]
}
Devices: [{"did":"XXX","name":"XXX","class":"7bryc5","resource":"XXX","nick":"Alfred","company":"eco-ng","bindTs":1643315113556,"service":{"jmq":"jmq-ngiot-eu.dc.ww.ecouser.net","mqs":"api-ngiot.dc-as.ww.ecouser.net"},"homeId":"XXX","homeSort":9999,"deviceName":"DEEBOT N8+","icon":"https://portal-ww.ecouser.net/api/pim/file/get/XXX","ota":true,"UILogicId":"N8_PLUS","materialNo":"XXX","pid":"XXX","product_category":"DEEBOT","model":"N8_PLUS_WHITE","updateInfo":{"needUpdate":false,"changeLog":""},"status":1,"offmap":true,"deviceNumber":0}]
 function  getVacBot('XXX','ecouser.net','XXX','XXX','[object Object]','eu')
 warn  got value 'eu' for continent (deprecated)
 success  '950type' model identified
 function  connect()
 info  url: 'mqtts://mq-eu.ecouser.net:8883'
 info  username: 'XXX@ecouser'
 info  clientId: 'XXX@ecouser/XXX'
 success  MQTT client connected
 function  subscribe()
 info  atr channel: 'iot/atr/+/XXX/XXX/XXX/j'
 success  successfully subscribed to atr channel
 info  [VacBot] Ready event!
vacbot ready
 success  MQTT client received ready event

If I can help debugging and testing something let me know, I would really like to help.
Thank you

from ecovacs-deebot.js.

mrbungle64 avatar mrbungle64 commented on July 25, 2024

@scognito

vacbot.run("RotateLeft");

Why you use "RotateLeft"?

from ecovacs-deebot.js.

scognito avatar scognito commented on July 25, 2024

Sorry I was making some guessing and left the wrong command.
Changing to "MoveLeft" I get

 success  got response for 'move' with id '09675245':
 warn  errorCode: 500
 warn  errorDescription: Request Timeout
 info  [EcovacsMQTT] failure code 500 (undefined) sending command 'move'
 error  error sending command: Failure code 500 (undefined)

from ecovacs-deebot.js.

mrbungle64 avatar mrbungle64 commented on July 25, 2024

@matrix1233 @scognito

Does the N8 (+) has control elements in the Ecovacs Home App to move the device?

from ecovacs-deebot.js.

scognito avatar scognito commented on July 25, 2024

from ecovacs-deebot.js.

mrbungle64 avatar mrbungle64 commented on July 25, 2024

@scognito

No, it doesn't. Please don't tell me it's unsupported

The problem is that you cannot capture the traffic if you cannot trigger the function in the Ecovacs Home App 😉

from ecovacs-deebot.js.

scognito avatar scognito commented on July 25, 2024

from ecovacs-deebot.js.

mrbungle64 avatar mrbungle64 commented on July 25, 2024

Sounds good to me. Wonder how move forward and move back commands were captured since they work

I think it's working by accident 😉

I captured the traffic of the move commands for my T8 AIVI and X1 Turbo devices.
With the X1 it's working with the payload used in the test branch, but for the T8 AIVI it's still not working ...

That models have control elements in camera mode.

from ecovacs-deebot.js.

scognito avatar scognito commented on July 25, 2024

So you are 100% sure there is no way? It's a pity though. My idea was to add a mini IR camera on the N8 and create a mobile app for moving it like a security robot when I'm not at home 😔

from ecovacs-deebot.js.

mrbungle64 avatar mrbungle64 commented on July 25, 2024

@scognito

So you are 100% sure there is no way?

I didn't say that, did I? 😉
I'll let you know if I finally got it working with the T8 AIVI or if there is otherwise any progress on it.

from ecovacs-deebot.js.

scognito avatar scognito commented on July 25, 2024

Ah ok cool! Let me know if and how I can help, thanks

from ecovacs-deebot.js.

Hobart2967 avatar Hobart2967 commented on July 25, 2024

Same here, using a deebot N8 and LEft & Right are not working.

from ecovacs-deebot.js.

Hobart2967 avatar Hobart2967 commented on July 25, 2024

Would offer my support in sniffing or testing if you'd like to have some more info.

from ecovacs-deebot.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.