Preferably solid wire rather than stranded wire and yes start with 16cm. I am not familiar with the Nexa sockets but you should have 2 options to obtain the ID. The ID's are never included within the manuals as they are factory set to different numbers.7ewis wrote:How do I pair my Nexa plugs to PiHAT?
I received them yesterday, they are a standard 3 pack with a remote, I believe they are the self learning set.
How do I find out the ID and channel to attempt a connection? It doesn't say anywhere on the packaging.
And for the aerial, it just has to be 16cm of any wire touching that particular pin?
The options you have are:
1. Use the bash scripts in this thread to try all possible ID's within the 64,000 range. It is likely to take many hours but should eventually find the code.
2. Build a simple decoding circuit i.e. record the signal and run it through software again included within this thread. You will need a 433mhz receiver to do this.
To start with you should set up PiHAT without the use of the remote control and you can pick any ID i.e. 0 or 1. The ID you pick can be the same, but doesn't have to be, for each socket if you are not using the remote control.
Pretty sure the channels are the same as the Status sockets but again when testing without the remote you can just pick one, say channel 7. Put the Nexa in pairing mode and run the PiHAT commands (assuming it is in /usr/bin/) e.g.
/usr/bin/sudo pihat --brand=0 --repeats=50 --id=1 --channel=7 --state=1
Once paired turn on with:
/usr/bin/sudo pihat --brand=0 --repeats=15 --id=1 --channel=7 --state=1
and off with:
/usr/bin/sudo pihat --brand=0 --repeats=15 --id=1 --channel=7 --state=0
(if using Status sockets change --brand=0 to --brand=5)
Once you are happy running from the PiHAT move on to decoding the remote. Hope this helps.