Tedee Smart lock MQTT integration through NodeRed

I’ve developed a NodeRed flow that communicated with Gerda Tedee API (currently v1.25) based on MQTT messages. The flow and the required setup steps are available here: https://gitlab.com/matfiz/tedee-nodered

Integration with OH3 is quite straightforward. Just create things with MQTT binding:

Thing mqtt:topic:tedee-front "Lock front" (mqtt:broker:mosquitto) @ "gGroundFloor" {
Channels:
    Type switch : lock     "Lock"                [ stateTopic="tedee/lock", commandTopic="tedee/set/lock",on="locked", off="unlocked" ]
    Type number : battery "Battery" [ stateTopic="tedee/status", transformationPattern="JSONPATH:$.lockProperties.batteryLevel"]
    Type string   : last_state_change "Last state changed" [ stateTopic="tedee/status", transformationPattern="JSONPATH:$.lockProperties.lastStateChangedDate"]
    Type number   : state "State" [ stateTopic="tedee/status", transformationPattern="JSONPATH:$.lockProperties.state"]
}

And add the items of your choice:

Switch tedeeLockFront "Front door [%s]" <button> (gFrontDoorLock) ["Switch"] { channel="mqtt:topic:tedee-front:lock", profile="transform:MAP", function="tedee" }
Switch tedeeLockFrontStatus "Front door - status [%s]" <button> (gFrontDoorLock) { channel="mqtt:topic:tedee-front:state", profile="transform:MAP", function="tedee" }
Switch tedeeLockFrontDateChanged "Front door - last change [%s]" <button> (gFrontDoorLock) { channel="mqtt:topic:tedee-front:last_state_change" }
Number tedeeLockFrontBattery "Front door lock battery [%d %%]" <battery> (gFrontDoorLockBattery, gBatteryLevels) ["Status", "LowBattery"] { channel="mqtt:topic:tedee-front:battery" }

In addition, I’ve used a map to convert between Tedee states and some meaningful strings.

tedee.map
locked=Zamknięty
unlocked=Otwarty
ON=Zamknięty
OFF=Otwarty
=Nieznany
0=Nieskalibrowany
1=Kalibruje się
2=Otwarty
3=Częściowo Zamknięty
4=Otwiera się
5=Zamyka się 
6=Zamknięty
7=Zaciągnięty
8=Zaciąga się
9=Nieznany
18=Aktualizuje się

Finally, the lock can be operated from the sitemap:

Switch  item=tedeeLockFront icon='door' label='Drzwi frontowe [MAP(tedee.map):%s]'
Text item=tedeeLockFrontBattery
Text item=tedeeLockFrontStatus
Text item=tedeeLockFrontDateChanged

I hope it will help you to integrate your Tedee with OH3.

Ugh, I’ve just got a message that the repository has been private :person_facepalming:, I’ve made it public now: Grzegorz Brzezinka / Tedee Nodered · GitLab, sorry!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.