RF-V48 Watch-Protocol-Decoder

Khalil HADDEDa year ago

Hi,

I have RF-V48 watch that is sending data using watch protocol.

I have 2 topics to discuss: Position Decoder and Health Information

1- Position Decoder

The server received this data:

[3G*9705141740*00C2*UD_LTE,260723,082224,V,00.000000,,00.0000000,,0.00,0.0,0.0,0,60,99,0,0,00000000,2,0,605,1,10012,42500,-2,10012,49670,-6,3,,44:d7:91:fd:2b:54,-78,,00:31:92:a1:b7:e0,-84,,94:27:90:30:fb:92,-98,0.0]

But it couldn't decode it. The problem was with the PATTERN_POSITION

private static final Pattern PATTERN_POSITION = new PatternBuilder()
            .number("(dd)(dd)(dd),")             // date (ddmmyy)
            .number("(dd)(dd)(dd),")             // time (hhmmss)
            .expression("([AV]),")               // validity
            .number(" *(-?d+.d+),")              // latitude
            .expression("([NS]),")
            .number(" *(-?d+.d+),")              // longitude
            .expression("([EW])?,")
            .number("(d+.?d*),")                 // speed
            .number("(d+.?d*),")                 // course
            .number("(-?d+.?d*),")               // altitude
            .number("(d+),")                     // satellites
            .number("(d+),")                     // rssi
            .number("(d+),")                     // battery
            .number("(d+),")                     // steps
            .number("d+,")                       // tumbles
            .number("(x+),")                     // status
            .expression("(.*)")                  // cell and wifi
            .compile();

This line:

.expression("([NS]),") 

should be updated like this:

.expression("([NS])?,") 

2- Health Information

The device sends this data about heart rate, blood pressure, and blood oxygen:

[3G*9705141740*0013*bphrt,122,75,73,,,,][3G*9705141740*000B*oxygen,0,98]

The server can handle the heart rate and blood pressure message:

[3G*9705141740*0013*bphrt,122,75,73,,,,]

but it can't handle the blood oxygen message:

[3G*9705141740*000B*oxygen,0,98]

Maybe if you add something like this:

if (type.equalsIgnoreCase("oxygen") {
...
position.set("bloodOxygen", 98);
}

Thank you.

Anton Tananaeva year ago

Feel free to send a pull request if you know how to fix those things.

Khalil HADDEDa year ago

Done. Please take a look at these small updates.

#5146

Thank you.

Khalil HADDEDa year ago

Hi Anton,

can you check this please

#5147
#1154

Thank you.

Anton Tananaeva year ago

I think you misunderstood my earlier comment. You either use custom attributes without any translation or you add known attributes that need translation. It seems like you did the opposite. Which option do you want to go with?

Khalil HADDEDa year ago

I ll set them as known attributes if you don't mind. There is a new commit. Thank you.

Khalil HADDEDa year ago

Hi Anton,

check this please

#5148

Thank you.

Azhar Tambolia year ago

Hi Khalid HADDED, Can u get ur contact details or email id to connect with you, I am also facing the problem in Chinese smart watch communication with my server. Please connect me on my email Id [removed]

Anton Tananaeva year ago

Warning that we don't allow sharing personal contact information on the forum.