0 Replies Latest reply on Sep 18, 2017 4:49 AM by pbarisich-2 RSS
    pbarisich-2 Newbie

    MQTT and Non-MQTT data refresh

    Hey All,

     

    Fairly new to thingworx but have a good grasp on OO and programming, need some help . Thingworx 8 runnning MQTT moquitto broker on a raspberry pi getting data from multiple arduino sensors.

     

    so my design is using a single thing called MQTTGAteway which handles all properties (Pub and Sub) to the physical world ( arduino side).

    on the thingworx side i use a data model similar to MVC.

     

    so for example i have a ThingTemplate called WaterHeaterTT and then inherited from this i have Tank1WaterHeater , Tank2WaterHeater and etc. in the thing ( Tank1WaterHeater ) , i properties that are local bound to MQTT properties which are bound to topics.

     

    for example Tank1WaterHeater has watertemp ( bound to MQTTGateway property ) and WaterHeater which is bound to (MQTTGateway waterheater1).

    On the MQTTGateway properties are logged and always in regard to data change type.

     

    My problem is that i build a mashup of WaterTank1 which has temp and waterheater on/off state. Now on the mashup i drop a couple of numeric entries to test display and refresh using refresh widget set to 5 second intervals

     

    mashup

    numeric entry ------> Thing(Tank1WaterHeater). water Heater state

    numeric entry ---> Thing(Tank1WaterHeater).watertemp

     

    numeric entry ---> MQTTGateway.water heater state

    numeric entry ----> MQTTGateway.watertemp

     

    so four fields , if i run this mashup what happens is that MQTT Gateway fields are constantly refreshed but the Thing fields ( which local bound the same fields as the MQTTGateway fields) not refreshed. The only way to go into the thing and hit refresh on the property screen of hit save on the object.

     

    Hope this makes sense , hoping somebody can help with this.

    Cheers

    Paul B