Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. English
    3. ioBroker general
    4. Zigbee adapter stopped working FIXED

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Zigbee adapter stopped working FIXED

    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      ap2017 @Asgothian last edited by

      @Asgothian Pardon my ignorance, how do I check NPM list? In terms of pruning, I have no idea what do I needs. I have very rudimentary knowledge of command line controls, I am one of those users who appreciate very much object level system configuration. That is why I like ioBroker, it seems to me well though through for this purpose. As always, thank you for your time and help.

      Thomas Braun Asgothian 2 Replies Last reply Reply Quote 0
      • Thomas Braun
        Thomas Braun Most Active @ap2017 last edited by

        @ap2017

        cd /opt/iobroker
        npm list serialport
        

        Should look similar to

        pi@raspberrypi:/opt/iobroker $ npm list serialport
        iobroker.inst@2.0.3 /opt/iobroker
        └─┬ iobroker.zigbee@1.2.1
          └─┬ zigbee-herdsman@0.12.117
            └── serialport@9.0.1
        
        A 1 Reply Last reply Reply Quote 0
        • A
          ap2017 @Thomas Braun last edited by

          @Thomas-Braun said in Zigbee adapter stopped working:

          npm list serialport

          Here we go:

          c4d5d82b-44c4-43ad-b489-5d9a5d94fad6-image.png

          1 Reply Last reply Reply Quote 0
          • Asgothian
            Asgothian Developer @ap2017 last edited by

            @ap2017 I apologise. I should have put quotes around the "npm list", as that was the command i wanted you to check.

            As you can see, there is an extra serialport library installed, but each adapter has (should have) a usable version, so you should be able to remove the extra one.

            npm prune should get rid of it.

            A.

            A 2 Replies Last reply Reply Quote 0
            • A
              ap2017 @Asgothian last edited by

              @Asgothian No problem. I run the following, but still have same extraneous serial library 6..2.2 when run "npm list serialport"

              cd /opt/iobroker
              npm prune --dry-run
              sudo reboot

              Asgothian 1 Reply Last reply Reply Quote 0
              • A
                ap2017 @Asgothian last edited by

                @Asgothian As previously, keep getting these errors:

                zigbee.0 2020-09-24 10:39:10.082 error (2461) Error: Error while opening serialport 'Error: Error: Device or resource busy, cannot open /dev/ttyACM1' at Znp.<anonymous> (/opt/iobroker/node_modules/iobroker.zigbee/node_modules/zigbee-he
                zigbee.0 2020-09-24 10:39:10.081 error (2461) Failed to start Zigbee
                zigbee.0 2020-09-24 10:39:09.975 info (2461) Starting Zigbee...
                zigbee.0 2020-09-24 10:39:09.974 info (2461) Try to reconnect. 1 attempts left
                zigbee.0 2020-09-24 10:38:59.972 error (2461) Error: Failed to connect to the adapter (Error: Cannot request when znp has not been initialized yet) at ZStackAdapter.<anonymous> (/opt/iobroker/node_modules/iobroker.zigbee/node_modules/z
                zigbee.0 2020-09-24 10:38:59.972 error (2461) Failed to start Zigbee

                1 Reply Last reply Reply Quote 0
                • Asgothian
                  Asgothian Developer @ap2017 last edited by

                  @ap2017
                  Of course.. the "npm prune --dry-run" only lists what it would do. This is to ensure that it doesn't get rid of something you want to keep
                  once you checked the list, you can do "npm prune" (without the dry run)

                  a Reboot is not needed..

                  A.

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    ap2017 @Asgothian last edited by

                    @Asgothian The unwanted serial driver 6.2.2 disappeared after pruning, but it did not help to resolve the main issue, see errors below. I rebooted controller after pruning, just in case.

                    c66f51c5-44a8-48ad-a01d-23b798bd1f64-image.png

                    00b80659-4d3b-45b9-9ec2-0bbe6a6baabf-image.png

                    Asgothian 1 Reply Last reply Reply Quote 0
                    • Asgothian
                      Asgothian Developer @ap2017 last edited by

                      @ap2017
                      Unfortunately, that is what i expected. Now you should no longer get any errors on an npm rebuild, but i have the feeling that is not the error. I am starting to think that the firmware on the Zigbee Board / Stick is not responding correctly.

                      As long as there is a message that the zigbee library cannot be initialized, the issue is most likely hardware related.

                      A.

                      Thomas Braun 1 Reply Last reply Reply Quote 0
                      • Thomas Braun
                        Thomas Braun Most Active @Asgothian last edited by

                        @ap2017
                        Please stop the zwave Adapater and reboot. I may happen that the zwo adapters do block the port.
                        And I see a duplicate entry in the zwave entry. I think that only one entry should show there.

                        A 1 Reply Last reply Reply Quote 0
                        • A
                          ap2017 @Thomas Braun last edited by ap2017

                          @Thomas-Braun I stopped both zwave and zigbee and rebooted, here is list of serial ports:

                          ce95bb59-7db6-4273-bb47-9fec159789dd-image.png

                          As I mentioned before, when zigbee is off, zwave works fine on both ports ACM0 and ACM1, so it looks like system works properly with ports.

                          What would be next step, try to uninstall and reinstall zigbee adapter again? Re-flash CC2531 dongle? Thank you.

                          Asgothian 1 Reply Last reply Reply Quote 0
                          • Asgothian
                            Asgothian Developer @ap2017 last edited by

                            @ap2017
                            No.

                            Please verify if the Zigbee Adapter will start when

                            • no zwave sticks are connected to the system
                            • no zwave adapter is running.

                            A.

                            A 1 Reply Last reply Reply Quote 0
                            • A
                              ap2017 @Asgothian last edited by

                              @Asgothian Sorry, how do I check if zigbee adapter started?

                              Asgothian 1 Reply Last reply Reply Quote 0
                              • Asgothian
                                Asgothian Developer @ap2017 last edited by

                                @ap2017 Watch the log for an entry that the zigbee adapter started successfully, alternatively, watch the green light in the instance list.

                                A 2 Replies Last reply Reply Quote 0
                                • A
                                  ap2017 @Asgothian last edited by ap2017

                                  @Asgothian Of course, I did not pay attention that you asked to disable zwave, not zigbee. Unplugging zwave dongle and disabling zwave adapter did not help. FYI, zigbee behaves same way for ACM0 and ACM1 ports

                                  f906dc71-851d-4757-b064-8455622fb7de-image.png

                                  1 Reply Last reply Reply Quote 0
                                  • A
                                    ap2017 @Asgothian last edited by

                                    @Asgothian Here is the latest debug log when trying to restart zigbee adapter. Anything comes to mind? Thank you for your time.

                                    zigbee.0 2020-09-27 17:53:02.239 error (4926) Error: Error while opening serialport 'Error: Error: Device or resource busy, cannot open /dev/ttyACM1' at Znp.<anonymous> (/opt/iobroker/node_modules/zigbee-herdsman/dist/adapter/z-stack/z
                                    zigbee.0 2020-09-27 17:53:02.239 error (4926) Failed to start Zigbee
                                    zigbee.0 2020-09-27 17:53:02.138 debug (4926) Starting zigbee-herdsman...
                                    zigbee.0 2020-09-27 17:53:02.137 info (4926) Starting Zigbee...
                                    zigbee.0 2020-09-27 17:53:02.137 info (4926) Try to reconnect. 1 attempts left
                                    zigbee.0 2020-09-27 17:52:52.136 error (4926) Error: Error while opening serialport 'Error: Error: Device or resource busy, cannot open /dev/ttyACM1' at Znp.<anonymous> (/opt/iobroker/node_modules/zigbee-herdsman/dist/adapter/z-stack/z
                                    zigbee.0 2020-09-27 17:52:52.135 error (4926) Failed to start Zigbee
                                    zigbee.0 2020-09-27 17:52:52.061 debug (4926) Backup /opt/iobroker/iobroker-data/zigbee_0/backup_2020_09_27-17_52_51.tar.gz success
                                    zigbee.0 2020-09-27 17:52:52.004 debug (4926) Starting zigbee-herdsman...
                                    zigbee.0 2020-09-27 17:52:52.003 info (4926) Starting Zigbee...
                                    zigbee.0 2020-09-27 17:52:51.977 debug (4926) Using zigbee-herdsman with settings: {"network":{"panID":6754,"channelList":[11],"networkKey":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13],"extenedPanID":[221,221,221,221,221,221,221,221]},"database
                                    zigbee.0 2020-09-27 17:52:51.960 info (4926) starting. Version 1.2.1 in /opt/iobroker/node_modules/iobroker.zigbee, node: v12.18.4, js-controller: 3.1.6
                                    host.AP-Tiny 2020-09-27 17:52:51.188 info instance system.adapter.zigbee.0 started with pid 4926
                                    host.AP-Tiny 2020-09-27 17:52:48.684 info instance system.adapter.zigbee.0 terminated with code 11 (ADAPTER_REQUESTED_TERMINATION)
                                    zigbee.0 2020-09-27 17:52:48.172 error at stop (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:8270:22)
                                    zigbee.0 2020-09-27 17:52:48.172 error at Zigbee.emit (events.js:315:20)
                                    zigbee.0 2020-09-27 17:52:48.172 error at Zigbee.onUnload (/opt/iobroker/node_modules/iobroker.zigbee/main.js:442:41)
                                    zigbee.0 2020-09-27 17:52:48.172 error at ZigbeeController.stop (/opt/iobroker/node_modules/iobroker.zigbee/lib/zigbeecontroller.js:304:20)
                                    zigbee.0 2020-09-27 17:52:48.172 error at ZigbeeController.callExtensionMethod (/opt/iobroker/node_modules/iobroker.zigbee/lib/zigbeecontroller.js:187:42)
                                    zigbee.0 2020-09-27 17:52:48.172 error at DeviceAvailability.stop (/opt/iobroker/node_modules/iobroker.zigbee/lib/zbDeviceAvailability.js:118:43)
                                    zigbee.0 2020-09-27 17:52:48.172 error at ZigbeeController.getClients (/opt/iobroker/node_modules/iobroker.zigbee/lib/zigbeecontroller.js:201:49)
                                    zigbee.0 2020-09-27 17:52:48.172 error at Controller.getDevices (/opt/iobroker/node_modules/zigbee-herdsman/dist/controller/controller.js:252:31)
                                    zigbee.0 2020-09-27 17:52:48.172 error at Function.all (/opt/iobroker/node_modules/zigbee-herdsman/dist/controller/model/device.js:234:16)
                                    zigbee.0 2020-09-27 17:52:48.172 error at Function.loadFromDatabaseIfNecessary (/opt/iobroker/node_modules/zigbee-herdsman/dist/controller/model/device.js:214:55)
                                    zigbee.0 2020-09-27 17:52:48.172 error (4705) TypeError: Cannot read property 'getEntries' of null
                                    zigbee.0 2020-09-27 17:52:48.171 error (4705) unhandled promise rejection: Cannot read property 'getEntries' of null
                                    Unhandled 2020-09-27 17:52:48.170 error promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
                                    zigbee.0 2020-09-27 17:52:48.170 info (4705) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
                                    zigbee.0 2020-09-27 17:52:48.169 info (4705) terminating
                                    zigbee.0 2020-09-27 17:52:48.169 error at ZigbeeController.stop (/opt/iobroker/node_modules/iobroker.zigbee/lib/zigbeecontroller.js:308:33))
                                    zigbee.0 2020-09-27 17:52:48.169 error at Controller.stop (/opt/iobroker/node_modules/zigbee-herdsman/dist/controller/controller.js:199:16)
                                    zigbee.0 2020-09-27 17:52:48.169 error at __awaiter (/opt/iobroker/node_modules/zigbee-herdsman/dist/controller/controller.js:23:12)
                                    zigbee.0 2020-09-27 17:52:48.169 error at new Promise (<anonymous>)
                                    zigbee.0 2020-09-27 17:52:48.169 error at /opt/iobroker/node_modules/zigbee-herdsman/dist/controller/controller.js:27:71
                                    zigbee.0 2020-09-27 17:52:48.169 error at Generator.next (<anonymous>)
                                    zigbee.0 2020-09-27 17:52:48.169 error at Controller.<anonymous> (/opt/iobroker/node_modules/zigbee-herdsman/dist/controller/controller.js:200:18)
                                    zigbee.0 2020-09-27 17:52:48.169 error at Controller.databaseSave (/opt/iobroker/node_modules/zigbee-herdsman/dist/controller/controller.js:219:45)
                                    zigbee.0 2020-09-27 17:52:48.169 error at Function.all (/opt/iobroker/node_modules/zigbee-herdsman/dist/controller/model/group.js:88:15)
                                    zigbee.0 2020-09-27 17:52:48.169 error at Function.loadFromDatabaseIfNecessary (/opt/iobroker/node_modules/zigbee-herdsman/dist/controller/model/group.js:76:55)
                                    zigbee.0 2020-09-27 17:52:48.169 error (4705) Failed to stop zigbee (TypeError: Cannot read property 'getEntries' of null
                                    zigbee.0 2020-09-27 17:52:48.168 info (4705) Zigbee: disabling joining new devices.
                                    zigbee.0 2020-09-27 17:52:48.166 info (4705) cleaned everything up...
                                    zigbee.0 2020-09-27 17:52:48.165 info (4705) Got terminate signal TERMINATE_YOURSELF
                                    host.AP-Tiny 2020-09-27 17:52:48.163 info stopInstance system.adapter.zigbee.0 send kill signal
                                    host.AP-Tiny 2020-09-27 17:52:48.159 info stopInstance system.adapter.zigbee.0 (force=false, process=true)

                                    Asgothian 1 Reply Last reply Reply Quote 0
                                    • Asgothian
                                      Asgothian Developer @ap2017 last edited by

                                      @ap2017 Things that come to mind:

                                      • Put the log in code tags, makes it more readable
                                      • The serial port is still locked.
                                      • This is not the first entry after trying to start the adapter. It shows a restart attempt.

                                      Please follow these steps, and post the resulting log (in code tags)

                                      • Disable the zigbee instance
                                      • stop the iobroker
                                      • verify that no process has the serial device open
                                      lsof /def/ttyACM1
                                      
                                      • If no process has the serial device open, start iobroker
                                      • check again if any process has the serial port open
                                      • delete the current log (Delete, not clear, in the log view)
                                      • attempt to start the zigbee adapter. If it does not start, disable it again, then post the log file.

                                      A.

                                      A 1 Reply Last reply Reply Quote 0
                                      • A
                                        ap2017 @Asgothian last edited by

                                        @Asgothian said in Zigbee adapter stopped working:

                                        lsof /def/ttyACM1

                                        When iobroker stopped and started same status of serial port is reported (hopefully there is no error in command):

                                        Zigbee 9-28-20.jpg

                                        Here is log after zigbee adapter started

                                        zigbee.0	2020-09-28 23:23:31.400	error	(26678) Error: Failed to connect to the adapter (Error: Cannot request when znp has not been initialized yet) at ZStackAdapter.<anonymous> (/opt/iobroker/node_modules/zigbee-herdsman/dist/adapter/
                                        zigbee.0	2020-09-28 23:23:31.399	error	(26678) Failed to start Zigbee
                                        zigbee.0	2020-09-28 23:23:23.829	debug	(26678) Starting zigbee-herdsman...
                                        zigbee.0	2020-09-28 23:23:23.829	info	(26678) Starting Zigbee...
                                        zigbee.0	2020-09-28 23:23:23.828	info	(26678) Try to reconnect. 1 attempts left
                                        zigbee.0	2020-09-28 23:23:13.828	error	at /opt/iobroker/node_modules/serialport/node_modules/@serialport/stream/lib/index.js:242:12
                                        zigbee.0	2020-09-28 23:23:13.828	error	at SerialPort._error (/opt/iobroker/node_modules/serialport/node_modules/@serialport/stream/lib/index.js:198:14)
                                        zigbee.0	2020-09-28 23:23:13.828	error	at SerialPort.<anonymous> (/opt/iobroker/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:134:49)
                                        zigbee.0	2020-09-28 23:23:13.828	error	at __awaiter (/opt/iobroker/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:23:12)
                                        zigbee.0	2020-09-28 23:23:13.828	error	at new Promise (<anonymous>)
                                        zigbee.0	2020-09-28 23:23:13.828	error	at /opt/iobroker/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:27:71
                                        zigbee.0	2020-09-28 23:23:13.828	error	at Generator.next (<anonymous>)
                                        zigbee.0	2020-09-28 23:23:13.828	error	at Znp.<anonymous> (/opt/iobroker/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:136:32)
                                        zigbee.0	2020-09-28 23:23:13.828	error	(26678) Error: Error while opening serialport 'Error: Error: Device or resource busy, cannot open /dev/ttyACM1'
                                        zigbee.0	2020-09-28 23:23:13.827	error	(26678) Failed to start Zigbee
                                        zigbee.0	2020-09-28 23:23:13.744	debug	(26678) Backup /opt/iobroker/iobroker-data/zigbee_0/backup_2020_09_28-23_23_13.tar.gz success
                                        zigbee.0	2020-09-28 23:23:13.666	debug	(26678) Starting zigbee-herdsman...
                                        zigbee.0	2020-09-28 23:23:13.665	info	(26678) Starting Zigbee...
                                        zigbee.0	2020-09-28 23:23:13.628	debug	(26678) Using zigbee-herdsman with settings: {"network":{"panID":6754,"channelList":[11],"networkKey":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13],"extenedPanID":[221,221,221,221,221,221,221,221]},"databa
                                        zigbee.0	2020-09-28 23:23:13.611	info	(26678) starting. Version 1.2.1 in /opt/iobroker/node_modules/iobroker.zigbee, node: v12.18.4, js-controller: 3.1.6
                                        zigbee.0	2020-09-28 23:23:13.150	debug	(26678) statesDB connected
                                        zigbee.0	2020-09-28 23:23:13.150	debug	(26678) States connected to redis: 127.0.0.1:9000
                                        zigbee.0	2020-09-28 23:23:13.146	debug	(26678) States create System PubSub Client
                                        zigbee.0	2020-09-28 23:23:13.145	debug	(26678) States create User PubSub Client
                                        zigbee.0	2020-09-28 23:23:13.142	debug	(26678) Redis States: Use Redis connection: 127.0.0.1:9000
                                        zigbee.0	2020-09-28 23:23:13.141	debug	(26678) objectDB connected
                                        zigbee.0	2020-09-28 23:23:13.138	debug	(26678) Objects connected to redis: 127.0.0.1:9001
                                        zigbee.0	2020-09-28 23:23:13.129	debug	(26678) Objects client initialize lua scripts
                                        zigbee.0	2020-09-28 23:23:13.128	debug	(26678) Objects create User PubSub Client
                                        zigbee.0	2020-09-28 23:23:13.128	debug	(26678) Objects create System PubSub Client
                                        zigbee.0	2020-09-28 23:23:13.126	debug	(26678) Objects client ready ... initialize now
                                        zigbee.0	2020-09-28 23:23:13.105	debug	(26678) Redis Objects: Use Redis connection: 127.0.0.1:9001
                                        host.AP-Tiny	2020-09-28 23:23:12.547	info	instance system.adapter.zigbee.0 started with pid 26678
                                        
                                        Thomas Braun 1 Reply Last reply Reply Quote 0
                                        • Thomas Braun
                                          Thomas Braun Most Active @ap2017 last edited by

                                          @ap2017

                                          lsof /dev/ttyACM1
                                          

                                          would be correct.

                                          A 1 Reply Last reply Reply Quote 0
                                          • A
                                            ap2017 @Thomas Braun last edited by ap2017

                                            @Thomas-Braun Here is response for lsof /dev/ttyACM1 Not sure what it means, is port being used or not? Getting same response with ioBroker on or off

                                            ap@AP-Tiny:~$ lsof /dev/ttyACM1
                                            ap@AP-Tiny:~$
                                            
                                            
                                            A 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            931
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            zigbee
                                            4
                                            41
                                            5939
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo