codersaur/SmartThings

Missing value digit

7c opened this issue · 1 comments

7c commented

I do have strange behaviour:

T 93.157.189.201:42672 -> 209.126.18.59:8086 [AP]
  POST /write?db=smartthings HTTP/1.1..Accept: */*..User-Agent: Linux UPnP/1.0 SmartThings..Authorization: Ba
  sic xxx..Content-Type: application/x-www-form-urlencoded..HOST: 209.126.18.59:8086..C
  ontent-Length: 242....temperature,deviceId=2f6712bd-5b1a-48e4-a9db-329af912120f,deviceName=wc\ kapi,groupId
  =null,groupName=Home,hubId=68ac12fa-f184-4d5a-b269-2e87328c293a,hubName=K..y,locationId=cfa4c8f6-63b7-4bd0-
  b05a-bcccf6ea398f,locationName=koey,unit=C value=25

this request is stored as:

1550412800599626821 2f6712bd-5b1a-48e4-a9db-329af912120f wc kapi null Home 68ac12fa-f184-4d5a-b269-2e87328c293a Köy cfa4c8f6-63b7-4bd0-b05a-bcccf6ea398f koey C 2

as you see it stores the 25 as 2 for reason i dont understand. If i use CURL and put the line protocoll manually it does store it properly as 25.

Any suggestions?

7c commented

I have changed

// Catch any other general numerical event (carbonDioxide, power, energy, humidity, level, temperature, ultravioletIndex, voltage, etc).
    else {
        data += ",unit=${unit} value=${value}"
    }

as

// Catch any other general numerical event (carbonDioxide, power, energy, humidity, level, temperature, ultravioletIndex, voltage, etc).
    else {
        data += ",unit=${unit} value=${value},value3=${value}"
    }

and then i am getting

-4bd0-b05a-bcccf6ea398f koey C 17 1 1550414870332249506 7fa4bfb8-f173-49af-80a5-aaf17e3a6b31 dedeminOda null Home 68ac12fa-f184-4d5a-b269-2e87328c293a Köy cfa4c8f6-63b7-4bd0-b05a-bcccf6ea398f koey C 30 3

this means, that something is wrong with last char submitted to POST. This is for now a workaround about this problem. I am using smartthings hub v3 from samsung... I think this must be a bug which can be improved, probably a problem between v2 and v3, where this bug is i dont know...