Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add update frequency /ac frequency precision to SDM01v1.5 #8792

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

ghoz
Copy link
Contributor

@ghoz ghoz commented Feb 10, 2025

adds update frequency to define how often the device should push data updates
adds ac frequency precision option to make the AC frequency reporting more useful (you can see the spikes when the energy market adds or remove load to the grid...) maybe the default precision of 0 is not right and should be changed to 2 globally ?

tested on an very spamy SDM01 that got a firmware update on a tuya gateway, and now reacts as a SDM01v1.5 (same data points), although it is not recognized as such

Allow changing the ac_frequency precision (current default of 0 make it mostly useless)
SDM01v1.5 has a configurable poll interval rather than spam the network tha was in SDM01
Note: updating SDM01 firmware on a tuya bridge make it work like an SDM01v1.5, but still identifies as a SDM01
@ghoz
Copy link
Contributor Author

ghoz commented Feb 10, 2025

Related to that , not sure how actually identify my updated SDM01, it has the same signature as before the firmware update...

database before update
{
  "id": 80,
  "type": "Router",
  "ieeeAddr": "0x0cae5ffffe3449e7",
  "nwkAddr": 59782,
  "manufId": 4098,
  "manufName": "_TZE204_ugekduaj",
  "powerSource": "Mains (single phase)",
  "modelId": "TS0601",
  "epList": [
    1
  ],
  "endpoints": {
    "1": {
      "profId": 260,
      "epId": 1,
      "devId": 81,
      "inClusterList": [
        0,
        4,
        5,
        61184
      ],
      "outClusterList": [
        25,
        10
      ],
      "clusters": {
        "genBasic": {
          "attributes": {
            "65503": "�� /i�� /i�� /i�� /i�� /i�� /i�� /i�� /i�� /i",
            "65506": 31,
            "65508": 0,
            "65534": 0,
            "modelId": "TS0601",
            "manufacturerName": "_TZE204_ugekduaj",
            "powerSource": 1,
            "stackVersion": 0,
            "dateCode": "",
            "zclVersion": 3,
            "appVersion": 70,
            "hwVersion": 1
          }
        }
      },
      "binds": [],
      "configuredReportings": [],
      "meta": {}
    }
  },
  "appVersion": 70,
  "stackVersion": 0,
  "hwVersion": 1,
  "dateCode": "",
  "zclVersion": 3,
  "interviewCompleted": true,
  "meta": {
    "configured": 217189513
  },
  "lastSeen": 1737369003413
}
database after update
{
  "id": 80,
  "type": "Router",
  "ieeeAddr": "0x0cae5ffffe3449e7",
  "nwkAddr": 9354,
  "manufId": 4098,
  "manufName": "_TZE204_ugekduaj",
  "powerSource": "Mains (single phase)",
  "modelId": "TS0601",
  "epList": [
    1
  ],
  "endpoints": {
    "1": {
      "profId": 260,
      "epId": 1,
      "devId": 81,
      "inClusterList": [
        0,
        4,
        5,
        61184
      ],
      "outClusterList": [
        25,
        10
      ],
      "clusters": {
        "genBasic": {
          "attributes": {
            "65503": "��</i��</i��</i��</i��</i��</i��</i��</i",
            "65506": 31,
            "65508": 0,
            "65534": 0,
            "modelId": "TS0601",
            "manufacturerName": "_TZE204_ugekduaj",
            "powerSource": 1,
            "stackVersion": 0,
            "dateCode": "",
            "zclVersion": 3,
            "appVersion": 70,
          }
        }
      },
      "binds": [],
      "configuredReportings": [],
      "meta": {}
    }
  },
  "appVersion": 70,
  "stackVersion": 0,
  "hwVersion": 1,
  "dateCode": "",
  "zclVersion": 3,
  "interviewCompleted": true,
  "meta": {
    "configured": 217189513
  },
  "lastSeen": 1739214488291
}

only thing I see is endpoints[1].cluster.genBasic.attributes.hwversion:1 that disapeared after the update...

src/devices/tuya.ts Outdated Show resolved Hide resolved
@Koenkk Koenkk merged commit 80e718a into Koenkk:master Feb 10, 2025
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Feb 10, 2025

Thanks!

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.

2 participants