I just spent ages debugging issue with theSunCalc module used in Node-Red-Contrib--BigTimer.
It turns out that the getMoonTimes module doesn’t seem to handle the alwaysUp and alwaysDown methods the way one might expected – these do not return FALSE if not TRUE – they return undefined – that took some figuring out.
I started with try-catch but that failed also. Simply checking as follows did the trick:
if (typeof moons.rise==='undefined')
date2=moons.rise; moonrise = (date2.getHours() * 60) +
if (typeof moons.set==='undefined')
date3=moons.set; moonset = (date3.getHours() * 60) +
I’m pretty sure this is now fixed as of BigTimer 2.1.7
Thanks to Aidan Ruff for his help in this one.