Modifications

Sauter à la navigation Sauter à la recherche
27 octets ajoutés ,  3 septembre 2017 à 21:11
Ligne 96 : Ligne 96 :  
import json
 
import json
   −
url = "ws://your.unipi.ip.address/ws"
+
url = "ws://l_adresse_ip_de_votre_Raspberry/ws"
    
def on_message(ws, message):
 
def on_message(ws, message):
Ligne 122 : Ligne 122 :  
</syntaxhighlight>
 
</syntaxhighlight>
   −
=== Perl using JsonRPC
+
=== Perl using JsonRPC ===
    
A simple example of controlling the UniPi via RPC use JSON::RPC::Client;
 
A simple example of controlling the UniPi via RPC use JSON::RPC::Client;
Ligne 129 : Ligne 129 :     
my $client = new JSON::RPC::Client;
 
my $client = new JSON::RPC::Client;
my $url    = 'http://your.pi.ip.address/rpc';
+
my $url    = 'http://l_adresse_ip_de_votre_Raspberry/rpc';
    
$client->prepare($url, ['relay_set']);
 
$client->prepare($url, ['relay_set']);
29 917

modifications

Menu de navigation