Skip to content

DDF for OWON THS317-ET Multisensor (temp probe support) - #5777

Merged
manup merged 1 commit into
dresden-elektronik:masterfrom
Stim04:ddf_for_OWON_THS317-ET
Mar 15, 2022
Merged

manup merged 1 commit into
dresden-elektronik:masterfrom
Stim04:ddf_for_OWON_THS317-ET

Conversation

@Stim04

@Stim04 Stim04 commented Feb 10, 2022

Copy link
Copy Markdown
Contributor

This is a DDF I created for this sensor with the help of @Smanar and @Mimiix. It actually works pretty well for reading the temperature cluster, the battery and the sw version, but this sensor is supposed to report humidity and is also a PIR sensor.
As you can see on the screenshots provided in issue #5738 it probably lack some cluster for these other features to be supported by deCONZ so if someone have a sniffer and this device, feel free to contribute to make other commands usable.
As requested the DDF has been set up to Bronze status.

This is a DDF I created for this sensor with the help of @Smanar and @Mimiix. It actually works pretty well for reading the temperature cluster, the battery and the sw version, but this sensor is supposed to report humidity and is also a PIR sensor.
As you can see on the screenshots provided in issue #5738 it probably lack some cluster for these other features to be supported by deCONZ so if someone have a sniffer and this device, feel free to contribute to make other commands usable.
As requested the DDF has been set up to Bronze status.
@Stim04

Stim04 commented Feb 10, 2022

Copy link
Copy Markdown
Contributor Author

Hmmm think I messed up when I wanted to rename PR #5676 and then I tried to delete it as it was named patch-1 by default. Do I have to open a new one or it's ok as we can still see the file here

@Smanar

Smanar commented Feb 10, 2022

Copy link
Copy Markdown
Collaborator

IDK, we can't found the branch Stim04:ddf_for_OWON_THS317-ET but the PR look valid.
If someone have a better look than me ?

@Stim04

Stim04 commented Feb 10, 2022

Copy link
Copy Markdown
Contributor Author

yes I deleted the patch-1 branch because after I renamed it ddf_for_OWON_THS317-ET it automatically closed PR #5776. That's what I should not have done I think, as it also seems to have deleted this branch in repository

@Smanar

Smanar commented Feb 10, 2022

Copy link
Copy Markdown
Collaborator

Don't worry, if it don't work, someone will react here.
And if you are on holiday I will remake the PR myself, it's just one file.

@Stim04

Stim04 commented Feb 10, 2022 •

Copy link
Copy Markdown
Contributor Author

All right thanks. Also not sure how to link this to issue 5738, the commands from the help section don't seem to work in preview mode. Probably only authorized people like you can do it

@Smanar Smanar linked an issue Feb 10, 2022 that may be closed by this pull request
@Smanar

Smanar commented Feb 10, 2022

Copy link
Copy Markdown
Collaborator

Done.

@manup

manup commented Feb 27, 2022

Copy link
Copy Markdown
Member

Hi so I guess this one can be merged or does another PR need to be merged first?

@Smanar

Smanar commented Feb 27, 2022

Copy link
Copy Markdown
Collaborator

For me you can merge it.
IDK for missing sensor, but they are not present on other zigbee project too

https://www.zigbee2mqtt.io/devices/THS317-ET.html

And they are no more usable cluster, so can be a firmware/hardware issue too.

@Stim04

Stim04 commented Feb 27, 2022 •

Copy link
Copy Markdown
Contributor Author

Hello, probably need to use one of the OWON gateways to be able to use all functions.
https://www.owon-smart.com/zigbee-gateways/
Reading the manufacturer pdf it looks like everything is "optional" on the device, so I might have a temperature one only.
https://www.owon-smart.com/uploads/Quick-Start-Guide-PIR323-ZigBee-Multi-Sensor1.pdf

@Smanar

Smanar commented Feb 27, 2022

Copy link
Copy Markdown
Collaborator

Yep lol, what does mean "optionnal" for them ? I don't think you can add sensors the to device ?

@Stim04

Stim04 commented Feb 27, 2022

Copy link
Copy Markdown
Contributor Author

I have no idea but according to the pdf everything is "optional" even the temp probe.. so I guess you could buy a multisensor that does... Zigbee only with no sensors at all, which is interesting.
More seriously there is something that looks like PIR sensor on the front of my device, but it might be a dull one as it is "optional".

@Stim04

Stim04 commented Feb 27, 2022

Copy link
Copy Markdown
Contributor Author

@Smanar
Think I got it, here is the models numbers and the features for this Multi-sensor from OWON. I guess evrything is crystal clear now !
https://www.owon-smart.com/uploads/Datasheet-PIR323-ZigBee-Multi-Sensor1.pdf
sensorowon

@manup manup added this to the v2.15.0-beta milestone Mar 15, 2022
@manup
manup merged commit f6d14c7 into dresden-elektronik:master Mar 15, 2022
@Stim04

Stim04 commented May 25, 2022 •

Copy link
Copy Markdown
Contributor Author

Hello @Smanar ,

Unfortunately I have bad news about this device (mine is still working fine with february beta firmware.. i'm not home so no updates). Concerning the difficulty to pair it to the Conbee 2 I think we narrowed the problem pretty well and the only solution that seems to work in case battery or temperature isn't showing correctly on Phoscon is to reset it and pair it again, as many times as it takes to make it report everything correctly. Sometimes it takes up to an hour or more to make everything readable when you pair it.

However, I have at least two persons on the Jeedom forums that have a totally different problem that we could not solve. Their device is constantly reporting every 3 seconds. Battery last only a week due to this behaviour. Of course they tried to tweak the min max and change values.

Any clue? Was their any change on the ddf values format (like the number of zeros in the change 0x0.. values or something similar in latest updates?)

@Smanar

Smanar commented May 25, 2022 •

Copy link
Copy Markdown
Collaborator

For the pairing issue, prevent the device going to sleep during the inclusion is a good method. But deconz have some watchdog, if the inclusion is not finished (for exemple a binding is not finished) deconz can detect it and retry later, so the device can work itself later (the device is sleeping, so deconz wait for the device is awake to retry to send the request)

For the 3s reporting, I m seing the issue on your jeedom forum.
This device don't have poll cluster, so we can play only on reporting setting.
There is not a reset procedure and a pairing procedure ? It s the same one ?
So I don't think it's usefull to remove battery as for me when the user re-include the device it reset all previous binding/reporting.

But take care if the DDF is not active BEFORE the inclusion, the legacy code can make some config, and later the DDF make another one.

On your DDF, the only part that can "hurt my eyes" is the battery binding/reporting.
They can try without this part, as we can't remove the temperature part for tests.

    {
      "bind": "unicast",
      "src.ep": 3,
      "cl": "0x0402",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x29",
          "min": 60,
          "max": 600,
          "change": "0x00000014"
        }
      ]
    }

And here can try to increase the mini, but value are standard, it the one used by defaut on deconz.

{
  "schema": "devcap1.schema.json",
  "manufacturername": "OWON",
  "modelid": "THS317-ET",
  "product": "THS317-ET",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_TEMPERATURE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x03",
        "0x0402"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/offset",
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
            "name": "config/battery",
            "parse": {"cl": "0x0001", "at": "0x0021", "eval": "Item.val = Attr.val"},
            "awake": true
        },
        {
          "name": "state/lastupdated"
        },
          {
          "name": "state/temperature",
          "awake": true,
          "read": {
            "at": "0x0000",
            "cl": "0x0402",
            "ep": 3,
            "fn": "zcl"
          },
          "parse": {
            "at": "0x0000",
            "cl": "0x0402",
            "ep": 3,
            "eval": "Item.val = Attr.val",
            "fn": "zcl"
          }
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 3,
      "cl": "0x0402",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x29",
          "min": 300,
          "max": 600,
          "change": "0x00000014"
        }
      ]
    }
  ]
}

@SwoopX

SwoopX commented May 25, 2022 •

Copy link
Copy Markdown
Collaborator

From my perspective, the reason for such an intense battery drain is that the device gets hammered by battery and temperature reads, due to the configuration. You shouldn't apply read functions without any "refresh.interval" being greater than your max reporting interval, even worse is omitting it on light sleepers. I'd propose the below as it:

  • Sets the DDF to Gold, ensuring the newer DDF code gets applied
  • Fixes the missing battery endpoint and corrects the battery reading
  • Removes the temperature parsing functions (as defaults can be used)
  • Changes battery reporting to hourly and temperature reporting to report only +/-0.5° deviations
{
  "schema": "devcap1.schema.json",
  "manufacturername": "OWON",
  "modelid": "THS317-ET",
  "product": "THS317-ET",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_TEMPERATURE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x03",
        "0x0402"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/offset"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "config/battery",
          "parse": {
            "at": "0x0021",
            "cl": "0x0001",
            "ep": 3,
            "eval": "Item.val = Attr.val / 2",
            "fn": "zcl"
          }
        },
        {
          "name": "state/lastupdated"
        },
          {
          "name": "state/temperature"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 3,
      "cl": "0x0001",
      "report": [
        {
          "at": "0x0020",
          "dt": "0x21",
          "min": 3600,
          "max": 3600,
          "change": "0x00000001"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 3,
      "cl": "0x0402",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x29",
          "min": 1,
          "max": 600,
          "change": "0x00000032"
        }
      ]
    }
  ]
}

@Stim04

Stim04 commented May 25, 2022 •

Copy link
Copy Markdown
Contributor Author

Thanks for your help guys i'm going to let them try those changes.

There is not a reset procedure and a pairing procedure ? It s the same one ?

There is a reset procedure -> Hold button for 10 seconds.
To pair it you just have to short press it once (light blink red then green when paired), which also triggers a "refresh" or "read" of values if it's already paired to a gateway (flashing green twice)

@Smanar

Smanar commented May 26, 2022 •

Copy link
Copy Markdown
Collaborator

Ok so better to use the full procedure with the reset one.

On the Swoop DDF, I think for battery bind, better to use the attribute 0x0021 (battery percentage) as it's the one you use on the DDF above.

And can add the "refresh.interval" he have speaked if you sill have issue to try, they are finally missing on the DDF

          {
              "name": "state/temperature",
               "refresh.interval": 3600
          } 

To try to force a poll every hour if reporting is not working.

@Stim04

Stim04 commented May 26, 2022 •

Copy link
Copy Markdown
Contributor Author

yea I get it. One of them already saw my message and is trying your changes. About the refresh interval I'm going to write a little something to make sure they try this.
Again thank you for them :)

PS: one thing I did not understand is the min 1 sec on the temperature reading on @SwoopX 's DDF.

@SwoopX

SwoopX commented May 26, 2022

Copy link
Copy Markdown
Collaborator

Please stop fiddling around with reads and refresh intervals for battery powered sensor nodes, as this can horribly go wrong as you already experienced, unless you know wxactly what you're doing. The legacy device code NEVER polls any data from battery powered devices.

From my experience, there's only very rare cases where you actually need to deviate from the above.

Min 1 is: fire the temperature report instantly, when the temp changes +/- 0.5. With 60, it waits 1 minute. It's just more crisp.

@Stim04

Stim04 commented May 26, 2022

Copy link
Copy Markdown
Contributor Author

As i can't try myself the changes (very far from home until august) we will have to wait for the feedbacks from the people that have the problem. Both of them read my message about your suggestions on Jeedom forums.
Thanks

@Smanar

Smanar commented Aug 7, 2022

Copy link
Copy Markdown
Collaborator

Someone know waht is the status for this device ?
To know If I need to edit something ? To know if I can change the status to "Gold" or Silver" ?

@Stim04

Stim04 commented Aug 7, 2022

Copy link
Copy Markdown
Contributor Author

Hey,
I'm afraid mine got chewed by the dog and fell in the swimming pool. I guess it's still partly working as some people reported only battery % problems mostly, but pairing has always been edgy on my side too but once it was correctly done I had no issue with it (in Gold status)

@Smanar

Smanar commented Aug 7, 2022

Copy link
Copy Markdown
Collaborator

Lol.
And you are using the defaut one (just have edited the status ?)

Someone with battery issue have tried the Swoops DDF ? #5777 (comment)

To check if it's better ?

@Stim04

Stim04 commented Aug 7, 2022 •

Copy link
Copy Markdown
Contributor Author

Oh I'm sorry but I didn't express myself well enough. Mine is out of order. I was saying that considering the jeedom post they can manage to read the temperature fine but some have battery issue and/or refresh rate issue (too fast, like every second or so).

I read some of them tried the Swoop DDF but with no change on battery and/or refresh rate. Mine was working perfectly until dog and water came in the equation.

@Smanar

Smanar commented Aug 7, 2022 •

Copy link
Copy Markdown
Collaborator

I m sorry but I can do nothing for your dog ^^

Link on jeedom forum https://community.jeedom.com/t/owon-ths317-et-avec-deconz-appairage-non-visible-dans-jeedom/81301

I have read the link (fastly) and I don't understand how it can work on some users and not others .... No sures all are using the same one.
The more boring issue for me is the battery drain.

@Smanar Smanar mentioned this pull request Aug 30, 2022
@aldoushx

aldoushx commented Jun 7, 2023

Copy link
Copy Markdown

Hi all,

Sorry to unearth this topic, but i still don't manage to make this device work.
To avoid multiplying the topics, you can see what is not working with my sensor and deconz here :

#5738 (comment)

Any idea on what to do next ?

@Smanar

Smanar commented Jun 7, 2023

Copy link
Copy Markdown
Collaborator

Next here > #5738

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

THS317-ET by OWON

5 participants