NAV Navbar
WebPage Device Arduino/ESP Device RasbperryPi python RemoteMe device

Introduction

Edit with wizard is great tool for beginners where without big knowledge of html,javascript and RemoteMe they can play and create some simple examples.

How buildin components are working you can easly see in the RemoteMeComponents seource code
basically the javascript is finding components and replace it by bootstrap one with added variables listeners and setters. RemoteMeComponents.js is also a good source of knowledge when you just need to modify a little build in components or see how its working under the hood.

However for more advanced scenario sometimes is need to write your own components or sends diffrent data types.

In this documentaiton you will find how to setup and register diffrent types of devices : esp, python script at RaspberryPi, and ESP.

After set device you can send messages beetwen them:

In RemoteMe there are three base methods of communicate

RemoteMe has support for

In this documentation is shown how to use this libraries for each device. For Quick start please run one of the out of the box projects at RemoteMe platform tab. It will generate sample code for you.

At the right side (or bottom while browsing with at smartphones) is shown source code for javascript,esp and python.

Documentation for REST api can be find in swagger webpage where You can also execute some rest calls.

Javascript

javascript initialization and requirements

To Make RemoteMe javascript libraries works properly you need to include libraries. All needed are listed at your right. It's also good to start with creating webPage choosing ComponentsStarter and copy header from index.html file.

    <!--needed imports -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

    <script src="/libs/remoteMe.js"></script>
    <script src="/libs/remoteMeMessages.js"></script>
    <script src="/libs/remoteMeApiRest.js"></script>
    <script src="/libs/variables.js"></script>
    <script src="/libs/operationTimer.js"></script>

Simplest program

$(document).ready(function () { 
    var remoteme = RemoteMe.getInstance();
});

It's good to call remoteme when document is ready, and becasue jquery is mandatory by RemoteMe and we already have it I've used jquery document ready event

Start RemoteMe and register in devices

    var remoteMe=RemoteMe.getInstance();

Initialization of RemoteMe

After call constructor (with parameter automaticallyConnectWS: true its set by default so if you don't want to chagne it just dont add it at all ) or getInstance it will automaticly connect device in RemoteMe Platform and in WebPage belt there will be green link icon.

Alternative way of creating RemoteMe is call constructor; It's useful if you want to change some default settings

//alternative way of instance RemoteMe
    var remoteMe=new RemoteMe({
        automaticallyConnectWS: true,
        automaticallyConnectWebRTC: false,
        remoteVideoElementId: "remoteVideo",
        pcConfig: {"iceServers": [{"urls": "stun:stun.l.google.com:19302"}]},
        pcOptions: {optional: [{DtlsSrtpKeyAgreement: true}]},
        mediaConstraints: {'mandatory': {'OfferToReceiveAudio': true, 'OfferToReceiveVideo': true}}
    });

Remember to call new RemoteMe only once at your code.

websocket Connection

with choosed getInstance() or run RemoteMe with automaticallyConnectWS: true WebPage will automatically connect to the platform. If you prefer you can disconnect this connection, reconnect etc Easiest way to connect disconnect WebPage to RemoteMe platform is to add component status from Edit with wizard index.html context menu. However you can control websocket connection by your self using functions:

WebSocket Connection Change

function callWhenWebSocketConnectionChange(status){
    if (status == ConnectingStatusEnum.CONNECTING) {
        //do something
    } else if (status == ConnectingStatusEnum.CONNECTED) {
        //do something
    } else if (status == ConnectingStatusEnum.DISCONNECTED) {
        //do something
    } else if (status == ConnectingStatusEnum.FAILED) {
        //do something
    }
}
RemoteMe.getInstance().remoteMeConfig.webSocketConnectionChange.push(callWhenWebSocketConnectionChange);

register function to call when WebSocket conenctions status is changed

Control websocket connection function

RemoteMe.getInstance().restartWebSocket();

RemoteMe.getInstance().onOffWebSocket();//disconnect if connected Or connect if disconnected

RemoteMe.getInstance().disconnectWebSocket();

RemoteMe.getInstance().connectWebSocket();

RemoteMe.getInstance().isWebSocketConnected();

WebRTC Connection

var remoteMe=new RemoteMe({
        automaticallyConnectWebRTC: true,
        remoteVideoElementId: "remoteVideo",
        pcConfig: {"iceServers": [{"urls": "stun:stun.l.google.com:19302"}]},
        pcOptions: {optional: [{DtlsSrtpKeyAgreement: true}]},
        mediaConstraints: {'mandatory': {'OfferToReceiveAudio': true, 'OfferToReceiveVideo': true
        }
    );

WebRTC is direct connection beetwen RasbperryPi and the browser. RemoteMe send by this channel video and and control messages. To set automaticly connect webRTC in constructor set automaticallyConnectWebRTC: true, . While calling constructor you can also set webRTC properties remoteVideoElementId points to video element with such id, to display video comming from RPi camera

WebRTC Connection Change

function callWhenWebRTCConnectionChange(status){
    if (status == ConnectingStatusEnum.CONNECTING) {
        //do something
    } else if (status == ConnectingStatusEnum.CONNECTED) {
        //do something
    } else if (status == ConnectingStatusEnum.DISCONNECTED) {
        //do something
    } else if (status == ConnectingStatusEnum.FAILED) {
        //do something
    }else if (status == ConnectingStatusEnum.DISCONNECTING) {
        //do something
    } else if (status == ConnectingStatusEnum.CHECKING) {
        //do something
    }
}
RemoteMe.getInstance().webRtcConnectionChange.push(callWhenWebRTCConnectionChange);

register function to call when WebRTC conenctions status is changed

Control webRTC connection function

RemoteMe.getInstance().restartWebRTC();

RemoteMe.getInstance().onOffWebRTC();//disconnect if connected Or connect if disconnected

RemoteMe.getInstance().disconnectWebRTC();

RemoteMe.getInstance().connectWebRTC();

RemoteMe.getInstance().isWebRTCConnected();

Direct Connections

after instance RemoteMe call RemoteMe.getInstance().directWebSocketConnectionConnect(); this function will ask RemoteMe to which ESP webPage can be connected directly. And will connect this devices (webPage and ESP has to be connected to the same local network). After connection is established WebPage can send messages directly to devices - it's usefull when you want to minimize latency beetwen ESP and webpage for example when you control some ESP based car (more in Set variable section) WebPage will connect to all ESP with open directConnection. How to turn on direct conenction at ESP itself in this document in Arduino section.

Direct Connection Change

function callWhenWebSocketConnectionChange(status){
    if (status == ConnectingStatusEnum.CONNECTING) {
        //do something
    } else if (status == ConnectingStatusEnum.CONNECTED) {
        //do something
    } else if (status == ConnectingStatusEnum.DISCONNECTED) {
        //do something
    } else if (status == ConnectingStatusEnum.FAILED) {
        //do something
    }
}
RemoteMe.getInstance().remoteMeConfig.directConnectionChange.push(callWhenWebSocketConnectionChange);

register function to call when Direct conenctions status is changed

Control direct connection function

RemoteMe.getInstance().onOffDirectConnection();//disconnect if connected Or connect if disconnected

RemoteMe.getInstance().connectDirectConnection();

RemoteMe.getInstance().disconnectDirectConnections();

RemoteMe.getInstance().getDirectConnectionCount();// how many devices WebPage is connected directly

Listener for devices connection status change

    RemoteMe.getInstance().remoteMeConfig.deviceConnectionChange.push((deviceId,connected)->{
        console.info(`device with id ${deviceId} is ${connected?'connected':'disconnected'}` )
    );

    RemoteMe.getInstance().subscribeEvent(EventSubscriberTypeEnum.DEVICE_CONNECTION);

This event will be called when one of your deivce connection stauts has been changed

Listener for Device File Change

    RemoteMe.getInstance().remoteMeConfig.deviceFileChange.push((deviceId,fileName)=>{
        console.info(`File ${fileName} at device with id ${deviceId}` has been changed)
    });

    RemoteMe.getInstance().subscribeEvent(EventSubscriberTypeEnum.FILE_CHANGE);

This event will be called when file at devices has been changed. It's usefull when ESP is uploading files to your webPage and You want to refresh the file on the browser

From You ESP you can upload file using Upload file function

Read more

Arduino

RemoteMe has libraries to connect RemoteMe from your ESP, ESP8266, ESP32 others also should work but are not supported . Simplest way to add your ESP into RemoteMe is to generate code using wizard. got to article to learn how to do that. Network devices in RemoteMe

Libraries

To make Arduino works with RemoteMe you will need this libraries

Simplest program

#define WIFI_NAME "your wifi name"
#define WIFI_PASSWORD "your wifi password"
#define DEVICE_ID //deviceId
#define DEVICE_NAME //device name
#define TOKEN //your token

#include <RemoteMe.h>
#include <RemoteMeSocketConnector.h>
#include <ESP8266WiFi.h> //for ESP8266
//#include <WiFi.h> for esp32

//include <RemoteMeWebSocketConnector.h>// needed for websocket conenction
//#include <RemoteMeDirectWebSocketConnector.h>  // needed for directconnection 

RemoteMe& remoteMe = RemoteMe::getInstance(TOKEN, DEVICE_ID);

void setup() {
    WiFi.begin(WIFI_NAME, WIFI_PASSWORD);
    while (WiFi.status() != WL_CONNECTED) {
        delay(100);
    }
    remoteMe.setConnector(new RemoteMeSocketConnector());
    remoteMe.sendRegisterDeviceMessage(DEVICE_NAME);
}

void loop() {
    remoteMe.loop();
}

This program will register your deivce in RemoteMe platform (and create if doesn't exist) remoteMe.loop(); should be called in every loop. remoteMe.loop(); will read messages from RemoteMe or other devices, sends stayalive pings, and reconnect if ESP was disconnected;

Connection

remoteMe.setConnector(new RemoteMeSocketConnector());//uses socket conenction on port 19

This line make ESP to use plain socket connection ( on port 19 ). If for any of reason you cannot use socket connection alternative method is to use websocket connection (on standardn http port 80)

remoteMe.setConnector(new RemoteMeWebSocketConnector());//uses websocket connection on port 80

Its better to use plaoin socket connection - its faster then websockets. Websocket connection should be use only in case when socket connection cannot be established with RemoteMe platform. After connect ESP send device name by calling remoteMe.sendRegisterDeviceMessage(DEVICE_NAME); If device with deviceId has diffrent name it will be changed to sent one;

Direct Connection

remoteMe.setDirectConnector(new RemoteMeDirectWebSocketConnector());

To enable WebPages to connect directly ESP you should call function. After call it in Device tab in RemoteMe platform after export you will see Direct local connections with this device are enabled text

Read more

RasberryPi

RemoteMe has libraries to connect RemoteMe from your RasbperryPi. Then you can just add python files to interact with RemoteMe platform and other devices More about RasbperryPi devices in RemoteMe

To add python script follow instructions written here Rpi Python devices

Simplest program

import logging
import socket
import struct
import sys
import os

os.chdir(sys.argv[1])
sys.path.append('../base')

import remoteme

try:

    logging.basicConfig(level=logging.DEBUG,
    format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
    datefmt='%d.%m %H:%M',
    filename="logs.log")
    logger = logging.getLogger('application')

    remoteMe = remoteme.RemoteMe()
    remoteMe.startRemoteMe(sys.argv)

    # here setup listeners 

    remoteMe.wait()
finally:
    pass

Python launching explanation

python script is launch by the launching script. Launching script name is configurable but default name is runme.sh located at python directory.

#!/bin/sh
python3.5 $1/python.py $1 $2 $3 $4 $5

and at shell parameters are

At launchin script you can change the name of python script and made other pre-run jobs

WebRtc Connection Change

In case you want to stops your car or do other action when webrtc connection state is changed You can add a listener which will be called when webrtc connection status will be changed


import remotemeStruct

def onWebRtcConnectionStateChange(state):
    if state == remotemeStruct.ConnectionState.CONNECTING:
        logger.info("onWebRtcConnectionStateChange CONNECTING ")
    elif state == remotemeStruct.ConnectionState.CONNECTED:
        logger.info("onWebRtcConnectionStateChange CONNECTED ")
    elif state == remotemeStruct.ConnectionState.DISCONNECTED:
        logger.info("onWebRtcConnectionStateChange DISCONNECTED ")
    elif state == remotemeStruct.ConnectionState.FAILED:
        logger.info("onWebRtcConnectionStateChange FAILED ")
    elif state == remotemeStruct.ConnectionState.DISCONNECTING:
        logger.info("onWebRtcConnectionStateChange DISCONNECTING ")
    elif state == remotemeStruct.ConnectionState.CHECKING:
        logger.info("onWebRtcConnectionStateChange CHECKING ")

remoteMe.addWebRtcConnectionChangeListener(onWebRtcConnectionStateChange)

function onWebRtcConnectionStateChange will be called with new state of webrtc connection

Websocket Connection Change


import remotemeStruct

def onWebsocketConnectionStateChange(state):
    if state == remotemeStruct.ConnectionState.CONNECTING:
        logger.info("websocket CONNECTING ")
    elif state == remotemeStruct.ConnectionState.CONNECTED:
        logger.info("websocket CONNECTED ")
    elif state == remotemeStruct.ConnectionState.DISCONNECTED:
        logger.info("websocket DISCONNECTED ")
    elif state == remotemeStruct.ConnectionState.FAILED:
        logger.info("websocket FAILED ")
    elif state == remotemeStruct.ConnectionState.DISCONNECTING:
        logger.info("websocket DISCONNECTING ")
    elif state == remotemeStruct.ConnectionState.CHECKING:
        logger.info("websocket CHECKING ")


remoteMe.addWebsocketConnectionChangeListener(onWebsocketConnectionStateChange)

If websocket conenction chagne beetwen rasbeprryPi main program and RemoteMe. First weboscket to RemoteMe is made before pythong scripts are run so this functions is usefull for reconnecting issues.

Read more

Rest call

Entire documentation you can find in swagger documentation Swagger documentation of RemoteMe remember to choose Main Rest at top combobox

Common section

Javascript, Arduino, Python libraries are using very similar method to communicate with RemoteMe. In this section you will find how to integrate with RemoteMe Platform using this three libraries

Variables

Variables - listen to a variable change (one value variable)


def onBooleanChange(b):
    #here is boolean with variable value after it's changed you can add your code

    pass

#...
remoteMe.getVariables().observeBoolean("someVariableName" ,onBooleanChange); #add it just before remoteMe.wait()


function onBooleanChange(b){
    //here is boolean with variable value after it's changed you can add your code
}

RemoteMe.getInstance().getVariables().observeBoolean("someVariableName",onBooleanChange);

void onBooleanChange(boolean b) {
    //here is boolean with variable value after it's changed you can add your code
}

//...
remoteMe.getVariables()->observeBoolean("led" ,onBooleanChange); //add it before setting the connector

Let's say we have boolean variable called someVariableName in the code you can see how to calll funciton when the variable is changed. If the variable is persistant the current value you will be also send jsut after set variable Change listener. you can have as many listeners as you want. All variable listeners are visible in RemoteMe platform after expand variable belt At the right you will find example of code to set value change listener for variable with boolean type. Insimilar way you can set value change listeners for other one value type variables such as:

For multi-value variables check section below

Variables - listen to a variable change (multi value variable)


def onIntegerBooleanChange(i,b):
    #here is integer and  boolean with variable value after it's changed you can add your code

    pass

#...
remoteMe.getVariables().observeBoolean("someVariableName" ,onIntegerBooleanChange); #add it just before remoteMe.wait()


function onIntegerBooleanChange(i,b){
    //here is integer and  boolean with variable value after it's changed you can add your code
}

RemoteMe.getInstance().getVariables().observeBoolean("someVariableName",onIntegerBooleanChange);

void onIntegerBooleanChange(int32_t i, boolean b) {
    //here is integer and  boolean with variable value after it's changed you can add your code
}

//...
remoteMe.getVariables()->observeBoolean("led" ,onIntegerBooleanChange); //add it before setting the connector

As Example setting variable change listener for variable with type int and boolean and name someVariableName To set variable change listener with multi-value variables you do almoust the same as for one-value variable change. The diffrence is the listener function number and types of parameters and its as follow:

Variables - set variable value


remoteMe.getVariables().setIntegerBoolean("someVariableName", 123, true);
remoteMe.getVariables().setIntegerBoolean("someVariableName", 123, true,ignoreCurrent);




RemoteMe.getInstance().getVariables().setIntegerBoolean("someVariableName", 123, true);
RemoteMe.getInstance().getVariables().setIntegerBoolean("someVariableName", 123, true,byDirectChannelIfAny );
RemoteMe.getInstance().getVariables().setIntegerBoolean("someVariableName", 123, true,byDirectChannelIfAny,ignoreCurrent );

remoteMe.getVariables()->setIntegerBoolean("someVariableName", 123, true);
remoteMe.getVariables()->setIntegerBoolean("someVariableName", 123, true,ignoreCurrent);

Let's say we have variable with type Integer Boolean and we want to set value into 123,true. There are examples at the right.

In Similar way you can send others variables types using:

more inormations you can find in the source code


Click here to create an example project with setting variables

Messages

User Messages are used when you want to send specify arrays of bytes to one specified device - recongized by deviceId . In RemoteMe there are functions which helps you add into user message diffrent datatypes variables. So you can easly send one message wiht string and double, then easly decode values. RemoteMe deliver utils to easly encode and decode diffrent types of variables into byte of array to send in usermessage.

In User message receive is shown how to receive such messages.

UserMessages - send array of one byte integers

remoteMe.sendUserMessage(targetDeviceId ,[1,1,2,3,5]);
RemoteMe.getInstance().sendUserMessage(targetDeviceId ,[1,1,2,3,5]);
uint16_t dataSize = 5;
uint16_t pos = 0;
uint8_t *data = (uint8_t*)malloc(dataSize );

RemoteMeMessagesUtils::putUint8(data, pos, 1);
RemoteMeMessagesUtils::putUint8(data, pos, 1);
RemoteMeMessagesUtils::putUint8(data, pos, 2);
RemoteMeMessagesUtils::putUint8(data, pos, 3);
RemoteMeMessagesUtils::putUint8(data, pos, 5);

remoteMe.sendUserMessage(targetDeviceId , data, dataSize );

Very simple example this code is sending user message to targetDeviceId specified as unsigned 16bit integer, sending message has 5 unsigned 1 byte integer numbers: 1 1 2 3 5

UserMessages - send diffrent datatypes

let stringToSend="Some String to send";
stringToSend=getArray(stringToSend);//convert string to utf-8 arrays of bytes

dataToSend = new RemoteMeData(stringToSend.length // string length
                            +1// each string is neded by 0 so we need one byte for it 
                            +8 );//size of double 
dataToSend.putString(stringToSend);
dataToSend.putDouble(-1.2345);
remoteme.sendUserMessage(targetDeviceId,dataToSend.getArray());

string stringToSend="Some String to send";

uint16_t dataSize = stringToSend.length // string length
                    +1// each string is neded by 0 so we need one byte for it 
                    +8;//size of double

uint16_t pos = 0;
uint8_t *data = (uint8_t*)malloc(dataSize );

RemoteMeMessagesUtils::putString(data, pos, stringToSend);
RemoteMeMessagesUtils::putDouble(data, pos, -1.2345);


remoteMe.sendUserMessage(targetDeviceId , data, dataSize );
import remoteMeDataWriter


stringToSend="Some String to send"

writer= remoteMeDataWriter.RemoteMeDataWriter()

writer.writeString(stringToSend)
writer.writeDouble(-1.2345)

remoteMe.sendUserMessage(targetDeviceId ,writer.getBytes())

Second example is more complicated we are sending two variables first one string, second a double value.

User message is always sends as a array of bytes , so when you need to send for example string value and double value first ou need to decode it into arary of bytes. RemoteMe will help you with that using functions such as

Before sending the variable we need to sum sending byte array length - in this case this is string byte length (in utf-8 encoding) + 1 byte for 0 after a string + 8bytes of the double. In python script there is no need to sum returning arrays length since its done by remoteMeDataWriter object while creating message. Then we just add variables to prepared buffor, and at the end send byte of array returned from the buffer; In the same way as Stirng and double was send you can send diffrent variables. Please check sourcecode for more function names.
Click here to create an example project sending and receiving user message

UserMessages - receive Messages

Here how to send messages

function onUserMessage(senderDeviceId,data){
    console.info(`got message from ${senderDeviceId}`);
    data = new RemoteMeData(data);//lets just replace it
    let stringVale= data.popString();
    let doubleValue=data.popDouble();

    console.info(`message string ${stringVale} double from message: ${doubleValue}`);

}
$(document).ready(function () {
    RemoteMe.getInstance();//connect to RemoteMe and keeps conenction live
    RemoteMe.getInstance().remoteMeConfig.onUserMessage=onUserMessage;
});



void onUserMessage(uint16_t senderDeviceId, uint16_t dataSize, uint8_t *data){
   Serial.printf("got data size %d from device %d \n",dataSize,senderDeviceId);

    uint16_t pos = 0;
    String str=RemoteMeMessagesUtils::getString(data, pos);
    double doubleValue=RemoteMeMessagesUtils::getDouble(data, pos);

    Serial.printf("on User message string:'%s' and doublevalue '%f' \n",str.c_str(),doubleValue);
}


void setup() {

  //...
    remoteMe.setUserMessageListener(onUserMessage);
  //...
}
import remoteMeDataReader

def onUserMessage(senderDeviceId,data):
    reader= remoteMeDataReader.RemoteMeDataReader(data)
    stringValue = reader.readString()
    doubleValue = reader.readDouble()
    logger.info("get message from device {} of length {}".format(senderDeviceId,len(data)))

remoteMe.setUserMessageListener(onUserMessage)

In this example you can see how to receive UserMessage where is send String and double.

User message is always received a array of bytes , so if u sends some variables for example double and string first you need to encode it from this array. RemoteMe is giving you some utils to use

When you want to receive userMessage you need to setup listeners first - by setting the function which will be called when new User message arrives. Function will be called with first parameter as deviceId from where userMessage was sent. then is data (and for ESP size of data) From data you can easly extract sended data such as String or double
We are setting a function which will be called when userMessage arrives, and un function we get from array of bytes string and double values, and print it on console Click here to create an example project sending and receiving user message

UserSyncMessages

function send(targetDeviceId){
    dataToSend = new RemoteMeData(8+8 );//size of double is 8 so we have 16 sinve sending two
    dataToSend.putDouble(123.456);
    dataToSend.putDouble(-789.012);

    RemoteMe.getInstance().sendUserSyncMessage(targetDeviceId,dataToSend.getArray(),data=>{
        data = new RemoteMeData(data);//lets just replace it
        let doubleValue=data.popDouble();

        console.info(`got response ${doubleValue}`)
    });
}

$(document).ready(function () {
    RemoteMe.getInstance();//connect to RemoteMe and keeps conenction live
});



void onUserSyncMessage(uint16_t senderDeviceId, uint16_t dataSize, uint8_t* data, uint16_t &returnDataSize, uint8_t *&returnData) {
    uint16_t pos = 0;
    double double1Value=RemoteMeMessagesUtils::getDouble(data, pos);
    double double2Value=RemoteMeMessagesUtils::getDouble(data, pos);
    Serial.printf("on User sync message d1:'%f' d2: '%f' \n",double1Value,double2Value);

    returnDataSize = 8;
    returnData = (uint8_t*)malloc(returnDataSize);
    pos=0;
    RemoteMeMessagesUtils::putDouble(returnData, pos, double1Value+double2Value);


}



void setup() {

  //...
    remoteMe.setUserSyncMessageListener(onUserSyncMessage);
  //...
}
import remoteMeDataReader
import remoteMeDataWriter

def onUserSyncMessage(senderDeviceId,data):
    reader= remoteMeDataReader.RemoteMeDataReader(data)
    double1Value = reader.readDouble()
    double2Value = reader.readDouble()

    logger.info("get message from device {} of length {}".format(senderDeviceId,len(data)))
    logger.info("double1Value '{}' double2Value {}".format(double1Value,double2Value))

    writer= remoteMeDataWriter.RemoteMeDataWriter()
    writer.writeDouble(double1Value+double2Value)
    return writer.getBytes()

//...
remoteMe.setUserSyncMessageListener(onUserSyncMessage)
//...

Similar like with userMessage we are sneding and receiving array of byte, so we need first to decode, then decode variables We want to send. To do that you can use the same utils we was using for userMessages.

While UserMessages are used to send some data asynchronious, UserSyncMessage is used to send some data and waits for a reponse, It's usefull when you want to 'ask' ESP about some measurements. By sending usersyncMessage you will get receive response.

At the example javascript is sending two double values to some device targetDeviceId then in sendUserSyncMessage we set functions which will be called when reponse from device will come in listener function we decode one double value from response and prints in on the console.

In python and ESP script we are setitng function which will be called when userSyncMessage come decode two doubles from incomming message. Then we create reponse where we put sum of income double values and returns it.

Click here to create an example project sending sync message

Other

Send Push messages

Article about setting up and exporting android application to receive push notificatons

remoteMe.sendPushNotificationMessage(targetWegPageId,title,body,badge,icon,image);
//there is ready to use method to send push notification check ESP and RPi code example
remoteMe.sendPushNotificationMessage(targetWegPageId,title,body,badge,icon,image);

In function there are parameters

Upload file to Your webpage

# not supported yet
// not supported
remoteMe.setFileContent(targetDeviceId,filename,dataLength,data);

In function there are parameters

Function is usefull to upload for example photo taken by your ESP_32_cam - there is tutorial You can launch Click here to create an example project with sending photos from ESP_32 to the webpage

Your webpage can detect file changes using Listener file change

If there is exisiting file wiht the same name old one will be replaces by adding _number to its name. You can change it in configiguration if You don't want to have file history.

Rember there is limit of file count in RemoteMe You can extend it by collecting points