<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.wattmon.com/dokuwiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://www.wattmon.com/dokuwiki/feed.php">
        <title>Wattmon Documentation Wiki uphp:functions</title>
        <description></description>
        <link>https://www.wattmon.com/dokuwiki/</link>
        <image rdf:resource="https://www.wattmon.com/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico" />
       <dc:date>2026-04-29T09:24:02+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/adc_read?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/aes_decrypt?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/aes_encrypt?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/array?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/array_key?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/array_keys?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/array_resize?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/base64_decode?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/base64_encode?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/call_user_func?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/charat?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/chdir?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/chr?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/clear_watchdog?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/cos?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/debug?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/debugout?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/die?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/disk_free_space?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/disk_status?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/disk_total_space?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/disk_type?rev=1721099531&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/download_info?rev=1645073565&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/error_reporting?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/exec?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/exec_action?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/explode?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/f485open?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/fclose?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/feof?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/fgets?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/file_exists?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/filesize?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/findfirst?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/findnext?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/firmwareupdate?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/flash_status?rev=1721102858&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/floatval?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/flush?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/fopen?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/fread?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/fread_unpack?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/freemem?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/freestack?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/fseek?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/fseropen?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/fsockopen?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ftell?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ftp_close?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ftp_command?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ftp_error?rev=1721104498&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ftp_open?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ftp_size?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ftp_status?rev=1721103852&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ftp_upload?rev=1726134067&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/function_exists?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/fwrite?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/fwrite_pack?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/get3gstat?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/get_csv_data?rev=1721099032&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/getcwd?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/getethstat?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/getmac?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/gettype?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/getusbstat?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/hash_hmac?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/header?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/htmlspecialchars?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ieee754toint?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/implode?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/include?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/indexed_array?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ini_get?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ini_get_array?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ini_put_array?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ini_set?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/init_watchdog?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/inttoieee754?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/intval?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/is_array?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/is_float?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/is_int?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/is_numeric?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/is_string?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/isset?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/json_decode?rev=1636949105&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/json_encode?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ln?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/log?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/log10?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mail?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/max_execution_time?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_add_dev?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_delete_dev?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_delete_device?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_dev_by_id?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_dev_by_index?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_dev_by_name?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_dev_info?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_role_array?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_status_by_role?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_val_by_role?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_num_devices?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_queue_command?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_scan_complete?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_scan_percent?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_send_command?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_set_dev_var?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_set_val_by_role?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mb_start_scan?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/md5?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/md5_file?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mem_dump?rev=1648628821&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mem_usage?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/microtime?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mkdir?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mktime?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mqtt_disconnect?rev=1710126539&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mqtt_publish?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mqtt_subscribe?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/mqttstat?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/net_disable3g?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/net_enable3g?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/netstat?rev=1639127919&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/number_format?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_backup?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_defrag?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_dump?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_free?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_get?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_restore?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_set?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_unset?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ord?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ow_first?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ow_next?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ow_read?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ow_read_temp?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ow_reset?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ow_write?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/pack?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/phpinfo?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/pin_configure?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/pin_get?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/pin_set?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ping?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/power?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/print?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/print_r?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/printf?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/process_kill?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/process_list?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/rand?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/reboot?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/register_callback?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/rename?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/reset?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/rmdir?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/send_sms?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/session_destroy?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/session_is_new?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/session_start?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/set_cert_key?rev=1636715435&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/set_search_path?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/setethpower?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/setpriority?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/settime?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/setusbpower?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/sha1?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/sin?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/sizeof?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/sleep?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/snmp_trap_send?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/spi_clearcs?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/spi_read?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/spi_setcs?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/spi_write?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/sprintf?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/sqr?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/sqrt?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/stats?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/str_replace?rev=1636714790&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/strftime?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/strlen?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/strpos?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/strrpos?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/strtolower?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/strtoupper?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/strval?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/substr?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/sys_get?rev=1721100983&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/sys_set?rev=1721101268&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/tar_finish?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/tar_put?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/time?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/timefromfat?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/trim?rev=1636716080&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/ucfirst?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/unlink?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/unpack?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/untar?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/uptime?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/urldecode?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.wattmon.com/dokuwiki/uphp/functions/urlencode?rev=1631512652&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://www.wattmon.com/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico">
        <title>Wattmon Documentation Wiki</title>
        <link>https://www.wattmon.com/dokuwiki/</link>
        <url>https://www.wattmon.com/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico</url>
    </image>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/adc_read?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:adc_read</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/adc_read?rev=1631512652&amp;do=diff</link>
        <description>adc_read

WMPRO FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Read an onboard ADC channel

Description



Return the raw ADC value of a channel

Parameter

:  Value between 0 and 2

Channel 0 is attached to pin A1, which is the voltage divider to measure battery voltage and can measure up to 60V DC.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/aes_decrypt?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:aes_decrypt</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/aes_decrypt?rev=1631512652&amp;do=diff</link>
        <description>aes_decrypt

WMMEGA FW &gt;= 2.1147 WM-M2 FW &gt;= 3.1147

Decrypt AES-encrypted data in 

Description



Decrypts the string $data with length $length bytes.  Pass the encryption key and iv value in the corresponding fields.

Parameter









Return Values</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/aes_encrypt?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:aes_encrypt</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/aes_encrypt?rev=1631512652&amp;do=diff</link>
        <description>aes_encrypt

WMMEGA FW &gt;= 2.1147 WM-M2 FW &gt;= 3.1147

Encrypt data in  using the AES algorithm

Description



Encrypts the string $data with length $length bytes.  Pass the encryption key and iv value in the corresponding fields.

Parameter









Return Values</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/array?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:array</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/array?rev=1631512652&amp;do=diff</link>
        <description>array

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Create an , with optional values

Description



Parameters



Return Values

:  empty or with values as specified

Examples

Creating Arrays


&lt;? 
  $arr=array(); // create a blank array
  $arr[0]='Item 1';
  $arr[]='Item 2'; // automatically appends the value to the next available key
  $arr[2]='Item 3';
   
  $arr2=array(1,2,3,4); // array of integers
  
  $arr3=array(&quot;one&quot;,2,3.33333,$arr); // mixed array, elements of type: string, integer, flo…</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/array_key?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:array_key</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/array_key?rev=1631512652&amp;do=diff</link>
        <description>array_key

WMPRO, WMMINI FW &gt;= 1.953 WMMEGA FW &gt;= 2.0

Return the key for an  index

Description



Parameters



: The index for the array element (the first element is index 0)

Return Values

 containing the key name of the array element at the specified index</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/array_keys?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:array_keys</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/array_keys?rev=1631512652&amp;do=diff</link>
        <description>array_keys

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return keys for an  that has key/value pairs

Description



Return an  object

Parameter



Return Values

An  of keys

Example


&lt;pre&gt;&lt;?
  $arr=array();
  $arr['name']=&quot;John&quot;;
  $arr['age']=30;
  $arr['status']=1;
  $keys=array_keys($arr);
  print_r($keys);
?&gt;&lt;/pre&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/array_resize?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:array_resize</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/array_resize?rev=1631512652&amp;do=diff</link>
        <description>array_resize

WMMEGA FW &gt;= 2.1179 WM-M2 FW &gt;= 3.1179

Resize an indexed array

Description



Parameters



: The number of elements to resize to.  If this is larger than the current size, 0 values will be inserted at the end.  If the value is smaller, the array will be chopped.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/base64_decode?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:base64_decode</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/base64_decode?rev=1631512652&amp;do=diff</link>
        <description>base64_decode

WMPRO, WMMINI FW &gt;= 1.893 WMMEGA FW &gt;= 2.0

Decode a base64-encoded 

Description



Decodes data encoded with MIME Base64

Parameter



Return Values



Example


&lt;?
  $base64=&quot;VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==&quot;;
  print(base64_decode($base64));
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/base64_encode?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:base64_encode</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/base64_encode?rev=1631512652&amp;do=diff</link>
        <description>base64_encode

WMPRO, WMMINI FW &gt;= 1.893 WMMEGA FW &gt;= 2.0

Return the base64-encoded version of a 

Description



Encodes data using MIME Base64

Parameter



Return Values



Example


&lt;?
  $data=&quot;This will be an encoded string&quot;;
  print(base64_encode($data));
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/call_user_func?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:call_user_func</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/call_user_func?rev=1631512652&amp;do=diff</link>
        <description>call_user_func

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Call a user defined function with optional parameters

Description



Return result as defined by the user function 

Parameters



:  Optional parameter(s) to pass to the function

Return Values</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/charat?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:charat</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/charat?rev=1631512652&amp;do=diff</link>
        <description>charat

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the ASCII code for a character in a 

Description



Parameters



:  Index into string (the first character in the string is index = 0)

Return Values

 ASCII code (0-255)

Example


&lt;?
  $str=&quot;Test String&quot;;
  $ascii=charat($str,5);
  print($ascii); // result is 83
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/chdir?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:chdir</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/chdir?rev=1631512652&amp;do=diff</link>
        <description>chdir

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Change the current directory

Description



Parameter

:  The new current directory

Return Values

:  0 on success or -1 on failure

Example

Change directory to /logs


&lt;?
  chdir(&quot;/logs/&quot;);
?&gt;


See Also</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/chr?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:chr</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/chr?rev=1631512652&amp;do=diff</link>
        <description>chr

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the character for an ASCII 

Description



Parameter

:  ASCII code number (0-255)

Return Values

A one-character  containing the ASCII character referenced by 

Example


&lt;?
  $a=chr(65);
  print($a); // result is 'A' which is the ASCII character number 65
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/clear_watchdog?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:clear_watchdog</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/clear_watchdog?rev=1631512652&amp;do=diff</link>
        <description>clear_watchdog

WMPRO, WMMINI FW &gt;= 1.1112 WMMEGA FW &gt;= 2.1113

Clear the software watchdog timer

Description



Clears the watchdog timer.  This auto-increments in firmware once per second and when it reaches the preset threshold the Wattmon will reboot.  This is implemented to prevent issues if long running scripts block the system.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/cos?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:cos</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/cos?rev=1631512652&amp;do=diff</link>
        <description>cos

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return cosine of a radian angle

Description



Parameter

:  Angle in radians

Return Values

:  Cosine of angle

Examples


&lt;pre&gt;&lt;?
  $pi=3.14159;
  print(cos($pi).&quot;\r\n&quot;);   // result is -1.000000
  print(cos($pi*2).&quot;\r\n&quot;); // result is  1.000000
?&gt;&lt;/pre&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/debug?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:debug</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/debug?rev=1631512652&amp;do=diff</link>
        <description>debug

WMPRO FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Print to debug output

Description



Parameter



Return Values

None

Example


&lt;?
  debug(&quot;This is a debug message&quot;);
  // this will appear on the serial port if connected to a console
?&gt;


See Also

Serial Port Programming - Some information on connecting and using the serial ports</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/debugout?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:debugout</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/debugout?rev=1631512652&amp;do=diff</link>
        <description>debugout

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Enable or disable debug messages

Description



Sets the status of debug messages on the telnet console

Parameter

:  0 to disable, 1 to enable

Return Values

None

Example

Do nothing for 10 seconds during which time all debug alerts appear on the console</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/die?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:die</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/die?rev=1631512652&amp;do=diff</link>
        <description>die

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Kill the script

Description



Terminates the current script

Parameters

None

Return Values

None

Examples


&lt;?
  die(); // nothing beyond this line will be executed
  while (1); // without the die() statement above we'd be stuck here until max_execution_time expires
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/disk_free_space?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:disk_free_space</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/disk_free_space?rev=1631512652&amp;do=diff</link>
        <description>disk_free_space

WMPRO, WMMINI FW &gt;= 1.55 WMMEGA FW &gt;= 2.0 WM2 FW &gt;= 3.0

Return total space on a drive

Description



Parameters

:  0=sd card, 1=internal flash (M2 only)

Return Values

KiloBytes (KB) total for the microSD card (Bytes/1024, rounded to an</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/disk_status?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:disk_status</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/disk_status?rev=1631512652&amp;do=diff</link>
        <description>disk_status

WMPRO, WMMINI FW &gt;= 1.55 WMMEGA FW &gt;= 2.0 WM2 FW &gt;= 3.0

Return mount status of a drive

Description



Parameters

:  0=sd card, 1=internal flash (M2 only)

Return Values

Status of the drive, 1 = unmounted and 0 = mounted.  

Example


&lt;?
  $d1=disk_status(0);
  if ($d1) 
    print(&quot;MicroSD card unmounted&quot;); 
  $d2=disk_status(1);
  if ($d2) 
    print(&quot;Flash unmounted&quot;); 
    
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/disk_total_space?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:disk_total_space</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/disk_total_space?rev=1631512652&amp;do=diff</link>
        <description>disk_total_space

WMPRO, WMMINI FW &gt;= 1.55 WMMEGA FW &gt;= 2.0

Return total space on microSD card

Description



Parameters

None

Return Values

KiloBytes (KB) total for the microSD card (Bytes/1024, rounded to an )

Example


&lt;?
  $dt=disk_total_space();
  print(&quot;The card has &quot;.$dt.&quot; KiloBytes total.&quot;); 
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/disk_type?rev=1721099531&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-07-16T03:12:11+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:disk_type</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/disk_type?rev=1721099531&amp;do=diff</link>
        <description>disk_type

FW &gt;= 1310

Get the file system type

Description



Parameters

&lt;span style=“color:green”&gt;int &lt;span style=“color:blue”&gt;disk_index&lt;span style=“color:black”&gt;: disk index - 0 for SD card, 1 for flash and 2 for RAM

Return Values</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/download_info?rev=1645073565&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-02-17T04:52:45+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:download_info</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/download_info?rev=1645073565&amp;do=diff</link>
        <description>DSM_HOME = 0,

DSM_NAME_RESOLVE,

DSM_ARP_START_RESOLVE,

DSM_ARP_RESOLVE,

DSM_SOCKET_OBTAIN,

DSM_SOCKET_OBTAINED,

DSM_START_SSL,

DSM_START_SSL_WAIT,

DSM_SEND_HEADERS,

DSM_PROCESS_RESPONSE,

DSM_DISCONNECT, 10

DSM_DONE,

DSM_ERROR</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/error_reporting?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:error_reporting</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/error_reporting?rev=1631512652&amp;do=diff</link>
        <description>error_reporting

WMPRO, WMMINI FW &gt;= 1.885 WMMEGA FW &gt;= 2.0

Set the debug output level

Description



Set the verbosity level for debug output messages

Parameter

:  0=error, 1=warning, 2=notice

Return Values

None

See Also

debug() - Print to debug output</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/exec?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:exec</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/exec?rev=1631512652&amp;do=diff</link>
        <description>exec

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Run a script with an optional delay

Description



Parameters

:  Path and filename of script to execute

:  Optional delay in milliseconds before script is started

Return Values

None

Example


&lt;?
  exec(&quot;/scripts/ip.cgi&quot;,1000); // run the external script in 1 second from now
  // ...
  // (if there are any further commands here they will be executed immediately without delay)
  // ...
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/exec_action?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:exec_action</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/exec_action?rev=1631512652&amp;do=diff</link>
        <description>exec_action

WMPRO, WMMINI FW &gt;= 1.887 WMMEGA FW &gt;= 2.0

Triggers a manually executable action by id or name

Description



Parameter

:  ID or name

Return Values

:  Success=1, Error=0

Also See

The WattmonOS user interface for managing actions to automate the Wattmon

WattmonOS - The scripts that run on the SD card</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/explode?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:explode</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/explode?rev=1631512652&amp;do=diff</link>
        <description>explode

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0



Description




Parameters



:  Character to use for separation

Return Values

 of elements

Example


&lt;pre&gt;&lt;?
  $mylist=&quot;one,two,three,four&quot;;
  $myarray=explode($mylist,&quot;,&quot;);
  print_r($myarray);
?&gt;&lt;/pre&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/f485open?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:f485open</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/f485open?rev=1631512652&amp;do=diff</link>
        <description>f485open

WMPRO, WMMINI FW &gt;= 1.922 WMMEGA FW &gt;= 2.0

Open the RS-485 port at the specified baud rate and parity

Description



Attempt to open the RS-485 port as a stream, and return the file handle for future operations

In order to use the RS-485 port, you need to disable modbus polling (see</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/fclose?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:fclose</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/fclose?rev=1631512652&amp;do=diff</link>
        <description>fclose

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Close a file, stream or socket

Description



Close a resource that has previously been opened

Parameter

:  Valid handle of a previously opened resource

Return Values

None

Example


&lt;?
  $f=fopen(&quot;/test.txt&quot;,&quot;r&quot;); // open the file for reading and get the file handle
  if ($f) {
    print(fgets($f)); // print the first line of the file
    fclose($f); // close the file referenced by file handle
  } else {
    print(&quot;Unable to open file /test…</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/feof?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:feof</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/feof?rev=1631512652&amp;do=diff</link>
        <description>feof

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Test if no more data is available in a file, stream or socket

Description



Return 1 (true) if no more data is available: The pointer is at the end of the file (EOF) or there is no more data pending in the stream's input.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/fgets?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:fgets</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/fgets?rev=1631512652&amp;do=diff</link>
        <description>fgets

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return a single line from a file, stream or socket, with optional size limit

Description



This function works with different resource types. If no size is specified, it will keep reading from the file, stream or socket until it reaches the end of the line (or the end of the file). For streams and sockets it will return characters until a line feed (LF) or carriage return (CR) is reached (it will wait until an entire line is received). If the op…</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/file_exists?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:file_exists</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/file_exists?rev=1631512652&amp;do=diff</link>
        <description>file_exists

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Check if a file exists

Description



Return 1 (true) if the file exists, otherwise return 0 (false)

Parameter

:  Full path and file name to check

Return Values

:  1 if file exists, 0 if file does not exist</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/filesize?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:filesize</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/filesize?rev=1631512652&amp;do=diff</link>
        <description>filesize

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the size of a file, or the number of unread bytes in a stream or socket

Description

There are two different forms for this function.

Filename Form - The syntax is the same as in mainline PHP, and uses a filename for the parameter:</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/findfirst?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:findfirst</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/findfirst?rev=1631512652&amp;do=diff</link>
        <description>findfirst

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Start searching the current folder for files matching a pattern and attributes

Description



Begin a search to iterate through a list of files

Parameters

:  Partial or full pattern such as *.* or *.cgi</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/findnext?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:findnext</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/findnext?rev=1631512652&amp;do=diff</link>
        <description>findnext

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return next matching file information (after a findfirst)

Description



Continue a search to iterate through a list of files

Parameters

None

Return Values

 of the next matching file containing the following keys and values:</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/firmwareupdate?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:firmwareupdate</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/firmwareupdate?rev=1631512652&amp;do=diff</link>
        <description>firmwareupdate

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Initiate a firmware update sequence and reboot the device

Description


Make sure that the latest firmware is stored in the file 'image.hex' in the root folder of the SD Card, otherwise it will cause the device to not boot.  To recover from this situation you will need to remove the SD Card, copy a new firmware onto it, reinsert it and power on while holding the reset button at the back of the device</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/flash_status?rev=1721102858&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-07-16T04:07:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:flash_status</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/flash_status?rev=1721102858&amp;do=diff</link>
        <description>flash_status

FW &gt;= 1295

The flash_status() function returns information about the onboard flash chip (if any)

Description



Parameter

None

Return Values

:  Return array contains the following elements:
 Key     Value          state   Flash status</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/floatval?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:floatval</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/floatval?rev=1631512652&amp;do=diff</link>
        <description>floatval

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0



Description



Return the floating point equivalent

Parameter



Return Values

	*   (if an equivalent exists)
	*  
	*  
	*  

Example

Convert the integer '1' into a float variable which has a value of 1.000000</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/flush?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:flush</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/flush?rev=1631512652&amp;do=diff</link>
        <description>flush

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Flush current output to the browser

Description



This function will send out any pending buffered data immediately

Parameters

None

Return Values

None

Example


&lt;?
  print(&quot;This data will be buffered for a while...&quot;);
  flush();
  print(&quot;Buffering will start again here...&quot;);
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/fopen?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:fopen</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/fopen?rev=1631512652&amp;do=diff</link>
        <description>fopen

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Open a file for reading or writing

Description



Attempt to open a file (or special stream) for reading or writing, and return the file handle for future operations

Parameters

:   If a path is omitted, the current directory will be used to search for the file. Relative paths are supported. Two special file names will open specific streams instead:</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/fread?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:fread</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/fread?rev=1631512652&amp;do=diff</link>
        <description>fread

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Read bytes from a file, stream or socket

Description



This function attempts to read a specified number of bytes from a file, stream or socket. If less than the number of bytes are available it will return the available data. If no data is available it will return an empty string.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/fread_unpack?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:fread_unpack</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/fread_unpack?rev=1631512652&amp;do=diff</link>
        <description>fread_unpack

WMMEGA FW &gt;= 2.1179

Read data from a file into an indexed array in binary form.

Description



This function performs a binary-safe read of data from a file into an indexed array that is automatically created.  The format parameter determines the element size of the array.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/freemem?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:freemem</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/freemem?rev=1631512652&amp;do=diff</link>
        <description>freemem

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return free memory space

Description



Parameters

None

Return Values

 number of bytes available in RAM

Example


&lt;pre&gt;&lt;?
  $free=freemem();
  print($free.&quot; bytes free memory\r\n&quot;);
  if ($free&lt;10000) print(&quot;Memory is getting low...&quot;);
?&gt;&lt;/pre&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/freestack?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:freestack</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/freestack?rev=1631512652&amp;do=diff</link>
        <description>freestack

WMPRO, WMMINI FW &gt;= 1.924 WMMEGA FW &gt;= 2.0

Return free stack space

Description



Parameters

None

Return Values

 number of bytes available in the stack

Example


&lt;?
  $free=freestack();
  print($free.&quot; bytes available in the stack&quot;);
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/fseek?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:fseek</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/fseek?rev=1631512652&amp;do=diff</link>
        <description>fseek

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Position the file pointer in an open file

Description



This function will relocate the file pointer within an active file.  Three different start position options are available.

Parameters

:  Valid handle of a previously opened file</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/fseropen?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:fseropen</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/fseropen?rev=1631512652&amp;do=diff</link>
        <description>fseropen

WMPRO FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Open the serial port at the specified baud rate with optional parameters

Description



Attempt to open the serial port, and return the file handle for future operations

Parameters

:  Rate in bits per second</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/fsockopen?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:fsockopen</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/fsockopen?rev=1631512652&amp;do=diff</link>
        <description>fsockopen

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Open an internet socket connection with optional timeout

Description



Attempts to create a socket to a remote host using the protocol specified, and return the file handle for future operations. By default a TCP/IP connection will be initiated. If a UDP connection is required prefix the host name with udp:</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ftell?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ftell</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ftell?rev=1631512652&amp;do=diff</link>
        <description>ftell

WMPRO, WMMINI FW &gt;= 1.94 WMMEGA FW &gt;= 2.0

Return the current position of a file read/write pointer

Description



Return the current file pointer position in an active previously opened file

Parameter

:  Valid handle of a previously opened file</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ftp_close?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ftp_close</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ftp_close?rev=1631512652&amp;do=diff</link>
        <description>ftp_close

WM-MINI2, WM-MEGA FW &gt;= 2.1137 WM-M2 FW &gt;= 3.1137

Close an active FTP connection

Description



Close the FTP connection if it is open.

Parameters

None

Return Values

None

Example


&lt;?
	$res = ftp_open(&quot;ftp.myserver.com&quot;,21,&quot;myuser&quot;,&quot;mypassword&quot;);
	if ($res) {

		// get the current directory on the server

		$res=ftp_command(&quot;pwd&quot;);

		print($res.&quot;\r\n&quot;); // will print out something like: 257 &quot;/&quot; is your current location

		ftp_close();
	}
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ftp_command?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ftp_command</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ftp_command?rev=1631512652&amp;do=diff</link>
        <description>ftp_command

WM-MINI2, WM-MEGA FW &gt;= 2.1137 WM-M2 FW &gt;= 3.1137

Send an FTP command and get the response

Description



Send an FTP command to the server and get the response back

Parameters



Return Values

:  Full response line from the server

Example</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ftp_error?rev=1721104498&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-07-16T04:34:58+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ftp_error</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ftp_error?rev=1721104498&amp;do=diff</link>
        <description>ftp_error

FW &gt;= 1295

The ftp_error() function returns the internal FTP error number

Description



Parameter

None

Return Values

:  Return value is explained in the below table.
 Value     Error Name  Description          0   FTP_RESOLVE_OK   DNS</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ftp_open?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ftp_open</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ftp_open?rev=1631512652&amp;do=diff</link>
        <description>ftp_open

WM-MINI2, WM-MEGA FW &gt;= 2.1137 WM-M2 FW &gt;= 3.1137

Open a connection to an FTP server

Description



Connect to the server and return the response code.

Parameters















Return Values

:  Returns 1 if FTP connection was successful and 0 if it failed.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ftp_size?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ftp_size</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ftp_size?rev=1631512652&amp;do=diff</link>
        <description>ftp_size

WM-MINI2, WM-MEGA FW &gt;= 2.1137 WM-M2 FW &gt;= 3.1137

Get the file size of a file on the remote FTP server

Description



Return the file size of a file on the remote server.

Parameters



Return Values

:  Size of the file in bytes if the value is above or equal to 0.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ftp_status?rev=1721103852&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-07-16T04:24:12+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ftp_status</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ftp_status?rev=1721103852&amp;do=diff</link>
        <description>ftp_status

FW &gt;= 1250

The ftp_status() function returns information about the FTP engine

Description



Parameter



Return Values

:  Return array contains the following elements:
 Key     Value          status   Connection transfer status   file_size</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ftp_upload?rev=1726134067&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-09-12T09:41:07+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ftp_upload</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ftp_upload?rev=1726134067&amp;do=diff</link>
        <description>ftp_upload

WM-MINI2, WM-MEGA FW &gt;= 2.1137 WM-M2 FW &gt;= 3.1137

Upload a file over FTP

Description



Upload a file to the FTP server 

Parameters

See Also

ftp_close() - Close an FTP connection</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/function_exists?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:function_exists</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/function_exists?rev=1631512652&amp;do=diff</link>
        <description>function_exists

WMPRO, WMMINI FW &gt;= 1.887 WMMEGA FW &gt;= 2.0

Check if a function exists (native or custom)

Description



This function will check to see if a function exists in firmware (native, internal) or has been defined in the current script context (custom, user-defined).  It is useful if a script needs to determine if it is being run on an older version of the firmware that might not have some of the newer functions. It can also be used for controlling flow in scripts that define custom…</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/fwrite?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:fwrite</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/fwrite?rev=1631512652&amp;do=diff</link>
        <description>fwrite

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Write data to a file, stream or socket

Description



This function performs a binary-safe write of strings or bytes specified by integers to a previously opened resource

Parameters

:  Valid handle of a previously opened resource</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/fwrite_pack?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:fwrite_pack</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/fwrite_pack?rev=1631512652&amp;do=diff</link>
        <description>fwrite_pack

WMMEGA FW &gt;= 2.1179

Write data from an indexed array in binary form (packed) to a file.

Description



This function performs a binary-safe write of array data.  The data type is determined by the indexed array definition and can be: BYTE, SHORT, INT or FLOAT.  This is an efficient way to write multiple binary bytes to a file in one go.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/get3gstat?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:get3gstat</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/get3gstat?rev=1631512652&amp;do=diff</link>
        <description>get3gstat

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Get cellular data connection status information

Description



Return an array containing information on the status of the USB Dongle network interface

Parameters

None

Return Values

 containing the following keys and values:</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/get_csv_data?rev=1721099032&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-07-16T03:03:52+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:get_csv_data</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/get_csv_data?rev=1721099032&amp;do=diff</link>
        <description>get_csv_data

FW &gt;= 1317

Extract partial CSV data from an existing CSV file

Description



This function takes a filename (including the full path) in the $filename parameter and a list of columns to extract in the $columns field.  The $interval period in minutes is used to extract data at predefined intervals from the start of the file.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/getcwd?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:getcwd</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/getcwd?rev=1631512652&amp;do=diff</link>
        <description>getcwd

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Get the current directory

Description



Return the current path

Parameters

None

Return Values

 containing the current path

Example


&lt;?
  $path=getcwd();
  chdir(&quot;/scripts/&quot;);
  // do something
  chdir($path); // change back to the old location
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/getethstat?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:getethstat</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/getethstat?rev=1631512652&amp;do=diff</link>
        <description>getethstat

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Get Ethernet connection status information

Description



Return an array containing information on the status of the LAN interface

Parameters

None

Return Values

 containing the following keys and values:</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/getmac?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:getmac</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/getmac?rev=1631512652&amp;do=diff</link>
        <description>getmac

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Get the Wattmon's MAC address

Description



Return the Ethernet network MAC address

Parameters

None

Return Values

 containing the MAC

Example


&lt;?
  $mac=getmac();
  print(&quot;Your current MAC address is: &quot;.$mac);
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/gettype?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:gettype</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/gettype?rev=1631512652&amp;do=diff</link>
        <description>gettype

WM-ULTRA &gt;= 4.1195 WMMEGA FW &gt;= 2.1195

The gettype() function is an inbuilt function in uPHP which is used to get the type of a variable. It is used to check the type of existing variable.

Description



Parameter

:  Variable to check the type of</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/getusbstat?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:getusbstat</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/getusbstat?rev=1631512652&amp;do=diff</link>
        <description>getusbstat

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Get USB host status information

Description



Return an array containing information about the state of the USB interface

Parameters

None

Return Values

 containing the following keys and values:</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/hash_hmac?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:hash_hmac</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/hash_hmac?rev=1631512652&amp;do=diff</link>
        <description>hash_hmac

WMMEGA FW &gt;= 2.1030 WM2 FW &gt;= 3.1130

Generate a keyed hash value using the HMAC method

Description



This can be used for cryptography or just for checksum calculations.

Parameter


 Parameter   Algorithm   Return Size (characters)   md5</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/header?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:header</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/header?rev=1631512652&amp;do=diff</link>
        <description>header

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Add to HTTP header

Description



This will add a header line to the HTTP response. Make sure that no data has been sent prior to calling header or else the function will fail. This means the opening tag &lt;? has to appear at the very beginning of the file, if even a single space precedes it, the header function won't work.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/htmlspecialchars?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:htmlspecialchars</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/htmlspecialchars?rev=1631512652&amp;do=diff</link>
        <description>htmlspecialchars

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Convert special characters for display in HTML

Description



Certain characters have special significance in HTML, and should be represented by HTML entities if they are to be displayed in a browser</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ieee754toint?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ieee754toint</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ieee754toint?rev=1631512652&amp;do=diff</link>
        <description>ieee754toint

WMPRO, WMMINI FW &gt;= 1.897 WMMEGA FW &gt;= 2.0



Description





Parameter



Return Values



See Also

inttoieee754() -</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/implode?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:implode</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/implode?rev=1631512652&amp;do=diff</link>
        <description>implode

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0



Description





Parameters





Notes

For float values and indexed float arrays, values are rounded to 3 decimal places.

Return Values



Example


&lt;?
  $mylist=array(&quot;one&quot;,&quot;two&quot;,&quot;three&quot;,&quot;four&quot;);
  $st=implode($mylist,&quot;|&quot;);
  print($st);
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/include?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:include</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/include?rev=1631512652&amp;do=diff</link>
        <description>include

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Include a file within the current script at the current location

Description



This function includes and evaluates the specified file. When a file is included, the code it contains inherits the variable scope of the line on which the include occurs. Any variables available at that line in the calling file will be available within the called file, from that point forward. If the include occurs inside a function within the calling file, then al…</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/indexed_array?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:indexed_array</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/indexed_array?rev=1631512652&amp;do=diff</link>
        <description>indexed_array

WMPRO, WMMINI FW &gt;= 1.898 WMMEGA FW &gt;= 2.0

Create an  of a specific type and size

Description



Create an indexed  with the specified type and number of elements. An indexed array is a more efficient way to store variables in memory if the size and data type is known beforehand. The</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ini_get?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ini_get</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ini_get?rev=1631512652&amp;do=diff</link>
        <description>ini_get

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Get a value from an INI file

Description





Parameters

:  Full path and name of the INI file

:  Name of the section inside the INI file





Return Values





Example

Get the network mask from the Wattmon network configuration file</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ini_get_array?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ini_get_array</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ini_get_array?rev=1631512652&amp;do=diff</link>
        <description>ini_get_array

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Get a group of parameters from an INI file as an 

Description



This function reads multiple configuration key/value pairs from an INI file.

Parameters

:  Full path and name of the INI file</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ini_put_array?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ini_put_array</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ini_put_array?rev=1631512652&amp;do=diff</link>
        <description>ini_put_array

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Write a group of parameters to an INI file from an 

Description




If the INI file already exists it will be entirely overwritten. Use ini_set to partially update an existing INI file.
Parameters

:  Full path and name of the INI file</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ini_set?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ini_set</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ini_set?rev=1631512652&amp;do=diff</link>
        <description>ini_set

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Set a value in an INI file

Description



This function writes a configuration key/value pair to an INI file.







Clearing a Key

By specifying a blank ('') value for the key, the key and value will be erased from the ini file.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/init_watchdog?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:init_watchdog</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/init_watchdog?rev=1631512652&amp;do=diff</link>
        <description>init_watchdog

WMPRO, WMMINI FW &gt;= 1.1112 WMMEGA FW &gt;= 2.1113

Initialize the software watchdog timer

Description



Initializes the watchdog timer.  This auto-increments in firmware once per second and when it reaches the preset threshold the Wattmon will reset and reboot.  This is implemented to prevent issues if long running scripts block the system.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/inttoieee754?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:inttoieee754</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/inttoieee754?rev=1631512652&amp;do=diff</link>
        <description>inttoieee754

WMPRO, WMMINI FW &gt;= 1.897 WMMEGA FW &gt;= 2.0



Description





Parameter



Return Values



See Also

ieee754toint() -</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/intval?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:intval</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/intval?rev=1631512652&amp;do=diff</link>
        <description>intval

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0



Description



Return the  value by rounding

Parameter



Return Values

 value, or:

	*  0 on failure (for example, strings without a numeric in the leftmost characters)
	*  0 on empty 
	*  1 on non-empty</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/is_array?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:is_array</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/is_array?rev=1631512652&amp;do=diff</link>
        <description>is_array

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Check if a variable is an 

Description



Check to see if a variable or value is of type 

Parameter

:  Variable or expression to be evaluated

Return Values



Examples


&lt;?
  $x=1;
  print(is_array($x)); // outputs 0
  $y=array(&quot;one&quot;);
  print(is_array($y)); // outputs 1
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/is_float?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:is_float</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/is_float?rev=1631512652&amp;do=diff</link>
        <description>is_float

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Check if a variable is a 

Description



Check to see if a variable or value is of type  (a floating point number)

Parameter

:  Variable or expression to be evaluated

Return Values

:  1 (true) if</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/is_int?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:is_int</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/is_int?rev=1631512652&amp;do=diff</link>
        <description>is_int

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Check if a variable is an 

Description



Check to see if a variable or value is of type  (an integer)

Parameter

:  Variable or expression to be evaluated

Return Values



Examples


&lt;?
  $x=1;
  print(is_int($x)); // outputs 1, $x is an integer
  $y=1.0;
  print(is_int($y)); // outputs 0, $y is a float
  $z=&quot;1.0&quot;;
  print(is_int($z)); // outputs 0, $z is a string
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/is_numeric?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:is_numeric</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/is_numeric?rev=1631512652&amp;do=diff</link>
        <description>is_numeric

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0



Description



Check to see if a value is numeric

Parameter

:  Variable or expression to be evaluated

Return Values

:  1 (true) if numeric, 0 (false) if not numeric (arrays always return 0)</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/is_string?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:is_string</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/is_string?rev=1631512652&amp;do=diff</link>
        <description>is_string

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Check if a variable is a 

Description



Check to see if a variable or value is of type 

Parameter

:  Variable or expression to be evaluated

Return Values



Examples


&lt;?
  $x=1.0;
  print(is_string($x)); // outputs 0, $x is a float
  $y=&quot;1.0&quot;;
  print(is_string($y)); // outputs 1, $y is a string
  $z=''
  print(is_string($z)); // outputs 1, $z is an empty string
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/isset?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:isset</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/isset?rev=1631512652&amp;do=diff</link>
        <description>isset

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Check if a variable exists

Description



Determine if a variable is set

Parameter

:  Variable to check for existence

Return Values

:  1 (true) if variable exists, 0 (false) if variable does not exist</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/json_decode?rev=1636949105&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-11-15T04:05:05+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:json_decode</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/json_decode?rev=1636949105&amp;do=diff</link>
        <description>json_decode

WMMEGA FW &gt;= 2.1180



Description



Return an 

Parameters



Return Values

JSON decoded 

Example


&lt;pre&gt;&lt;?
   $json_string='{&quot;a&quot;:1,&quot;b&quot;:2,&quot;c&quot;:3}';
   $res=json_decode($json_string);
   print_r($res);
?&gt;&lt;/pre&gt;


The above example will output:</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/json_encode?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:json_encode</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/json_encode?rev=1631512652&amp;do=diff</link>
        <description>json_encode

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0



Description



Return a  containing the JSON encoded representation of an 

Parameters



 to represent an object or an array:

	*  0 - object (default for  not specified)
	*  1 - array (without keys)</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ln?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ln</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ln?rev=1631512652&amp;do=diff</link>
        <description>ln

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the natural logarithm of a 

Description



Parameter



Return Values



Examples


&lt;?
  $val=ln(1);
  print($val); // outputs 0
?&gt;


Note

The natural logarithm of a number is its logarithm to the base of the mathematical constant</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/log?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:log</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/log?rev=1631512652&amp;do=diff</link>
        <description>log

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Print to the System Log (or optional file)

Description



This function places an entry in the default system log /logs/log.txt or in the specified .

Parameters



:  Optional, log file name

Return Values</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/log10?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:log10</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/log10?rev=1631512652&amp;do=diff</link>
        <description>log10

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the base 10 logarithm of a 

Description



Parameter



Return Values



Examples


&lt;?
  $val=log10(10);
  print($val); // outputs 1
?&gt;


See Also

ln() - Return the natural logarithm of a 

power() - Return base raised to the power of exp</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mail?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mail</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mail?rev=1631512652&amp;do=diff</link>
        <description>mail

WMPRO, WMMINI FW &gt;= 1.0 and =&lt; 1.1090 WMMEGA FW &gt;= 2.1160

Send an email [deprecated in WattmonPRO &amp; Mini].  Re-actived in Mega/MINI3 with SSL.

Description



This function will send an email using the SMTP Server settings that are configured in</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/max_execution_time?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:max_execution_time</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/max_execution_time?rev=1631512652&amp;do=diff</link>
        <description>max_execution_time

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Set the maximum execution time for the current script

Description



This function changes the maximum execution time for the current script. If the script continues to execute for longer than this time it is terminated. The default value is not affected by this function, it is configured in</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_add_dev?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_add_dev</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_add_dev?rev=1631512652&amp;do=diff</link>
        <description>mb_add_dev

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Add a device to the list of polled devices

Description



Parameters

:  Device identification number (slave ID)

:  Device type identification number

:  Device name

:  Modbus polling interval</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_delete_dev?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_delete_dev</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_delete_dev?rev=1631512652&amp;do=diff</link>
        <description>mb_delete_dev

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Delete a device from the list of active devices

Description



Parameter

:  Device identification number (slave ID)

Return Values

:  1=success, otherwise there was an error deleting the device</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_delete_device?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_delete_device</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_delete_device?rev=1631512652&amp;do=diff</link>
        <description>mb_delete_device

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Delete a device from the list of active devices

Description



Parameter

:  Device identification number (slave ID)

Return Values

:  1=success, otherwise there was an error deleting the device</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_dev_by_id?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_get_dev_by_id</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_dev_by_id?rev=1631512652&amp;do=diff</link>
        <description>mb_get_dev_by_id

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return modbus device details by 

Description



Parameter

:  Device identification number (slave ID)

:  Optional bus identifier (0 is RS-485 and 2-12 are Modbus TCP channels 1-10 respectively).  This was introduced in 1.1078 and 2.1084.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_dev_by_index?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_get_dev_by_index</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_dev_by_index?rev=1631512652&amp;do=diff</link>
        <description>mb_get_dev_by_index

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return modbus device details by 

Description



Parameter

:  Device index

Return Values



See Also

mb_add_dev() - Add a device to the list of polled devices

mb_delete_dev() - Delete a device from the list of active devices</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_dev_by_name?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_get_dev_by_name</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_dev_by_name?rev=1631512652&amp;do=diff</link>
        <description>mb_get_dev_by_name

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return modbus device details by 

Description



Parameter

:  Device name

Return Values



See Also

mb_add_dev() - Add a device to the list of polled devices

mb_delete_dev() - Delete a device from the list of active devices</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_dev_info?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_get_dev_info</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_dev_info?rev=1631512652&amp;do=diff</link>
        <description>mb_get_dev_info

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return modbus device details by 

Description



Parameter

:  Device type identification number

Return Values



See Also

mb_add_dev() - Add a device to the list of polled devices

mb_delete_dev() - Delete a device from the list of active devices</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_role_array?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_get_role_array</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_role_array?rev=1631512652&amp;do=diff</link>
        <description>mb_get_role_array

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return an  of all roles and their values

Description



Parameters

None

Return Values

 of all roles and their values

See Also

mb_add_dev() - Add a device to the list of polled devices

mb_delete_dev() - Delete a device from the list of active devices</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_status_by_role?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_get_status_by_role</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_status_by_role?rev=1631512652&amp;do=diff</link>
        <description>mb_get_status_by_role

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return status of the device attached to the 

Description



Parameter

:  Role ID number

Return Values

:  1=OK

See Also

mb_add_dev() - Add a device to the list of polled devices

mb_delete_dev() - Delete a device from the list of active devices</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_val_by_role?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_get_val_by_role</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_get_val_by_role?rev=1631512652&amp;do=diff</link>
        <description>mb_get_val_by_role

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return value of the 

Description



Parameter

:  Role ID number

Return Values



See Also

mb_add_dev() - Add a device to the list of polled devices

mb_delete_dev() - Delete a device from the list of active devices</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_num_devices?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_num_devices</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_num_devices?rev=1631512652&amp;do=diff</link>
        <description>mb_num_devices

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return number of devices on the modbus

Description



Parameters

None

Return Values

:  Number of devices on the modbus

See Also

mb_add_dev() - Add a device to the list of polled devices

mb_delete_dev() - Delete a device from the list of active devices</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_queue_command?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_queue_command</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_queue_command?rev=1631512652&amp;do=diff</link>
        <description>mb_queue_command

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Queue a sequence of characters to the RS-485 bus and get but ignore the reply

Description



Parameters



Return Values



See Also

mb_add_dev() - Add a device to the list of polled devices

mb_delete_dev() - Delete a device from the list of active devices</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_scan_complete?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_scan_complete</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_scan_complete?rev=1631512652&amp;do=diff</link>
        <description>mb_scan_complete

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Check to see if a modbus scan has completed

Description



Parameters

None

Return Values

:  1=complete, 0=ongoing

See Also

mb_add_dev() - Add a device to the list of polled devices

mb_delete_dev() - Delete a device from the list of active devices</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_scan_percent?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_scan_percent</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_scan_percent?rev=1631512652&amp;do=diff</link>
        <description>mb_scan_percent

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return scan percentage completed

Description



Parameters

None

Return Values

:  Scan percentage completed

See Also

mb_add_dev() - Add a device to the list of polled devices

mb_delete_dev() - Delete a device from the list of active devices</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_send_command?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_send_command</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_send_command?rev=1631512652&amp;do=diff</link>
        <description>mb_send_command

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Send a sequence of characters to the RS-485 [or TCP Channel] bus and get a reply

Description



Parameters



The $bus parameter can be one of the following values:

0 - Modbus RTU

2-10 - Modbus TCP Channel 1-9</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_set_dev_var?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_set_dev_var</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_set_dev_var?rev=1631512652&amp;do=diff</link>
        <description>mb_set_dev_var

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Set a  on a modbus device

Description



Parameters

:  Device name

:  Device identification number (slave ID)

:  Parameter to set.

This can be the register name, one of the predefined parameters such as</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_set_val_by_role?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_set_val_by_role</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_set_val_by_role?rev=1631512652&amp;do=diff</link>
        <description>mb_set_val_by_role

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Set a  on a modbus device

Description



Parameters

:  Role ID number



Return Values

: 1=OK

See Also

mb_add_dev() - Add a device to the list of polled devices

mb_delete_dev() - Delete a device from the list of active devices</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mb_start_scan?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mb_start_scan</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mb_start_scan?rev=1631512652&amp;do=diff</link>
        <description>mb_start_scan

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Initiate an automatic scan of the modbus

Description



Parameters

:  Starting device identification number

:  Ending device identification number

:  Bus number to scan or leave blank to use RS-485</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/md5?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:md5</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/md5?rev=1631512652&amp;do=diff</link>
        <description>md5

WMPRO, WMMINI FW &gt;= 1.1015 WMMEGA FW &gt;= 2.0

Calculate the MD5 hash of a 

Description



Parameter



Return Values



See Also

md5_file() - Calculate the MD5 hash of a file

sha1() - Calculate the SHA1 hash of a 

hash_hmac() - Calculate the hash of a string

aes_decrypt() - Decrypt a string using the AES algorithm</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/md5_file?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:md5_file</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/md5_file?rev=1631512652&amp;do=diff</link>
        <description>md5_file

WMPRO, WMMINI FW &gt;= 1.1015 WMMEGA FW &gt;= 2.0

Calculate the MD5 hash of a file

Description



Parameter

:  Full path and name

Return Values

:  MD5 hash (32 character hexadecimal number) of the file

See Also

md5() - Calculate the MD5 hash of a</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mem_dump?rev=1648628821&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-03-30T08:27:01+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mem_dump</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mem_dump?rev=1648628821&amp;do=diff</link>
        <description>mem_dump

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Write the current memory map to /dump.txt

Description

Usage 1



Usage 2 (FW &gt; 1217)



Parameters

Passing no parameters will cause the memory block structure to be written to /dump.txt.

Passing an address (hex string) and a length will return a hex encoded string of the contents of the memory area.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mem_usage?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mem_usage</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mem_usage?rev=1631512652&amp;do=diff</link>
        <description>mem_usage

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Write memory usage to standard output

Description



This function will output a summary list showing how memory is currently being used

Parameters

None

Return Values

None

Example


&lt;?
  mem_usage();
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/microtime?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:microtime</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/microtime?rev=1631512652&amp;do=diff</link>
        <description>microtime

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the number of milliseconds since boot

Description



Parameters

None

Return Values

:  Milliseconds since boot

See Also

mktime() - Return the Linux Timestamp for a given date and time

settime() - Set the system time from a Linux Timestamp, with optional calibration</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mkdir?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mkdir</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mkdir?rev=1631512652&amp;do=diff</link>
        <description>mkdir

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Make a directory

Description



This function attempts to create a new directory as specified by the 

Parameter

:  The directory path.  Using a / at the beginning will make it relative to the root, otherwise it will be relative to the current working directory, which is either the folder that the script was started in or as was set by</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mktime?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mktime</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mktime?rev=1631512652&amp;do=diff</link>
        <description>mktime

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the Linux Timestamp for a given date and time

Description



Parameters

:  Hour 0-23

:  Minutes 0-59

:  Seconds 0-59

:  Month 0-11

:  Day 1-31 (depending on the month)

:  Year, four digit representation</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mqtt_disconnect?rev=1710126539&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-03-11T03:08:59+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mqtt_disconnect</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mqtt_disconnect?rev=1710126539&amp;do=diff</link>
        <description>mqtt_disconnect

WMMEGA FW &gt;= 2.1161

Disconnect the current MQTT connection

Description



This function disconnects the current MQTT connection, allowing you to resubscribe in case of a connection issue.  For information on connection parameters see</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mqtt_publish?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mqtt_publish</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mqtt_publish?rev=1631512652&amp;do=diff</link>
        <description>mqtt_publish

WMPRO, WMMINI FW &gt;= 1.1074 WMMEGA FW &gt;= 2.1078

Publish a message to an MQTT channel

Description



Parameters

:  Channel to publish to.  See MQTT Configuration

:  Message content to publish

Return Values

1 if successful and 0 on failure

See Also</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mqtt_subscribe?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mqtt_subscribe</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mqtt_subscribe?rev=1631512652&amp;do=diff</link>
        <description>mqtt_subscribe

WMPRO, WMMINI FW &gt;= 1.1074 WMMEGA FW &gt;= 2.1078

Subscribe to an MQTT channel

Description



Parameters

:  Channel to subscribe to.  See MQTT Configuration

:  Callback script to execute upon receipt of a message

Return Values

1 if successful and 0 on failure</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/mqttstat?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:mqttstat</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/mqttstat?rev=1631512652&amp;do=diff</link>
        <description>mqttstat

WMMEGA FW &gt;= 2.1161

Get MQTT connection status

Description



Parameters

None

Return Values

Array of the following values
 Key         Value                                 CONNECTED   1 if connected or 0 if disconnected   IDLE   1 if idle or 0 if busy</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/net_disable3g?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:net_disable3g</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/net_disable3g?rev=1631512652&amp;do=diff</link>
        <description>net_disable3g

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Disable 3G support for the dongle

Description



This function disables the 2G/3G PPP stack, allowing you to interface with a USB CDC device or the 3G modem via text commands

Parameters

None</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/net_enable3g?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:net_enable3g</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/net_enable3g?rev=1631512652&amp;do=diff</link>
        <description>net_enable3g

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Enable 3G support for the dongle

Description



This enables the 2G/3G PPP stack which will automatically connect to the Internet once the dongle is plugged in

Parameters

None

Return Values</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/netstat?rev=1639127919&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-12-10T09:18:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:netstat</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/netstat?rev=1639127919&amp;do=diff</link>
        <description>netstat

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Get Ethernet information

Description



This function returns an  containing information about the state of the network interface

Parameters

None

Return Values

 containing the following keys and values:</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/number_format?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:number_format</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/number_format?rev=1631512652&amp;do=diff</link>
        <description>number_format

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0



Description



Parameters





Return Values

 value formatted at the specified precision

Example

Convert the float 1.55 into an string with a precision of 1 decimal point


&lt;?
  $f=1.55;
  $i=number_format($f,1);
  print(&quot;The value of &quot;.$f.&quot; is &quot;.$i);
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_backup?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:nvram_backup</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/nvram_backup?rev=1631512652&amp;do=diff</link>
        <description>nvram_backup

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Backup the contents of NVRAM to a file on the SD Card

Description



Parameter

:  Full path and file name for where to store the NVRAM data

Return Values

 number of bytes written, or 0 if unsuccessful</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_defrag?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:nvram_defrag</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/nvram_defrag?rev=1631512652&amp;do=diff</link>
        <description>nvram_defrag

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Defragment NVRAM to optimise it

Description



This function will defragment NVRAM if required

Parameters

None

Return Values

None

Example


&lt;?
  nvram_defrag();
?&gt;


See Also

nvram_restore() - Restore the contents of</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_dump?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:nvram_dump</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/nvram_dump?rev=1631512652&amp;do=diff</link>
        <description>nvram_dump

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Dump the contents of NVRAM to standard output

Description



This function will dump the entire contents of NVRAM to the standard output (console or script) for debugging purposes

Parameters

None</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_free?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:nvram_free</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/nvram_free?rev=1631512652&amp;do=diff</link>
        <description>nvram_free

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the number of bytes available in NVRAM

Description



Parameters

None

Return Values

:  The number of bytes free in NVRAM

Example


&lt;?
  $res=nvram_free();
  print(&quot;NVRAM Free Size: &quot;.$res);  
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_get?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:nvram_get</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/nvram_get?rev=1631512652&amp;do=diff</link>
        <description>nvram_get

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Get a value from NVRAM

Description



Parameter



Return Values

NVRAMNVRAM

Example


&lt;?
  $res=nvram_get(&quot;myvariable&quot;);
  if ($res) {
    print(&quot;The NVRAM Variable myvariable contains: &quot;.$res);
  }
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_restore?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:nvram_restore</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/nvram_restore?rev=1631512652&amp;do=diff</link>
        <description>nvram_restore

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Restore the contents of NVRAM from a file

Description



Parameter

:  Full path and file name to restore from

Return Values

 number of bytes restored, or 0 if unsuccessful

Example


&lt;?
  $res=nvram_restore(&quot;/mybackup.dat&quot;);
  if ($res &gt; 0) {
    print(&quot;NVRAM Restore complete. File Size: &quot;.$res);
  } else {
    print(&quot;Restore failed.&quot;);
  }
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_set?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:nvram_set</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/nvram_set?rev=1631512652&amp;do=diff</link>
        <description>nvram_set

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

NVRAM

Description



NVRAM

Parameters



 value to set.  If you wish to set a numeric value, first convert it to a string using strval() or number_format().

Return Values

:  1 on success, or 0 on failure

Example


&lt;?
  $res=nvram_set(&quot;myvariable&quot;,&quot;Test&quot;);
  if (!$res) print(&quot;Error saving NVRAM key/value&quot;);
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/nvram_unset?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:nvram_unset</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/nvram_unset?rev=1631512652&amp;do=diff</link>
        <description>nvram_unset

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Clear a  from NVRAM

Description



This function will unset (clear) a value in NVRAM for a particular 

Parameter



Return Values

:  1 on success, 0 on failure

Example


&lt;?
  $res=nvram_unset(&quot;myvariable&quot;);
  if (!$res) print(&quot;Error clearing NVRAM key/value&quot;);
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ord?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ord</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ord?rev=1631512652&amp;do=diff</link>
        <description>ord

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the ASCII code for a 

Description



Parameter



Return Values



Example


&lt;?
  $a=chr(65);
  $o=ord($a);
  print(&quot;Character &quot;.$a.&quot; has ASCII code &quot;.$o);
?&gt;


See Also

chr() - Return the character for an</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ow_first?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ow_first</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ow_first?rev=1631512652&amp;do=diff</link>
        <description>ow_first

WMPRO &gt;= 1.0 WMMEGA FW &gt;= 2.0

Initiate a OneWire bus scan and return the address of the first device found

Description



This function starts a new OneWire bus scan and provides the address of the first device found.  Currently only DS18B20 temperature sensors are detectable.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ow_next?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ow_next</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ow_next?rev=1631512652&amp;do=diff</link>
        <description>ow_next

WMPRO &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the address of the next OneWire device found (after an ow_first)

Description



This function continues a OneWire bus scan and provides the address of the next device found.  Currently only DS18B20 temperature sensors are detectable.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ow_read?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ow_read</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ow_read?rev=1631512652&amp;do=diff</link>
        <description>ow_read

WMPRO &gt;= 1.0 WMMEGA FW &gt;= 2.0

Read a byte from the OneWire bus

Description



This function will read a single byte from the OneWire bus.  This is a low level function allowing custom OneWire operations.

Parameters

None

Return Values

An</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ow_read_temp?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ow_read_temp</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ow_read_temp?rev=1631512652&amp;do=diff</link>
        <description>ow_read_temp

WMPRO &gt;= 1.0 WMMEGA FW &gt;= 2.0

Read a temperature from a device on the OneWire bus

Description



Parameter



Return Values

A  value containing the temperature in degrees Celsius

Examples


&lt;?
  
  $res=ow_read_temp();
  print(&quot;Temperature for the first sensor is &quot;.$res);
  
  $dev=array(0xA0,0x00,0x00,0x04,0x80,0x57,0x77,0x35);
  $res=ow_read_temp($dev);
  print(&quot;Temperature for the specified device is &quot;.$res);
  
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ow_reset?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ow_reset</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ow_reset?rev=1631512652&amp;do=diff</link>
        <description>ow_reset

WMPRO &gt;= 1.0 WMMEGA FW &gt;= 2.0

Reset the OneWire bus

Description



This function sends a reset signal to the OneWire bus.  This is a low level function for custom OneWire bus operations.

Parameters

None

Return Values

None

Example


&lt;?
  ow_reset();
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ow_write?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ow_write</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ow_write?rev=1631512652&amp;do=diff</link>
        <description>ow_write

WMPRO &gt;= 1.0 WMMEGA FW &gt;= 2.0

Write a byte to the OneWire bus

Description



This function will write a single byte to the OneWire bus.  This is a low level function allowing custom OneWire operations.

Parameter

 value of the byte to send to the OneWire bus</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/pack?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:pack</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/pack?rev=1631512652&amp;do=diff</link>
        <description>pack

WMMEGA FW &gt;= 2.1167



Description





Parameters


 Value   Description                                       l       signed long (always 32 bit, machine byte order)   L       unsigned long (always 32 bit, machine byte order)   f       floating point(always 32 bit, machine byte order)</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/phpinfo?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:phpinfo</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/phpinfo?rev=1631512652&amp;do=diff</link>
        <description>phpinfo

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return information about the system

Description



Parameters

None

Return Values

:  Firmware version and basic operating system information in a list format

Example


&lt;?
  print(phpinfo());
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/pin_configure?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:pin_configure</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/pin_configure?rev=1631512652&amp;do=diff</link>
        <description>pin_configure

WMPRO FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Configure an I/O pin as a digital input, output, or analog input

Description



This function will change settings for certain pins on WattmonPRO and MEGA.  This is actually not to be used unless you know what you are doing, because it may cause certain parts of the device to not function properly.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/pin_get?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:pin_get</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/pin_get?rev=1631512652&amp;do=diff</link>
        <description>pin_get

WMPRO FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the value of an I/O pin

Description





Parameters

:  The internal pin number.  Refer to pin_configure() for the list of available pins.

:
Description1 Digital Output2 Digital Input4 Analog Input16Counter
Return Values</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/pin_set?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:pin_set</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/pin_set?rev=1631512652&amp;do=diff</link>
        <description>pin_set

WMPRO FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Set a digital output to  1 or 0

Description



Parameters

:  The internal pin number.  Refer to pin_configure() for the list of available pins.  If the pin is not configured as a digital output this function does nothing.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ping?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ping</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ping?rev=1631512652&amp;do=diff</link>
        <description>ping

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Send an ICMP ping and place the result in an 

Description





Parameter

:  A URI web address name (such as example.com) or an IP address (such as 172.16.254.1). If a URI is provided the function will attempt to resolve it to an IP address by</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/power?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:power</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/power?rev=1631512652&amp;do=diff</link>
        <description>power

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0



Description



Parameters

:  The base to use

:  The exponent

Return Values



See Also

sqr() - Return the square of a 

sqrt() - Return the square root of a 

ln() - Return the natural logarithm of a 

log10() - Return the base 10 logarithm of a</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/print?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:print</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/print?rev=1631512652&amp;do=diff</link>
        <description>print

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Print  to the current output stream such as a web page or terminal

Description



Parameter

:  The data to print

Return Values

None

Example


&lt;pre&gt;&lt;?
  print(&quot;Hello\r\n&quot;);
  print(&quot;World\r\n&quot;);
?&gt;&lt;/pre&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/print_r?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:print_r</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/print_r?rev=1631512652&amp;do=diff</link>
        <description>print_r

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Dump the contents of an  to the current output

Description



Prints human-readable information about an 

Parameter

:  The  to dump to the current output

Return Values

None

Examples

Create an array with key/value pairs and dump the contents to the current output</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/printf?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:printf</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/printf?rev=1631512652&amp;do=diff</link>
        <description>printf

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Print a formatted string to standard output

Description



. Each  fetches one parameter from the .

Parameters

 with literal text and/or 



Return Values

None

Conversion Specifiers

A conversion specification sequence consists of a</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/process_kill?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:process_kill</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/process_kill?rev=1631512652&amp;do=diff</link>
        <description>process_kill

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Send a kill request to a process

Description



This function attempts to end a running script.  This does not ensure the process will die, it merely does it's best by setting flags in the running process that it should terminate after the next instruction.  If for some reason a script has frozen, it may not actually terminate in which case it will still be listed in the process list.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/process_list?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:process_list</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/process_list?rev=1631512652&amp;do=diff</link>
        <description>process_list

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return an  of the currently running scripts

Description



Parameters

None

Return Values

An array of arrays containing key/value pairs with information about each running process:
KeyTypeValue Description</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/rand?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:rand</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/rand?rev=1631512652&amp;do=diff</link>
        <description>rand

WMPRO, WMMINI FW &gt;= 1.893 WMMEGA FW &gt;= 2.0



Description





Parameters

:  Minimum possible value

:  Maximum, returned values will be less than this

Return Values

Pseudo-random 

Example

Generate 5 random numbers between 0 and 99


&lt;pre&gt;&lt;?
  for ($i=1; $i&lt;=5; $i++) {
    print(rand(0,100).&quot;\r\n&quot;);
  }
?&gt;&lt;/pre&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/reboot?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:reboot</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/reboot?rev=1631512652&amp;do=diff</link>
        <description>reboot

WMPRO, WMMINI &gt;= 1.931 WMMEGA FW &gt;= 2.0

Reboot the processor

Description



This function will reset the processor causing the Wattmon to reboot

Parameters

None

Return Values

None

Example


&lt;?
  reboot();
?&gt;


See Also

reset() - Reset the processor</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/register_callback?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:register_callback</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/register_callback?rev=1631512652&amp;do=diff</link>
        <description>register_callback

WM-MEGA, WM-M2, WM-MINI2 &gt;= 2.1000

Register a call back to a system event

Description



This function will register a callback which will be called when a system event occurs.&lt;/html&gt;

Parameters

:
 Name      Description        DATA_RX</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/rename?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:rename</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/rename?rev=1631512652&amp;do=diff</link>
        <description>rename

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0



Description



This function attempts to rename or move a file or directory from , moving it between directories if necessary.  Relative paths are supported for both parameters:  using a / at the beginning will make it relative to the root, otherwise it will be relative to the current working directory, which is either the folder that the script was started in or as was set by</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/reset?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:reset</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/reset?rev=1631512652&amp;do=diff</link>
        <description>reset

WMPRO, WMMINI &gt;= 1.0 WMMEGA FW &gt;= 2.0

Reset the processor

Description



If passed with no parameters this function will reset the processor causing the Wattmon to reboot (equivalent to reboot())

Parameters

None for reboot

Return Values

None

Example


&lt;?
  reset();
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/rmdir?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:rmdir</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/rmdir?rev=1631512652&amp;do=diff</link>
        <description>rmdir

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Remove a directory, with optional deletion of contents

Description



This function attempts to remove a directory as specified by the 

Parameters

:  The directory path.  Using a / at the beginning will make it relative to the root, otherwise it will be relative to the current working directory, which is either the folder that the script was started in or as was set by</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/send_sms?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:send_sms</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/send_sms?rev=1631512652&amp;do=diff</link>
        <description>send_sms

WMPRO, WMMINI FW &gt;= 1.1094 WMMEGA FW &gt;= 2.1094

Send an SMS through a USB cellular dongle

Description



This function attempts to send an SMS using a connect cellular dongle.  This assumes that the dongle has already been recognized by Wattmon and that it has established a CDC connection.  This will disconnect any Internet session (TCP/IP or otherwise), send the 
SMS and then restart the dongle.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/session_destroy?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:session_destroy</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/session_destroy?rev=1631512652&amp;do=diff</link>
        <description>session_destroy

WMPRO, WMMINI &gt;= 1.0 WMMEGA FW &gt;= 2.0

Clear the current session's data

Description



This is only applicable for HTTP initiated scripts.  An internal $_SESSION array is available to all HTTP scripts to allow for persistent variables to be shared between scripts.  This array is associated with the script based on a cookie created at login.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/session_is_new?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:session_is_new</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/session_is_new?rev=1631512652&amp;do=diff</link>
        <description>session_is_new

WMPRO, WMMINI &gt;= 1.0 WMMEGA FW &gt;= 2.0

Check if a session was just initiated

Description



This is only applicable for HTTP initiated scripts.

This is supposed to return a non-zero value if the session has just been created (first time the page is loaded from a browser session).  However, at the time of this writing we're not sure if this works, and it needs to be tested</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/session_start?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:session_start</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/session_start?rev=1631512652&amp;do=diff</link>
        <description>session_start

WMPRO, WMMINI &gt;= 1.0 WMMEGA FW &gt;= 2.0

Initiate a new session and send the cookie data for it

Description



This function will start a new session and clear any existing session information.  This generates a random session ID and passes it as a cookie back to the browser, so it needs to be called before any other data is sent out.  You can then set session variables through the global</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/set_cert_key?rev=1636715435&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-11-12T11:10:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:set_cert_key</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/set_cert_key?rev=1636715435&amp;do=diff</link>
        <description>set_cert_key

WMMEGA FW &gt;= 2.1198

Set a custom certificate for TLS

Description



This function lets you use a custom certificate for HTTPS transactions.

Parameter

:  The contents of the PEM key file

:  The contents of the CRT  file

Return Values</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/set_search_path?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:set_search_path</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/set_search_path?rev=1631512652&amp;do=diff</link>
        <description>set_search_path

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Set the search path for the telnet client

Description



This function sets the search path which is used when entering a command at the telnet prompt

Parameter

:  The directory path

Return Values</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/setethpower?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:setethpower</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/setethpower?rev=1631512652&amp;do=diff</link>
        <description>setethpower

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Enable or disable the ethernet controller

Description



This function will turn on or off the ethernet controller MAC layer.

Turning it off will save power but render your device unreachable (you could always switch it back on periodically).  When off, the power consumption is reduced from 2W down to 1W.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/setpriority?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:setpriority</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/setpriority?rev=1631512652&amp;do=diff</link>
        <description>setpriority

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Set the  of the current script

Description



This function can be used to run a script with a higher priority if required.  If  &gt; 0, it will wait till all other scripts are finished before continuing, so that the maximum amount of memory is available to the script.</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/settime?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:settime</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/settime?rev=1631512652&amp;do=diff</link>
        <description>settime

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0



Description





Parameters

:  Seconds since January 1, 1970, 00:00:00, local Wattmon time

:  Optional, value to set in the RTC calibration register

Return Values

None

Notes

Unlike mainline PHP, in uPHP</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/setusbpower?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:setusbpower</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/setusbpower?rev=1631512652&amp;do=diff</link>
        <description>setusbpower

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Enable or disable USB power

Description



This function will turn on or off the power for USB.  This can be used to reset a USB dongle or just to disable it if required.

Parameter

:

	*  1 - Enable USB power</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/sha1?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:sha1</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/sha1?rev=1631512652&amp;do=diff</link>
        <description>sha1

WMPRO, WMMINI FW &gt;= 1.1015 WMMEGA FW &gt;= 2.0

Calculate the SHA1 hash of a 

Description



This can be used for cryptography or just for checksum calculations.

For more information on SHA1, see this Wikipedia link.

Parameter



Return Values



Example


&lt;?
  // Name this example and call it with this: sha1.cgi?key=secretkey

  // SHA1 hash value for &quot;secretkey&quot;:
  $hash=&quot;9885F8AF04289135DF259E34BD22D17FE45EA81E&quot;;

  if (sha1($_GET['key']) == $hash) {
    print(&quot;hashes match!&quot;);
  }
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/sin?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:sin</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/sin?rev=1631512652&amp;do=diff</link>
        <description>sin

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return sine of a radian angle

Description



Parameter

:  Angle in radians

Return Values

:  Sine of angle

Examples


&lt;?
  $pi=3.14159;
  print(sin($pi/2)); // result is 1
  print(sin($pi));   // result is 0
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/sizeof?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:sizeof</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/sizeof?rev=1631512652&amp;do=diff</link>
        <description>sizeof

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the number of elements in an 

Description



Parameter



Return Values



Examples


&lt;?

  $array1[0]=1;
  $array1[1]=3;
  $array1[2]=5;
  print(sizeof($array1)); // output 3
  
  $array2[0]=7;
  $array2[5]=9;
  $array2[10]=11;
  print(sizeof($array2)); // output 3
  
  $array3=array();        // blank array
  print(sizeof($array3)); // output 0
  
  $array3=indexed_array(1,100); // indexed array of bytes
  print(sizeof($array3));       …</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/sleep?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:sleep</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/sleep?rev=1631512652&amp;do=diff</link>
        <description>sleep

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Sleep for specified milliseconds

Description



This function causes script execution to delay for the specified number of milliseconds before resuming

Parameter

:  Milliseconds to sleep

Return Values</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/snmp_trap_send?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:snmp_trap_send</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/snmp_trap_send?rev=1631512652&amp;do=diff</link>
        <description>snmp_trap_send

WMMEGA,MINI3 &gt;= 2.1175 WM-M2 &gt;= 3.1175

Send an SNMP Trap message

Description



Send a message via SNMP Trap to the configured trap server.  This will be transmitted as an ASCII message.

Parameter



Return Values



Example


&lt;?
  $res = snmp_trap_send(&quot;Voltage exceeded threshold&quot;);
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/spi_clearcs?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:spi_clearcs</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/spi_clearcs?rev=1631512652&amp;do=diff</link>
        <description>spi_clearcs

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Clear the CS output of the SPI bus

Description



Parameters

None

Return Values

None

See Also

spi_read() - Read a byte from the SPI bus

spi_setcs() - Set the CS output of the SPI bus

spi_write() - Write a byte to the SPI</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/spi_read?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:spi_read</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/spi_read?rev=1631512652&amp;do=diff</link>
        <description>spi_read

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Read a byte from the SPI bus

Description



Parameter

None

Return Values

An  byte value read from the SPI bus (0-255)

See Also

spi_clearcs() - Clear the CS output of the SPI bus

spi_setcs() - Set the CS output of the</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/spi_setcs?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:spi_setcs</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/spi_setcs?rev=1631512652&amp;do=diff</link>
        <description>spi_setcs

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Set the CS output of the SPI bus

Description



Parameters

None

Return Values

None

See Also

spi_clearcs() - Clear the CS output of the SPI bus

spi_read() - Read a byte from the SPI bus

spi_write() - Write a byte to the SPI bus</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/spi_write?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:spi_write</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/spi_write?rev=1631512652&amp;do=diff</link>
        <description>spi_write

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Write a byte to the SPI bus

Description



Parameter

 byte value to write to the SPI bus (0-255)

Return Values

None

See Also

spi_clearcs() - Clear the CS output of the SPI bus

spi_read() - Read a byte from the SPI</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/sprintf?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:sprintf</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/sprintf?rev=1631512652&amp;do=diff</link>
        <description>sprintf

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return a formatted 

Description



. Each  fetches one parameter from the .

Parameters

 with literal text and/or 



Return Values

Formatted  with all supported  replaced with the converted value</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/sqr?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:sqr</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/sqr?rev=1631512652&amp;do=diff</link>
        <description>sqr

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the square of a 

Description



Parameter



Return Values



See Also

power() - Return base raised to the power of exp

sqrt() - Return the square root of a</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/sqrt?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:sqrt</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/sqrt?rev=1631512652&amp;do=diff</link>
        <description>sqrt

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the square root of a 

Description



Parameter



Return Values



See Also

power() - Return base raised to the power of exp

sqr() - Return the square of a</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/stats?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:stats</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/stats?rev=1631512652&amp;do=diff</link>
        <description>stats

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return system statistics

Description



Parameters

None

Return Values

An  of current system information containing the following key/value pairs:
KeyTypecron_script      http_script      heap_free</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/str_replace?rev=1636714790&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-11-12T10:59:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:str_replace</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/str_replace?rev=1636714790&amp;do=diff</link>
        <description>str_replace

WMMEGA FW &gt;= 2.1188



Description





Parameters

 to search for

 to replace with

 with the search strings to be replaced

 which will contain the number of replacements made.  Make sure you pass this with a &amp; before the variable (pass by reference)</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/strftime?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:strftime</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/strftime?rev=1631512652&amp;do=diff</link>
        <description>strftime

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0



Description



Parameters

 with Format Character Sequences which can also contain literal text

:  Seconds since January 1, 1970, 00:00:00, local Wattmon time

Return Values

Formatted  with all supported</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/strlen?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:strlen</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/strlen?rev=1631512652&amp;do=diff</link>
        <description>strlen

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the length of a 

Description



Parameter



Return Values



Examples


&lt;?
  $str='abcdef';
  echo strlen($str); // 6

  $str=' ab cd ';
  echo strlen($str); // 7
?&gt;


See Also

charat() - Return the</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/strpos?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:strpos</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/strpos?rev=1631512652&amp;do=diff</link>
        <description>strpos

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0



Description





Parameters

 to search in

 to search for

Return Values



Note that string positions start at 0, and not 1.

Example


&lt;?
  $str='abcdefabcdef';
  $pos=strpos($str,'abc')
  if ($pos&gt;=0) {
    print(&quot;Substring found at position &quot;.$pos); // 0
  }
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/strrpos?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:strrpos</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/strrpos?rev=1631512652&amp;do=diff</link>
        <description>strrpos

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0



Description





Parameters

 to search in

 to search for

Return Values



Note that string positions start at 0, and not 1.

Example


&lt;?
  $str='abcdefabcdef';
  $pos=strrpos($str,'abc')
  if ($pos&gt;=0) {
    print(&quot;Substring found at position &quot;.$pos); // 6
  }
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/strtolower?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:strtolower</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/strtolower?rev=1631512652&amp;do=diff</link>
        <description>strtolower

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the lowercase version of a 

Description



This function converts all alphabetic characters in  to lowercase

Parameter



Return Values

lowercase 

Example


&lt;?
  $str=&quot;Mary Had A Little Lamb and She LOVED It So&quot;;
  $str=strtolower($str);
  print($str); // Prints &quot;mary had a little lamb and she loved it so&quot;
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/strtoupper?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:strtoupper</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/strtoupper?rev=1631512652&amp;do=diff</link>
        <description>strtoupper

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the UPPERCASE version of a 

Description



This function converts all alphabetic characters in  to UPPERCASE

Parameter



Return Values

UPPERCASE 

Example


&lt;?
  $str=&quot;Mary Had A Little Lamb and She LOVED It So&quot;;
  $str=strtoupper($str);
  print($str); // Prints &quot;MARY HAD A LITTLE LAMB AND SHE LOVED IT SO&quot;
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/strval?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:strval</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/strval?rev=1631512652&amp;do=diff</link>
        <description>strval

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0



Description



Type cast an 

Parameter



Return Values
RETURN VALUE
Examples


&lt;pre&gt;&lt;?
  
  $i=100;
  $str=strval($i);
  print(&quot;The string value of the integer '&quot;.$i.&quot;' is '&quot;.$str.&quot;'\r\n&quot;);

  $f=1.55;
  $str=strval($f);
  print(&quot;The string value of the float '&quot;.$f.&quot;' is '&quot;.$str.&quot;'\r\n&quot;);
  
  $s=&quot;100 dollars&quot;
  print(&quot;The string value of the string '&quot;.$s.&quot;' is '&quot;.strval($s).&quot;'\r\n&quot;);
  
  $arr1=array();            // empty array
  print(&quot;str…</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/substr?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:substr</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/substr?rev=1631512652&amp;do=diff</link>
        <description>substr

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return part of a 

Description



This function returns a substring of a 

Parameters

. Must be one character or longer.





Note



Return Values





Examples


&lt;pre&gt;&lt;?
  print(substr('abcdef',1).&quot;\r\n&quot;);    // bcdef
  print(substr('abcdef',1,3).&quot;\r\n&quot;);  // bcd
  print(substr('abcdef',0,4).&quot;\r\n&quot;);  // abcd
  print(substr('abcdef',0,8).&quot;\r\n&quot;);  // abcdef
  print(substr('abcdef',6).&quot;\r\n&quot;);    // (empty string)
  print(substr('abcdef',1,0).&quot;…</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/sys_get?rev=1721100983&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-07-16T03:36:23+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:sys_get</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/sys_get?rev=1721100983&amp;do=diff</link>
        <description>sys_get

FW &gt;= 1300

Get a system parameter

Description



This function will get an internal function parameter and return the value.

Parameters


 Parameter                      Description                                        disk_write_counter</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/sys_set?rev=1721101268&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-07-16T03:41:08+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:sys_set</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/sys_set?rev=1721101268&amp;do=diff</link>
        <description>sys_set

FW &gt;= 1300

Set a system parameter

Description



This function will set an internal parameter

Parameters


 Parameter                      Description                                        force_log             Set to 1 to trigger a log event</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/tar_finish?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:tar_finish</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/tar_finish?rev=1631512652&amp;do=diff</link>
        <description>tar_finish

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Add the ending header to a TAR file

Description



This function will attempt to add the ending header to a previously opened file in TAR format.  To use this function, first open the file using</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/tar_put?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:tar_put</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/tar_put?rev=1631512652&amp;do=diff</link>
        <description>tar_put

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Add a file to an open file in TAR format

Description



This function will attempt to add a single file to a previously opened file in TAR format.  To use this function, first open the file using fopen(), then call</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/time?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:time</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/time?rev=1631512652&amp;do=diff</link>
        <description>time

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the current system timestamp

Description



Parameters

None

Return Values

:  Seconds since January 1, 1970, 00:00:00, local Wattmon time

Notes

Unlike mainline PHP, in uPHP “Linux Timestamps</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/timefromfat?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:timefromfat</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/timefromfat?rev=1631512652&amp;do=diff</link>
        <description>timefromfat

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Convert a FAT  to a Linux Timestamp

Description



Parameter

:  A FAT File Timestamp, seconds since January 1, 1980, 00:00:00, local Wattmon time

Return Values

:  A Linux Timestamp, seconds since January 1, 1970, 00:00:00, local Wattmon time</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/trim?rev=1636716080&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-11-12T11:21:20+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:trim</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/trim?rev=1636716080&amp;do=diff</link>
        <description>trim

WMMEGA FW &gt;= 2.1170

Remove whitespace from 

Description



Parameter



Return Values

A  with whitespace characters removed from the beginning and end of the string

Whitespace characters are:
CharacterDescription' 'space'\n'newline'\t'horizontal tab</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/ucfirst?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:ucfirst</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/ucfirst?rev=1631512652&amp;do=diff</link>
        <description>ucfirst

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Convert a  to lowercase except for the first character

Description



Parameter



Return Values

Lowercase  with the first character capitalized (if that character is alphabetic)

Example


&lt;?
  $str=&quot;Mary Had A Little Lamb and She LOVED It So&quot;;
  $str=ucfirst($str);
  print($str); // Prints &quot;Mary had a little lamb and she loved it so&quot;
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/unlink?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:unlink</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/unlink?rev=1631512652&amp;do=diff</link>
        <description>unlink

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Remove a file (delete it)

Description



This function deletes a file. It is similar to the Unix C unlink() function.

Parameter

:   Using a / at the beginning will make it relative to the root, otherwise it will be relative to the current working directory, which is either the folder that the script was started in or as was set by</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/unpack?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:unpack</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/unpack?rev=1631512652&amp;do=diff</link>
        <description>unpack

WMMEGA FW &gt;= 2.1167



Description





Parameters


 Value   Description                                       l       signed long (always 32 bit, machine byte order)   L       unsigned long (always 32 bit, machine byte order)   f       floating point(always 32 bit, machine byte order)</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/untar?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:untar</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/untar?rev=1631512652&amp;do=diff</link>
        <description>untar

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Expand a TAR file into the current folder, optionally verbose

Description



This function will attempt to unpack a TAR archive into the current working folder, which is the folder that the script was started in or as was set by</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/uptime?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:uptime</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/uptime?rev=1631512652&amp;do=diff</link>
        <description>uptime

WMPRO, WMMINI FW &gt;= 1.0 WMMEGA FW &gt;= 2.0

Return the uptime in milliseconds

Description



Parameters

None

Return Values

:  System uptime in milliseconds

See Also

microtime() - Return the number of milliseconds since boot

mktime() - Return the Linux Timestamp for a given date and time</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/urldecode?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:urldecode</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/urldecode?rev=1631512652&amp;do=diff</link>
        <description>urldecode

WMMEGA FW &gt;= 2.1179

URL-decode a string

Description



Decodes any %## encoding in the given string. Plus symbols ('+') are decoded to a space character. 

Parameter



Return Values



Examples


&lt;?
  $data=&quot;%23G%282BH%29&quot;
  $send=urldecode($data);
  print($send); // #G(2BH)
?&gt;</description>
    </item>
    <item rdf:about="https://www.wattmon.com/dokuwiki/uphp/functions/urlencode?rev=1631512652&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-09-13T05:57:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions:urlencode</title>
        <link>https://www.wattmon.com/dokuwiki/uphp/functions/urlencode?rev=1631512652&amp;do=diff</link>
        <description>urlencode

WMMEGA FW &gt;= 2.1179

URL-encode a string

Description



This function is convenient when encoding a string to be used in a query part of a URL, as a convenient way to pass variables to the next page.  

Parameter



Return Values



Examples</description>
    </item>
</rdf:RDF>
