KpMQTT and Thingsboard

Forum Home Forums Communicating with Devices KpMQTT and Thingsboard

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #9290
    german
    Participant

    I have config as Mikhail advise <Topic TopicName=”v1/devices/me/rpc/request/+” QosLevel=”0″ CnlCnt=”4″ JSHandlerPath=”C:\SCADA\ScadaComm\Config\KpMqtt_Job.js” />
    But i dont see anything in Chanel [301,304]. But it had response Json from Thingboard v1/devices/me/rpc/request/523 = {“method”:”setValue”,”params”:80.74}. Now I use the fomular to convert string json and the code test ok in C Program.
    /* get ID = 523 from string “v1/devices/me/rpc/request/523″*/
    const char* GetID(const char* topic){
    const char* reqid = &topic[26];
    return reqid;
    }

    and call function GetID(Cnl) at the inputchanel 301 run server with error
    Line 516, column 15: error CS1519: Invalid token ‘;’ in class, struct, or interface member declaration. Pls help me about that solve. Thanks.

    #9293
    Mikhail
    Moderator

    This error is caused by an incorrect formula in the Formulas table or in the Input channels table. Formulas use C# syntax, not C/C++.

    #9294
    Mikhail
    Moderator

    For your task, you don’t need formulas in the configuration database.

    #9381
    german
    Participant

    Thanks Mikhail, I used function converter mqtt internal and external data.

Viewing 4 posts - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.