Apparatus for transcutaneous electrical nerve stimulation in a user, the apparatus comprising: a stimulator (105) for electrically stimulating at least one nerve with at least one stimulation pulse; a controller (520) connected to the stimulator for controlling at least one characteristic of the at least one stimulation pulse; an analyzer (540) for identifying the current and future presence of pain- altering patterns based on weather and/or environmental factors; and a processor (535) connected to the analyzer and the controller for modulating the at least one characteristic of the at least one stimulation pulse according to the pain-altering patterns identified by the analyzer.