Skip to content
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

Jasco 43132 does not show Energy or Power values #12588

Closed
haforme opened this issue May 25, 2022 · 6 comments
Closed

Jasco 43132 does not show Energy or Power values #12588

haforme opened this issue May 25, 2022 · 6 comments
Labels
problem Something isn't working

Comments

@haforme
Copy link

haforme commented May 25, 2022

What happened?

According to the documentation the Jasco 43132 should report power and energy usage.
https://www.zigbee2mqtt.io/devices/43132.html#jasco-43132

The device joins the zigbee network without any issues but the power and energy readings always show null when the connected device is drawing power.

Capture

What did you expect to happen?

That the Energy and Power values be populated when the attached device is drawing power.

How to reproduce it (minimal and precise)

Join the device as normal and observe the values reported while a attached device is drawing power.

Zigbee2MQTT version

1.25.1-1

Adapter firmware version

0x26580700

Adapter

Conbee2

Debug log

No response

@haforme haforme added the problem Something isn't working label May 25, 2022
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Jun 25, 2022
@haforme
Copy link
Author

haforme commented Jun 25, 2022

This is still an active issue.

@github-actions github-actions bot removed the stale Stale issues label Jun 26, 2022
@Koenkk
Copy link
Owner

Koenkk commented Jun 26, 2022

Could you check if the issue is fixed with the following external converter:

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['43132'],
    model: '43132',
    vendor: 'Jasco',
    description: 'Zigbee smart outlet',
    extend: extend.switch(),
    fromZigbee: [...extend.switch().fromZigbee, fz.metering],
    exposes: [e.switch(), e.power()],
    configure: async (device, coordinatorEndpoint, logger) => {
        const endpoint = device.getEndpoint(1);
        await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
        await reporting.onOff(endpoint);
        await reporting.readMeteringMultiplierDivisor(endpoint);
        await reporting.instantaneousDemand(endpoint);
    },
};

module.exports = definition;
  • save this as file next to configuration.yaml as ext_converter.js
  • add it to configuration.yaml:
external_converters:
  - ext_converter.js
  • start z2m, check if issue is fixed

@jronnen7
Copy link

jronnen7 commented Jun 27, 2022

I tested the above and I am still receiving null for power and energy values

I was able to query the device directly for the value 🤔 let me look into this more tonight (the attribute was instantaneousDemand)

image

@jronnen7
Copy link

jronnen7 commented Jun 29, 2022

@Koenkk aha, I figured out my issue, the above code example does work, I was editing the wrong configuration.yaml file (I was pointing at one in a/root/shared/zigbee2mqtt that is why I wasn't able to get it to work yesterday.

I also found a way to include energy by providing the currentSummDelivered attribute.

I landed with the following

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['43132'],
    model: '43132',
    vendor: 'Jasco',
    description: 'Zigbee smart outlet',
    extend: extend.switch(),
    fromZigbee: [...extend.switch().fromZigbee, fz.metering],
    exposes: [e.switch(), e.power(), e.energy()],
    configure: async (device, coordinatorEndpoint, logger) => {
        const endpoint = device.getEndpoint(1);
        await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
        
        await reporting.onOff(endpoint);
        await reporting.readMeteringMultiplierDivisor(endpoint);
        await reporting.instantaneousDemand(endpoint);
        await reporting.currentSummDelivered(endpoint);
    }
};

module.exports = definition;

@haforme notice working power and energy values now 🎉
image

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Jun 29, 2022
@Koenkk
Copy link
Owner

Koenkk commented Jun 29, 2022

cool, i've integrated the changes!

Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

@Koenkk Koenkk closed this as completed Jun 29, 2022
Mephistofeles pushed a commit to Mephistofeles/zigbee-herdsman-converters that referenced this issue Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants