Xiaomi Xiaowan Smart pet feeder mmgg.feeder.petfeeder
Before submitting a new request, use the search to see if there is an existing issue for the device.
Device information:
- Name(s) of the device: Xiaomi pet feeder
- Link:
Use miiocli device --ip <ip address> --token <token>.
- Model: mmgg.feeder.petfeeder
- Hardware version: esp8266
- Firmware version: 2.1.3
Additional context If you know already about potential commands or any other useful information to add support for the device, please add that information here.
Hi team,
I'm not a developer but have the device above and would like to contribute to support of it if possible. I installed miiocli and can communicate with it. Just don't know next steps which needs to be done. If you could point me out the right direction will be appreciated.
@AlexPotterOnGit You could try similar way as for Pet Water Dispenser but I'm not sure about token flow:
- hold hardware button to initialize provisioning mode
- device should indicate that it's waiting for connection (e.g. blue blinking light)
- connect from laptop to device's wifi (ssid usually contain model name)
- run
miiocli discover --no-mdns - output should print token and it should be different from
00000000000000000000000000000000orffffffffffffffffffffffffffffffff - check that token is valid
miiocli device --ip <device_ip> --token <device_discovered_token> info - previous command should print model, hardware and firmware version
- connect device to 2.4Ghz wifi
miiocli device --ip <device_ip> --token <device_discovered_token> raw_command miIO.config_router '[{"ssid": "<your_wifi_name>", "passwd": "<your_wifi_password>", "uid": <your_xiaomi_account_user_id>}]' - device will print
ok, changed it's network address and turn off (you could turn it back manually) - after success provisioning and if wifi have internet access, device will regenerate token and send it to Xiaomi cloud for subsequent use via their app
- to get provisioned token from Xiaomi cloud you could use https://github.com/Squachen/micloud#in-terminal
micloud --username [email protected] --country cn --pretty - new token should be printed out if device is belong to account and country
- if wifi network does not have internet access it should not regenerate token
- go to https://home.miot-spec.com/spec/mmgg.feeder.spec for siid/piid/aiid
- example: get
feedtotalandoutfood-numpropertymiiocli device --ip <device_ip> --token <device_token> raw_command get_properties '[{"siid": 4, "piid": 2}, {"siid": 4, "piid": 4}]' - example: set
server-time-zonepropertymiiocli device --ip <device_ip> --token <device_token> raw_command set_properties '[{"siid": 9, "piid": 13, "value": 3}]' - example: run
pet-food-outactionmiiocli device --ip <device_ip> --token <device_token> raw_command action '{"did": "", "siid": 2, "aiid": 1, "in":[]}' - example device with similar realization https://github.com/rytilahti/python-miio/blob/master/miio/huizuo.py
- base class with proper action, getter and setter methods https://github.com/rytilahti/python-miio/blob/master/miio/miot_device.py
Great instructions, appreciated. Let me give it a try tonight.
Great instructions @ofen!
Would you mind creating a PR to add a note or two based on your experiences to https://python-miio.readthedocs.io/en/latest/contributing.html#miot-devices (https://github.com/rytilahti/python-miio/blob/master/docs/contributing.rst#miot-devices) based on what you just wrote above?
Sadly it doesn't follow it's own published miot spec 🤦
But we've worked out all the available miio methods and format now.
See: https://github.com/al-one/hass-xiaomi-miot/issues/220
https://github.com/rytilahti/python-miio/pull/1210
- raw_command action '{"did": "", "siid": 2, "aiid": 1, "in":[]}'
Dude you are amazing!