User Tools

Site Tools


fluksosetup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

fluksosetup [2014/02/13 08:18]
paalsteek [Step 2: First contact to the msg server]
fluksosetup [2014/11/25 14:02] (current)
paalsteek led images added
Line 9: Line 9:
 ==== Step 1: Wired connection ==== ==== Step 1: Wired connection ====
  
-The Flukso is first connected to the router of the user using the supplied network cable. Considering the standard configuration of common routers the Flukso will receive a valid network configuration using the DHCP protocol or via IPv6 autoconfiguration. The success of this step will be indicated by the lan led on the device itself.+The Flukso is first connected to the router of the user using the supplied network cable. Considering the standard configuration of common routers the Flukso will receive a valid network configuration using the DHCP protocol or via IPv6 autoconfiguration. 
 + 
 +Note: The success of this step will be indicated by the lan led on the device itself. This is not possible as the lan led is controlled by the network hardware and indicates a link on the ethernet port. 
 + 
 +{{ :fluksoled-01011.png?200 |}}
  
 == Possible errors == == Possible errors ==
Line 15: Line 19:
   * The network cable is not connected correctly or it is faulty   * The network cable is not connected correctly or it is faulty
     *  This results in a missing link and therefore the lan led does not light up     *  This results in a missing link and therefore the lan led does not light up
 +{{ :fluksoled-00011.png?200 |}}
   * The router does not supply a DHCP address nor an IPv6 configuration   * The router does not supply a DHCP address nor an IPv6 configuration
     *  The Flukso will retry configuring the interface regularly but there is currently no way to indicate this situation to the user     *  The Flukso will retry configuring the interface regularly but there is currently no way to indicate this situation to the user
Line 20: Line 25:
 ==== Step 2: First contact to the msg server ==== ==== Step 2: First contact to the msg server ====
  
-After establishing the link, the Flukso tries to communicate with the msg server and sends a heartbeat containing the shared secret. The success of this step will be indicated by the globe led on the Flukso.+After establishing the link, the Flukso tries to communicate with the msg server and sends a heartbeat containing the shared secret. During this step the globe led is flashing. The success of this step will be indicated by the globe led on the Flukso. In this step also the list of available sensors has to be sent to the server. 
 + 
 +{{ :fluksoled-01111.png?200 |}}
  
 == Possible errors == == Possible errors ==
Line 27: Line 34:
     *  In this situation the globe led stays dark     *  In this situation the globe led stays dark
   * The mySmartGrid api returns an error   * The mySmartGrid api returns an error
-    *  This could be indicated by a flashing globe led+    *  In this situation the globe led stays dark 
 + 
 +In case of an error a new heartbeat can be triggered by pressing the reset button for 2-5 seconds. 
 ==== Step 3: Configuration ==== ==== Step 3: Configuration ====
  
Line 43: Line 53:
     * ...     * ...
  
-After each step of the configuration the information is sent to the Flukso and feedback has to be shown to the userIn addition the device indicates success of the steps via its leds. A working WiFi connection is indicated by the WiFi led, a working sensor configuration is indicated by the heartbeat led.+When the device is configured this configuration will be transmitted to the flukso with the next heartbeatA heartbeat can be triggered manually by pressing the reset button of the flukso for 2-5 seconds. The success of the configuration is indicated via the leds on the flukso as well as on the device page of the mySmartGrid web platform. A working WiFi connection is indicated by the WiFi led, a working network connection to the server is indicated by the globe led. 
 + 
 +{{ :fluksoled-11111.png?200 |}} 
 + 
 +== Possible errors == 
 +  * The entered network configuration is not correct 
 +    *  This can be detected by the Flukso and is indicated by the globe led. In addition this information is shown on the device page on the mySmartGrid web page.
  
 ==== Step 4: Final steps ==== ==== Step 4: Final steps ====
  
 When using WiFi the user can now disconnect the wired interface and the setup proces is finished. When using WiFi the user can now disconnect the wired interface and the setup proces is finished.
 +
 +{{ :fluksoled-10111.png?200 |}}
 +
 +===== API modifications needed =====
 +
 +To transfer the configuration entered at the server to the device the following fields have to be added to the heartbeat response:
 +
 +  network: {
 +    lan: {
 +      enabled:  <integer>,
 +      protocol: <string(6) - either static or dhcp>,
 +      ip:       <string(15) - iff protocol is static>,
 +      netmask:  <string(15) - iff protocol is static>,
 +      gateway:  <string(15) - iff protocol is static>
 +    } - optional
 +    wifi: {
 +      essid:    <string(60)>,
 +      enc:      <string(5) - one of open,wpa,wpa2>,
 +      psk:      <string(60) - iff enc is wpa or wpa2>,
 +      protocol: <string(6) - either static or dhcp>,
 +      ip:       <string(15) - iff protocol is static>,
 +      netmask:  <string(15) - iff protocol is static>,
 +      gateway:  <string(15) - iff protocol is static>
 +    } - optional
 +    sensors: <list of sensor ids> - optional
 +  }
 +  
 +The field sensors contains a list of sensor ids whose configuration changed.
 +  
 +When the Flukso changes its configuration it includes the new configuration to inform the server that it received the new configuration.
 +
 +There also has to be an API call per sensor returning the following data:
 +
 +  {
 +    config : {
 +       device:      <string(32) - device id>,
 +       externalid:  <string(64) - sensor id given by the client>,
 +       function:    <string(16) - sensor name>,
 +       unit:        <string(16) - sensor unit>,
 +       class:       <string(10)>,
 +       voltage:     <integer>,
 +       current:     <integer>,
 +       phase:       <integer>,
 +       constant:    <integer>,
 +       type:        <string(16)>,
 +       enable:      <integer>
 +    }
 +  }
fluksosetup.txt · Last modified: 2014/11/25 14:02 by paalsteek