<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://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://wattmon.com/dokuwiki/feed.php">
        <title>Wattmon Documentation Wiki uphp</title>
        <description></description>
        <link>https://wattmon.com/dokuwiki/</link>
        <image rdf:resource="https://wattmon.com/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico" />
       <dc:date>2026-05-01T09:50:55+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://wattmon.com/dokuwiki/uphp/ajax_generation?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://wattmon.com/dokuwiki/uphp/blockly_home_page_hook?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://wattmon.com/dokuwiki/uphp/blockly_programming_the_wattmon?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://wattmon.com/dokuwiki/uphp/functions?rev=1721102142&amp;do=diff"/>
                <rdf:li rdf:resource="https://wattmon.com/dokuwiki/uphp/modbus_functions?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://wattmon.com/dokuwiki/uphp/mqtt_configuration?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://wattmon.com/dokuwiki/uphp/server?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://wattmon.com/dokuwiki/uphp/uphp_compiler?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://wattmon.com/dokuwiki/uphp/uphp_intro?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://wattmon.com/dokuwiki/uphp/uphp_language_basics?rev=1631512652&amp;do=diff"/>
                <rdf:li rdf:resource="https://wattmon.com/dokuwiki/uphp/uphp_special_variables?rev=1631512652&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://wattmon.com/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico">
        <title>Wattmon Documentation Wiki</title>
        <link>https://wattmon.com/dokuwiki/</link>
        <url>https://wattmon.com/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico</url>
    </image>
    <item rdf:about="https://wattmon.com/dokuwiki/uphp/ajax_generation?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:ajax_generation</title>
        <link>https://wattmon.com/dokuwiki/uphp/ajax_generation?rev=1631512652&amp;do=diff</link>
        <description>AJAX Generation

AJAX is the standard for Asynchronous Javascript and allows dynamic variables to be loaded into a page.  In WattmonOS, the home page uses AJAX to update its parameters once per second.  

Various packages may insert hooks that generate content in the AJAX output.   All parameters in the AJAX page are</description>
    </item>
    <item rdf:about="https://wattmon.com/dokuwiki/uphp/blockly_home_page_hook?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:blockly_home_page_hook</title>
        <link>https://wattmon.com/dokuwiki/uphp/blockly_home_page_hook?rev=1631512652&amp;do=diff</link>
        <description>Blockly Home Page Hook

In order to display a custom widget on the dashboard of Wattmon, you can create a script using blockly and set the type to Display on Home page.  



The script above displays data which has been generated dynamically.  To do this, refer to the variable using</description>
    </item>
    <item rdf:about="https://wattmon.com/dokuwiki/uphp/blockly_programming_the_wattmon?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:blockly_programming_the_wattmon</title>
        <link>https://wattmon.com/dokuwiki/uphp/blockly_programming_the_wattmon?rev=1631512652&amp;do=diff</link>
        <description>uPHP Blockly Development

Blockly is a visual programming editor developed by Google.  We have integrated blockly with all the uPHP functions to make programming easier.  Blockly scripts can be automatically hooked to various parts of the system from the interface.</description>
    </item>
    <item rdf:about="https://wattmon.com/dokuwiki/uphp/functions?rev=1721102142&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-07-16T03:55:42+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uphp:functions</title>
        <link>https://wattmon.com/dokuwiki/uphp/functions?rev=1721102142&amp;do=diff</link>
        <description>uPHP Reference

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

Certain additional functions are available as WattmonOS include files.  For a list of these see</description>
    </item>
    <item rdf:about="https://wattmon.com/dokuwiki/uphp/modbus_functions?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:modbus_functions</title>
        <link>https://wattmon.com/dokuwiki/uphp/modbus_functions?rev=1631512652&amp;do=diff</link>
        <description>Serial and Modbus Function Reference

uPHP functions related to the serial port and Modbus are shown below:

Click on the function name for further details:
FUNCTION NAMEPARAMETER(S)RETURNDESCRIPTIONf485openfcloseClose a file, stream or socketfeofTest if no more data is available in a file, stream or socket</description>
    </item>
    <item rdf:about="https://wattmon.com/dokuwiki/uphp/mqtt_configuration?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:mqtt_configuration</title>
        <link>https://wattmon.com/dokuwiki/uphp/mqtt_configuration?rev=1631512652&amp;do=diff</link>
        <description>MQTT Configuration

Wattmon can connect to any standard MQTT server - you can install the open source mosquitto for example.
In order for Wattmon to work with MQTT, it needs to be enabled.  To do this, create a config file called mqtt.ini in the /config/ folder.


[config]
enabled=1
mqtt_server=10.0.0.1</description>
    </item>
    <item rdf:about="https://wattmon.com/dokuwiki/uphp/server?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:server</title>
        <link>https://wattmon.com/dokuwiki/uphp/server?rev=1631512652&amp;do=diff</link>
        <description>$_SERVER Array

Whenever a script is executed, a $_SERVER array is created and passed to the script.  This provides information about the context of the script and environment.

The elements of the array are read-only.  You can actually modify them from code, but they will not have any effect on the system once the script terminates.</description>
    </item>
    <item rdf:about="https://wattmon.com/dokuwiki/uphp/uphp_compiler?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:uphp_compiler</title>
        <link>https://wattmon.com/dokuwiki/uphp/uphp_compiler?rev=1631512652&amp;do=diff</link>
        <description>The uPHP Compiler

uPHP scripts are written by humans as text files. But to speed things up the Wattmon system actually executes a compiled binary version, which loads and runs much faster after the first time it is created.

Mainline PHP is not a compiled language. However, uPHP is designed to run with limited memory constraints and uses a compiler to reduce requirements and speed loading and execution of scripts. Compilation is performed automatically by the firmware</description>
    </item>
    <item rdf:about="https://wattmon.com/dokuwiki/uphp/uphp_intro?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:uphp_intro</title>
        <link>https://wattmon.com/dokuwiki/uphp/uphp_intro?rev=1631512652&amp;do=diff</link>
        <description>Programming the Wattmon

“Programming” and “scripting” are used interchangeably throughout this documentation.

The Wattmon is built on a scripting language that is syntactically identical to PHP - we call it uPHP for Micro-PHP.  It has a small but powerful subset of the functions and features found in the PHP language.</description>
    </item>
    <item rdf:about="https://wattmon.com/dokuwiki/uphp/uphp_language_basics?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:uphp_language_basics</title>
        <link>https://wattmon.com/dokuwiki/uphp/uphp_language_basics?rev=1631512652&amp;do=diff</link>
        <description>uPHP Language Basics

The following sections describe how to work with uPHP scripts.

uPHP Tags

When Wattmon parses a file, it looks for opening and closing tags, which are &lt;? and ?&gt; respectively. This tells Wattmon to start and stop interpreting the uPHP code between them. Parsing in this manner allows you to integrate script code within an</description>
    </item>
    <item rdf:about="https://wattmon.com/dokuwiki/uphp/uphp_special_variables?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:uphp_special_variables</title>
        <link>https://wattmon.com/dokuwiki/uphp/uphp_special_variables?rev=1631512652&amp;do=diff</link>
        <description>uPHP Special Variables

uPHP has several special arrays that are populated automatically before the script is run:

$_SERVER - Information about the server and script

$_GET - Parameters passed to the script - this is only applicable for scripts run from the web interface, not from telnet or cron. The maximum number of GET parameters is 7, and the maximum length of each parameter is 32 bytes.</description>
    </item>
</rdf:RDF>
