Skip to main content
Visitor II
April 20, 2020
Solved

How to write variable from flow in cube-monitor?

  • April 20, 2020
  • 3 replies
  • 3617 views

I think this page would have the content:

https://wiki.st.com/stm32mcu/wiki/STM32CubeMonitor:How_to_write_a_variable_from_flow

It seems that hashKey value can not be read out somewhere?

{"variablelist":[{"address":"{{flow.current_limit_adr}}","name":"current_limit","type":5,"checked":true,"$$hashKey":"object:604","value":"{{payload}}","validity":true}],"accesspoint":0}

(I know how to use the write panel - but need to set 1 variable with value from flow)

    This topic has been closed for replies.
    Best answer by stephane.legargeant

    Hello

    To write data by flow, the following payload must be sent to probe out node ,with the topic “write�? :

    {

       "variablelist": [

           {

               "address": "0x20000060",

               "type": 4,

               "value": "xxxx"

           }

       ],

       "accesspoint": 0

    }

     The question has been asked in this topic : https://community.st.com/s/question/0D53W000000ayg1SAA/hello-how-is-it-possible-to-change-a-variable-by-pressing-a-buttoni-just-can-change-a-variable-by-using-the-write-panel-butregards

    The post explains with details how to write variable from the flow without using the write-panel. It should answer you point.

    We are preparing a wiki page, but it is not finalized yet. So there is just a placeholder right now on the wiki.

    best regards

    Stephane

    3 replies

    ST Employee
    April 20, 2020

    Hello

    To write data by flow, the following payload must be sent to probe out node ,with the topic “write�? :

    {

       "variablelist": [

           {

               "address": "0x20000060",

               "type": 4,

               "value": "xxxx"

           }

       ],

       "accesspoint": 0

    }

     The question has been asked in this topic : https://community.st.com/s/question/0D53W000000ayg1SAA/hello-how-is-it-possible-to-change-a-variable-by-pressing-a-buttoni-just-can-change-a-variable-by-using-the-write-panel-butregards

    The post explains with details how to write variable from the flow without using the write-panel. It should answer you point.

    We are preparing a wiki page, but it is not finalized yet. So there is just a placeholder right now on the wiki.

    best regards

    Stephane

    KJeps.2Author
    Visitor II
    April 20, 2020

    Thanks.... I only forgot the "write" topic :(

    "$$hashKey":"object:604"

    "validity":true

    These 2 is for no use?

    /Kasper

    ST Employee
    April 20, 2020

    You don't need to take care of "$$hashKey" and "validity" to write from flow.

    Stephane

    Visitor II
    November 11, 2021

    Hello,

    I follow the instruction and i receive this error:

     "Bad parameter (7)"

    msg : string[264]

    "Unsuccessful write (Bad parameter (7)) on 48FF6E064986484820270787, for data = "{\n \"variablelist\": [\n {\n \"address\": \"0x20000000\",\n \"type\": 3,\n \"value\": \"3678\"\n }\n ],\n \"accesspoint\": 0\n}": write"

    Do you know what's wrong with it? I check the address and i type and they are correct.

    KJeps.2Author
    Visitor II
    April 20, 2020

    Got it - and stuff is working.

    This is really a good and powerfull tool you have produced here - Thank you!!

    Just as a feedback, i had some problems with adding 2 variables blocks to select different variables, then it uses the same exe config, and mixes up the variables between them.... i ended up using only one variables block and manual parse them out.

    On the other hand i could have made several variabel blocks, and connect direct to chart.

    /Kasper