lorabridge / bridge-lcd-ui

LCD interface software for LoRaBridge bridges
GNU General Public License v3.0
1 stars 0 forks source link

TODO: Implement allow join for z2m #1

Closed hruotsalainen closed 2 years ago

hruotsalainen commented 2 years ago

Can be done via zigbee2mqtt/bridge/request/permit_join MQTT request

tobiasdam commented 2 years ago

is the idea to deny joins per default and allow them only per button press?

hruotsalainen commented 2 years ago

is the idea to deny joins per default and allow them only per button press?

This should be default for a fresh installation. LCD/Web UI shall have then enable zigbee pairing button/switch. Also an automatic deny join request should be sent after a timeout of maybe some 10-15 minutes.

hruotsalainen commented 2 years ago

Just thinking aloud here: I feel like reserving one of the buttons as a "pairing button", which sends LCD&z2m into a "pairing" mode. The new pairing is then displayed on LCD via z2m mqtt event sub.

tobiasdam commented 2 years ago

good idea! we could also do something like when button 1 + 2 are pressed, then do something (if possible)

tobiasdam commented 2 years ago

This should be default for a fresh installation. LCD/Web UI shall have then enable zigbee pairing button/switch. Also an automatic deny join request should be sent after a timeout of maybe some 10-15 minutes.

it is possible to set a timeout, when enabling joins requests via zigbee2mqtt/bridge/request/permit_join

{"value": true, "time": 20}

time is in seconds

tobiasdam commented 2 years ago

a timeout of 30 seconds per button press should be reasonable, no?

tobiasdam commented 2 years ago

done via c0cba624dab962634840abdcf7fcb0e106dbecdb

hruotsalainen commented 2 years ago

Please increase pairing time-out to 300 seconds (5 minutes).

tobiasdam commented 2 years ago

thanks for the reminder, fixed

hruotsalainen commented 2 years ago

Tried to pair a device today, but got this immediately after join enable: SRSP - ZDO - mgmtPermitJoinReq after 6000ms which according to z2m faq is pretty bad. However, Z2M did not crash

hruotsalainen commented 2 years ago

After restarting zigbee2mqtt container pairing worked again, but the original issue remains unsolved. I'll open a fresh issue on this

hruotsalainen commented 2 years ago

Closing because feature is implemented