dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 498 forks source link

[Device Support Request] Eurotronic Spirit ZigBee #1098

Closed micha91 closed 3 years ago

micha91 commented 5 years ago

Hi,

I just bought this thermostat device (on a random guess) to move away from other wireless protocols. I would love to see support for it in deCONZ. At the moment there is nearly no documentation for this device, but at least some clusters are recognised and it is possible to set the desired temperature using the attribute in the cluster. Node Info image Basic Cluster: image Power Configuration: image Thermostat: image

Thank you very much in advance

Michael

ebaauw commented 5 years ago

But funny enough, since yesterday afternoon the value of state.valve is set to 0 each time the setpoint is reached. It looks like the device is adjusting itself over time?

I suspect it does. It seems to find the right valve setting for a constant temperature, rather than opening/closing the valve all the time. When you change the heatsetpoint far from the current temperature, it will fully open or close the valve.

Another find is that when I press the boost button on the device, web hooks come in for config.heatsetpoint, state.valve and state.temperature, but not for config.auto Is this not reported by the device or is this report missed to send?

I think you mean config.mode? It's read from the Host Flags attribute 0x4008. The factory default reporting is too conservative, imho, and it doesn't report changes immediately. If you change this manually, it does get reported like the other attributes, see https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1098#issuecomment-464348217.

wvuyk commented 5 years ago

Indeed I ment config.mode. I was hoping it would report in a regular manner, like 5 minutes or so. But I have out waited the boost time, and it never reported the config.mode as "heat", the other values were reported consistantly, could see them change here, Now 15 minutes have past all is reset.

Too bad, this could have been useful information for the Homeseer events....

ebaauw commented 5 years ago

Two of my thermostats spontaneously (?) sort of reset, clearing displayflipped, even though the display itself is still flipped. In both cases, I see the same pattern in the log:

The next time Host Flags is written, the cleared displayflipped bit is sent back to the thermostat, and the display unflips.

I'm not sure what triggered this sequence. These were different thermostats than the one going MIA in https://github.com/dresden-elektronik/deconz-rest-plugin/issues/849.

Update Upon further analysis of the log, other thermostat went thru the same routine, but as their display wasn't flipped, I didn't notice this at first.

ebaauw commented 5 years ago

I'm not sure what triggered this sequence.

I think it's the thermostat's self test. According to https://eurotronic.org/produkte/zigbee-heizkoerperthermostat/spirit-zigbee/, the thermostat does a self-test once per week:

Selbsttest: 1 x wöchentlich

akaho commented 5 years ago

This device seems to be great! @Kane610 I saw your PR. Thanks for the work. It doesn't include schedules, for the moment, right? Just want to know that I won't be searching for something that isn't there.

Kane610 commented 5 years ago

@akaho no schedules. No way to expose it in hass atm

choss38 commented 5 years ago

Hi, I found the device with DeCONZ, thanks for the work ! But can you see it in Phoscon ? I can't find it.

rweise commented 5 years ago

Hi, i also add a Spirit Zigbee, after the Custer Info -read procedure, Phoscon write "Sensor bereit" But there is no Sensor in Phoscon and also nothing in IOBroker . But i can see it in Deconz-GUI as SPZB001 following a Battery-Symbol.

I run Deconz 2.05.60 on a RPI3.

bohtho commented 5 years ago

Not being into zigbee and clusters (I’ve been using wireless KNX-RF based thermostatic valves), is there support for manually driving the valve motor, or in effect doing your own PID controller for it? Also, is currently only end point device thermostatic valves (on battery) supported, or would also mains powered (router) zigbee thermostatic valves work now?

ebaauw commented 5 years ago

is there support for manually driving the valve motor, or in effect doing your own PID controller for it?

The Eurotronic Spirit valves have a mode where you can set the valve position manually. This is using manufacturer-specific extentions to the Zigbee standard, so ymmv for other thermostats. I haven’t exposed this part over the REST API.

Writing your own PID controller seems quite challenging to me; would love to see your work on that.

Also, is currently only end point device thermostatic valves (on battery) supported, or would also mains powered (router) zigbee thermostatic valves work now?

Each type of thermostat needs to be whitelisted explicitly, and might need some fiddling depending on how they implement and extend the Zigbee standard. Whether they’re mains or battery powered won’t make much of a difference. Nor whether they’re Zigbee routers or Zigbee end devices (which isn’t always the same as mains vs battry powered). If you have a particular type in mind, please open a new issue, providing the info described here: https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Request-Device-Support.

BobbyXXX commented 5 years ago

Hi,

i have a problem to add the eurotronic spirit with deconz v2.05.60.

my deconz is running on ubuntu without gui, so i can only use phoscon webapp and rest api. my problem is, after joining the eurotronic to deconz via Phoscon App the eurotronic device seems to added to my zigbee network (device ok, phoscon app reported "no device found"), but i cant see the device neither in phoscon app nor in rest api. the device itself reported successfull connection to zigbee network.

can someone help me?

regards Bobby

Oliviakrkk commented 5 years ago

I am afraid you need to read Cluster info. I recently bought additional thermostats and needed to do the procedure for each newly added one.

BobbyXXX commented 5 years ago

Thanks for info. is there a way to do this without x11 gui?

alpha23 commented 5 years ago

@BobbyXXX: I used x11vnc for it.

kaykoch commented 5 years ago

Same problem like BobbyXXX for me. I use deconz in docker (marthoc/deconz). So there is no GUI. I tested Eurotronic Spirit ZigBee with CC2531-Stick in iobroker (based on zigbee2mqtt.io). Device is recognized within seconds and usable in iobroker. In deconz the device is paired but not to find in Phoscon or REST

regards Kay

Oliviakrkk commented 5 years ago

Hi

Docker has option for VNC. You can access GUI via VNC.

Options: -e DECONZ_VNC_MODE=1 -e DECONZ_VNC_PORT=5900

kaykoch commented 5 years ago

Thanks. That's it. I can join it. Thank you

Kay for docker-compose:

realwax commented 5 years ago

Hi, Due the posts above I managed to get mine into iobroker. Thank you! But sadly it only shows a few values and no options to set a temperature, nor set it on & off. Will this be added it the near future? Otherwise it is pretty useless and I need to return it. Is there anything I can do myself? (coding skills low) Thank you very much! Wolfgang Unbenannt

rweise commented 5 years ago

Because there is no Chance with Deconz, I changed the Eurotronic Spirit Zigbee to a 4$ Chinese CC2531 and that is what i get :

Bildschirmfoto 2019-04-04 um 11 30 40
kaykoch commented 5 years ago

@Wolfgang: I'm using node-red with iobroker. rweise is right. The CC2531 works well with this thermostat, but not with other devices. I tried both and I stay with deconz. If you work with node red, here is my Solution: The Idea based on sending new temperature with REST-API. There are two buttons, to increase and decrease wanted temperature. This temperture is stored in iobroker via node-red. New temperture ist sended to deconz via http-Request. Description is in english. Name of nodes in german. eurotronic

[ { "id": "8c13faa0.312318", "type": "ui_gauge", "z": "82a0e2b1.be156", "name": "Thermostat, Schlazimmer (SOLL)", "group": "62b68445.1ceddc", "order": 2, "width": "3", "height": "3", "gtype": "gage", "title": "Schlafzimmer (Soll)", "label": "°C", "format": "{{value}}", "min": "5", "max": "35", "colors": [ "#0092b5", "#00e627", "#b50000" ], "seg1": "20", "seg2": "25", "x": 1120, "y": 240, "wires": [] }, { "id": "ee827496.0baf08", "type": "http request", "z": "82a0e2b1.be156", "name": "", "method": "use", "ret": "txt", "url": "", "tls": "", "x": 1050, "y": 540, "wires": [ [] ] }, { "id": "16322cea.30f4f3", "type": "ui_button", "z": "82a0e2b1.be156", "name": "+ 1 °C", "group": "62b68445.1ceddc", "order": 3, "width": "2", "height": "1", "passthru": false, "label": "+ 1 °C", "tooltip": "", "color": "", "bgcolor": "firebrick", "icon": "", "payload": "100", "payloadType": "num", "topic": "", "x": 130, "y": 380, "wires": [ [ "d34474dd.fa8458" ] ] }, { "id": "ab90e2a6.95fc2", "type": "ui_button", "z": "82a0e2b1.be156", "name": "- 1 °C", "group": "62b68445.1ceddc", "order": 5, "width": "2", "height": "1", "passthru": false, "label": "- 1 °C", "tooltip": "", "color": "", "bgcolor": "#0092b5", "icon": "", "payload": "-100", "payloadType": "num", "topic": "", "x": 130, "y": 420, "wires": [ [ "d34474dd.fa8458" ] ] }, { "id": "d34474dd.fa8458", "type": "ioBroker get", "z": "82a0e2b1.be156", "name": "Schlazimmer, Temperatur (Soll)", "topic": "node-red.0.deconz.0.Sensor_7.heatsetpoint", "attrname": "heatsetpoint", "payloadType": "value", "x": 430, "y": 400, "wires": [ [ "f1878f12.b4c2d" ] ] }, { "id": "f1878f12.b4c2d", "type": "function", "z": "82a0e2b1.be156", "name": "Set_heatsetpoint", "func": "\nvar new_temp = {payload: (msg.heatsetpoint + msg.payload) }\nvar real_new_temp = {payload:new_temp.payload / 100}\n \n\nmsg.method = \"PUT\";\n// here put your own Apikey\nmsg.headers = { \"X-ApiKey\": \"XXXXXXXXX\" };\n\nvar data = {\"heatsetpoint\": new_temp.payload};\nmsg.payload = JSON.stringify(data);\n// here put sensor_id, mine is 7\nmsg.url = \"http://127.0.0.1/api/DB28CD6F62/sensors/7/config\"\n\nreturn [real_new_temp, new_temp, msg]\n\n\n", "outputs": 3, "noerr": 0, "x": 750, "y": 400, "wires": [ [ "8c13faa0.312318" ], [ "6a17be92.3e904" ], [ "ee827496.0baf08" ] ] }, { "id": "6a17be92.3e904", "type": "ioBroker out", "z": "82a0e2b1.be156", "name": "Schlazimmer, Temperatur (Soll)", "topic": "node-red.0.deconz.0.Sensor_7.heatsetpoint", "ack": "false", "autoCreate": "false", "x": 1110, "y": 400, "wires": [] }, { "id": "acd7e601.65e8f8", "type": "comment", "z": "82a0e2b1.be156", "name": "GUI to change Temperature", "info": "value that increases/decreases temperature\nhere: +/- 100 (-> 1°C)\n\nsaved to msg.payload", "x": 160, "y": 340, "wires": [] }, { "id": "2e589afa.4d0426", "type": "comment", "z": "82a0e2b1.be156", "name": "iobroker place to load heatsetpoint", "info": "This is to store the heatsetpoint somewhere\n\nI want to increase or decrease temperature, \nso i have to store it.\nCan be everywhere.\nIs here loaded to change temperature to:\n\nsaved to msg.heatsetpoint", "x": 440, "y": 360, "wires": [] }, { "id": "edd2e760.bdea58", "type": "comment", "z": "82a0e2b1.be156", "name": "iobroker place to store heatsetpoint", "info": "Here the new temperature is stored", "x": 1120, "y": 340, "wires": [] }, { "id": "b30bf85a.5aafc8", "type": "comment", "z": "82a0e2b1.be156", "name": "Gui of new temperature ", "info": "", "x": 1080, "y": 200, "wires": [] }, { "id": "1962d290.5e630d", "type": "comment", "z": "82a0e2b1.be156", "name": "http request", "info": "All information comes from function", "x": 1050, "y": 500, "wires": [] }, { "id": "f07d3e8e.499a6", "type": "comment", "z": "82a0e2b1.be156", "name": "Function to create Api-Call", "info": "Here you have to change your own API Information.\n- API key\n- Sensors ID", "x": 750, "y": 360, "wires": [] }, { "id": "62b68445.1ceddc", "type": "ui_group", "z": "", "name": "Temperatur", "tab": "e70b7e9b.cc318", "order": 2, "disp": true, "width": "6", "collapse": true }, { "id": "e70b7e9b.cc318", "type": "ui_tab", "z": "", "name": "Werte", "icon": "dashboard", "order": 1, "disabled": false, "hidden": false } ]

realwax commented 5 years ago

Can I add a CC2531 to my raspberry in addition to my Conbee so they co-exist as two coordinators on different channels? That would be a 5-8$ solution and quickfix?

rweise commented 5 years ago

Yes you can, and i do it :-) kaykoch is right, deconz has more options and better support. i use a lot of xiaomi stuff. And deconz has often a easy way for automation , because there is an option "lastupdated" that i miss in zigbee. But because, there is no way for easy going with thermostats i use a Zigbee Stick with the iobroker zigbee adapter too . Both works very well und the distance from the 5$ Zigbee Stick to the Thermostate is 6m with a 24cm stonewall in between.

Finally i hope, that dresden-elektronik, will make it happen, that the Spirit Zigbee will work with deconz like it works with zigbee. Normaly, they have a very good support. image And here it is, the red light on deconz and the green one is the zigbee Stick.

rweise commented 5 years ago

And here is your Version :-) image image image

Falls sie aus D sind, ich habe mehrere Sticks ...

realwax commented 5 years ago

Hallo, Bin aus Österreich und habe warte, dass meiner aus China kommt. Da ich nur einen Stick benötige habe ich keinen Flasher etc. Sollte er nicht ankommen, melde ich mich gerne... Danke :)

rweise commented 5 years ago

Nur für Sie. Suchen sie auf Ebay nach jblack_de Schreiben sie mir hier, wann sie mir über eBay ihre Adresse gesendet haben Nichts Kaufen!!! Sie bekommen dann in wenigen Tagen einen völlig kostenlosen Brief Nach Österreich...

Einfach weil ich es kann :-) und gerne helfe ...

realwax notifications@github.com schrieb am Di., 16. Apr. 2019, 19:22:

Hallo, Bin aus Österreich und habe warte, dass meiner aus China kommt. Da ich nur einen Stick benötige habe ich keinen Flasher etc. Sollte er nicht ankommen, melde ich mich gerne... Danke :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1098#issuecomment-483767001, or mute the thread https://github.com/notifications/unsubscribe-auth/ANHUcloaKts41eqCWnYzlAtZmRXz-NQOks5vhgbQgaJpZM4Zz_-1 .

rweise commented 5 years ago

Ich weiß nicht, wie lange die Post braucht. Ich brauche 24h ab Adresszugang zum Versenden 😃

René Weise weise.rene@gmail.com schrieb am Di., 16. Apr. 2019, 20:06:

Nur für Sie. Suchen sie auf Ebay nach jblack_de Schreiben sie mir hier, wann sie mir über eBay ihre Adresse gesendet haben Nichts Kaufen!!! Sie bekommen dann in wenigen Tagen einen völlig kostenlosen Brief Nach Österreich...

Einfach weil ich es kann :-) und gerne helfe ...

realwax notifications@github.com schrieb am Di., 16. Apr. 2019, 19:22:

Hallo, Bin aus Österreich und habe warte, dass meiner aus China kommt. Da ich nur einen Stick benötige habe ich keinen Flasher etc. Sollte er nicht ankommen, melde ich mich gerne... Danke :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1098#issuecomment-483767001, or mute the thread https://github.com/notifications/unsubscribe-auth/ANHUcloaKts41eqCWnYzlAtZmRXz-NQOks5vhgbQgaJpZM4Zz_-1 .

rweise commented 5 years ago

Falls das bei eBay nicht funktioniert. Ich habe mein Postfach bei gmail und mein Benutzername hier ist erster Buchstabe des Vornamen gefolgt vom Nachnamen. Bei Google startet der Nachname von einem Punkt verfolgt. Danach könnten sie es mit Rene vor dem @ probieren 😂 Dabei bitte ebenfalls hier schreiben, das sie eine Nachricht gesendet haben...

realwax commented 5 years ago

@rweise ich habe mich per gmail gemeldet. LG Wolfgang

rweise commented 5 years ago

Ist Unterwegs , viel Spass damit :-)

Am Mi., 24. Apr. 2019 um 13:15 Uhr schrieb realwax <notifications@github.com

:

@rweise https://github.com/rweise ich habe mich per gmail gemeldet. LG Wolfgang

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1098#issuecomment-486180283, or mute the thread https://github.com/notifications/unsubscribe-auth/ADI5I4SBJ4R6C7FDAASRKRTPSA6OJANCNFSM4GOP762Q .

wuast94 commented 5 years ago

I also stumbled over this device recently. The Z-Wave version has the interesting feature of supporting external temperature sensors (which may give more realistic readings than the internal one). Of those that already have the device, do you know if this is (or will be) possible via Zigbee, too? The manufacturer's website is unfortunately very sparse.

i have this question too. is it possible to implement this too to the api ?

ebaauw commented 5 years ago

If you can tell me that, and how, the Zigbee version supports it. I haven’t been able to set this up.

wuast94 commented 5 years ago

i am not so deep in zigbee standard but I found this in a pdf from manufacturer: attribute id: 0x001A Default Value: 0x00 Data type: 0x18 (8-bit bitmap) Read/Write: RW Manufacturer Specific: N0 Reportable: No

I hope this helps you :)

https://eurotronic.org/wp-content/uploads/2019/01/Spirit_ZigBee_BAL_web_DE_view_V9.pdf

ebaauw commented 5 years ago

I found that as well, but it doesn’t give me clue as to how to link the external temperature sensor. I tried setting this attribute and binding the TRV to a Temperature Measurement cluster of one of my Hue motion sensors, but no joy.

wuast94 commented 5 years ago

it sounds like its not possible to send a temp ? and I must "link" another zigbee device with a temp reading with the thermostat ?

from the pdf It sounds like that I must send the actual temp in a 8bit cluster and all should be fine

tkintscher commented 5 years ago

attribute id: 0x001A Default Value: 0x00 Data type: 0x18 (8-bit bitmap) Read/Write: RW

from the pdf It sounds like that I must send the actual temp in a 8bit cluster and all should be fine

I was wondering about this as well. But you can see that the data type is a bitmap (i.e. a bunch of flags to toggle) and not an "int" number (as for the other temperatures in the PDF). deCONZ allows toggling these flags. One of the options is something like "Use external temperature sensor". This can be turned on using the bitmap, but I don't understand how to send the actual temperature.

It was supported in deCONZ already very early, so it seems to be a a standard ZigBee attribute. Yet I wonder if such things are supposed to happen via bindings (which the thermostat doesn't support afaik), then why have this bitmap?

According to the manual it should also be possible to use an external window sensor, but the situation is the same...

Either we inquire with the manufacturer again, or manage to catch them at a trade fair (like IFA in September in Berlin)... ;-)

Tobi0892 commented 5 years ago

I would also be very interested in the Eurotronic, however I am rather new to hass.io and python

manutoky commented 5 years ago

Can anyone give a summary what's working and what not? I'm looking for thermostats and already have a Conbee II stick so i'd like to use that for controlling the thermostats. Thanks!

embeddeddev commented 5 years ago

I can tell you what's working in combination w/ Home Assistant frontend:

  1. Reading temperature values from temperature sensor
  2. Setting setpoint/target temperature
  3. Turning device off

What's not working:

  1. Setting HVAC/system mode to off though announced as possible HVAC mode
  2. Enabling remote sensing (as I understood its possible to set a remote temperature sensor; makes sense when thermostat is near ground/ceiling level and has too low/values to regulate expected room temperature)

Didn't investigated further where the problems are located, but I think enabling remote sensing is an internal ZigBee network's/device's option and has to be solved in deCONZ so far.

ebaauw commented 5 years ago

as I understood its possible to set a remote temperature sensor

How? I haven’t been able to set that up on the ZigBee version of the Eurotronic Spirit.

cinemarene commented 5 years ago

How can I change the valve position value via the API when I am in TRV mode "Unknown 2"? If I call "http://localhost/api/XXXX/sensors/2/state" via PUT with the content "{"valve": 127}", then I get "[{}]" as return. If I do this via the deCONZ app, the value is changed directly.

ebaauw commented 5 years ago

You can only PUT the state of CLIP sensors, not of ZigBee sensors. The REST API doesn’t support setting the valve position directly, only thru the temperature setpoint.

cinemarene commented 5 years ago

Must have missed it in the API documentation. Is it planned for future versions?

ebaauw commented 5 years ago

No. There's no API support for TRV mode either.

Why would you want this? Are you writing your own PID controller?

cinemarene commented 5 years ago

Yes with dependencies e.g. "at home", "not at home" and "on vacation". Or outside temperature and room temperature. Or solar radiation into the room, so that the system also knows that the room is being heated by the sun.

ebaauw commented 5 years ago

I'm sorry, I don't understand what you're trying to achieve. Isn't it way easier just to set the target temperature and let the TRV handle the valve position?

Outside temperature or room being heated by the sun are relevant when you have a single room thermostat driving the central heating boiler and you still want to heat other rooms. The TRV only drives a single radiator, only influencing the temperature of the room it's in.

cinemarene commented 5 years ago

Just imagine it's early in the morning and you controlled the thermostat through your Smarthome control panel by time. So the sun rises, but it's cloudy. The valve opens 80%. Same scenario, but it's not cloudy. The sun shines into the room, the valve opens only 20%, because the sun heats the room supporting. If I set this above the target temperature e.g. to 22 degrees, the valve stands up much further than it should. In addition, the heat accumulates at one point on my radiator and an external thermostat is obligatory. I would have to set it to 26 degrees, although the room should only have 22 degrees, so that the valve does not close too early by mistake. Sounds all confusing but makes more sense in my case. Therefore also the question whether it would be a lot of effort for you to implement this.

embeddeddev commented 5 years ago

No. There's no API support for TRV mode either. Why would you want this? Are you writing your own PID controller?

I'd support this, too.

Since I found no way to link the TRV to a remote temperature sensor so far after trying around w/ device bindings and reading ZigBee spec + TRV docs. (Sceanrio was: Thermostatas near ground w/ wrong/too low temperature values so that regulation is faulty because of wrong feedback values)

As solution only was to work around this problem is to implement / use an PID algoirithm/template in Home Assistant or NodeRed and link these entities on higher application level.

As @cinemarene described this solution provides much more possibilities like time and based automations.

ebaauw commented 5 years ago

Implementing direct valve position control would involve creating config resources for setting the target valve position and TRV mode, and maybe a state resource to report the actual TRV mode. I’m still seeing occasional hiccups where deCONZ temporary loses the route to the TRV, so it might be prudent to update these using the config.pending mechanism. That’s a fair amount of work.

Personally, I daren’t set the valve position before the routing issues are resolved. I’m actually quite happy with the TRV’s PID algorithm, where needed using the temperature offset to correct the TRV’s measurement. My challenge is to align the setting of the room thermostat of my central heating to the TRV setting (whose PID algorithm gets thrown off when the boiler is not providing heated water), so I won’t be working on valve position control anytime soon.

embeddeddev commented 5 years ago

I’m still seeing occasional hiccups where deCONZ temporary loses the route to the TRV

Yeah, that would be quite error-prone and could end up in a sauna, especially since one of my thermostats looses connection for longer periods actually, too ;-)

I’m actually quite happy with the TRV’s PID algorithm, where needed using the temperature offset to correct the TRV’s measurement.

I agree, the implementation of another PID would be a workaround only. In the meantime I'll play a bit around w/ the temperature offset and maybe have a deeper look into the remote sensor thing.

Tobi0892 commented 5 years ago

I can't get deCONZ to detect my Spirit ZigBee. I opened the deCONZ web app and chose add new sensor. Next, I put the thermostat into pairing mode (sceen shows INS) by inserting the batteries and installed it to the radiator. However, the conbee II stick / deCONZ web app does not detect my devices (tried 2 of them). I tried it several times, also with new batteries. I even put the thermostat directly next to the stick - nothing worked.

How did you manage to pair deCONZ and the Spirit Zigbee?