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

MOSZB-140 some minor cleanup and fixes #4741

Merged
merged 3 commits into from Oct 5, 2022
Merged

Conversation

sjorge
Copy link
Sponsor Contributor

@sjorge sjorge commented Oct 5, 2022

A few bits pulled in from #4731 (comment)

I did fire off an e-mail to develco, but the last time I did that I got no answer from them, so I am not very hopeful. This PR cherry picks a few minor things from that one.

  • improvement for postfixWithEndpointName in case an endpoint is not listed in the endpoint object, so no more propertyname_undefined now (was hitting this with the other PR, but still a good general improvement)
  • batteryVoltage was read twice, once by the configure it self and once my the reporting setup
  • wrap the develco* attributes in a try/catch, over on zigbee2mqtt there is an open issue of people hitting timeouts during configure on these

Although i can't reproduce the issues myself, based on #4731 I have a bit less faith in the technical manual.

e.g. the MOSZB-140 has 35 as the default endpoint, most of the config on genBasic, genPowerCfg and ssIasZone are there.
Additionally it uses seperate endpoints for temperature and illumance (40 and 39). It also has 3 (!!) msOccupancySensing endpoints (34, 40, 41), for those we do want to provide a suffix to the property name.

For those we don't really need a suffix for the propery name, having `{default: 35, 'logic_a': 34, 'logic_b': 40, 'logic_c': 41}` mostly works but tempeature now has _undefined appended.
With this change, instead of appending undefined, we just return the original proporty.
- drop read of batteryVoltage, reporting configuration does this
- update reporting settings to match with the suggestions from develco
  (esp illumantion was very spanny and battery draining with the defaults)
There was a issue were configure kept failing due to timeouts on reading these.
As show in Koenkk#4731 the tech manual might not be 100%
 accurate. So putting them in a try/catch should at least let the configuration continue settings up everything else.
@Koenkk Koenkk merged commit 9c6d8c6 into Koenkk:master Oct 5, 2022
@Koenkk
Copy link
Owner

Koenkk commented Oct 5, 2022

Thansk!

@sjorge sjorge deleted the moszb140cleanup branch October 5, 2022 19:01
@sjorge
Copy link
Sponsor Contributor Author

sjorge commented Oct 5, 2022

I’ve said a reminder in 2 weeks to clean up the 2 attributes in herdsman it u don’t hear back from deveclo

Mephistofeles pushed a commit to Mephistofeles/zigbee-herdsman-converters that referenced this pull request Dec 13, 2022
* utils: postfixWithEndpointName should handle "undefined" better

e.g. the MOSZB-140 has 35 as the default endpoint, most of the config on genBasic, genPowerCfg and ssIasZone are there.
Additionally it uses seperate endpoints for temperature and illumance (40 and 39). It also has 3 (!!) msOccupancySensing endpoints (34, 40, 41), for those we do want to provide a suffix to the property name.

For those we don't really need a suffix for the propery name, having `{default: 35, 'logic_a': 34, 'logic_b': 40, 'logic_c': 41}` mostly works but tempeature now has _undefined appended.
With this change, instead of appending undefined, we just return the original proporty.

* MOSZB-140: cleanup

- drop read of batteryVoltage, reporting configuration does this
- update reporting settings to match with the suggestions from develco
  (esp illumantion was very spanny and battery draining with the defaults)

* MOSZB-140: try/catch on read of develcoAlarmOffDelay/develcoLedControl

There was a issue were configure kept failing due to timeouts on reading these.
As show in Koenkk#4731 the tech manual might not be 100%
 accurate. So putting them in a try/catch should at least let the configuration continue settings up everything else.
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

Successfully merging this pull request may close these issues.

None yet

2 participants