Announcement

Collapse
No announcement yet.

Anyone using Xiaomi Mi Vacuum Integration with HS3 (Looking for Ideas Too)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Anyone using Xiaomi Mi Vacuum Integration with HS3 (Looking for Ideas Too)

    Hi Everyone,

    I never saw anything listed in the forums, but curious if any of you are using Xiaomi Mi Vacuum smart vacuum (uses Wifi) with HomeSeer? I had mine for a couple of months now and I'm loving it for everyday vacuum cleaning throughout the house.

    In the app, I can create basic cleaning schedules. But now that I just started with Homeseer, I'm hoping to start doing some more advanced cleaning schedules. Right now I have it clean twice a day - noon and midnight. Without going too far into details, what I am going to do is have it run through a cleaning if we arm the house and are away. But not have it run if it ran within the past 6 hours. Same deal will apply when we are at home as well. I can do that with virtual switches/conditions in events with no problem.

    But now I'm thinking, how can I control the vacuum in HomeSeer? I found a python scripts that accomplishes my goal at here: https://github.com/rytilahti/python-mirobo. I installed it on my Mac Server (separate from my HS Box - which I'm running in Vmware Fusion) . I can ssh into the Mac Server and run commands such as "mirobo start" and "mirobo stop". With using Plink and event scripting, I think I can easily accomplish what I originally want here


    Now having said that, I noticed that you can also get the status of the vacuum as well with the python scripts such as typing in "mirobo status". I'm thinking this would really help me out. While I love this vacuum, sometimes it will say the main brush is blocked when it gets to the thicker carpet in our house and pause. It tells you to check the main brush. But all I have to do is resume the cleanup in the app and it picks off. So what I would like to do is find a away of picking up the status results and if the status says that the main brush is blocked, go ahead and run the start command again. And thinking about it further, maybe have the status communicate back to homeseer via Json somehow to control the vacuum virtual switch.

    Trying to find some ideas here as I am scattered in different directions on having status updates and two way communications. Now one thing I have done was install this in Home Assistant successfully (https://home-assistant.io/components...xiaomi_vacuum/). I tried looking at using MQTT, but Home Assistant isn't quite clear on how to use MQTT with a physical switch (the vac shows up as a physical switch in Home Assistant. Plus from what I researched, MQTTT won't tell me about the detailed status in Home Assistant. Json is what you have to use. I thought about calling a JSON url from HS to HA, but it doesn't appear to be easy enough for me in HS. I saw a post by Sparkman to where he done something with a WD Live product. But I can't correlate how to do that with the JSON post URLs to Homeseer. And then parsing it will be another battle.

    I'm curious what everyone thoughts are in integrating this product somehow with HS.

  • #2
    Welcome to the Homeseer forum panda2297.

    Personally I do not have a Xiaomi Mi Vacuum.


    You can run Homeseer 3 using Mono in Linux - personally running Homeseer 3 / Ubuntu 64bit flavors using ARM, Intel, AMD CPUs.

    BTW you can also run Homeseer on your MAC server.

    Well and run python / perl scripts that intermingle with Homeseer. Mostly python lately.

    I think it would be a great idea integrating this product with Homeseer.
    Last edited by Pete; August 10th, 2017, 01:41 PM.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.00
    Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.00

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

    Comment


    • #3
      Anyone using Xiaomi Mi Vacuum Integration with HS3 (Looking for Ideas Too)

      That sounds pretty cool. I am considering picking up to vacuum robots for my house. Keep us posted.

      So you should be able to enable JSON Calls to HS3 in your setup. This would allow you to make changes to devices in HS3 from a remote node on your network. I do this in my current setup using homebridge and apple home.

      To run JSON calls from your HS3 server to another node on your network your best bet would be a script. In Linux I suspect you can run a .sh script using a curl command.


      Sent from my iPhone using Tapatalk

      Comment


      • #4
        Originally posted by Pete View Post
        Welcome to the Homeseer forum panda2297.
        You can run Homeseer 3 using Mono in Linux - personally running Homeseer 3 / Ubuntu 64bit flavors using ARM, Intel, AMD CPUs.

        BTW you can also run Homeseer on your MAC server.

        Well and run python / perl scripts that intermingle with Homeseer. Mostly python lately.

        I think it would be a great idea integrating this product with Homeseer.
        Hi Pete,

        I am aware of being able to run HomeSeer on Linux. Main reason why I went with Windows is that the plugins are generally more available than the Linux ones. I did not know that you could run it in Mac OS X, but I do see where you can do that with Mono. Very interesting.

        Comment


        • #5
          Originally posted by Kerat View Post
          So you should be able to enable JSON Calls to HS3 in your setup. This would allow you to make changes to devices in HS3 from a remote node on your network. I do this in my current setup using homebridge and apple home.
          That is a great idea you have there for HomeBridge and using JSON calls. I'm actually quite familiar with HomeBridge. I used it for my Vera and alarm.com integration. Since I ditched my Vera due to stability issues, I am definitely going to start using HomeBridge again. I just not too much in a rush as I been using the Alexa integration with my setup.

          Out of curiosity, I noticed that there is a HomeBridge plugin for HomeSeer. Is there a reason why you didn't go with that? I wasn't sure if it was because it wasn't availability at the time or had known issues.

          Comment


          • #6
            Running the Python script in HS3?

            I'm interested in the Xiaomi vacuum cleaner too and have the same idea about scheduling according to home security status.

            A plugin with support for the growing set of Xiaomi devices would be great. But meanwhile something more "dirty" is needed.

            Would it be possible to run the Python script you found directly on the HS3 server? Maybe also triggered from an HS3 event?

            /Fredrik

            Comment


            • #7
              I'm also interested in ideas to accomplish this within or integrated with HS.

              Sent from my ZTE A2017U using Tapatalk

              Comment


              • #8
                I set up Home Assistant on one of my extra Pi's just for shits and giggles and one of the addons is the Xiaomi Vacuum. It uses the python script mentioned above. I have been able to control it directly through HASS so it's served that purpose even if I can't get what I want to work.

                What I would like to be able to do is use the MQTT plugin to control some of the stuff from HS that I currently can't (such as the vacuum) and also update the status of some of the other stuff I have. Currently I am using Stringify with HS to update the status of my Wink Relay but HASS has local control.

                My biggest challenge so far is to actually map control of devices to/from MQTT with Homeseer (as well as HASS.)

                Once I know a bit more and can figure some of this new stuff out I'll post more. Bottom line is though that the script does work. You have to get the access token and at least with Android you'll need to be able to extract that from the app using ADB on a computer. I believe I read something the other day about being able to use a network sniffer to do that as well.

                Comment


                • #9
                  Success

                  So here's what I ended up doing.

                  I have a raspberry pi running Home Assistant with just a few components. My Wink Relay, FireTV, Plex, and of course the Xiaomi Vacuum. The hardest part was actually getting the vacuum to work with HASS.

                  Once that was done I downloaded curl.exe for Windows and set up a virtual device in HS. I run two events. One for the On state and one for Off.

                  If the virtual device becomes on then the event runs the commandline:

                  curl.exe -X POST -H "x-ha-access: PASSWORD" http://192.168.86.65:8123/api/services/vacuum/turn_on

                  for off:

                  curl.exe -X POST -H "x-ha-access: PASSWORD" http://192.168.86.65:8123/api/services/vacuum/turn_off

                  I'm very pleased that there's no delay whatsoever. The wife loves "Alexa, turn on the vacuum"

                  I could probably just use the python script mentioned above with some work and do without HASS but I really suck at scripting and I have other plans for HASS as well to integrate some other stuff into Homeseer. I've been toying around with MQTT and NodeRED lately so this was a nice learning experience. Only bad part is that I have three different pieces that could fail...Homeseer on one machine, Home Assistant on a Pi, or the Vacuum. Might make troubleshooting later a bit harder.

                  Comment


                  • #10
                    I managed to do it using Hassio , I use hassio from time to time to integrate devices that Homeseer doesn't support ( like Spotify Player , Xiaomi Vacuum cleaner and couple of other devices ) , I built the attached device using hassio and MQTT

                    What I want to do next is report the values from Hassio to Homeseer to get the status of the vacuum , battery , cleaned area and so on , I can barely use mqtt to send commands but not report value , if anyone can help it would be great , and if you guys need help building this in Homeseer I'm sure I can help

                    Click image for larger version

Name:	Screen Shot 2018-11-18 at 10.59.46 AM.png
Views:	92
Size:	35.6 KB
ID:	1260247Click image for larger version

Name:	Screen Shot 2018-11-18 at 11.02.13 AM.png
Views:	104
Size:	422.0 KB
ID:	1260245
                    Attached Files

                    Comment


                    • #11
                      Hi all has any one got any further with this?
                      I have the setup Hassio and have the Vac working in it but would much prefer running out of HS.

                      Comment


                      • #12
                        Hi,

                        Jeedom has a ‘Xiaomi Home’ plugin (for 6€) that seems to allow to control Xiaomi Vacuum cleaners.
                        My HS3 Jeedom plugin allows to control/monitor Jeedom equipment from Homeseer.
                        You can setup a Jeedom box on a raspberry pi and install the xiaomi home plugin. Then install Jeedom plugin on HS3 and your vacuum cleaner will show up in HS3.

                        Comment

                        Working...
                        X