Estoy realizando ese programa pero me aparece el siguiente error en la segunda función:
TypeError: Cannot read property 'time' of undefined
The error says that it cannot get the time
property because the specified parent does not exist.
Look through your code for lines that have .time
. I note that they appear in a loop. Specifically, you are using a loop counter as an array index but you are using i+1
- so on the last iteration of the loop, that reference won't exist.
should be for(let i=0; i < msg.payload.length-1; i++)
Gracias ahora me crea el nuevo measurements pero hay un tipo de dato NaN
That will be because of a bad value in planificado or tiempoparo
add these
//...
node.warn(planificado); //<<<< additional linea
node.warn(tiempoparo); //<<<< additional linea
disponibilidad = (planificado-tiempoparo)/planificado;
//...
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.