Zigbee problems with tuya temperature & humidity Sensor

Since I have added the temperature & humidity aensor from tuya I get an segmentation fault error.

sudo nymead -n
Translations: Could not find nymead translations for “en_GB”
“/usr/translations”
“/usr/share/nymea/translations”
I | Application: =====================================
I | Application: nymead 1.2.0+202206160020~bullseye+rpi1 started as root.
I | Application: =====================================
W | default: Cannot find a running Bluez. Please check the Bluez installation.
W | Bluetooth: No bluetooth adapter found. Resource not available.
I | MacAddressDatabase: Database initialized successfully “/usr/share/nymea/nymead/mac-addresses.db”
I | NetworkDeviceDiscovery: Created successfully
I | NetworkDeviceDiscovery: Loading cached network device information from “/var/cache/nymea/network-device-discovery.cache”
I | NetworkDeviceDiscovery: Loaded 0 network device infos from cache.
W | Bluez: Invalid DBus ObjectManager interface.
W | Nuki: Bluetooth not available
W | ThingManager: Plugin for thing “Lampe Esszimmer” “{056de92c-85f9-4de7-9fb6-2f5d995dfd9c}” not found. This thing will not be functional until the plugin can be loaded.
W | ThingManager: Not loading thing “Lampe Esszimmer” “{056de92c-85f9-4de7-9fb6-2f5d995dfd9c}” because the thing class for this thing could not be found.
W | ThingManager: Plugin for thing "Esszimmer rechts " “{2247eb8c-9a8b-4eed-a11f-04e317656fce}” not found. This thing will not be functional until the plugin can be loaded.
W | ThingManager: Not loading thing "Esszimmer rechts " “{2247eb8c-9a8b-4eed-a11f-04e317656fce}” because the thing class for this thing could not be found.
W | ThingManager: Plugin for thing "Esszimmer mitte " “{4f85548f-2e00-484b-967a-d838be3361fa}” not found. This thing will not be functional until the plugin can be loaded.
W | ThingManager: Not loading thing "Esszimmer mitte " “{4f85548f-2e00-484b-967a-d838be3361fa}” because the thing class for this thing could not be found.
W | ThingManager: Plugin for thing “Esszimmer links” “{8b4fbcb9-2627-4223-a94f-5884d14a5f9e}” not found. This thing will not be functional until the plugin can be loaded.
W | ThingManager: Not loading thing “Esszimmer links” “{8b4fbcb9-2627-4223-a94f-5884d14a5f9e}” because the thing class for this thing could not be found.
W | RuleEngine: Could not load the value type of the state evaluator. The value type will be guessed by QVariant QVariant(Invalid)
W | RuleEngine: Could not load the value type of the state evaluator. The value type will be guessed by QVariant QVariant(Invalid)
W | RuleEngine: Could not load the value type of the state evaluator. The value type will be guessed by QVariant QVariant(Invalid)
W | RuleEngine: Could not load the value type of the state evaluator. The value type will be guessed by QVariant QVariant(Invalid)
W | RuleEngine: Could not load the value type of the state evaluator. The value type will be guessed by QVariant QVariant(Invalid)
W | RuleEngine: Could not load the value type of the state evaluator. The value type will be guessed by QVariant QVariant(Invalid)
W | ZigbeeController: Reply timeout InterfaceReply(“Request controller device state”, 0)
W | ZigbeeController: Request Deconz::CommandDeviceState finished with error Deconz::StatusCodeError
W | ZigbeeController: Unhandled interface package received Deconz::CommandDeviceState SQN: 0 Deconz::StatusCodeSuccess Frame length: 7 “0xa6 0x00”
W | nymea.mqtt.server: Rejecting connection due to user validation.
W | nymea.mqtt.server: Rejecting connection due to user validation.
W | ZigbeeNetwork: Received confirmation but could not find any reply. Ignoring the confirmation
W | ZigbeeResource: No zigbee handler available to handle node ZigbeeNode(0xd35e, F0:D1:B8:00:00:18:98:5F, LEDVANCE (0x1189), A60 RGBW Value II, End device, RxOn:true)
W | ZigbeeResource: No zigbee handler available to handle node ZigbeeNode(0x2583, 00:17:88:01:0C:43:F5:D4, Philips (0x100b), LWG004, End device, RxOn:true)
W | ZigbeeResource: No zigbee handler available to handle node ZigbeeNode(0x2d92, 00:17:88:01:0C:43:FA:EC, Philips (0x100b), LWG004, End device, RxOn:true)
W | ZigbeeResource: No zigbee handler available to handle node ZigbeeNode(0xcb3d, 00:17:88:01:09:DB:9C:35, Philips (0x100b), LWG004, End device, RxOn:true)
W | AWS: Unhandled subscription received! “ce513f1a-44ff-4c9d-bd38-2eb66e08c51e/pair” “{“id”:2,“idToken”:“eyJraWQiOiJYUXdsN1NVMFNMR0JRdklUbGlxVUlEM2JKSFwvK1RORENxR2JscUhvUkd2az0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjMGM3MzcwNy1iNGI3LTRjZjYtYWNjOC1mYzBiODY4YTIzOWEiLCJhdWQiOiIzNWR1bGkwYjEzYzdwZXQ1azRiY3Y4cGJ1IiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImV2ZW50X2lkIjoiMzNlOTlhYzMtY2ZhNS00MjdmLWI2NjUtYjk4MTdmOTllMjY2IiwidG9rZW5fdXNlIjoiaWQiLCJhdXRoX3RpbWUiOjE2NTY0NDYzODksImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xX1daVnNhQnNhWSIsImNvZ25pdG86dXNlcm5hbWUiOiIyODBkZjk4ZC00MTYyLTRjZDItYWU3NS0xMDZkNmE0YjQ3ZTkiLCJleHAiOjE2NTY0NDk5ODksImlhdCI6MTY1NjQ0NjM4OSwiZW1haWwiOiJtLm1lbm5lckB0LW9ubGluZS5kZSJ9.KBaNl3LVshMlLR1wsR8bgQZDnaoM9MGDEUKsoRycItOOOtKxaTr5-M31c-ik-h9hmioTG_kkIE4zHnvmgngKe7I9boWfqmENtBt1Y_ri0waiFoGlU_mGXHN2KBTQe1SfUHxozBK1XC7XkaQK2_9ooLIPbw5X2srGI2umqALxL4rP56HWYjs6kqaumWUm6kcH3kSMRBJM8Mce1e1ITFDKMZHqL6ByqOjcrBc9QSj09XdmdIeUfvwgXutXw1-LvneBDclNuzR0zigUwWrRzQQ1myfdEaF4X8CavfCibzTyVTZM4sgUbncfFsBlFRMLUwlOgkoL5AIsIA8s6RPClntxng”,“timestamp”:1656447128537,“userId”:“280df98d-4162-4cd2-ae75-106d6a4b47e9”}”
W | AWS: Unhandled subscription received! “ce513f1a-44ff-4c9d-bd38-2eb66e08c51e/pair” “{“id”:3,“idToken”:“eyJraWQiOiJYUXdsN1NVMFNMR0JRdklUbGlxVUlEM2JKSFwvK1RORENxR2JscUhvUkd2az0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjMGM3MzcwNy1iNGI3LTRjZjYtYWNjOC1mYzBiODY4YTIzOWEiLCJhdWQiOiIzNWR1bGkwYjEzYzdwZXQ1azRiY3Y4cGJ1IiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImV2ZW50X2lkIjoiMzNlOTlhYzMtY2ZhNS00MjdmLWI2NjUtYjk4MTdmOTllMjY2IiwidG9rZW5fdXNlIjoiaWQiLCJhdXRoX3RpbWUiOjE2NTY0NDYzODksImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xX1daVnNhQnNhWSIsImNvZ25pdG86dXNlcm5hbWUiOiIyODBkZjk4ZC00MTYyLTRjZDItYWU3NS0xMDZkNmE0YjQ3ZTkiLCJleHAiOjE2NTY0NDk5ODksImlhdCI6MTY1NjQ0NjM4OSwiZW1haWwiOiJtLm1lbm5lckB0LW9ubGluZS5kZSJ9.KBaNl3LVshMlLR1wsR8bgQZDnaoM9MGDEUKsoRycItOOOtKxaTr5-M31c-ik-h9hmioTG_kkIE4zHnvmgngKe7I9boWfqmENtBt1Y_ri0waiFoGlU_mGXHN2KBTQe1SfUHxozBK1XC7XkaQK2_9ooLIPbw5X2srGI2umqALxL4rP56HWYjs6kqaumWUm6kcH3kSMRBJM8Mce1e1ITFDKMZHqL6ByqOjcrBc9QSj09XdmdIeUfvwgXutXw1-LvneBDclNuzR0zigUwWrRzQQ1myfdEaF4X8CavfCibzTyVTZM4sgUbncfFsBlFRMLUwlOgkoL5AIsIA8s6RPClntxng”,“timestamp”:1656447128599,“userId”:“280df98d-4162-4cd2-ae75-106d6a4b47e9”}”
W | AWS: Unhandled subscription received! “ce513f1a-44ff-4c9d-bd38-2eb66e08c51e/device/users” “{“command”:“getUsers”,“id”:4,“timestamp”:1656447130143}”
Segmentation fault

I had the same error with Version 1.1.0. After updating to 1.2.0 the error also occurred.

Hey, can you please try with experimental? We’ve fixed something that could relate to this recently.

I have changed the repo to experimental and updated thezigbee lib, but I also get an segmenation fault.

Get:1 Index of /experimental-silo bullseye/rpi armhf libnymea-zigbee1 armhf 1.2.1+202206202333~bullseye+rpi1 [318 kB]

sudo nymead -n
Translations: Could not find nymead translations for “en_GB”
“/usr/translations”
“/usr/share/nymea/translations”
I | Application: =====================================
I | Application: nymead 1.2.1+202206272335~bullseye+rpi1 started as root.
I | Application: =====================================
W | default: Cannot find a running Bluez. Please check the Bluez installation.
W | Bluetooth: No bluetooth adapter found. Resource not available.
I | MacAddressDatabase: Database initialized successfully “/usr/share/nymea/nymead/mac-addresses.db”
I | NetworkDeviceDiscovery: Created successfully
I | NetworkDeviceDiscovery: Loading cached network device information from “/var/cache/nymea/network-device-discovery.cache”
I | NetworkDeviceDiscovery: Loaded 0 network device infos from cache.
W | Bluez: Invalid DBus ObjectManager interface.
W | Nuki: Bluetooth not available
W | ThingManager: Plugin for thing “Lampe Esszimmer” “{056de92c-85f9-4de7-9fb6-2f5d995dfd9c}” not found. This thing will not be functional until the plugin can be loaded.
W | ThingManager: Not loading thing “Lampe Esszimmer” “{056de92c-85f9-4de7-9fb6-2f5d995dfd9c}” because the thing class QUuid("{8d157281-73c0-4d2c-96a0-572d26e9dd4f}") is neither provided by a plugin nor found in the cache.
W | ThingManager: Plugin for thing “Esszimmer rechts " “{2247eb8c-9a8b-4eed-a11f-04e317656fce}” not found. This thing will not be functional until the plugin can be loaded.
W | ThingManager: Not loading thing “Esszimmer rechts " “{2247eb8c-9a8b-4eed-a11f-04e317656fce}” because the thing class QUuid(”{b2eeb554-ca5c-46b5-a897-bc443fb186ea}”) is neither provided by a plugin nor found in the cache.
W | ThingManager: Plugin for thing “Esszimmer mitte " “{4f85548f-2e00-484b-967a-d838be3361fa}” not found. This thing will not be functional until the plugin can be loaded.
W | ThingManager: Not loading thing “Esszimmer mitte " “{4f85548f-2e00-484b-967a-d838be3361fa}” because the thing class QUuid(”{b2eeb554-ca5c-46b5-a897-bc443fb186ea}”) is neither provided by a plugin nor found in the cache.
W | ThingManager: Plugin for thing “Esszimmer links” “{8b4fbcb9-2627-4223-a94f-5884d14a5f9e}” not found. This thing will not be functional until the plugin can be loaded.
W | ThingManager: Not loading thing “Esszimmer links” “{8b4fbcb9-2627-4223-a94f-5884d14a5f9e}” because the thing class QUuid("{b2eeb554-ca5c-46b5-a897-bc443fb186ea}") is neither provided by a plugin nor found in the cache.
W | RuleEngine: Could not load the value type of the state evaluator. The value type will be guessed by QVariant QVariant(Invalid)
W | RuleEngine: Could not load the value type of the state evaluator. The value type will be guessed by QVariant QVariant(Invalid)
W | RuleEngine: Could not load the value type of the state evaluator. The value type will be guessed by QVariant QVariant(Invalid)
W | ZigbeeController: Reply timeout InterfaceReply(“Request controller device state”, 0)
W | ZigbeeController: Request Deconz::CommandDeviceState finished with error Deconz::StatusCodeError
W | ZigbeeController: Unhandled interface package received Deconz::CommandDeviceState SQN: 0 Deconz::StatusCodeSuccess Frame length: 7 “0xa2 0x00”
W | nymea.mqtt.server: Rejecting connection due to user validation.
W | nymea.mqtt.server: Rejecting connection due to user validation.
W | ZigbeeResource: No zigbee handler available to handle node ZigbeeNode(0xd35e, F0:D1:B8:00:00:18:98:5F, LEDVANCE (0x1189), A60 RGBW Value II, End device, RxOn:true)
W | ZigbeeResource: No zigbee handler available to handle node ZigbeeNode(0x2583, 00:17:88:01:0C:43:F5:D4, Philips (0x100b), LWG004, End device, RxOn:true)
W | ZigbeeResource: No zigbee handler available to handle node ZigbeeNode(0x2d92, 00:17:88:01:0C:43:FA:EC, Philips (0x100b), LWG004, End device, RxOn:true)
W | ZigbeeResource: No zigbee handler available to handle node ZigbeeNode(0xcb3d, 00:17:88:01:09:DB:9C:35, Philips (0x100b), LWG004, End device, RxOn:true)
W | AWS: Unhandled subscription received! “ce513f1a-44ff-4c9d-bd38-2eb66e08c51e/pair” “{“id”:2,“idToken”:“eyJraWQiOiJYUXdsN1NVMFNMR0JRdklUbGlxVUlEM2JKSFwvK1RORENxR2JscUhvUkd2az0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjMGM3MzcwNy1iNGI3LTRjZjYtYWNjOC1mYzBiODY4YTIzOWEiLCJhdWQiOiIzNWR1bGkwYjEzYzdwZXQ1azRiY3Y4cGJ1IiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImV2ZW50X2lkIjoiNmE0M2JlY2MtMDVlNi00YjMxLTk4ZDUtNGJhNjA5Y2M1ZDYyIiwidG9rZW5fdXNlIjoiaWQiLCJhdXRoX3RpbWUiOjE2NTY0ODMzOTIsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xX1daVnNhQnNhWSIsImNvZ25pdG86dXNlcm5hbWUiOiIyODBkZjk4ZC00MTYyLTRjZDItYWU3NS0xMDZkNmE0YjQ3ZTkiLCJleHAiOjE2NTY0ODY5OTIsImlhdCI6MTY1NjQ4MzM5MiwiZW1haWwiOiJtLm1lbm5lckB0LW9ubGluZS5kZSJ9.DVnuts1sYk31b4GVo6p7NfrUQWHfAJSaIqFKd1VBMGcsJEdINpZAqKltISKVq5eXYFDU368noH_8pL9AqGfdvCPYi97bw0FqWl1cMN-R6guQFWrLCswIah9PSwH_U-lz3v1awEf_LnjbjCto6z65irEALP4J2QWf024bR8rdcFKkkZXrl3zNUu6Hd8moYZoa_fhLxDcHAfg52ilO1EYQrw_0MXqXFA7_tAyX2fO2smfjtlMiQU8EB2_SPdIzKNipg0tBQ575DZ1rAEnZ3wNVwyc3C7rJUPemKBZ-Y9g8mkqltXXx8P5gKBr2pxUE_YLSTKwgj8V7csjCfPfgoRbS1A”,“timestamp”:1656483918634,“userId”:“280df98d-4162-4cd2-ae75-106d6a4b47e9”}”
W | Platform: Platform plugin does not implement deviceSerialNumber and DEVICE_SERIAL is not set. Cannot determine device serial number.
W | AWS: Unhandled subscription received! “ce513f1a-44ff-4c9d-bd38-2eb66e08c51e/device/users” “{“command”:“getUsers”,“id”:3,“timestamp”:1656483920221}”
W | AWS: Unhandled subscription received! “ce513f1a-44ff-4c9d-bd38-2eb66e08c51e/pair” “{“id”:4,“idToken”:“eyJraWQiOiJYUXdsN1NVMFNMR0JRdklUbGlxVUlEM2JKSFwvK1RORENxR2JscUhvUkd2az0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjMGM3MzcwNy1iNGI3LTRjZjYtYWNjOC1mYzBiODY4YTIzOWEiLCJhdWQiOiIzNWR1bGkwYjEzYzdwZXQ1azRiY3Y4cGJ1IiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImV2ZW50X2lkIjoiNmE0M2JlY2MtMDVlNi00YjMxLTk4ZDUtNGJhNjA5Y2M1ZDYyIiwidG9rZW5fdXNlIjoiaWQiLCJhdXRoX3RpbWUiOjE2NTY0ODMzOTIsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xX1daVnNhQnNhWSIsImNvZ25pdG86dXNlcm5hbWUiOiIyODBkZjk4ZC00MTYyLTRjZDItYWU3NS0xMDZkNmE0YjQ3ZTkiLCJleHAiOjE2NTY0ODY5OTIsImlhdCI6MTY1NjQ4MzM5MiwiZW1haWwiOiJtLm1lbm5lckB0LW9ubGluZS5kZSJ9.DVnuts1sYk31b4GVo6p7NfrUQWHfAJSaIqFKd1VBMGcsJEdINpZAqKltISKVq5eXYFDU368noH_8pL9AqGfdvCPYi97bw0FqWl1cMN-R6guQFWrLCswIah9PSwH_U-lz3v1awEf_LnjbjCto6z65irEALP4J2QWf024bR8rdcFKkkZXrl3zNUu6Hd8moYZoa_fhLxDcHAfg52ilO1EYQrw_0MXqXFA7_tAyX2fO2smfjtlMiQU8EB2_SPdIzKNipg0tBQ575DZ1rAEnZ3wNVwyc3C7rJUPemKBZ-Y9g8mkqltXXx8P5gKBr2pxUE_YLSTKwgj8V7csjCfPfgoRbS1A”,“timestamp”:1656483920631,“userId”:“280df98d-4162-4cd2-ae75-106d6a4b47e9”}”
Segmentation fault

I also updated the lib for the remote proxy connection to see if the error is possibly here. But that didn’t solve the problem anyway.

The fixes were in the nymea-plugin-zigbee-tuya and nymea-plugin-zigbee-develco plugins, please upgrade those.

I have upgrade the plugins, but this don’t solved the issue.

Easyupload.io - Upload files for free and transfer big files easily. (here you can find the logs of nymea)

I hope it helps you to locate the error.

Hmm, no, the log doesn’t seem to help much… Are you able to create a crash stack trace perhaps?

  • Install debug symbols with sudo apt-get gdb install libnymea1-dbgsym libnymea-zigbee1-dbgsym nymea-plugin-zigbee-tuya-dbgsym
  • Stop the nymead service with sudo systemctl stop nymead
  • Start gdb with gdb /usr/bin/nymead
  • Once gdb is started, run nymead in there with r -n -p
  • wait for it to crash
  • type t a a bt in gdb to print the stack trace.

Then copy/paste that. It should tell us exactly what happens.

Oh, also, please enable ZigbeeTuya, ZigbeeCluster and ZigbeeNetwork debug prints… That should add enough information to the logs so I may be able to follow the code path with it…

Thread 1 "nymead" received signal SIGSEGV, Segmentation fault.
0xb6599398 in QIODevice::isOpen() const () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
(gdb)  t a a bt

Thread 7 (Thread 0xad138380 (LWP 28175) "QNetworkAccessM"):
#0  __GI___poll (timeout=28588, nfds=11, fds=0xac8031a0) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  __GI___poll (fds=0xac8031a0, nfds=11, timeout=28588) at ../sysdeps/unix/sysv/linux/poll.c:26
#2  0xb4368988 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 6 (Thread 0xaf0ff380 (LWP 27705) "QQmlThread"):
#0  __GI___poll (timeout=-1, nfds=1, fds=0xae703b28) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  __GI___poll (fds=0xae703b28, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:26
#2  0xb4368988 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 5 (Thread 0xafa85380 (LWP 27703) "Thread (pooled)"):
#0  0xb6fb7978 in memcmp () from /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so
#1  0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 4 (Thread 0xb07ff380 (LWP 26612) "Qt bearer threa"):
#0  __GI___poll (timeout=9989, nfds=1, fds=0xafe03f40) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  __GI___poll (fds=0xafe03f40, nfds=1, timeout=9989) at ../sysdeps/unix/sysv/linux/poll.c:26
#2  0xb4368988 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0xb1159380 (LWP 26603) "Thread (pooled)"):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0xb1158cc8, clockid=<optimized out>, expected=0, futex_word=0x119e54) at ../sysdeps/nptl/futex-internal.h:323
#1  __pthread_cond_wait_common (abstime=0xb1158cc8, clockid=<optimized out>, mutex=0x46edde00, cond=0x119e28) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x119e28, mutex=0x46edde00, abstime=0xb1158cc8) at pthread_cond_wait.c:656
#3  0xb648bed4 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#4  0xb6488d3c in ?? () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#5  0xb6484cec in ?? () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#6  0xb63bd300 in start_thread (arg=0xb1159380) at pthread_create.c:477
#7  0xb618c208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0xb1d19380 (LWP 24426) "QDBusConnection"):
#0  __GI___poll (timeout=-1, nfds=2, fds=0xb140c6e8) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  __GI___poll (fds=0xb140c6e8, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:26
#2  0xb4368988 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0xb1f4a040 (LWP 23574) "nymead"):
#0  0xb6599398 in QIODevice::isOpen() const () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#1  0xb5a99f88 in ZigbeeInterfaceDeconz::onError (this=0xc3c10, error=@0x2d9010: QSerialPort::ResourceError) at backends/deconz/interface/zigbeeinterfacedeconz.cpp:202
#2  0xb66b4570 in QObject::event(QEvent*) () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#3  0xb6680c2c in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#4  0xb66840f0 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#5  0xb66e8554 in ?? () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#6  0xb436872c in g_main_context_dispatch () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#7  0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

I repeated one and I got different trace:

Thread 7 (Thread 0xad138380 (LWP 18374) "QNetworkAccessM"):
#0  __GI___poll (timeout=30447, nfds=7, fds=0xac8031a0) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  __GI___poll (fds=0xac8031a0, nfds=7, timeout=30447) at ../sysdeps/unix/sysv/linux/poll.c:26
#2  0xb4368988 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 6 (Thread 0xaf0ff380 (LWP 17957) "QQmlThread"):
#0  __GI___poll (timeout=-1, nfds=1, fds=0xae703b28) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  __GI___poll (fds=0xae703b28, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:26
#2  0xb4368988 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 5 (Thread 0xafa85380 (LWP 17956) "Thread (pooled)"):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0xafa84cc8, clockid=<optimized out>, expected=0, futex_word=0xbe4c8) at ../sysdeps/nptl/futex-internal.h:323
#1  __pthread_cond_wait_common (abstime=0xafa84cc8, clockid=<optimized out>, mutex=0x77, cond=0xbe4a0) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0xbe4a0, mutex=0x77, abstime=0xafa84cc8) at pthread_cond_wait.c:656
#3  0xb648bed4 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#4  0xb6488d3c in ?? () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#5  0xb6484cec in ?? () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#6  0xb63bd300 in start_thread (arg=0xafa85380) at pthread_create.c:477
#7  0xb618c208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 4 (Thread 0xb07ff380 (LWP 16837) "Qt bearer threa"):
#0  __GI___poll (timeout=9989, nfds=1, fds=0xafe03f40) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  __GI___poll (fds=0xafe03f40, nfds=1, timeout=9989) at ../sysdeps/unix/sysv/linux/poll.c:26
#2  0xb4368988 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 0xb1159380 (LWP 16799) "Thread (pooled)"):
#0  futex_abstimed_wait_cancelable (private=<optimized out>, abstime=0xb1158cc8, clockid=<optimized out>, expected=0, futex_word=0x8c554) at ../sysdeps/nptl/futex-internal.h:323
#1  __pthread_cond_wait_common (abstime=0xb1158cc8, clockid=<optimized out>, mutex=0xab79a500, cond=0x8c528) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x8c528, mutex=0xab79a500, abstime=0xb1158cc8) at pthread_cond_wait.c:656
#3  0xb648bed4 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#4  0xb6488d3c in ?? () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#5  0xb6484cec in ?? () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#6  0xb63bd300 in start_thread (arg=0xb1159380) at pthread_create.c:477
#7  0xb618c208 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 2 (Thread 0xb1d19380 (LWP 15696) "QDBusConnection"):
#0  __GI___poll (timeout=-1, nfds=2, fds=0xb140c6e8) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  __GI___poll (fds=0xb140c6e8, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:26
#2  0xb4368988 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0xb1f4a040 (LWP 14966) "nymead"):
#0  0xb5b06c7c in ZigbeeCluster::readAttributes (this=this@entry=0x0, attributes=..., manufacturerCode=manufacturerCode@entry=0) at zcl/zigbeecluster.cpp:107
#1  0xad7e7cf8 in IntegrationPluginZigbeeTuya::pollEnergyMeters (this=0x3d5198) at integrationpluginzigbeetuya.cpp:192
#2  0xb66c0044 in ?? () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#3  0xb6cc2074 in nymeaserver::PluginTimerImplementation::tick (this=0x5652d0) at hardware/plugintimermanagerimplementation.cpp:94
#4  nymeaserver::PluginTimerImplementation::tick (this=0x5652d0) at hardware/plugintimermanagerimplementation.cpp:83
#5  0xb66c0044 in ?? () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#6  0xb6ca1144 in nymeaserver::TimeManager::timerEvent (this=0xb140e7e8, event=<optimized out>) at time/timemanager.cpp:92
#7  0xb66b4468 in QObject::event(QEvent*) () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#8  0xb6680c2c in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#9  0xb66e6b80 in QTimerInfoList::activateTimers() () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#10 0xb66e75b0 in ?? () from /lib/arm-linux-gnueabihf/libQt5Core.so.5
#11 0xb436872c in g_main_context_dispatch () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#12 0x00000000 in ?? ()

I think the problem is following function:


void IntegrationPluginZigbeeTuya::pollEnergyMeters()
{
    foreach (Thing *thing, myThings().filterByThingClassId(powerSocketThingClassId)) {
        ZigbeeNode *node = nodeForThing(thing);
        ZigbeeNodeEndpoint *endpoint = node->getEndpoint(0x01);
        ZigbeeClusterElectricalMeasurement *electricalMeasurementCluster = endpoint->inputCluster<ZigbeeClusterElectricalMeasurement>(ZigbeeClusterLibrary::ClusterIdElectricalMeasurement);
        electricalMeasurementCluster->readAttributes(
                    {
                        ZigbeeClusterElectricalMeasurement::AttributeACPhaseAMeasurementActivePower,
                        ZigbeeClusterElectricalMeasurement::AttributeACPhaseAMeasurementRMSCurrent,
                        ZigbeeClusterElectricalMeasurement::AttributeACPhaseAMeasurementRMSVoltage
                    });
        ZigbeeClusterMetering *meteringCluster = endpoint->inputCluster<ZigbeeClusterMetering>(ZigbeeClusterLibrary::ClusterIdMetering);
        meteringCluster->readAttributes({ZigbeeClusterMetering::AttributeCurrentSummationDelivered});
    }
}

I have installed power sockets from Shelley.

in the function all power sockets are gone through.

foreach (Thing *thing, myThings().filterByThingClassId(powerSocketThingClassId)) {

But since I don’t have any power sockets from tuya it runs into empty.

I uninstalled the tuya plugin and now the system works again.

After the app is working, I see that the temperature Sensor from tuya ist detected as Power Socket (TS0201_TZ300) . This is a bit strange.

Yes… this is a bug that we’ve fixed in experimental and I hoped that would solve it for you: Tuya: Fix handleNode grabbing too much by mzanetti · Pull Request #24 · nymea/nymea-plugins-zigbee · GitHub

I bought temperature sensor (Tuya Temperature & Humidity Sensor (IH-K009) Zigbee compatibility) from Tuya and tried to add it as a Zigbee device.

This sensor does not follow the Zigbee standard. It is detected once as a power socket and once as an unknown device, see screen shoot. The incorrect recognition as a power socket causes a segmentation fault.

I’m not that familiar with Zigbee, would I need to extend the tuya plugin to use the sensor?

Hey, so the incorrect detection as the power socket was a bug in 1.1. Removing the node from the network and re-joining after upgrading to 1.2 or newer should not make the power socket appear any more.

For actually supporting it, yes, there’s the need to do some little work in nymea-plugin-zigbee-tuya.

How this normally works is that you enable the Zigbee, ZigbeeNetwork and ZigbeeCluster logs and monitor them. Then add the device to the network. This will print the complete Cluster list in the logs (here’s an example output from another device so you know what to look for: I | Zigbee: Node added to ZigbeeNetwork(00:15:8D:00:01:EE:22:EA, {1ef6c932-409f - Pastebin.com) and from there the reverse engineering fun begins. Normally it’s reasonably easy tho, even if a device doesn’t follow the spec because ZigBee only has a very limited set of options how data is transferred… I.e. it will most likely still be a ZigBee cluster (perhaps the wrong one, perhaps a “unknown” one) which sill send the attributeChanged() message whenever the temperature changes. If you’re new to ZigBee, that may sound a bit overwhelming atm, I understand that, but if you post the cluster list of the device here, I’m sure we’ll figure it out together.