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

Salus SP600 - Power measurement under-read by factor of 10 #2233

Closed
wjcloudy opened this issue Oct 30, 2019 · 20 comments
Closed

Salus SP600 - Power measurement under-read by factor of 10 #2233

wjcloudy opened this issue Oct 30, 2019 · 20 comments

Comments

@wjcloudy
Copy link

Hope it's OK to add these device related issues here when adding a few existing smart-plugs I have to zigbee2mqtt

The Salus SP600 is supported, and reports on/off,signal and power.

The power reading under-reads ie: "power":104.1 showing when consumption is ~1000W)

Let me know if I can capture any helpful info - Thanks

@gausie
Copy link
Contributor

gausie commented Oct 30, 2019

@jameswarner62 not directly on topic but I'm having trouble connecting my any of my SP600s at all - can I ask what hardware device you're using and what firmware version?

@Koenkk
Copy link
Owner

Koenkk commented Oct 30, 2019

@jameswarner62 Is this with the latest dev branch?

@wjcloudy
Copy link
Author

@Koenkk No - running 1.6.0 stable in hassio - I've tried with the latest devices.js if that helps...

@gausie this is a standard generic CC2531 stick with CC2531_DEFAULT_20190608.zip I believe

@gausie
Copy link
Contributor

gausie commented Oct 30, 2019 via email

@Koenkk
Copy link
Owner

Koenkk commented Oct 30, 2019

@gausie please try with latest dev, pairing has been improved there

@jameswarner62 please also try with hassio edge version.

@wjcloudy
Copy link
Author

@Koenkk Can confirm the issue still exists in edge version

zigbee2mqtt:info 2019-10-30T19:36:07: Starting zigbee2mqtt version 1.6.0 (commit #36c7a27e6c632e0450db18279fc46a1d01365579)
zigbee2mqtt:info 2019-10-30T19:36:07: Starting zigbee-herdsman...
zigbee2mqtt:info 2019-10-30T19:36:09: zigbee-herdsman started
zigbee2mqtt:info 2019-10-30T19:36:09: Coordinator firmware version: '{"type":"zStack12","meta":{"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20190608}}'

@Koenkk
Copy link
Owner

Koenkk commented Oct 30, 2019

Can you share your database.db and the debug log when receiving the power message (and please also indicate what power value you expect).

To enable debug logging set in configuration.yaml:

advanced:
  log_level: debug

@wjcloudy
Copy link
Author

wjcloudy commented Oct 30, 2019

@Koenkk With a 2kw known load:
zigbee2mqtt:debug 2019-10-30T19:58:58: Received Zigbee message from '0x001e5e0902132adb', type 'attributeReport', cluster 'seMetering', data '{"instantaneousDemand":1897}' from endpoint 9 with groupID 0
zigbee2mqtt:info 2019-10-30T19:58:58: MQTT publish: topic 'zigbee2mqtt/0x001e5e0902132adb', payload '{"state":"ON","linkquality":60,"power":189.7}'

Database entry:

{"id":7,"type":"Router","ieeeAddr":"0x001e5e0902132adb","nwkAddr":49822,"manufId":4216,"manufName":"Computime","powerSource":"Mains (single phase)","modelId":"SP600","epList":[9],"endpoints":{"9":{"profId":260,"epId":9,"devId":81,"inClusterList":[0,1,3,4,5,6,1026,1794,64513],"outClusterList":[25],"clusters":{"64513":{"dir":{"value":1},"attributes":{}},"genBasic":{"dir":{"value":1},"attributes":{"zclVersion":1,"appVersion":9,"stackVersion":2,"hwVersion":2,"manufacturerName":"Computime","modelId":"SP600","dateCode":"20160120","powerSource":1,"deviceEnabled":1}},"genPowerCfg":{"dir":{"value":1},"attributes":{"mainsVoltage":2442}},"genIdentify":{"dir":{"value":1},"attributes":{"identifyTime":0}},"genGroups":{"dir":{"value":1},"attributes":{"nameSupport":1}},"genScenes":{"dir":{"value":1},"attributes":{"count":0,"currentScene":0,"currentGroup":0,"sceneValid":0,"nameSupport":128}},"genOnOff":{"dir":{"value":1},"attributes":{"onOff":0}},"genOta":{"dir":{"value":2},"attributes":{}},"msTemperatureMeasurement":{"dir":{"value":1},"attributes":{"measuredValue":2000,"minMeasuredValue":0,"maxMeasuredValue":8500}},"seMetering":{"dir":{"value":1},"attributes":{"currentSummDelivered":{"0":0,"1":6},"currentSummReceived":{"0":0,"1":0},"defaultUpdatePeriod":12,"fastPollUpdatePeriod":1,"status":0,"unitOfMeasure":0,"multiplier":1,"divisor":10000,"summaFormatting":0,"demandFormatting":0,"historicalConsumpFormatting":0,"meteringDeviceType":0,"instantaneousDemand":1}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b00014d27c6","endpointID":1}]}},"appVersion":9,"stackVersion":2,"hwVersion":2,"dateCode":"20160120","zclVersion":1,"meta":{"configured":2}}

@davet2001
Copy link

Wow, what a coincidence. I also spotted the same under-read with the salus sp600 in the last few days. Exactly the same symptoms.
Mine too shows a 'multiplier' of 1 and a 'divisor' of 10000 which I think is the reason the readings are being scaled in
https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/converters/fromZigbee.js:

const factor = multiplier && divisor ? multiplier / divisor : null;
...
power = (power * factor) * 1000; // kWh to Watt

Does the divisor 10000 come from the device itself or elsewhere?

@Koenkk
Copy link
Owner

Koenkk commented Oct 30, 2019

The multiplier and divisor indeed come from the device, according to the ZCL it should result in the kWH value, but this is not the case for this device (so they didn't follow the ZCL).

I've added a separate converters for this device, it should be correct now in the latest zigbee2mqtt dev branch.

@wjcloudy
Copy link
Author

wjcloudy commented Oct 30, 2019

@Koenkk Many thanks for such a quick fix - what's the best way to integrate this in my hass.io before the next docker build? I can add the devices.js via the mount and set "zigbee_shepherd_devices": true - but not sure how to do the fromZigbee.js controller.

I think I replaced the file inside the container using docker exec , but just get errors when trying to use the new devices.js...

zigbee2mqtt:error 2019-10-30T23:32:11: Failed to call 'DeviceReceive' 'onZigbeeEvent' (TypeError: Cannot read property 'type' of undefined
at mappedDevice.fromZigbee.filter (/app/lib/extension/deviceReceive.js:83:42)
at Array.filter ()
at DeviceReceive.onZigbeeEvent (/app/lib/extension/deviceReceive.js:82:52)
at Controller.callExtensionMethod (/app/lib/controller.js:320:44)
at Controller.onZigbeeEvent (/app/lib/controller.js:228:14)
at Zigbee.emit (events.js:198:13)
at Controller.herdsman.on (/app/lib/zigbee.js:56:52)
at Controller.emit (events.js:198:13)
at Controller. (/app/node_modules/zigbee-herdsman/dist/controller/controller.js:405:22)
at Generator.next ())

@Koenkk
Copy link
Owner

Koenkk commented Oct 31, 2019

The latest docker build is up now (for hassio use edge). Note that you cannot use the latest devices.js with zigbee2mqtt 1.6 (incompatible)

@wjcloudy
Copy link
Author

Maybe I'm missing something - tried reinstall and readding the repo, but no luck & still showing latest image for test as 7days old?
https://hub.docker.com/r/dwelch2101/zigbee2mqtt-armhf/tags?page=1&name=test

@gausie
Copy link
Contributor

gausie commented Oct 31, 2019

Edge didn't help me here, I have made a new issue (#2240)

Although maybe @jameswarner62's note above is part of the problem

@wjcloudy
Copy link
Author

wjcloudy commented Nov 1, 2019

Just wanted to confirm the issue is now fixed - I had to manually make the changes inside the container, (which I'm still not sure how to get persisting past a restart) But I guess this will be fixed one the docker image for hassio gets updated

@wjcloudy wjcloudy closed this as completed Nov 1, 2019
@Koenkk
Copy link
Owner

Koenkk commented Nov 1, 2019

Hassio image should be updated now

@davet2001
Copy link

Works for me now also. For me it didn't work until after I'd unplugged/replugged the cc2531 and pressed the reset button.

Thanks for the quick fix.

@wjcloudy
Copy link
Author

This seems to have become an issue again in 1.9 - this version fixed the loss of power reporting but the under reading of power values has returned (reporting 100W load when it should be 1000W)

@Koenkk
Copy link
Owner

Koenkk commented Jan 17, 2020

Yes working on it in Koenkk/zigbee-herdsman-converters#915 (let's continue there)

@Koenkk Koenkk closed this as completed Jan 17, 2020
@amoros1
Copy link

amoros1 commented Jan 30, 2020

Sorry guys, do you kow if there is any plan to support from home assistant other Salus devices like UGE600, VS20WRF and KL08RF all working with Zigbee and the Salus smart home app?. It would be nice to have access to the readings of the temperatures or even to control some aspects of the heating. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants