Wattmon - Intelligent Remote Monitoring and Control

Wattmon helps you log data, monitor and control your devices over the Internet


Access your data over the Internet using any browser or smart phone


Log data and control your devices with automated rules - no programming required!


View intuitive graphs to understand and troubleshoot your system easily

On-Grid Solutions

PV Plant Monitoring

Connect multiple inverters and energy meters along with weather sensors such as irradiation, wind speed and temperature to keep track of plant performance through the Wattmon EMS cloud. Our platform supports most inverters and power meters out of the box, and can be easily customized to work with new ones.

Zero Feed In / Zero Export

For plants that have restrictions on energy exporting, our solution allows you to dynamically control output power on all inverters in the system – on a single device or across multiple rooftops and ensure that no power is exported to the grid while maintaining maximum generation from solar.

DG Protection

Solar plants can now be run together with diesel generators by controlling solar generation to ensure a healthy minimum load on the genset. This increases fuel efficiency and means your solar plant does not need to remain idle during those power cuts!

Off-Grid Solutions

Battery monitoring

Keep track of the state of charge of your battery bank and understand charge / discharge profiles.

Solar Pumping

Connect to a VFD and keep track of solar generation and water volumes pumped to ensure proper functioning of remote solar pumps.

Features & Benefits

Highly Versatile
Lets you customise device to your exact needs with intuitive interfaces
Easy To Use
Allows non-programmers to configure and automate things
Accessible from your phone, tablet and pc through our proxy server from anywhere
Communicate over TLS1.2 encryption over HTTPS and MQTTS
Industry Compliant Communications
Integrate new and existing devices easily using Modbus RTU & and Modbus TCP, as well as custom protocols
Local Storage
Securely store your data locally, control who can see it
M2M & Cloud Ready
Use Machine to Machine (M2M) protocols to upload data to your own server or use our advanced EMS portal
Write your own scripts in a built-in editor using uPHP or our blockly-based visual code editor to extend functionality
Multiple Network Protocols
Multiple Network Adapters
Connect through Ethernet, 2G, 3G and 4G (via dongle) and Wi-Fi (M2 Only)

Versatile Solutions

Monitoring Hardware
Devices that let you get to your data remotely with minimal hassle
Cloud Portal
Find out how our cloud based portal can help you
Understand the Wattmon system quickly

uPHP functions have an identical syntax to PHP functions in most cases. Below is a list of all the functions that have been implemented.

See the following topics for more information:

Basic uPHP Syntax

uPHP Special Variables

Click on the function name for further details:


adc_read channel number read onboard ADC channel
array values array object create an array with values
array_key array,index value return key for an array index
array_keys array array return keys for an array
base64_decode strong string returns base64-decoded version of string
base64_encode strong string returns base64-encoded version of string
call_user_func string function_name, optional parameters mixed result calls a user defined function with optional parameters
charat string,index number (ascii code) return ASCII code for character in string at index
chdir string number  
chr number String (1 character) return character for number
cos number or float float return cosine of number
debug string none print to debug output
debugout number   Enabled (1) or disable (0) output to the standard output
die none none kill script
disk_free_space int [volume] number get free space on SD
disk_total_space int [volume] number get total space on SD
error_reporting int debug_level none sets the debug output level
exec string filename, number msinterval   run a script
exec_action mixed action   triggers a manually executable action by id or action name
explode string delimiter,string value array turn a string into an array
f485open int baud, int parity int handle Opens the RS-485 port as a stream. The handle can be used with all file functions. Ensure modbus polling is disabled beforehand.
fclose number handle   Closes a file, stream or socket with the passed handle
feof number handle number Returns 0 if no more data is available, or 1 if there is data
fgets number handle, optional number bytes string or -1 for error returns a single line from the file or stream, optionally upto the number of bytes specified
file_exists string filename number Returns 1 if the file exists
filesize number handle number for files returns the number of bytes in file, for stream returns the number of bytes pending
findfirst string pattern, number flags array Start searching the current folder for files matching the pattern and with specified flags. Returns an array with the first matching info
findnext   array Return next matching file information as array
firmwareupdate     initiates a firmware update sequence and reboots the device
floatval Mixed value number returns the floating point value of the number or string
flush     Flushes current output to the browser
fopen string filename, string status Number handle Opens a file for reading or writing, returns the handle for future operations
fread number handle, number bytes string returns number bytes from the stream
freemem   number Returns bytes free
freestack   number Returns current stack bytes free
fseek number handle, number position, number position_type   Locate file pointer inside the open file to position. If position_type is 0, it seeks from the start. If position_type is 1, it seeks from the current position. If position_type=2 it seeks from the end
fseropen number baudrate, optional number blocking number handle Opens the serial port at the specified baud rate
fsockopen string host, optional number timeout Number handle Attempts to create a socket to the host with the protocol specified and returns a handle or 0 if failed
ftell int file handle int file position Returns the current file position of the open file
function_exists string funcname int result Checks if a function (custom or native) exists and returns 1 if so
fwrite number handle, mixed value number of bytes written or -1 for error writes data to the stream or file
get3gstat   array Returns an array of the status of the USB Dongle network interface
getcwd   string Gets the current directory
getethstat   array Returns an array of the status of the LAN interface
getmac   string Returns the network MAC address
getusbstat   array Returns information about the USB host status
header string none add to http header
htmlspecialchars string string convert characters for display in html
ieee754toint float int Takes a floating point value and returns it as an IEEE-754 encoded integer (32 bit)
implode array, string separator string Implodes the array with the separator and returns a string
include string filename none includes a file within the current script at the current location
indexed_array int type,int size array returns an array of [size] element of [type] (1=byte,2=short,3=int,4=float)
ini_get string ini, string section, string key, mixed defvalue mixed returns the value associated with the key if it exists, or the default value otherwise
ini_get_array string ini, string section array returns a key/value array of all items in the section
ini_put_array string ini, optional string section   writes the values in the key/value array to the ini file or to the section inside, if specified.
ini_set string ini, string section, string key, mixed value number (1=OK) writes the value to the section in an INI file
inttoieee754 float int Takes an IEEE-754 encoded integer (32 bit) and returns a float
intval string or float number integer value of the parameter
is_array mixed value number Returns 1 if the variable or value is an array
is_float mixed value number Returns 1 if the variable or value is a floating point value
is_int mixed value number Returns 1 if the variable or value is an integer
is_numeric mixed value number Returns 1 if the value is numeric (integer or float)
is_string mixed value number Returns 1 if the variable or value is a string
isset variable number Returns 1 if the variable exists or 0 if not
json_encode array,type [0=object,1=array) string encode an array as a string
ln number float return natural logarithm of number
log string none print to log
log10 number float return log10 of number
mail string recipient, string title, string body number 0=success, other number contains SMTP error code
max_execution_time number   set maximum execution time in seconds
mb_add_dev number device_id, number device_type_id, string name, number poll_interval, number status Number (0=OK) adds a device to the list of polled devices
mb_delete_device number device_id number (1=OK) delete a device from the list of active device with the slave ID passed
mb_get_dev_by_id number id array modbus device details
mb_get_dev_by_index number index array modbus device details
mb_get_dev_by_name string name array modbus device details
mb_get_dev_info number device type id array modbus device details
mb_get_role_array   array array of all roles and their values
mb_get_status_by_role number role_id number (1=OK) status of the device attached to the role
mb_get_val_by_role number role_id number value of the role in the system
mb_num_devices   number number of devices on the modbus
mb_scan_complete   number 1=complete, 0=ongoing
mb_scan_percent   number percentage completed of scan
mb_send_command mixed, multiple parameters array of numbers send a sequence of characters to the rs485 bus and get reply
mb_queue_command mixed, multiple parameters array of numbers queue a sequence of characters to the rs485 bus and get but ignore reply
mb_set_dev_var string or number device name or id, param string, value number, 1=OK set a variable on a modbus device
mb_set_val_by_role number role_id, number value number, 1=OK set a role value on a modbus device
mb_start_scan number start, number end   initiates an automatic scan of modbus bus
md5 string src string[32] calculates the MD5 hash of the string
md5_file string filename string[32] calculates the MD5 hash of the file
mem_dump   none writes the current memory map to /dump.txt
mem_usage   none writes memory usage to standards output
microtime   number number of milliseconds since boot
mkdir string number FR_OK or erro code
mktime number hr,min,sec,month,day,year number linux timestamp of date
net_disable3g     Disable usb dongle net connectivity
net_enable3g     Enabled usb dongle net connectivity if available
netstat   array returns information about the current http connections
number_format mixed num, number digits string formats the number with the specified number of digits of precision
nvram_backup string filename   writes contents of nvram to the file in filename
nvram_defrag     defragments nvram if required
nvram_dump     dumps the contents of nvram to the standard output
nvram_free   number number of free bytes in nvram
nvram_get string key, mixed def_value string returns the value of the key in nvram, or the def_value if not yet assigned
nvram_restore string filename   reads contents of filename into nvram
nvram_set string key, string value   sets a key and value in nvram
nvram_unset string key   clears a key from nvram
ord string char number num Returns the ASCII number of the character
ow_first   array Initiates a onewire scan and returns the first device found
ow_next   array Returns the next device found or 0 if none
ow_read   number val Reads a byte from the onewire bus
ow_read_temp optional array number Returns the temperature in degrees celcius for the device
ow_reset     Resets the onewire bus
ow_write number val   Writes a byte to the onewire bus
phpinfo   string returns information about the system
pin_configure number pin, number pin_type   configures an IO pin as a digital input, output, or analog input
pin_get number pin number get the value of digital input pin
pin_set Number pin_number, number value   sets a digital output to value (1 or 0)
ping string host array sends an ICMP ping and puts the result in the array
power number num, number factor number returns num to the power of factor
print mixed   output data to the current output stream such as web page or terminal
print_r array   dump the contents of an array to the current output
printf string format, optional values   prints a formatted string to the standard output
process_kill number process_id   sends a kill request to the process number
process_list   array returns an array of the currently running scripts
rand int min, int max int Returns a pseudo-random number between min and max
reboot     Resets the processor
rename string source, stirng dest number Renames or moves a file from source to dest name
reset     If passed with 0 parameters, equivalent to reboot
rmdir string dir number Removes a directory, returns 0 if successful
session_destroy     clears the current sessions data
session_is_new   number Returns 1 if the session is just initiated
session_start     initiates a new session and sends the cookie data for it
set_search_path string   sets the search path for the telnet client
setethpower number   Enables or disables the ethernet controller
setpriority number   sets the priority of the script (2 is high, 1 is low)
settime number   Set system from linux timestamp
setusbpower number   sets the USB host power on or off (1 or 0)
sha1 string src string[40] calculates the SHA1 hash of the string
sin number number Returns the sin value of the number
sizeof array number returns the number of elements in an array
sleep number   Sleep for specified milliseconds
spi_clearcs     clears the CS output of the SPI bus
spi_read   number reads a byte from the SPI bus
spi_setcs     sets the CS output of the SPI bus
spi_write number   writes a byte to the SPI bus
sprintf string format, optional values string formats a string using the format specified using the passed parameters and returns a string
sqr number number Returns the square of a number
sqrt number number Returns the square root of a number
stats   array Returns system statistics
strftime string format, number time string formats the passed time using the format string
strlen string str number Returns the length of a string
strpos string haystack, string needle number Returns the position of the first occurence of needle in haystack or -1 if not found
strrpos string haystack, string needle number Returns the last occurence of haystack in needle, or -1 if not found
strtolower string string returns the lowercase version of the string
strtoupper string string returns the uppercase version of the string
strval Mixed value string Returns the string value of the passed parameter
substr string str, number start, number len string returns a substring of the passed string from start for len characters. If len is blank it will return the string until the end
tar_finish number handle   adds the ending header to a TAR file
tar_put number handle, string filename number (1=OK) adds a file to the currently open file handle in TAR format
time   number Returns the current system timestamp
timefromfat number number converts a FAT filetime to a native timestamp
ucfirst string string convert string to lowercase except for first character
unlink string filename Number (0=OK) removes a file (deletes it)
untar string filename, number verbose   untars a file into the current folder, optionally verbose
uptime   number uptime in milliseconds



REI 2019 Coming Up!

We are excited to be participating in this year's renewable energy expo REI 2019 between 18 and 20 September at Greater Noida - this mega event is one of the largest in Asia and brings over 30,000 visitors and 1,400 exhibitors from around the globe.

Please visit us at booth 1.6 - right at the main entrance in hall 1.  We will be showcasing our power control solutions and officially releasing our new product - the Wattmon M2!

REI 2018

It's that time of year again!  We look forward to interaction with all of you this year at REI 2018 in Greater Noida (if you aren't already planning it - it's between September 18 and 20, 2018).   We have had a great year and expanded our support for inverters and power meters, perfected power control for both zero export and diesel generator protection, and most importantly we are going to be launching a new product as is our tradition every year!

So make sure to visit us at Hall 1 Booth 6 - right at the entrance on the right side!