yewtc wrote:I've got the same problem with and RPi3, but it works fine with RpiB. I'm guess the driver needs updating.
I don't have an RPi3: I see that you and @mercer (the OP) both do.
As I understand it there is no 'driver' involved. The interface from the RPi to the PiMote adapter is simply 6 GPIO pins.
I have seen 3 different implementations, in python, of a script to talk to the PiMote. The one published by Energenie themselves; the one published by @PenguinTutor based on gpiozero; and an earlier implementation from the RPF based on RPi.GPIO prior to the release of gpiozero. All drive the gpio pins - and thus the pimote adapter - directly.
Lacking hands-on experience with an RPi3 I don't see - from my knowledge of it from documentation - why the gpio handling would be different to the RPi2B running Raspbian Jessie that I tested. Perhaps @PenguinTutor might be able to comment?
Have you tried the 3-line basic recipe from the gpiozero documentation:
Code: Select all
from gpiozero import Energenie
lamp = Energenie(1)
ref: http://gpiozero.readthedocs.io/en/v1.2. ... #energenie
(You will need to use a long press on the green button on the socket to put it into 'learning' mode to pair it with the PiMote.)
[Added later postscripts -
1. There are both Green button and Purple button socket-and-transmitter sets, with different interfaces. My experience is with the Green button version, and I am pretty sure that is what @PenguinTutor has documented.
2. If you have code that works on an earlier RPi, you can probably 'pair' the PiMote and Socket using that code and then transfer the Pimote to the RPi3 before trying the gpiozero test.
- end of Postscript ]