question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'MAC transaction expired' (240) with Eurotronic Spirit SPZB0001 thermostat

See original GitHub issue

Sporadic my Eurotronic Spirit SPZB0001 thermostat will not react on commands and throw an exception 'MAC transaction expired’ like: zigbee2mqtt:error 2019-10-25T10:07:50: Publish 'set' 'current_heating_setpoint' to 'thermostat/living_room' failed: 'Error: Data request failed with error: 'MAC transaction expired' (240)' zigbee2mqtt:info 2019-10-25T10:07:50: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"zigbee_publish_error","message":"Publish 'set' 'current_heating_setpoint' to 'thermostat/living_room' failed: 'Error: Data request failed with error: 'MAC transaction expired' (240)'","meta":{"friendly_name":"thermostat/living_room"}}'

But If I change the temperature manually on the device itself, the transaction error will be fixed and reacting normal on set current_heating_setpoint: zigbee2mqtt:info 2019-10-25T10:19:56: MQTT publish: topic 'zigbee2mqtt/thermostat/living_room', payload '{"eurotronic_error_status":0,"current_heating_setpoint":19,"local_temperature":19.28,"occupied_heating_setpoint":20,"unoccupied_heating_setpoint":16,"eurotronic_system_mode":1,"pi_heating_demand":0,"battery":100,"linkquality":73,"system_mode":"heat"}'

using hassio with zigbee2mqtt-edge docker image, but can not get the current git commit: https://github.com/danielwelch/hassio-zigbee2mqtt/issues/242 my latest version I assume is a few days old but already patched with the thermostat_system_mode feature! https://github.com/Koenkk/zigbee-herdsman-converters/pull/682 Coordinator: CC2531 zStack12 20190619

How to avoid this problem? The thermostat device is in the same room with the coordinator. The networkmap shows me a value from the coordinator to the device around 80-120.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:112 (71 by maintainers)

github_iconTop GitHub Comments

3reactions
wassfilacommented, Nov 29, 2020

@M-Tier I think I can work around this. First answering your question about current vs occupied. Only the current is effective for the temp regulation, the occupied and unoccupied are simply user configuration with the convenience of being able to be stored on the device, so that different automation software could pick it from there consistently. e.g. you have one tool to configure occupied/unoccupied and another tool for presence detection or schedule and swaps the current according to the value configured in occupied/unoccupied. My impression is without an external tool using them, I did not notice any effect on the device itself in case you only care about the current.

Now back to the issue of this topic, how do I fix it every time,

  • repair the device. Not fun, but you ought to be ready to repair every month or so, on the lucky case some devices run for more than a year, some others get lost after a week.
  • repair is not easy, due to some mysterious bug I could never properly report (too complex), my z2m does not allow pairing devices neither old nor new ones, I even analyzed the wireshark traces and found an absurdity from z2m requesting the device to leave as soon as it gets first request, in order to workaround that, see next points :
  • stop z2m, remove the zigbee adapter, wait 10 sec, re plug it, restart. This is even explained in z2m user guide, which to me shows the unexplained limitation, it is a firmware bug to me that might be hard to fix.
  • remove the device before pairing it again
  • keep the adapter as close as possible to allow proper attributes discovery

and now, if you want to have a happy long time using it without needing to repair again, most important is :

  • keep your zigbee network clean
  • make sure all your wifi routers are on a fixed freq far from the z2m zigbee freq
  • keep checking signal quality (e.g. grafana below)
  • ask your neighbors to stop using wifi

of course not all are possible so you might have to re-pair again when that error appear. Now of course as a product, it’s insane that a user has to live with such a pain, well don’t forget that the devices are not within their intended used scope so you have no official support here, we’re on our own. Standards are not enough to guarantee interoperability, reporting this bug to the device manufacturer might not interest them, and no one has the capability to debug the z2m firmware interoperability with each device.

long story short, hope the workaround I suggested help, for the time being I decided that living with the workaround will take me much less time than trying to fix them, here’s my projects github if you’d like to have more info about how I set up my heating system https://github.com/HomeSmartMesh/raspi

fileds|   – | – current_heating_setpoint |   occupied_heating_setpoint |   unoccupied_heating_setpoint |   eurotronic_system_mode |   pi_heating_demand |   eurotronic_error_status |   battery |   linkquality |   local_temperature |

image

another funny example, in order to really understand the thermodynamics of your house, such grafana examples show the impact of opening a window. Note I have a scripts that uses window contact sensors and configures the off mode on the heating system

image

2reactions
Koenkkcommented, Jan 9, 2020

@sti0 first i want to make sure this fixes the problem, can you change https://gist.github.com/Koenkk/ca4b55f33bb1727af6bda204b95feafe#file-startznp-js-poll-rate-200-L214 200 to 100 here and see if things improve?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[CC2562P] Sporadic MAC Expired Request When ... - TI E2E
My polling asks to the thermostat the temperature, ... because the peer device did not respond before the transaction expired or was purged....
Read more >
Eurotronic Spirit Zigbee Radiator Thermostat SPZB0001 ...
If the device is following Zigbee standards it is possible it will work with other gateway solutions, it is just not confirmed as...
Read more >
Eurotronic SPZB0001 Homebridge/HomeKit integration
Add HomeKit support to your Eurotronic SPZB0001, using Homebridge, Zigbee2MQTT and homebridge-z2m. ... Spirit Zigbee wireless heater thermostat ...
Read more >
Eurotronics Spirit Zigbee Thermostat - Configuration
Hello everyone, I am new to HA and coming from ioBroker I am absolutelly amazed how great it looks, how easy it is...
Read more >
Eurotronic SPZB0001 control via MQTT - Zigbee2MQTT
Model, SPZB0001. Vendor, Eurotronic. Description, Spirit Zigbee wireless heater thermostat. Exposes, battery, climate (occupied_heating_setpoint, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found