Pi-Mote - Raspberry Pi Forums
taken delivery of energenie pi-mote , couple of controlled mains sockets.
have them working now, , reasonable lua scripts control them.
there issues python program , notes in i've spent happy afternoon investigating, , thought post results here.
i'm working on getting control via domoticz, running lua scripts directly @ moment.
i'm happy post have here if there interest.
cheers harry
energenie socket control codes.
verified experiment, differ codes in supplied sample code.
note gpio output 13 consistently on/off bit.
pins 11, 15 16 address field.
assuming bit weightings in order:
makes sense in negative logic
address 7 = socket 1
address 6 = socket 2
address 5 = socket 3
address 4 = socket 4
address 3 = sockets all
address 2 = socket ? functions
address 1 = socket ? functions
address 0 = socket ? functions sorta kinda..
off code "socket" same initialisation code encoder, suspect never makes out air.
if use socket "on" code initialise socket, initialises, , turns on when requested, "off" code aparently ignored.
socket turn off in response "all off" code, , stay off until receives 0 address "on" code or "all on" code.
have no idea codes may mean other energenie products or if work on sockets supplied, work me.
milage may vary, , use @ own risk etc....
official codes (corrected)
socket 1 on
gpio.output (11, 1)
gpio.output (15, 1)
gpio.output (16, 1)
gpio.output (13, 1) on/off bit
socket 1 off
gpio.output (11, 1)
gpio.output (15, 1)
gpio.output (16, 1)
gpio.output (13, 0) on/off bit
socket 2 on
gpio.output (11, 0)
gpio.output (15, 1)
gpio.output (16, 1)
gpio.output (13, 1) on/off bit
socket 2 off
gpio.output (11, 0)
gpio.output (15, 1)
gpio.output (16, 1)
gpio.output (13, 0) on/off bit
socket 3 on
gpio.output (11, 1)
gpio.output (15, 0)
gpio.output (16, 1)
gpio.output (13, 1) on/off bit
socket 3 off
gpio.output (11, 1)
gpio.output (15, 0)
gpio.output (16, 1)
gpio.output (13, 0) on/off bit
socket 4 on
gpio.output (11, 0)
gpio.output (15, 0)
gpio.output (16, 1)
gpio.output (13, 1)
socket 4 off
gpio.output (11, 0)
gpio.output (15, 0)
gpio.output (16, 1)
gpio.output (13, 0) on/off bit
socket on (?5?)
gpio.output (11, 1)
gpio.output (15, 1)
gpio.output (16, 0)
gpio.output (13, 1)
socket off
gpio.output (11, 1)
gpio.output (15, 1)
gpio.output (16, 0)
gpio.output (13, 0)
functional codes:
socket ?6? on
gpio.output (11, 0)
gpio.output (15, 1)
gpio.output (16, 0)
gpio.output (13, 1)
socket ?6? off
gpio.output (11, 0)
gpio.output (15, 1)
gpio.output (16, 0)
gpio.output (13, 0)
socket ?7? on
gpio.output (11, 1)
gpio.output (15, 0)
gpio.output (16, 0)
gpio.output (13, 1)
socket ?7? off
gpio.output (11, 1)
gpio.output (15, 0)
gpio.output (16, 0)
gpio.output (13, 0)
partially functional codes:
socket ?8? ?0? on
gpio.output (11, 0)
gpio.output (15, 0)
gpio.output (16, 0)
gpio.output (13, 1)
socket ?8? ?0? off - never makes air. not function.
gpio.output (11, 0)
gpio.output (15, 0)
gpio.output (16, 0)
gpio.output (13, 0)
have them working now, , reasonable lua scripts control them.
there issues python program , notes in i've spent happy afternoon investigating, , thought post results here.
i'm working on getting control via domoticz, running lua scripts directly @ moment.
i'm happy post have here if there interest.
cheers harry
energenie socket control codes.
verified experiment, differ codes in supplied sample code.
note gpio output 13 consistently on/off bit.
pins 11, 15 16 address field.
assuming bit weightings in order:
makes sense in negative logic
address 7 = socket 1
address 6 = socket 2
address 5 = socket 3
address 4 = socket 4
address 3 = sockets all
address 2 = socket ? functions
address 1 = socket ? functions
address 0 = socket ? functions sorta kinda..
off code "socket" same initialisation code encoder, suspect never makes out air.
if use socket "on" code initialise socket, initialises, , turns on when requested, "off" code aparently ignored.
socket turn off in response "all off" code, , stay off until receives 0 address "on" code or "all on" code.
have no idea codes may mean other energenie products or if work on sockets supplied, work me.
milage may vary, , use @ own risk etc....
official codes (corrected)
socket 1 on
gpio.output (11, 1)
gpio.output (15, 1)
gpio.output (16, 1)
gpio.output (13, 1) on/off bit
socket 1 off
gpio.output (11, 1)
gpio.output (15, 1)
gpio.output (16, 1)
gpio.output (13, 0) on/off bit
socket 2 on
gpio.output (11, 0)
gpio.output (15, 1)
gpio.output (16, 1)
gpio.output (13, 1) on/off bit
socket 2 off
gpio.output (11, 0)
gpio.output (15, 1)
gpio.output (16, 1)
gpio.output (13, 0) on/off bit
socket 3 on
gpio.output (11, 1)
gpio.output (15, 0)
gpio.output (16, 1)
gpio.output (13, 1) on/off bit
socket 3 off
gpio.output (11, 1)
gpio.output (15, 0)
gpio.output (16, 1)
gpio.output (13, 0) on/off bit
socket 4 on
gpio.output (11, 0)
gpio.output (15, 0)
gpio.output (16, 1)
gpio.output (13, 1)
socket 4 off
gpio.output (11, 0)
gpio.output (15, 0)
gpio.output (16, 1)
gpio.output (13, 0) on/off bit
socket on (?5?)
gpio.output (11, 1)
gpio.output (15, 1)
gpio.output (16, 0)
gpio.output (13, 1)
socket off
gpio.output (11, 1)
gpio.output (15, 1)
gpio.output (16, 0)
gpio.output (13, 0)
functional codes:
socket ?6? on
gpio.output (11, 0)
gpio.output (15, 1)
gpio.output (16, 0)
gpio.output (13, 1)
socket ?6? off
gpio.output (11, 0)
gpio.output (15, 1)
gpio.output (16, 0)
gpio.output (13, 0)
socket ?7? on
gpio.output (11, 1)
gpio.output (15, 0)
gpio.output (16, 0)
gpio.output (13, 1)
socket ?7? off
gpio.output (11, 1)
gpio.output (15, 0)
gpio.output (16, 0)
gpio.output (13, 0)
partially functional codes:
socket ?8? ?0? on
gpio.output (11, 0)
gpio.output (15, 0)
gpio.output (16, 0)
gpio.output (13, 1)
socket ?8? ?0? off - never makes air. not function.
gpio.output (11, 0)
gpio.output (15, 0)
gpio.output (16, 0)
gpio.output (13, 0)
raspberrypi
Comments
Post a Comment