I am using Domoticz.
Domoticz does not send the exact same json packet each time. So most of the time (10 seconds) the value of interest is shown as 'Undefined' and the real value is only shown for an instant.
As this was not happening in an old version of MMM-MQTT, I could quickly find a solution, which does the job for me.
I made a small change in de MMM-MQTT.js code:
The location:
// Extract value if JSON Pointer is configured
if (sub.jsonpointer) {
value = get(JSON.parse(value), sub.jsonpointer);
}
//.. new test if value exists...
if (isNaN(value) == false)
{
..the rest of the .code....
}
I am using Domoticz. Domoticz does not send the exact same json packet each time. So most of the time (10 seconds) the value of interest is shown as 'Undefined' and the real value is only shown for an instant. As this was not happening in an old version of MMM-MQTT, I could quickly find a solution, which does the job for me.
I made a small change in de MMM-MQTT.js code:
The location: // Extract value if JSON Pointer is configured if (sub.jsonpointer) { value = get(JSON.parse(value), sub.jsonpointer); }
//.. new test if value exists...
if (isNaN(value) == false) { ..the rest of the .code.... }