-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Adding support for "Develco AMS HAN sensor (EMIZB-132)" #974
Comments
Can you share your |
Thanks for helping out, much appreciated! Here is the database for zigbee2mqtt: |
Please try with {
zigbeeModel: ['EMIZB-132'],
model: 'emizb-132',
vendor: 'Develco',
description: 'Wattle AMS HAN power-meter sensor',
supports: 'Monitoring stats from central household power-meter',
fromZigbee: [fz.on_off, fz.generic_power],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(2);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
await configureReporting.onOff(endpoint);
await configureReporting.instantaneousDemand(endpoint);
await endpoint.read('seMetering', ['multiplier', 'divisor']);
},
}, |
This is what I get in the logs when I try it out: It seems to output an error, then it connects on the second try. I have added this in homeassistant.js in the pattern list. Reading in the datasheet, these are the different values I should be getting https://i.imgur.com/rIYQj53.png Edit: Just saw something else as well, there seems to be some extra code needed for some of the metering devices. I got the one marked in yellow https://i.imgur.com/lMrtown.png Edit2: I'm getting the following when checking the device in Zigbee2MqttAssistant https://i.imgur.com/IVNGZum.png |
I'm getting these lines as well, not sure if they are related to this device? |
|
Here is the updated database.db |
And
? |
It's not a power socket so I wont be able to see a direct comparison to a bulb being connected. It's a AMS HAN reader for the fuse box. It plugs into the main relay in the house and monitors the total consumption of power and throughput in real time. Its the device circled in the picture. Its a fairly new thing and I haven't seen many other implementations of it. So in theory I should be seeing the total wattage/consumption used in total for all my outlets, computer, heater etc. And here is what I'm currently getting with debugging enabled: |
I don't know if it has to be added yet, it only make sense if after that we issue write requests to it. Looking at your we already got some luck with the config from #974 (comment) as I can see you got an energy value |
The energy reading seems to always be |
Can you try with below, this will set the mode to Kaifa (don't know if this is correct for your config), if not you can change the {
zigbeeModel: ['EMIZB-132'],
model: 'emizb-132',
vendor: 'Develco',
description: 'Wattle AMS HAN power-meter sensor',
supports: 'Monitoring stats from central household power-meter',
fromZigbee: [fz.electrical_measurement, fz.generic_power],
toZigbee: [],
meta: {configureKey: 5},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(2);
// Kaifka meter mode https://github.com/Koenkk/zigbee-herdsman-converters/issues/974#issuecomment-586455655
await endpoint.write('seMetering', {0x0302: {value: 0x0203, type: 49}}, {manufacturerCode: 0x1015});
await bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering']);
await endpoint.read('haElectricalMeasurement', [
'acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier',
'acCurrentDivisor', 'acPowerMultiplier', 'acPowerDivisor',
]);
await configureReporting.rmsVoltage(endpoint);
await configureReporting.rmsCurrent(endpoint);
await configureReporting.activePower(endpoint);
await endpoint.read('seMetering', ['multiplier', 'divisor']);
await configureReporting.instantaneousDemand(endpoint);
},
}, |
Thanks for the new code. I have the Aidon meter, so I believe I need to use https://gist.github.com/SilentFez/20caf69844c5e6b8eaf7881054c9b06b Edit: I noticed something. The data I get on And I'm alos getting |
Can you provide the log with: {
zigbeeModel: ['EMIZB-132'],
model: 'emizb-132',
vendor: 'Develco',
description: 'Wattle AMS HAN power-meter sensor',
supports: 'Monitoring stats from central household power-meter',
fromZigbee: [fz.electrical_measurement, fz.generic_power],
toZigbee: [],
meta: {configureKey: 5},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(2);
// Kaifka meter mode https://github.com/Koenkk/zigbee-herdsman-converters/issues/974#issuecomment-586455655
await endpoint.write('seMetering', {0x0302: {value: 0x201, type: 49}}, {manufacturerCode: 0x1015});
const result = await entity.read('seMetering', [0x0302], {manufacturerCode: 0x1015});
console.log('\n\n\n', 'result', result, '\n\n\n');
await bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering']);
await endpoint.read('haElectricalMeasurement', [
'acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier',
'acCurrentDivisor', 'acPowerMultiplier', 'acPowerDivisor',
]);
await configureReporting.rmsVoltage(endpoint);
await configureReporting.rmsCurrent(endpoint);
await configureReporting.activePower(endpoint);
await endpoint.read('seMetering', ['multiplier', 'divisor']);
await configureReporting.instantaneousDemand(endpoint);
},
}, |
Here is the log when testing with the latest code. And thanks for still helping out! 👍 |
I dont see a configure in the log which is the only thing im interested in for know. You dont have to repair everytime as you can also trigger a configure manually via https://www.zigbee2mqtt.io/information/mqtt_topics_and_message_structure.html#zigbee2mqttbridgeconfigure |
Aha thanks, good to know! |
I made a mistake, it has to be {
zigbeeModel: ['EMIZB-132'],
model: 'emizb-132',
vendor: 'Develco',
description: 'Wattle AMS HAN power-meter sensor',
supports: 'Monitoring stats from central household power-meter',
fromZigbee: [fz.electrical_measurement, fz.generic_power],
toZigbee: [],
meta: {configureKey: 5},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(2);
// Kaifka meter mode https://github.com/Koenkk/zigbee-herdsman-converters/issues/974#issuecomment-586455655
await endpoint.write('seMetering', {0x0302: {value: 0x201, type: 49}}, {manufacturerCode: 0x1015});
const result = await endpoint.read('seMetering', [0x0302], {manufacturerCode: 0x1015});
console.log('\n\n\n', 'result', result, '\n\n\n');
await bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering']);
await endpoint.read('haElectricalMeasurement', [
'acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier',
'acCurrentDivisor', 'acPowerMultiplier', 'acPowerDivisor',
]);
await configureReporting.rmsVoltage(endpoint);
await configureReporting.rmsCurrent(endpoint);
await configureReporting.activePower(endpoint);
await endpoint.read('seMetering', ['multiplier', 'divisor']);
await configureReporting.instantaneousDemand(endpoint);
},
}, |
Thanks, here is the updated log with the new code. It successfully configures again, but the data seems to still be the same values. https://gist.github.com/SilentFez/6610e64d0fe7ebb2af214c7d5d18f3b3 Edit: Here is the
|
Are you sure this is with the code from #974 (comment). I'm asking because I don't see the |
Yep it should be. Just in case I restarted zigbee2mqtt from inside HA just now and logged in to the new docker instance and added the code again. Screenshot of what I have added: I have |
Sorry, but I still don't see it. could it be that after a restart of the addon changes to Also in the Deconz issue they talk about having the energy company opening the HAN port, are you sure this port is opened by your energy provider? |
I did it like this:
I contacted my energy company a couple of months ago for them to open the HAN-port and got a confirmation mail stating that they had opened it. It is also possible to measure the voltage across pin 1 and 2 on the HAN-port. The port is polling data every 30 seconds and if the port is in fact opened it should show 24V, and I have confirmed this with a multimeter so it should be sending data. I'm on the zigbee2mqtt and Home Assistant discords (nick: SilentFez#8888) if you want login-info to my HA or terminal if that would make it easier to debug. Edit: I can see the following lines regarding
|
@SilentFez somehow I cannot find you, could you contact me on telegram (@Koenkk)? |
Update: |
Update 2: |
Just picked up the device. They have sent me a new one with the updated firmware. |
Cool! Could you share your debug logging (when receiving measurements from the device) and To enable debug logging set in advanced:
log_level: debug |
log: https://gist.github.com/SilentFez/c7cc887a9b355e19f241683c3ef02eec
|
thanks, changes will be available in the latest dev branch this evening. |
You do excellent work ! |
Would it be possible to change the unit of the energy point. It is now "kW" which is the unit for power. Energy is power over time i.e. "kWh" |
@toremick done! |
Great work guys and really cool that you got it working. You also "on the fly" proved my theory on the firmware being the root cause of the missing values. Just wanted to chime in on the previous question around the firmware, which is indeed not the date code (#974 (comment)). As to my knowledge, it's more the manufacturing date. The firmware and hardware version is "hidden" in manufacturer specific attributes of the basic cluster. If you're interested, check out general.xml in deconz repository (pretty much at the beginning). Should be 8010, 8020, ... |
I have a problem with this device - only getting generic readings and also getting some error messages - and was wondering if you have any suggestions as how to fix this? I am using the latest dev version, which include the above fixes. The device is brand new, with a relatively fresh manufacturing date according to the dateCode from database.db - so maybe not the FW issue talked about earlier? HAN port confirmed open by the electricity company here in Norway - and I have an Aidon meter. The EMIZB-132 is connected to the coordinator (CC2531) routed via an IKEA E1603/E1702 due to range to meter. I set interface mode after pairing by:
From database.db:
Every time I start z2m, I see generic reporting from the device in addition to the following error messages:
|
IMHO, you only can be sure if you compare the FW versions. Manufacturer specific attributes 0x8000 and 0x8010 of the basic cluster should be of interest here. The error on the manufacturer code being null rings a bell. The device may behave a bit "special" on that one. Some Develco devices do not have it included in the device announcement response and some not in the node descriptor... |
Thanks. I am fumbling in the dark here, never used Wireshark before - but the frame below from EMIZB-132 caught my attention with regards to "Software Build Id". Is there anything to be understood from that, am I looking at the right place or is there another way I should proceed to get the FW version on the device?
|
That's not unusual what you see here and has nothing to do with the firmware version of the device. I don't know how manufacturer specific attributes can be read with z2m, sry. Just wanted to give guidance where that information is to be found with my comment above. |
Facing some issues after updating to 1.13.0. The device is having trouble configuring after starting z2m. Tried to remove the device and repair as well. During configuration it seems to output some values but then suddenly stops when it fails to configure. |
Can you try changing the entry in {
zigbeeModel: ['EMIZB-132'],
model: 'EMIZB-132',
vendor: 'Develco',
description: 'Wattle AMS HAN power-meter sensor',
supports: 'power measurements',
fromZigbee: [fz.metering_power, fz.electrical_measurement_power],
toZigbee: [tz.EMIZB_132_mode],
meta: {configureKey: 9},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(2);
await bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering']);
// await readEletricalMeasurementPowerConverterAttributes(endpoint);
await configureReporting.rmsVoltage(endpoint);
await configureReporting.rmsCurrent(endpoint);
await configureReporting.activePower(endpoint);
await readMeteringPowerConverterAttributes(endpoint);
await configureReporting.instantaneousDemand(endpoint);
await configureReporting.currentSummDelivered(endpoint);
await configureReporting.currentSummReceived(endpoint);
},
}, |
Changing out the entry and sending configure commands gives me the following:
|
And with: {
zigbeeModel: ['EMIZB-132'],
model: 'EMIZB-132',
vendor: 'Develco',
description: 'Wattle AMS HAN power-meter sensor',
supports: 'power measurements',
fromZigbee: [fz.metering_power, fz.electrical_measurement_power],
toZigbee: [tz.EMIZB_132_mode],
meta: {configureKey: 9},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(2);
await bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering']);
try {
await readEletricalMeasurementPowerConverterAttributes(endpoint);
await configureReporting.rmsVoltage(endpoint);
await configureReporting.rmsCurrent(endpoint);
await configureReporting.activePower(endpoint);
} catch (e) {}
await readMeteringPowerConverterAttributes(endpoint);
await configureReporting.instantaneousDemand(endpoint);
await configureReporting.currentSummDelivered(endpoint);
await configureReporting.currentSummReceived(endpoint);
},
}, |
That worked flawlessly! Thank you very much 👍
|
@SilentFez thanks, will push it to the dev branch soon. |
@damtjern You are aware that you require Develco's latest firmware for that, aren't you? |
Yes, but to my understanding 2019-07 is the latest? Considering to buy the gateway from develco to check if my device actually works |
Well, I don't know. This seems something they're very strict about. Was in contact with their support and discussed a potential firmware bug (which apparently was none) and also asked for it for my smoke sensors. Unfortunately nothing. But hey, if you buy the gateway, I'll send you all my stuff for a firmware update 😂 |
I just bought an EMIZB-132. The meter is a Kamstrup, and The Also, the I'm just going to halve the |
Hi, I'm using hassio-zigbee2mqtt and getting an error when EMIZB-132 is configured:
I see that you try catch this error ( 7ef6e54), but still raise it, any particular reason for that? I've tried overwriting devices.js using the hassio method (https://www.zigbee2mqtt.io/information/configuration.html#external-converters-configuration), but my .js file does not seem to overwrite the original device since I can not see any of my log messages.
Anyone have ideas how I can fix this? |
Latest zigbee2mqtt release adds OTA support for Develco EMIZB-132: https://github.com/Koenkk/zigbee2mqtt/releases/tag/1.22.0 Firmware v4.0.1 is now available through OTA in zigbee2mqtt !! I am currently updating my device from the outdated "2017-11-01 12:57" firmware, will report if the device starts working after. Edit: I've experienced flickering of some of my zigbee lights after updating the device, possibly due to high amount of traffic. Tried changing the |
I updated to the "2019-09-10 14:56" firmware, and power is no longer doubled, but current 1 and current 3 show as crazy high, over 600A each. Current 2 seems somewhat more plausible at around 10A. |
Hi |
So I've been going at it for a while now and I'm at a loss on what to do next. Posting what I have so far in the hopes that someone can help me out a bit.
This is a device that connects to the HAN-port on a digital electricity meter and it should be able to read electrical measurements from the device.
Here is the datasheet for the device. https://www.develcoproducts.com/media/1783/emizb-132-technical-manual-emi-norwegian-han.pdf
This is the initial log when I connect the device in HA:
https://gist.github.com/SilentFez/94cdc5a6aa953d648323b403a6247dcc
And this is the log after adding the following in devices.js
https://gist.github.com/SilentFez/8e28969c0a677a22c46cad9d7baa9afd
And this is the log for when I add the converter that is showing up in the second log:
https://gist.github.com/SilentFez/026af1cf913fd899d1430f9c756f8b63
When I add the device in homeassistant.js and try to pair it, nothing seems not show up and I cant seem to get any other readings for converters in the logs.
The text was updated successfully, but these errors were encountered: