Applies to:
PcVue 15 onwards |
||
|
||
Summary:
This article will show you how to use filter if you don’t want to take into account a “Null” value in a MQTT payload. |
||
|
||
Details:
Let us imagine a simple situation. PcVue receives values like temperature in a MQTT topic. The device sends 22 in the Json Key temperature of a MQTT topic. PcVue displays 22 in the register. The device sends null in the temperature of a MQTT topic. With a MQTT filter expression you can dismiss this Null value if you wish. PcVue will then still display the last value with the last timestamp. The null value will not be taken into account thanks to the filter expression. The null is consided like an empty string. So use the following filter expression to prevent the null value: StrLen(JsonGetValue(value,temperature))>0
|
||
|
||
|
Created on: 21 Oct 2021 Last update: 30 May 2024