Integration Solutions using MQTT

Rules API for Zigbee to MQTT sending (when Zigbee temperature measurement changes):

{
  "name": "Temperature Changes - MQTT",
  "actions": [
    {
      "if": {
		"not": {
			"equals": {
			"left": {
            "device": {
              "devices": [
                "id zigbee device"
				],
				"component": "main",
				"capability": "temperatureMeasurement",
				"attribute": "temperature"
				}
			},
			"right": {
            "device": {
              "devices": [
                "id mqtt device"
				],
				"component": "main",
				"capability": "temperatureMeasurement",
				"attribute": "temperature"
				}			
			}
			}
        },
        "then": [
          {
            "command": {
              "devices": [
                "id mqtt device"
              ],
              "commands": [
                {
                  "component": "main",
                  "capability": "partyvoice23922.vtempset",
                  "command": "setvTemp",
                  "arguments": [
                    {
                      "device": {
                        "devices": [
                          "id zigbee device"
                        ],
                        "component": "main",
                        "capability": "temperatureMeasurement",
                        "attribute": "temperature"
                      }
                    }
                  ]
                }
              ]
            }
          }
        ]
	}
	}
	]
}

Copy rule and just change device ids. Don’t change anything else.

3 Likes