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

SPZB0001 with FW 22190930 doesn't work, how to upgrade #74

Closed
2 tasks done
Se7enair opened this issue Dec 6, 2021 · 30 comments
Closed
2 tasks done

SPZB0001 with FW 22190930 doesn't work, how to upgrade #74

Se7enair opened this issue Dec 6, 2021 · 30 comments
Assignees
Labels
documentation Improvements or additions to documentation under investigation If its not clear whats the problem

Comments

@Se7enair
Copy link

Se7enair commented Dec 6, 2021

Prerequisites

  • Model name of your Devices from Zigbee2Mqtt
    Eurotronic SPZB0001
  • Output from Home Assistent Developer Tools state e.g.
hvac_modes:
  - 'off'
  - auto
  - heat
min_temp: 5
max_temp: 30
target_temp_step: 0.5
current_temperature: 21.5
temperature: 21.5
hvac_action: None
battery: 127.5
current_heating_setpoint: 21.5
device:
  applicationVersion: 22
  dateCode: '20191014'
  friendlyName: wohnzimmer_heizung_rechts
  hardwareVersion: 35
  ieeeAddr: '0x00158d000369857b'
  manufacturerID: 4151
  manufacturerName: Eurotronic
  model: SPZB0001
  networkAddress: 22783
  powerSource: Battery
  softwareBuildID: '22190930'
  stackVersion: 5
  type: EndDevice
  zclVersion: 2
eurotronic_error_status: 0
eurotronic_host_flags:
  boost: false
  child_protection: false
  mirror_display: false
  window_open: false
eurotronic_system_mode: 1
linkquality: 248
local_temperature: 21.5
local_temperature_calibration: 0
occupied_heating_setpoint: 21.5
pi_heating_demand: 30
running_state: null
system_mode: auto
trv_mode: null
unoccupied_heating_setpoint: 16
update:
  state: idle
update_available: false
valve_position: null
friendly_name: wohnzimmer_heizung_rechts
supported_features: 1

configuration.yaml

climate:
  - platform: ai_thermostat
    name: wohnzimmer_heizung_rechts_ai
    unique_id: 1637927441
    thermostat: climate.wohnzimmer_heizung_rechts
    temperature_sensor: sensor.wohnzimmer_temperatursensor_temperature

Description

ai_thermostat does not change the local_temperature_calibration. But no errors.

Steps to Reproduce

Install ai_thermostat via HACS and add the new climate entity
2.
Restart and wait for ai_thermostat to do something

Expected behavior:

adjustement of the local_temperature_calibration on the tvr

Actual behavior:

nothing happens

Versions

core-2021.11.5
z2m 1.22.1-1

Additional Information

I am unable to send the local_temperature_calibration manual via service

service: mqtt.publish
data:
  topic: zigbee2mqtt/wohnzimmer_heizung_rechts/set
  payload: >
    {
      "local_temperature_calibration":2
    }

results in

debug Received MQTT message on 'zigbee2mqtt/wohnzimmer_heizung_rechts/set' with data '{ "local_temperature_calibration":2 } '
debug Publishing 'set' 'local_temperature_calibration' to 'wohnzimmer_heizung_rechts'
error Publish 'set' 'local_temperature_calibration' to 'wohnzimmer_heizung_rechts' failed: 'Error: Write 0x00158d000369857b/1 hvacThermostat({"localTemperatureCalibration":20}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'INVALID_VALUE')'
info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Publish 'set' 'local_temperature_calibration' to 'wohnzimmer_heizung_rechts' failed: 'Error: Write 0x00158d000369857b/1 hvacThermostat({\"localTemperatureCalibration\":20}, {\"timeout\":10000,\"disableResponse\":false,\"disableRecovery\":false,\"disableDefaultResponse\":true,\"direction\":0,\"srcEndpoint\":null,\"reservedBits\":0,\"manufacturerCode\":null,\"transactionSequenceNumber\":null,\"writeUndiv\":false}) failed (Status 'INVALID_VALUE')'","meta":{"friendly_name":"wohnzimmer_heizung_rechts"},"type":"zigbee_publish_error"}'
@KartoffelToby
Copy link
Owner

Looks like your z2m itself has a problem if you can't set the local_temperature_calibration.

Is it linked correctly?

@KartoffelToby KartoffelToby added the under investigation If its not clear whats the problem label Dec 6, 2021
@Se7enair
Copy link
Author

Se7enair commented Dec 6, 2021

How can I check that? I am new to z2m.
The Thermostat is working properly. I can set target_temperature etc. via mqtt, z2m or homeassistant.

I have another Thermostat which is accepting the temperature_calibration. It has another Firmware. Do you discovered any problems with different firmwares?

Not working:
Firmware Datum
20191014
Firmware Version
22190930

Working:
Firmware Datum
20190408
Firmware Version
18181120

@Se7enair
Copy link
Author

Se7enair commented Dec 7, 2021

I think I remember that it worked on deconz. So it is possible and maybe a bug in z2m.

@KartoffelToby
Copy link
Owner

This didn't work with deconz,

you can try the follow in Z2M to test if the TRV is working:

Go to the device detail page, and change the calibration, then check the logs of Z2M if any errors appear

@Se7enair
Copy link
Author

Se7enair commented Dec 7, 2021

Possible that tested it in deconz only with the one which is working?!

Errorlog From z2m

`Error Publish 'set' 'local_temperature_calibration' to 'esszimmer_heizung_links' failed: 'Error: Write 0x00158d00032f606e/1 hvacThermostat({"localTemperatureCalibration":30}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (no response received)' 

@KartoffelToby
Copy link
Owner

Looks like its not paired correctly, is it possible that the trv ist still connected to your deconz instance?

its only possible to pair it to deconz or z2m

@Se7enair
Copy link
Author

Se7enair commented Dec 7, 2021

Deconz is disabled, deleted and the conbee is working for z2m.
But I have read that reconnecting may help. Wanted to try this anyway. I'll left you know as soon as I've tried it.

@Se7enair
Copy link
Author

Se7enair commented Dec 7, 2021

Tried 5x, it still shows the same error.
Try a firmware update.

@KartoffelToby KartoffelToby self-assigned this Dec 7, 2021
@KartoffelToby
Copy link
Owner

Can you control the target temp in Z2M for the TRV? Its really strange, if you can't control anything with Z2M directly this is an issue thats related to Z2M not my Intigration

@Se7enair
Copy link
Author

Se7enair commented Dec 7, 2021

I can control the target temp in z2m.
I also think it is related to z2m, but I was hoping you have experience with this and can help me.

Firmwareupdate with deconz stucks. z2m claims that there is no image available.

In the meantime I tried a few times to change the calibration, the error shows "invalid_value". No matter if I try it via z2m or mqtt.

@KartoffelToby
Copy link
Owner

i have 3 Spirits i remember that i Update the Firmware over deconz last year Checkout this https://github.com/EUROTRONIC-Technology/Spirit-ZigBee

@Se7enair
Copy link
Author

Se7enair commented Dec 8, 2021

I tried it, but it stays on Idle and never starts.
I think there is a version which cannot be updated.
ordered three brand new thermostats which are arriving tomorrow. Curious about the if they will work.

@KartoffelToby
Copy link
Owner

It must be possible to make it work, you said setting offsets was possible in deconz, so it must be possible in z2m too, they make changes in the last release on the calibration values, so try a older version, or open a issue based on this problem in z2m

@Se7enair
Copy link
Author

Se7enair commented Dec 8, 2021

I tried it again with deconz with a thermostat which is also not working in z2m. This devices also doesnt work in deconz. So it is more related to the device itself.

I wrote a mail to the supplier, they already responded to me. They will change the affected devices to some which have a newer firmware.
There are many reports on github with a faulty firmware. But I was unsure, because everything worked, except the calibration. But this was one of the main reasons I choose this thermostats.

Keep you informed as soon as the new thermostats arrive.

@KartoffelToby KartoffelToby changed the title ai_thermostat without function SPZB0001 with FW 22190930 dosn't work Dec 8, 2021
@KartoffelToby KartoffelToby added the wontfix This will not be worked on label Dec 8, 2021
@KartoffelToby
Copy link
Owner

Just for the protocol:

I have two working with:

Firmware Datum
20190408
Firmware Version
18181120

Also one with
Firmware Datum
20191014
Firmware Version
22190930

its also working, so its really boring looks like the same FW as yours, but isn't.

As in this post discribed https://github.com/EUROTRONIC-Technology/Spirit-ZigBee/releases/tag/20190408 there was two FW with the same datecode.

If its unflashable with e.g. deCONZ you must return it.

I also find Z2M should add the fixed FW to the OTA

@KartoffelToby KartoffelToby added the documentation Improvements or additions to documentation label Dec 8, 2021
@Se7enair
Copy link
Author

Se7enair commented Dec 12, 2021

I bought 3 new ones so that I can equip all the radiators. All of them contains Firmware 22190930. But the new version, because everything is running fine.
To replace the old ones I need a invoice or something, but i bought a few of them used.

But now, I have four thermostats with working firmware. And they are working as expected with your code. 👍😊

current_temperature matches with temperature from the external sensor:
image

radiator next to the first, current_temperature does not match:
image

If ok, will keep this open, till I flashed the used ones. So that everbody can read here.

@KartoffelToby
Copy link
Owner

thats nice, thank you, yes let it Open. i'll pin it and the calibration curve shoud be better in the Future, as you can read from the current releases, the current Z2M Version only allow full int calibration, thats off by 0.9 -0.9 °C

i allready have a PR open, and test it in my local System. works fine with the Spirit.

hope it will be in the next Version of Z2M

@Se7enair
Copy link
Author

Se7enair commented Dec 13, 2021

It is working and totally easy!

All the benefits go to @solvisit he discovered it!

Heres a little tutorial to open the thermostat.

Preparations:
Download firmware
https://github.com/Se7enair/eurotronic-spirit-zigbee-firmware/blob/main/firmware-20191014-22190930-new.bin

Download FlashTool
https://www.nxp.com/downloads/en/software-development-kits/JN-SW-4107.zip

Buy FTDI-Adapter
https://www.amazon.de/AZDelivery-Adapter-FT232RL-Serial-gratis/dp/B01N9RZK6I/ref=sr_1_4?__mk_de_DE=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=14LG084JIJ26C&keywords=ftdi+usb+adapter&qid=1639419985&sprefix=FTDI%2Caps%2C183&sr=8-4

Buy jumper cables
https://www.amazon.de/AZDelivery-Jumper-Arduino-Raspberry-Breadboard/dp/B074P726ZR/ref=pd_bxgy_img_1/260-6644889-2185025?pd_rd_w=Hhy88&pf_rd_p=289750ef-2548-403a-9263-64d1c3b3297e&pf_rd_r=TM6NYNTCMGHDZSP5DWKT&pd_rd_r=cb200faf-da4a-4d48-8b46-7aa264575059&pd_rd_wg=XXXUu&pd_rd_i=B074P726ZR&psc=1

  1. Pull out the batteries
  2. Open the thermostat
  • There is a ring at the backside, remove it gently
    2021-12-13_17-22-27

  • There a four brackets to open. To open the first two, press firmly on the upper part on the battery side
    Inked2021-12-13_17-24-20_LI

  • It should be opened a little bit

  • Use a spatula or something similar to press down the case
    2021-12-13_17-24-59

  • Move the spatula to the back/mounting ring

  • Repeat on the other side

  • Now the case should be open

  1. Remove the zigbee-board
  2. follow the instructions below
  3. be happy

It is possible to replace the broken 20191014 firmware with a good 20191014 (or any other version), opening the TVR and programming the chip, it is not particularly difficult. Steps:

  1. You need a working TVR from which extract the working firmware or getting the file from someone did it. I will post the firmware if Eurotronic will permit it.
  2. You have to download the flash programmer for JN5179: https://www.nxp.com/downloads/en/software-development-kits/JN-SW-4107.zip
  3. You need an FTDI adapter ( maybe it works with a serial to usb cable too, didn't tested)
  4. Open the TVR
  5. Take off the zigbee board
  6. Connect it to the FTDI (not connected to USB) (see the image for wiring, there is an old hw version with the connectors on the other side, they are just translated not mirrorerd)
  7. Connect the FTDI to USB while shortcircuiting the board (see image)
  8. Open a Windows console with "cmd" and go to the flash programmer directory (default:"C:\NXP\ProductionFlashProgrammer")
    8a) To extract the firmware launch the command (if i remember correctly, read the help for tips): JN51xxProgrammer.exe -s COM8 -S internal -F firmware.bin
    8b) To program the firmware on the chip launch the command: JN51xxProgrammer.exe -s COM8 -S internal -f firmware.bin
    You have to try a few times to get connection with the chip, sometimes it doesn't work at first try. The chip is entered in programming mode if it does not to send packets, you can check it on the FTDI leds.
    DSC_0041 1
    DSC_0042 1
    DSC_0044 1
    DSC_0045 1
    DSC_0047 1
    DSC_0052 1
    DSC_0053 1
    DSC_0055 1

@KartoffelToby
Copy link
Owner

wow, your my men! Thanks for your super instructions, i'm sure this will help someone.

thanks for your Work!

@KartoffelToby KartoffelToby pinned this issue Dec 13, 2021
@KartoffelToby KartoffelToby changed the title SPZB0001 with FW 22190930 dosn't work SPZB0001 with FW 22190930 dosn't work, how to upgrade Dec 13, 2021
@Se7enair Se7enair changed the title SPZB0001 with FW 22190930 dosn't work, how to upgrade SPZB0001 with FW 22190930 doesn't work, how to upgrade Dec 14, 2021
@KartoffelToby
Copy link
Owner

@Se7enair What do you think about create a wiki page of your work here?

@Se7enair
Copy link
Author

Sounds good. I am propably not the only one with this problem.
But I think I will need a little bit support with the wiki itself. Or how do you plan to create the wiki?

@Valbx
Copy link

Valbx commented Jan 6, 2022

Hello, I'm trying to flash my TVR with but I have no communication when I plug the USB. There is light, I can see the COM is ok, but nothing else. I think I'm missing something. I'm using a CP210x to UART adaptor.

@Se7enair, could you give more informations about the point "7.Connect the FTDI to USB while shortcircuiting the board (see image)" please ? What do we have to short-circuit on the board ?

@maniacmanfred
Copy link

I have the exact same problem as Valbx.
Please give us some hint

@Se7enair
Copy link
Author

Se7enair commented Jan 6, 2022

Take a look here
EUROTRONIC-Technology/Spirit-ZigBee#1 (comment)

@KartoffelToby
Copy link
Owner

I create a wiki page for this: https://github.com/KartoffelToby/ai_thermostat/wiki/SPZB0001-with-FW-22190930-doesn't-work,-how-to-upgrade

if any other infos needed let me know or provide a Markdown i'll update the wiki

@sygys
Copy link

sygys commented Jan 8, 2022

Does this also fix the trv_mode issue? Every few hours my SPZ0001 seems to resets itself to trv_mode 2 and closes or opens the valve automatically. going back to temperature controlled. It needs to stay in valve mode. im on Firmware 22190930.

I bought these valves because they are the only ones with zigbee that have a valve % control function. so i can manually set the valve. But when these things keep resetting the TRV mode back to 2 after sometime these are useless too

@RubenKelevra RubenKelevra unpinned this issue Jan 30, 2022
@RubenKelevra RubenKelevra reopened this May 5, 2022
@stale stale bot removed the wontfix This will not be worked on label May 5, 2022
@stale
Copy link

stale bot commented Jul 4, 2022

This issue has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the stale Long time no activity label Jul 4, 2022
@KartoffelToby KartoffelToby pinned this issue Sep 15, 2022
@stale stale bot removed the stale Long time no activity label Sep 15, 2022
@bluenazgul
Copy link

bluenazgul commented Mar 11, 2023

updating worked fine, but now my Device is flashing red since about one Hour @Se7enair any tips?

Edit: 30min after this post the Device is back but still shows 20190408-18181120

@sygys
Copy link

sygys commented Mar 11, 2023

Just sell the damn things and buy the zwave ones. I also have 1 Shelly trv using wifi which does a tremendous job and also has direct valve control. These eurotronic garbage isn't worth the money. And contacting eurotronic has no use whatsoever. They just don't give a shit that their software is crap

@Se7enair
Copy link
Author

Yes, I would never by a new one. But I have 8 of them running. And they are doing what I want.
Except if I use them with BT. For me thats fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation under investigation If its not clear whats the problem
Projects
None yet
Development

No branches or pull requests

7 participants