-
Notifications
You must be signed in to change notification settings - Fork 503
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
Add some news field for future DDF (Consumption/power device) #5890
Conversation
I'm not sure about |
state/production for all devices that mesure consumption and production.
state/consumption_2 |
Cool, thanks that's indeed useful data to have 👍 |
I agree it’s useful to add attributes for these, but I’d urge to reconsider the naming and API design. I don’t know about Zigbee power meters, but in the DSMR standard they support consumption vs delivery attributes for not just consumption, but also power and current. Also the attributes in the Simple Metering cluster talk about delivered vs received. I would really prefer For three-phase electricity it’s probably best to use a subobject per phase, allowing for power, current, and voltage per phase. DSMR doesn’t define a consumption per phase, though. It does allow for different rates (e.g. day vs night rates), both for consumption delivered and received. |
It's not a problem for me, I can use state/consumption and state/consumption_delivered time for third app support state/consumption_received. Can do a new PR, I will adapt my future DDF for consuption, and can keep state/consumption and state/consumption_delivered for compatiblity with third app. For the Tree phase, do you have a json exemple ? IDK if it s better to make something for future or try to keep the compatibilities with third app ... |
Don't really have an example for any Zigbee device, but here is how I parse the DSMR telegram into JSON: {
"type": "ISK5\\2M550T-1012",
"version": "5.0",
"msg_text": "",
"electricity": {
"id": "E0044007118529318",
"lastupdated": "2019-12-29T23:37:14",
"tariff": "low",
"consumption": {
"low": 4000.647,
"normal": 1154.948
},
"power": 1765,
"failures": {
"short": 9,
"long": 4,
"log": {
"2018-03-27T06:41:11": 180,
"2019-01-08T10:59:23": 2603
}
},
"l1": {
"voltage": 236.9,
"sags": 1,
"swells": 1,
"current": 0,
"power": 132
},
"l2": {
"voltage": 235.1,
"sags": 1,
"swells": 1,
"current": 0,
"power": 37
},
"l3": {
"voltage": 234.9,
"sags": 1,
"swells": 1,
"current": 6,
"power": 1596
}
},
"electricityBack": {
"id": "E0044007118529318B",
"lastupdated": "2019-12-29T23:37:14",
"tariff": "low",
"consumption": {
"low": 0,
"normal": 0
},
"power": 0,
"l1": {
"power": 0
},
"l2": {
"power": 0
},
"l3": {
"power": 0
}
}
} |
So you want to use array in the JSON ? or dictionary ? |
That seems cleaner than repeated attributes with a changing suffix. Don't think we use that much today. Really need to do a proper design of the API going forward. |
Not used yet, but add