(EDGE Driver-Mc): Zigbee Temp Sensor and Child Thermostat Mc, Zigbee Temp Sensor with Thermostat Mc

Ok, maybe…
But for me, I have 4 Rules API and all stopped working a few months ago :frowning:

Don’t know why…

I have also had API Rules stop working. I generally go into the AWA and disable and then re-enable the rule. That seems to fix it.

Already tried and no luck…

I finally had a little time to look at the API problem…
So, my problem was related to the Shelly PM capability. Because when I first set the API rules, the Shelly PM had the capability “energyMeter” and the attribute “energy”.
And now, they’ve changed it to capability “powerMeter” and the attribute “power”.

So I just had to change this on my API rules, and now they are working again.

1 Like

So I followed your advice and I made 2 API rules.
The goal: Someone is taking a bath and it didn’t turned on the dehumidifier before.
I’ll explain what I did, in case of someone needs it.

First, I created a virtual device “Number Fields and Calculations”.
Then I made 2 API rules:

1st API rule: Bathroom Humidity %

{
 "name": "Bathroom Humidity %",
  "actions": [
    {
      "if": {
        "changes": {
         "operand": {
         "device": {
          "devices": [
           "ID_OF_THE_BATHROOM THERMOMETER"
          ],
          "component": "main",
		  "capability": "relativeHumidityMeasurement",
		  "attribute": "humidity"
        }
       }
      },		
      "then": [
       {
        "command": {
            "devices": [
            "ID_OF_THE_VIRTUAL_DEVICE"
            ],
            "commands": [
            {
                "component": "main",
                "capability": "legendabsolute60149.numberFieldTwo",
                "command": "setNumberFieldTwo",
                "arguments": [
                {
                    "device": {
                    "devices": [
                        "ID_OF_THE_BATHROOM THERMOMETER"
                    ],
                    "component": "main",
                    "capability": "relativeHumidityMeasurement",
                    "attribute": "humidity"
                    }
                }
                ]
            }
            ]
        }
       }
       ]
	  }
	}
	]
}

2nd API rule: Bathroom Humidity % every 5 minutes

{
  "name": "Bathroom Humidity % every 5 minutes",
  "actions": [
    {
       "every": {
           "interval": {
            "value": {
                  "integer": 5
            },
              "unit": "Minute"
           },
	   "actions": [
		 {
			"command": {
			  "devices": [
				"ID_OF_THE_VIRTUAL_DEVICE"
			  ],
			  "commands": [
				{
				  "component": "main",
				  "capability": "legendabsolute60149.numberFieldOne",
				  "command": "setNumberFieldOne",
				  "arguments": [
					{
					  "device": {
						"devices": [
						  "ID_OF_THE_BATHROOM THERMOMETER"
						],
						"component": "main",
						"capability": "relativeHumidityMeasurement",
						"attribute": "humidity"
					  }
					}
				  ]
				}
			  ]
			}
		  }
		]
	      }
	  }
  ]
}

So now I have the real time humidity % on the Field2 and every 5 minutes I’ll update that value to the Field1.
The Formula to Calculate is: 2-1

Finally, I made an automation:

Explanation:

  • Pre-condition - Dehumidifier is off
  • Calculation Result of the “Number Fields and Calculations” >= 5
  • Then turn on the Dehumidifier.

So, in a 5 minutes period, if the humidity % goes up to 5% (or more), then I’ll assume someone is taking a bath :slight_smile:

2 Likes

@Mariano_Colmenarejo Could you please add this ThirdReality temperature and humidity sensor to your driver when you get the chance please? I would appreciate it!

Hi @Docga , Unfortunately Mariano is taking a break away from SmartThings and this community, so you’re unlikely to get a reply from him in this thread.

If you have the abilities, you can make a copy of his driver code and create your own driver with this fingerprint.

DocgaNick - Third Reality has an Edge Driver for the Temp & Humidity Sensor on their Third Reality Driver Channel

I am aware. I would like to use the thermostat capabilities that are specific to Mariano’s driver. The other Third Reality temp/humidity sensor I have, the one with the screen, also reports at more frequent intervals and I wonder if that was something also specific to Mariano’s driver because that part can be configured in the settings. The sensor I am referring to is the other one by Third Reality that doesn’t have a screen.

Anybody have an issue where you change the thermostat heating or cooling temperature it doesn’t stick? Mine is defaulting to 68 F and if I change it to 70 it either pops back down to 68 F or up to 155 F and I can’t do anything to change it.

Good morning, I would like to add these two objects, they are temperature and humidity sensors that I would like to use as room thermostats. At the moment, Mariano’s driver is not among those selectable.

The first:
Device Name: HEIMAN Multipurpose Sensor
Device Profile: humidity-temp-battery
Model HT-EF-3.0
Type ZIGBEE
Device ID: b731d13d-bd74-4ba0-b677-d217ba34f06b
Presentation ID: d4a861e7-b408-3661-8861-8bcaefe4d069

The second:
Device Name: HEIMAN Multipurpose Sensor
Device Profile: humidity-temp-battery
Model HT-EF-3.0
Type ZIGBEE
Device ID: 60cf3a64-a3ea-4e85-bdf5-b1077867206b
Presentation ID: d4a861e7-b408-3661-8861-8bcaefe4d069

Who can help me?
Thankyou!

Unfortunately Mariano is taking a break from the SmartThings community, so you are not likely to get a reply from him.

You can make a copy of his driver codes which are posted on GitHub and add these fingerprints.

2 Likes

These look like the same fingerprint/manufacturer for TWO devices, right? It has to be because there are two different deviceID’s with the same Model and same PresentationID. What edge driver are these devices using?

Sounds like you just need to add a new fingerprint for that device into the driver, and as @Paul_Oliver mentioned, the original developer has stepped away for a break, but you can always make your own copy of the driver.

1 Like

Can you explain to me how to create a copy of the driver and add the fingerprint of my devices?
Thankyou

Easy way (to use stock drivers):
Use the Edge Driver Builder - SmartThings Developers tool:

  • Select device (need to be already paired to the hub), click next and then “Modify Configuration”. Follow the instructions.

The selected stock driver / profile will be applied to you device, you will need to do this for every device that you add. If you remove and repair the device, you will need to do this again.

1 Like

The process isn’t too difficult, but if you’re not familiar with editing code and using ST’s CLI tool, it may seem overwhelming at first. It’s doable if you’re willing to learn, have some patience, and use the information within this community to help answer questions I know you will have.

One thing for sure is that you will need a copy of the code. Thankfully, Mariano has made much of code available on GitHub.

This is his repository:

And this is the specific edge driver you need:

You’ll see in that directory structure a file titled “fingerprints.yml”. It’s that file you need to edit. Besides the model, you also need the manufacturer for that device, so without making this reply very long, search the community for “Zigbee Thing Mc”, or reference this topic:

You do not need your own GitHub repository. You just need the code on your computer so you can make any changes, and because ST’s CLI runs on your computer to create your edge driver.

So speaking of ST’s CLI, you need that on your computer. You can’t create an edge driver without it, or manage the drivers you created.

Here’s the tutorial to get you started:

Mostly everything you need to know on how to create your own driver, channel, and how to publish is in that tutorial, including other developer documentation.

1 Like

Hi!

I added a fingerprint for the Sonoff Thermometer with probe (SNZB-02LD) to my local copy of the Edge driver and created a new device profile using the CLI:

smartthings deviceprofile:create -i temp-therm-battery-05.yml

I rebuilt the package and reinstalled the driver. The device was recognized, but the detail view still shows a Humidity tile, which this device does not support. Interestingly:

  • The dashboard view does not show humidity.

  • The device settings still include a humidity offset.

  • I did not create or publish a new device-config or presentation.

When I check the device info using:

smartthings devices <deviceId>

smartthings deviceprofiles <profileId>

…I see that the device is using the ‘temp-humid-therm-battery-05’ profile instead of the new one I created (temp-therm-battery-05), even though I published the new profile.

The driver functions correctly and meets my needs, but I’d like to clean up the presentation and understand why the newly created profile isn’t being used.

Any insight or pointers would be appreciated! Thanks in advance.

Can someone walk me through how to adjust the temperature offset on a SONOFF SNZB-02D sensor when using a SmartThings Hub v3? I’m not sure where to start.

Edit: I’m able to change the temperature offset in the Android app, but I haven’t found a way to do this through the SmartThings web interface.

Hi

Great driver.

Is there a version to allow fan control based on humidity?

Thanks

Hello,

The thermostat doesn’t have code to control the fan based on humidity. It only controls it based on temperature.

You can do this independently with local routines in the app, without using the fan status capability, since the thermostat manages that status to turn the fan on and off based on the temperature and selected fan mode: auto, on, circulation, or schedule.
I don’t know if this answers your question.
Regards.

2 Likes