Skip to content

WebServer Commands

Dave Williams | DitroniX | G8PUO edited this page Jun 16, 2023 · 6 revisions

The IPEM WebServer Code, includes the below.

WebServer URL Commands. An example is http://ipaddress/pwm-on e.g. http:192.168.0.5/pwm-on

  • /pwm-local - This is Enable PWM to take use Local Power reading from specified variable and output.

  • /pwm-remote - This is Enable PWM to take use Remote Power reading from specified variable and output.

  • /pwm-on - This is Enable PWM to take use Local Power reading from specified variable and output.

  • /pwm-off - This is Turn Off PWM Output

  • /pwm-test - This will turn on a test PWM Loop and output

  • /dac-local - This is Enable DAC to take use Local Power reading from specified variable and output.

  • /dac-remote - This is Enable DAC to take use Remote Power reading from specified variable and output.

  • /dac-on - This is Enable DAC to take use Local Power reading from specified variable and output.

  • /dac-off - This is Turn Off DAC Output

  • /dac-test - This will turn on a test DAC Loop and output

Using this URL structure, you are able to directly control the IPEM board, from the same IP as the OTA, or control from Home Automation, such as Domoticz.

For safety (as we do not now what is connected to thh PWM or DAC Output), the output is initially turned off after any command.

Note: Both PWM and DAC can be turned on at the same time, so a method of MPPT can be created, as an example.

Settings

All values from both PWM and DAC, are configurable within the code. The Output is only sent upon change of variable value. Turning off, will turn the respective output off.

A default maximum power of 4000 Watts is in the formula for range control. So, 0-4000W = 0-100%.

The settings applied upon initialisation are:

  • PWM Resolution Bit: 14
  • PWM Maximum Resolution: 16383
  • DAC Resolution Bit: 8
  • DAC Maximum Resolution: 255

The DAC Test Mode includes three modes/options within the code. These will be expanded to URL control too.

  • 0 = Dynamic Output based on CT Power.
  • 1 = Sinewave (Default 10Hz).
  • 2 = Fixed Test Voltage. This being used for calibration etc.

The DAC control includes the ability to Set Fixed DAC Output from Remote Value, or Leave to Dynamic CT Power Values (WIP)

Work is underway, so the WebServer Page will also include additional information / buttons, relating to this.