-
-
Notifications
You must be signed in to change notification settings - Fork 670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pet Feeder (mmgg.feeder.petfeeder) #220
Comments
Have you tried to call this service? service: xiaomi_miot.get_properties
data:
entity_id: sensor.mmgg_petfeeder_entity_id
mapping:
fault:
siid: 2
piid: 1
feedtotal:
siid: 4
piid: 2
foodstatus:
siid: 4
piid: 7
dryertime:
siid: 7
piid: 1
clearnserve:
siid: 8
piid: 1
throw: true |
[
{"did": "fault", "siid": 2, "piid": 1, "code": -704030013},
{"did": "feedtotal", "siid": 4, "piid": 2, "code": -704040002},
{"did": "foodstatus", "siid": 4, "piid": 7, "code": -704040002},
{"did": "dryertime", "siid": 7, "piid": 1, "code": -704040002},
{"did": "clearnserve", "siid": 8, "piid": 1, "code": -704040002},
]
😭 |
So the spec of this model |
Indeed...which is odd because they carry the same part number of device. So those features that are working in Mi Home will only be available with Miio ? |
You can get the device states via custom attributes # customize.yaml
sensor.mmgg_petfeeder_entity_id:
miio_properties: prop1,prop2
sensor_commands:
get_prop:
params:
- prop1
- prop2
values: # to entity state attributes
- miio_prop1
- miio_prop2 And you can control the device via the service service: xiaomi_miot.send_command
data:
entity_id: sensor.mmgg_petfeeder_entity_id
method: set_prop1
params:
- value |
Thank you, I will see what I can find 😄 I have also emailed the developer who was involved with creating the product @laughmaker - maybe some fix available. |
Just done a packet capture and doesn't appear to be using miio locally, it's all between feeder <> xiaomi cloud on 54321. I guess if no reply from manufacturer I will have to disassemble 😢 |
Maybe you can get miio logs via MiHome mod by @vevsvevs:
|
I also have the same device and can’t access it |
@blackdm666 I took the device apart out of interest. It has ESP-WROOM-02D module however it looks like main MCU is "eastsoft hr8p506fhlq" which I know absolutely nothing about. There's lots of test pads but nearly all for main MCU. for hr8p506fhlq there is 5 pin populated header labeled: Device also contains BM8563 RTC with battery which is nice touch for such an important device. @al-one I appreciate this is only one device out hundreds in the ecosystem, but would you be able to chat to the developer?
|
我已经联系了对方的微信,我会让他尽快回复你邮件,以帮助改进工作,再次感谢你,我现在使用手机不方便英语,抱歉! |
@Wh1terat I discussed with him. Unfortunately, they can't support through OTA. However, there is another way to support this device. Please upgrade to the master branch and you will see some attributes in the entity. Then create a script to feed: alias: mmgg_feed_now
mode: single
sequence:
- service: xiaomi_miot.send_command
data:
entity_id: sensor.mmgg_petfeeder_entity_id
method: outfood
params:
- 1 # food amount 1-30 |
@al-one Ah I had hoped that perhaps there was a way of updating them via OTA. Noticed another "new one" recently: Re the script, I updated to master branch and tried but no food was dispensed and no error raised. |
@Wh1terat The new models don't help. They have different firmware. Please show me the entity attributes. |
And try this service service: xiaomi_miot.send_command
data:
entity_id: sensor.mmgg_petfeeder_entity_id
method: outfood
params:
- 1
throw: true |
@al-one They must have a way to update though as my unit has had 1 firmware update through MIHome since I bought it (something about fixing schedules) :/ Actually that's a good point, both sensor and switch entities are unavailable since update to master. I've tried removing the device from the integration, restarting but it does not remove the device or it's entities. How to force delete? |
That removed it... but then when re-adding it does not add:
|
What is your HA version ? |
|
Looks like that exception was changed to be a warning quite a while ago in python-miio lib: But HA has been using old package before that pull until only 2 days ago, but there's no release using it yet. |
@Wh1terat Please upgrade to master branch and try again. |
🥳 🎈 Just dispensed 2 units and it shows 2 units on MiHome! But importantly gained a whole load of new fields!
|
Just tried toggling wifi_led on MiHome and this state updates instantly so maybe a few small tweaks needed, but I really must say this is a huge huge step forward! 👏 From my head, these are features which would would mean no need to ever use MiHome app again for this:
*not even possible in app, only supports Chinese timezone so feedplan times must be calculated to match! |
You can create sensor entities via template: # configuration.yaml
template:
- trigger:
- platform: state
entity_id: sensor.mmgg_petfeeder_bf89_pet_feeder
attribute: food_status
sensor:
- name: mmgg_petfeeder_bf89_food_status
state: |
{% set sta = trigger.to_state.attributes.food_status | default | int(-1) -%}
{% set lst = ['full','less','empty'] -%}
{{ lst[sta] | default('unknown') }}
- trigger:
- platform: state
entity_id: sensor.mmgg_petfeeder_bf89_pet_feeder
attribute: clean_days
- platform: state
entity_id: sensor.mmgg_petfeeder_bf89_pet_feeder
attribute: dryer_days
sensor:
- name: mmgg_petfeeder_bf89_clean_days
state: |
{{ trigger.to_state.attributes.clean_days | default | int(0) }}
unit_of_measurement: days
- name: mmgg_petfeeder_bf89_dryer_days
state: |
{{ trigger.to_state.attributes.dryer_days | default | int(0) }}
unit_of_measurement: days
# scripts.yaml
mmgg_feeder_reset_clean:
sequence:
- service: xiaomi_miot.send_command
data:
entity_id: sensor.mmgg_petfeeder_bf89_pet_feeder
method: resetclean
params: []
mmgg_feeder_reset_dryer:
sequence:
- service: xiaomi_miot.send_command
data:
entity_id: sensor.mmgg_petfeeder_bf89_pet_feeder
method: resetdryer
params: [] |
Thank you 😸 That's great, I'll publish my final stuff once I've tweaked it - few different enums for values. Had a look at "getfeedplan1" and "getfeedplan2" index, hour, minute, portions, unknown(?) getfeedplan1 = [
0, 255, 255, 255, 255,
1, 255, 255, 255, 255,
2, 255, 255, 255, 255,
3, 255, 255, 255, 255,
4, 16, 30, 8, 255
]
getfeedplan2 =[
5, 255, 255, 255, 255,
6, 255, 255, 255, 255,
7, 255, 255, 255, 255,
8, 255, 255, 255, 255,
9, 255, 255, 255, 255
] (Mine ended up as index 4 as I had added/removed a few schedules when testing the unit.) Not sure if there is a "setfeedplan1" ? As for setting stuff, I'm struggling to work out how for key_lock and wifi_led. Any ideas? |
If you have an Android device, you can try #220 (comment), it can get all miio commands. |
Finally a use for my free firetab!
*(Guess they'd not heard of bool 🤣 )
(edit and add do the same) Turns out it does match up pretty well with mmgg.feeder.spec 😆 Total feed isn't seen so I guess this figure is just something stored in the plugin data and nothing to do with the device itself. |
A new commit (a4a991c) allows you to extend the miot-spec. Can you help me adapt the device ? This is an example: hass-xiaomi-miot/custom_components/xiaomi_miot/core/device_customizes.py Lines 370 to 398 in a4a991c
hass-xiaomi-miot/custom_components/xiaomi_miot/core/miio2miot_specs.py Lines 503 to 511 in a4a991c
|
Hi , I feel the state of ( Display daily total of dispensed food (feed_today) ❌ ) is quite important to me. How to decode it ? Thanks |
And it is using https://api.io.mi.com/app/home/rpc/248685518 to fetch the |
service: xiaomi_miot.get_device_data
data:
entity_id: sensor.mmgg_petfeeder_xxxx_pet_feeder
type: event
key: feedStats
|
I wrote support for the device including feed plans and submitted a pull to python-miio but lost interest after some differences of opinion with the developer. This provides support for feedplans. Not sure how we'd go about implementing feedplans within this project though without some chunks of code. |
Just installed and all entities are visable. I always use NODE-RED and I want to setup my own schedule. How can I send a signal to the feeder to feed x grams. So I want to have all control when to send and also based on other metrics in the future. I want to read the RFID chip (I have 2 cats) and based on this information feed the cat. |
This issue is closed, but it cloud help someone. The last unknown(?) part is : |
@Wh1terat Could you please explain again? How can I add Xiomi Pet Feeder? I'm a novice. |
Also having some issues with this, I can dispense 1 food measure from the dashboard. But nothing happens when I try to use the send_command like so:
|
There is no oufood actions. |
Hi, |
Which model do you have ? |
i have this model : Xiaomi Smart Pet Food Feeder thank you |
Hi all !
|
Hi,
I have the Mijia branded pet feeder (XWPF01MG) - "urn:miot-spec-v2:device:pet-feeder:0000A06C:mmgg-petfeeder:1".
The XIAOWAN branded pet feeder is identical, even shares the same part number but uses "urn:miot-spec-v2:device:pet-feeder:0000A06C:mmgg-spec:1"
This spec is more thorough and matches the features available through the Mi home app.
Is there any way to use this miot spec ?
The text was updated successfully, but these errors were encountered: