miio_cloud_records for mmgg.feeder.petfeeder
See original GitHub issueLooking for some clarity over miio_cloud_records.
I’ve got a device that pulls data from https://api.io.mi.com/app/user/get_user_device_data
(My beloved petfeeder 😆 )
Request:
{
"accessKey": "xxx",
"did": "xxx",
"group": "raw",
"key": "feedStats",
"limit": 1000,
"time_end": 1643673599,
"time_start": 1640995200,
"type": "event",
"uid": "xxx"
}
Response:
{
"code": 0,
"message": "ok",
"result": [
{
"did": "xxx",
"key": "feedStats",
"time": 1641198610,
"type": "event",
"uid": "xxx",
"value": "[8,4]"
},
{
"did": "xxx",
"key": "feedStats",
"time": 1641112211,
"type": "event",
"uid": "xxx",
"value": "[8,4]"
},
{
"did": "xxx",
"key": "feedStats",
"time": 1641025812,
"type": "event",
"uid": "xxx",
"value": "[8,4]"
}
]
}
So the plugin sends start+end time of day, week, month then iterates the response and adds up the first entry in “value”.
var value = JSON.parse(item.value)[0];
(Wonder what the 2nd was meant for…meh)
How best to implement this within the current component? (easy of course in Python, but I don’t think we want to have a load of per device hacks)
Issue Analytics
- State:
- Created 2 years ago
- Comments:35 (15 by maintainers)
Top Results From Across the Web
Pet Feeder (mmgg.feeder.petfeeder) · Issue #220 - GitHub
Hi, I have the Mijia branded pet feeder (XWPF01MG) ... appear to be using miio locally, it's all between feeder <> xiaomi cloud...
Read more >XIAOWAN Smart Pet Feeder - Xiaomi Miot Spec
XIAOWAN Smart Pet Feeder (mmgg.feeder.spec) 小米/米家设备型号、使用说明书查询工具,米家智能家居产品大全,Xiaomi MIoT Spec 规格查询.
Read more >Xiaomi Wifi devices (Mi IO) - Bindings - openHAB
Device ThingType Device Model Supported
AUX Smart Air Conditioner miio:unsupported aux.aircondition.v1 No
Mi Air Frying Pan miio:basic careli.fryer.maf01 Experimental
Mi Smart Air Fryer (3.5L) miio:basic careli.fryer.maf02...
Read more >EZMioo Automatic Cat Feeder, Pet Feeders, Auto Robotics ...
EZMioo Automatic Cat Feeder, Pet Feeders, Auto Robotics Dog Food Dispenser with Stainless Steel Food Bowl, Timed Cat Feeder, 1-4 Meals per Day...
Read more >IfA - River Thames Conditions - Environment Agency - GOV.UK
Valletta fc tickets, Major record label a&r contacts, Bass fishing molalla river ... Cosinus taintignies 2012, Ko je vladimir vukcevic, Lns bar feeder...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @al-one
It’s a good point with regard to the root sensor, @al-one is there anyway to override which attribute is used for state? This goes back to my comment on is there a way to disable miot for a mixed miio/miot device (since the spec is almost 100% broken for this device).
total_increasing
doesn’t make sense for a daily stats:This is how I’ve got the feeder displayed currently:
config:
scripts:
That’s what I was thinking too, maybe migrate them to a yaml file.
Call action for miio2miot was fixed in https://github.com/al-one/hass-xiaomi-miot/commit/3daaaeb67d45bbf95a99c22772922b6426f85ca8.