relayboard doesn't switch as expected ( solved : wrong repository used)

Doc Garret

New member
i have this board :
i omitted the lib in the next lines .
set(0,1,1) : Relay 1 goes on .
set(0,2,1) : Relay 8 goes on . ??
set(0,3,1) : Relay 2 goes on . ??
set(0,4,1) : Relay 7 goes on . ??
set(0,5,1) : Relay 4 goes on . ??
set(0,6,1) : Relay 5 goes on . ??
set(0,7,1) : Relay 7 goes on . ??
set(0,8,1) : Relay 6 goes on . ??

am i something missing here ? is this hardware of firmware or ?

Doc Garret

New member
I tried with the c-librarys/cmd line, and this one controls the relays as expected.
So this looks like a bug in the python libs.
Re-installing lib8relind didn't fix the problem.

So Debugging it will be..

Doc Garret

New member
after some extensive research i found the next :
When i look at the C code, then a macro / list is used , relayChRemap
this one is defined in the python code but never used.

This also make me think, that the schematics do not match with the reality. P0 is ok. P1 should be Relay 2 but is Relay 8 on the print.
Something like that. I think SeqMS can clearify that more and easier than me.

Where can we file a bug ?


Staff member
Sorry for the late reply.
Please tell me the card version printed on the top side of the PCB.
If you have V4.0 or higher the last repository is the one you should use.
Please test first with the 8relind command.
Last edited:

Doc Garret

New member
no problem alex. I have version 5.3 . And in deed it is correct in this version.
Somehow i must have missed to use the lib8relind-RPI is the one to use and therefore always used the
And since both libs ( lib8relind and the rpi version ) work, you don't think of a wrong lib there at first.

I think this made me go wrong. the pip install command is correct, but i searched in thonny for lib8relind.
Can i do a suggestion and change ?
Change the word lib8relind to lib8relind-rpi ?


Doc Garret

New member
And.. please keep in mind :
Uninstall SM8relind and lib8relind in thonny. Then reinstall SMrelind.
They both use the same location on disk and when cleaning up lib8relind, you uninstall parts of SMrelind as well.


Staff member
There is no problem to change a word in the documentation but I am unable the follow your reason for this. Could you be more specific? How this change can help users installing the right library?
The product page points you in the right direction

Doc Garret

New member
The story behind it :
I install all my libs via thonny nowadays in a virtual environment. see 1st ps. below.
And because of the virt-env. and with every project i have to install the libs again.
( Gotta find another way for that :) )

So sometimes i recheck on the SM website which lib i had to use again.
And so , being a bit of in a hurry up state ,the in BIG letters written word lib8relind suggested me that i had to search for the lib8relind lib in thonny. ( see 2nd ps. )
Yeah.. I admit. just a matter of correct reading.. I was in a bit of a hurry up state... and i failed to read the small letters ;) ..

1-- pip install does NOT work globally anymore in the latest version of the RPi - OS. Only in a virtual environment.
2-- Thonny ''s search option in the package management is limited. When you search for lib8relind, it won't show you a lib8relind-rpi version as well. You almost have to fill in the exact lib you search for.


New member
I have rev4.0 of the SM8 relay. 8relind -list says 0 boards detected. i2cdetect shows my board (with no jumpers) at 0x28.