Wrong output voltage with nodejs library on relay

Raspberry Pi 3 / GrovePi+ 1.2.7

When using the relay (version 1.2) with the python script in /home/pi/Dexter/GrovePi/Software/Python/
i get 5.1v from sig to gnd when the relay is on (works), but using the SPDTRelay from the nodejs library i only get 2.95v when using the .on() method (not enough to trigger the switch).

Weird thing is, that after i switch the relay with the python script one time and use the nodejs library later to do the same the voltage is 5.1v regardless of library used. When restarting the GrovePi, i get 2.95v when using only the nodejs library again.

Hi @pusteblume,

That’s super odd.

I’ll bring up a logic analyzer and compare the differences between the Python and NodeJS library. There should be a difference between what they communicate, otherwise, it wouldn’t make any sense.

Thanks for reporting this!

Did you find anything? I am trying to add that relay to an mqtt endpoint and just cannot get it to work with the nodejs library.
I suck at python, but if you need help with some JavaScript debugging i can help.

Hi @pusteblume,

Ahh … thanks for reminding me this. There are so many things on my plate during this time.

I’ll try to have a look at it and be back with an answer.

Thank you!

I just noticed, that using the nodejs library i get a value of 20,5 C and 51% humidity, while getting 21C and 53% humidity on python whith the blue temp/hum sensor. I can reproduce the results when jumping from one to the other. Going to measure voltage tomorrow as it could be the same issue.