April 18, 2018 at 08:58 #25258
I am starting to document here details around the Lightwaverf link 1 box.
Ideally I would like to be able to update the firmware myself as I don’t think Lightwaverf will be doing much with it now. This will be quite difficult to do unless Lightwaverf could be persuaded to open source the firmware which again I am not optimistic about.
The attached image shows the inside of a Link1 (with display). I suspect the updated Link1 without display will have similar electronics.
Items to note are
1) MCU is PIC18F97J60 with built in 10BaseT Ethernet, 128K Program memory, 3.6K application RAM (excluding Ethernet buffers)
2) 2 RF23S rf modules, One connected to short aerial 868MHz, One to longer aerial 433MHz. I am not sue but I think the RF23S is equivalent to Si4431
3) Programming header
Attachments:You must be logged in to view attached files.April 19, 2018 at 01:33 #25264
I opened my V2 box up. No display, buzzer or switches is probably the reason for the change, as less build cost = more profit.
Everything else is pretty much the same, including the 25PE20VP at IC3, Description is ” 1 and 2 Mbit, low voltage, Page-Erasable Serial Flash memories with Byte-Alterability, 50 MHz SPI bus, standard pinout” apart from a 6 pin header, which I presume is for the programmer, given it says so next to the pins. 🙂 Looks exactly the same size as my PIC programmer PCB plug.
Doubt if we shall ever see any code from lightwaveRF, but one can hope.
Given lightwaveRF have said they cannot do anything about it, I would imagine this device is code locked and the flash is just used for parameter storage.
The problem as far as the plug in sockets is concerned is that the LINK V1 or V2 needs to be powered before the plug sockets or you need to be notified that there has been a mains failure. A UPS is just a quick fix for short power cuts, up to something like 4 hours on a small UPS, but the problem will still occur for any long power outage. My original idea was to look on IFTTT to see if there was anything suitable to notify the user of a power failure.
Next test will be to block the signal from the LINK, wait until it has powered up properly then remove the block, metal tin should do the trick. This get the PIC initialisation out of the way and will test to see if the plug sockets turn on when they are establishing communication with the link, after the initial boot process is over. I saw you say you could see a burst transmit at power up, so was wondering if this was the problem.April 19, 2018 at 10:34 #25268
Yes. The issue goes as follows.
1) Link sends a power up message about 8 seconds after power is turned on.
2) Any device which is in pairing uses a Power On message to learn that future response to power up messages should be to turn on.
3) Basic plug ins stay in pairing for around 8 seconds after power up, so can pick this up.
UPS on Link will obviously work providing it covers all possible outages but I am sort of reluctant to fix a trivial software issue with that.
Another hardware based approach which would be independent of length of outage would be to put a delay circuit in the power feed to the link box. That could be done easily at the DC level. Just delaying the switch on by a few seconds would suffice. A simple mosfet switch should work with some resistor capacitor diode combo to do delay and make sure discharge on outage is rapid; maybe I’ll give that a go as I could do it as a simple passive in-line box in the dc path.
Thanks for adding info on non-display box. I think the external flash is for storing config and parameter set up as you say. The fact that there is a programming header makes it likely they do in circuit serial programming after assembly. They could lock that out after initial programming as future updates are over the air. However, I suspect they leave it active as a way of recovering bricked boxes.
I might try asking about possibilities of getting code but they still sell the gen 1 link box so I am not hopeful and most companies take the easy approach of saying no, no matter what the logic.April 22, 2018 at 16:59 #25272
Stopping the DC after power comes on is the same as power coming on after a mains cut. As I said or at least meant to say the problem is that with the plug sockets already powered on then the link powered any time after the plug sockets have powered, or even at the same time, the default of the socket is to turn on.
This is the reason I checked to see if the sockets were the problem or the Link box.
Thanks for the preamble time, it gives a good starting point, knowing as to what time period to allow before the signal can be allowed to communicate with devices.
If it had just been the link box then a 555 delay timer could have been used with as you say a FET/relay As it is, a small addition internally, failing any software fix, would to be to pull up or down the data o/p line via a relay to each of the transmitters and thus clamp the lines for that period. The data line clamp would have to have a default of power off clamped (n/c) , until the timer period had timed out and releases the relay. This should not effect setup of any plug socket as these can be set up at any point in time.
I found a different way unique to myself. I have LWRF pattress style sockets around the house, which all default to off and as my pug in sockets are all on 2 common plug boards ( Media Centre ) then I have the extension lead plugged into a socket. However there are othe sockets I would like to put on around the house which do need to default to off.
The only other ways I can think of is to turn off these devices off at multiple selected periods of time or and this does sound convoluted, but does get around various problems, so bare with me.
Use a light sensor connected to your system and any single plug in socket with a light attached to it. So under normal operation this socket is turned off, however just after a power outage this socket turns on, the light sensor operates and gives instant feedback at which point you have a trigger you can use to turn all plug in sockets off, including last of all the light for the sensor 🙂
Cost around £23 and one plug in LWRF socket.April 23, 2018 at 07:54 #25274
Once the plug in sockets have learnt the power on default is then it is true that powering up the link with the sockets on will turn them on. This behaviour is saved into the device’s memory just like normal pairing data.
However, if the sockets are cleared out first (ROOM all off command whilst in pairing mode) then they will not respond to the link power signal until they learn this mode again.
So the delayed power on the link will be effective providing the sockets are cleared out first. Then the sockets will never be in accidental pairing mode during link start ups.
If some other server also powers up after a failure then a software solution would be to send UDP commands into the link to turn off or on the desired start up state of any devices.April 25, 2018 at 12:11 #25276
Not so, you can have a light plugged into the MK1 plug sockets to test.
Initialise a new plug socket with the light off. This is a known state of no power output. As soon as you remove power from the link, then turn it on at any period there after, the light turns on.
Any delayed power just mimics manually removing and connecting the power. The delayed power is ineffective with Mk1 sockets as they always default to on.
You could use something like a Raspberry Pi to act as a server, detecting any power outage and sending the UDP.
Surprisingly enough even the lock commands are none functionalApril 25, 2018 at 21:11 #25277
This is incorrect, unless you have basic sockets which behave differently from mine which I don’t think is likely.
I have just taken a basic socket which had previously been paired.
I powered and while in pairing mode I cleared it out by sending a room all off command whilst it was still in pairing mode. This completely purges all pairing info and the response to link power on messages,
I then turned it off and paired it to room / device from the app by turning it back on and sending an on command whilst it was in pairing mode.
It then responded normally to on / off commands from that device as expected.
I then powered off the link and then turned it back on while leaving the plug powered up but off. It did NOT turn on.
I suspect the plug you thought was clean was not even if it was new. It is quite possible that it has some info in during testing.
You should follow the procedure I have described.
Note the LW381 also only has 3 pairings, and no mood or lock functionality.April 27, 2018 at 16:22 #25278
(I powered and while in pairing mode I cleared it out by sending a room all off command whilst it was still in pairing mode. This completely purges all pairing info and the response to link power on messages,)
(I then turned it off and paired it to room / device from the app by turning it back on and sending an on command whilst it was in pairing mode.)
Erm its unpaired, How do you turn it off ? There is no switch on the MK1.
The only way to turn it off and start the pairing is to remove the plug from the socket it is in, then plug it back in, There is no pairing button unlike the MK2 socket, which has.
I Plug it in and start pairing which turns it on.
Plug socket works normally until power failure to the link, which turns it on at power up.
Back to square one. Believe I have tried all ways round to get this stupid plug/socket to work by remaining off in the event of a power failure.
The comment made by the original poster on the other thread should verify everything I have said here.April 27, 2018 at 21:01 #25280
I am sorry for the difficulty you are having here, but this procedure works for me and is in line with how this feature works. Devices learn the power on default behaviour by hearing a power on message when they are in pairing mode. They remember this behaviour until they are explicitly purged.
Note that the device must be paired before you can purge it using the associated room off command. To be certain that a purge is going to work, one needs to be able to turn the device on and off normally from the app so one knows what room the device believes it is paired to. This in itself can be somewhat problematic if you do not know what pairing has been done on the device. One has to find the pairing or send it all possible room offs whilst it is in pairing. It will click its relay on and off several times when it recognises a purge.
For other devices there is some explicit method to enter a pairing state but with the basic plug ins this only occurs for 8 seconds after turning the input power onto the device.
When I said I turned it off after a purge then I meant I powered it off by removing its input power, turned its input power back on and quickly sent it a device On command from the App so that it was then paired to this device. I could then control it as normal. But when I left it an Off state but still supplied with input power, then when I powered the link off, waited for a little while and powered the link back on then it remained in the Off state.
I have verified this with 3 basic plug in sockets.
I don’t think there is anything in the original thread that is in conflict with this description of basic sockets learning this behaviour.April 27, 2018 at 21:07 #25281
Just to be sure we are on the same page and to show you procedures have been followed.
Using LWRF web page manager
1/ Unpair and delete device using the edit function.
2/ Unpair the handset.
3/ Device is no longer paired to anything
4/ Pair handset with device by using the on button when LW381 is set to linking mode (switched socket or by plugging in)
5/ Turn off the LW381 via the handset.
6 Using the manager in add a device mode, name the device and tell it its a switch.
7/ Turn the LW381 on, to put it in linking mode (switched socket or by plugging in)
8/ Start pairing using the manager
9/ The LW381 turns on when pairing happens.
If yours is not doing this you are lucky or you have not written the entire procedure that you have followed.
I would love for this to work as you have described it, but no matter which way I try it never does.April 28, 2018 at 11:47 #25285
Thanks for the clearer instructions.
The CRUCIAL STEP is the ALL OFF command rather than the device off command in the following step. I naturally thought the device off would work, which points to something wrong in the app, rather than user error. I tried this so many times and tried the room all off command as a last resort, which worked.
5) Power off the unit. Power it back on and send Room 3 All Off from App while it is in pairing mode (LED flashing). Unit should respond by clicking it’s relay a few times. It is now purged. If relay does not click a few times then repeat this step as the command may have arrived too late. This is the critical step in the procedure to ensure the unit is completely cleared out.
I have no idea why the all off command works whilst the device off command doesn’t but there you go.May 2, 2018 at 09:11 #25288
Good to hear that works.
I think the plug in device only purges on Room All Off to reduce the chance of accidentally purging while pairing. It is a little inconvenient if one has other devices in the room. I keep a room spare with only 1 device defined. Then I can pair a plug in to that device to allow a room all off without affecting other stuff.
I have now constructed a dc Power delay circuit which delays powering on the link for about 6 seconds. This means any plug in devices are out of auto pairing mode before the link sends its power up message. So these devices should never inadvertently become trained.
Attachments:You must be logged in to view attached files.May 2, 2018 at 16:07 #25292
Thanks for the help.
As long as the device is in pairing mode by itself, other devices are not affected with the all off.
I have 2 x LW270’s and 3 plug in adapters. Only the socket that is in learning mode when the all off is pressed has any effect.
Since I really need the communication to be there regardless of power outages, I just went down the route of a UPS. I may put a delay circuit in at a later date for any long power cut.
No idea why you get 6 seconds delay from that circuit, but I would ditch the 3K3 resistor, as it just presents a load across the supply, which is not needed and serves no real purpose.May 3, 2018 at 12:06 #25293
Using the Room All Off will turn off other devices in that room although won’t purge them as they are not in pairing mode. It was the inconvenience of having them turn off that I want to avoid.
The circuit gives a 6 second delay because it takes that time for the electrolytic capacitor to charge up to the turn on voltage of the MOSFET. The effective charging source is 3.8V (with reference to the 12V line) and has a source resistance of 350K. Time constant is 16 seconds with 47uF capacitor) but it only needs to get up to about 1.5v before the MOSFET turns on. The delay will vary with the MOSFET turn on value but I am not worried about the absolute value providing it is a few seconds.
I put the diode and the 3.3K resistor in to make sure the capacitor discharged rapidly during a power fail without worrying what the characteristic of the power supply was when off. I wanted to make sure that a short power fail period still gives a delay during the power on. The load and dissipation in the resistor is very low compared to the current going to the link (~200mA).
You must be logged in to reply to this topic.