cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

How to convert data from mashup to cloudmqtt

DN_9687801
5-Regular Member

How to convert data from mashup to cloudmqtt

Hi everybody,

I'm begin developer thingworx, have pass data from togglebutton to cloudmqtt. Ex: value true/false => ON/OFF.

Try write subscription in thing (picture).

2 REPLIES 2

Hi @DN_9687801,

 

If you want to access the current value of temp, does it work the following example ? :

 

if (eventData.newValue.value == true) {

me.temp = "ON";

} else if (eventData.newValue.value == false) {

me.temp = "OFF";

}

 

Hope it helps,

DN_9687801
5-Regular Member
(To:Ciprian-Traian)

thank but not run,

the problem is I have a mashup, want to control the switch, the switch message sent to cloudmqtt is ON / OFF but togglebutton have value is true / false. How to convert values.

Announcements


Top Tags