Tuya Generic Device (local driver)

I have some Tuya devices and note that these are quite difficult to locally integrate.

I'm using the Tuya Cloud driver by Jonathan Bradshaw (@jonathanb) and this works fine - thanks Jonathan! I thought I'd go for the gold standard of local integration and I'm trying to use the Tuya Generic driver by Ivar Holand (@holand.ivar).

I have the local keys and I suspect these are working because I'm getting some response from the Tuya hub, however it is not returning any decrypted json data - either for DP_QUERY or heartbeat frame types.

I was just wondering if anyone can deduce what may be the problem from the picture above? One problem I have is that the endpoint number is not clearly called out in the devices.json file from the tinytuya wizard. The devices are water sensors.

The status from tuya-raw shows:
"status": [
{
"code": "watersensor_state",
"value": "2"
},
{
"code": "battery_percentage",
"value": 0
}
]

There is also a mapping field in devices.json that looks like:
"mapping": {
"102": {
"code": "watersensor_state",
"type": "Enum",
"values": {
"range": [
"1",
"2"
]
}
},
"103": {
"code": "battery_percentage",
"type": "Integer",
"values": {
"unit": "%",
"min": 0,
"max": 100,
"scale": 0,
"step": 1
}
}
}

I'm not a groovy/java boffin and my main experience is Python these days. Any help or pointers would be greatly appreciated.

Can you show the "data" from the bottom of the device page on Johnathans driver.
What type of device is it? Water sensor?

I might be able to help but will have to dig into it again.
Can you give a link to the driver you are trying to use?

I currently have my one Tuya LED Strip setup locally (with cloud fallback) using Johnothan's optional local driver, that I have also customize myself for my device.

In my experience there is no problem that the DP_QUERY message is without a json object on the 3.3 version of the protocol. It is simply a form of ACK from the device.

When it comes to endpoints I am quite sure these are 102 for the water sensor and 103 for the battery percentage of the sensor itself.

DP 102 does not seem to have the same defined behaviour as lighting products have Function Definition of Lighting Products-Tuya Developer Platform-Tuya Developer.

Is this sensor a leakage detector, e.g. so that 1 means dry and 2 means wet?

The battery percentage is self explanatory.

I was able to extract the id, ip, productKey and version. I am now trying to configure my device and it asks me for the endpoint. I have no idea how to deduce it or find it. It was not part of my extraction when I scanned my network. I would appreciate it if one of you could point me in the right direction.