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

WIP: LCD T&H with date/time display #641

Open
wants to merge 7 commits into
base: SDK3
Choose a base branch
from
Open

Conversation

jepke
Copy link
Contributor

@jepke jepke commented Jan 3, 2024

Need to figure out on which DP to put the time. And likely update on any message. They get out of sync by a minute within the hour.

@jepke
Copy link
Contributor Author

jepke commented Jan 3, 2024

@JohanBendz

I'd like to ask for help.

2024-01-03T21:57:22.348Z [log] [ManagerDrivers] [Driver:lcd_th_sensor] [Device:8862b603-79ea-41f3-8ca0-40f140cf33ee] measure_humidity | relativeHumidity - measuredValue (humidity): 67
  zigbee-clusters:cluster ep: 1, cl: tuya (61184) unknown command received: ZCLStandardHeader {
  frameControl: Bitmap [ clusterSpecific, directionToClient ],
  trxSequenceNumber: 81,
  cmdId: 36,
  data: <Buffer 0c 00>
} { dstEndpoint: 1 } +231ms
  zigbee-clusters:endpoint ep: 1, cl: tuya (61184), error while handling frame unknown_command_received {
  meta: { dstEndpoint: 1 },
  frame: ZCLStandardHeader {
    frameControl: Bitmap [ clusterSpecific, directionToClient ],
    trxSequenceNumber: 81,
    cmdId: 36,
    data: <Buffer 0c 00>
  }
}

Correct me if i'm wrong but i believe the above request is send by the sensor to request for date/time in some format likely epoch or something. But for the life of me i can't find how to answer with code and or if im actually looking at the request for time update.

@JohanBendz
Copy link
Owner

JohanBendz commented Jan 4, 2024

Hi there @jepke, not sure I get the issue here.. your PR is quite a mess with two drivers and images and icons etc that do not match.. is this an early trial to get something working? Perhaps better to start an issue and ask for me to have a look at your code?

@jepke
Copy link
Contributor Author

jepke commented Jan 4, 2024

Yea i need to fix that up, based all my PR's off SDK3 branch but something is funky with that app.json file that gets regenerated by homey app install or something i dont know. Might be something else i do locally. It started happening after #581. For now this is that last device i have my hands on that doesnt work. Once the majority is in SDK3 i need to rebase everything i have locally.

TS0601
_TZE200_locansqn
image

this is the device i have which can display date and time but there's no code to actually send date/time or respond to its request to get date/time. So when the device is booted it just shows/starts at 00:00 00/00
i've googled and found they got it fixed in a few projects but reading up on that code i still dont know the DPID and if its even in the tuya specific cluster.

I found something that suggested 0x24 is the request command for date/time which equals 36 in decimal which makes me believe the debug output from my last message is the device its request for date/time value.

@obetsak
Copy link

obetsak commented Jan 5, 2024

@jepke The app.json is nothing you should make changes in. it is a generated file.
https://apps.developer.homey.app/the-basics/app

@JohanBendz
Copy link
Owner

I found something that suggested 0x24 is the request command for date/time which equals 36 in decimal which makes me believe the debug output from my last message is the device its request for date/time value.

Yes, Cmd ID 36 (0x24) is the Set Time command. I guess it's just to simple to use Zigbee Cluster 10.. they HAVE to come up with their own way using commands 😂

@jepke
Copy link
Contributor Author

jepke commented Jan 8, 2024

@jepke The app.json is nothing you should make changes in. it is a generated file. https://apps.developer.homey.app/the-basics/app

Yea been just reading up in the SDK docs about it. Either homey app run or homey app install or both generates it and since its not in the .gitignore it gets pushed into a commit. I'm still learning on the job.
Gotta cleanup my local branches as it got a mess real quick lately. Ill pay more attention to what happens when to that file. And fetch origin before pushing to github.

@JohanBendz
My lcd thingy says it has cluster 10 in the zigbee interview not sure if it works tho. But any pointers or other drivers i can take a peek to see how that works.

"inputClusters":[4 items
0:int4
1:int5
2:int61184
3:int0
]
"outputClusters":[2 items
0:int25
1:int10

Ill also redo this PR once i have cleaned up locally and rebase of the the updated SDK3 branch.

@jepke
Copy link
Contributor Author

jepke commented Jan 9, 2024

  zigbee-clusters:endpoint ep: 1, cl: time (10), error while handling frame binding_unavailable {
  meta: { dstEndpoint: 1 },
  frame: ZCLStandardHeader {
    frameControl: Bitmap [  ],
    trxSequenceNumber: 143,
    cmdId: 0,
    data: <Buffer 07 00>
  }

Guess tuya did something with CL10 (time) havent noticed these before.

@JohanBendz
Copy link
Owner

Hi @jepke, how is work going on this driver? :)

@jepke
Copy link
Contributor Author

jepke commented Feb 5, 2024

Hi @jepke, how is work going on this driver? :)

was still strugling with the date/time update thing and then got caught up in other things. Hopefully some more time for fun things after this week.

@jepke jepke requested a review from JohanBendz as a code owner March 17, 2024 14:53
@jepke
Copy link
Contributor Author

jepke commented Mar 17, 2024

@JohanBendz

i ended up hooking these lcd t&h sensors up to my zigbee2mqtt. This PR fully works with the temp hum and battery i just never got the damn time to update on those so the display would display correct date/time.

Ill leave it up to you what to do with this PR. Hopefully someday i get enough knowledge about zigbee and tuya to finaly fix it.

@slicke
Copy link
Contributor

slicke commented Oct 2, 2024

Have you tried adding _TZE200_locansqn to the temphumidisensor4 driver? It already supports the pretty much identical, though with a color LCD, _TZE200_vvmbj46n

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

Successfully merging this pull request may close these issues.

4 participants