User Tools

Site Tools


fluksosetup

To simplify the setup of a new Flukso the configuration is taken from the local webinterface to the mysmartgrid server. This reduces the complexity of the setup significantly as one does not have to deal with local ip addresses. In addition the performance issues of the old wizard are circumvented.

The process

The user gets his Flukso including the device itself, a power supply, a network cable and a manual containing a shared secret.

The setup consist of the following steps.

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.

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.

Possible errors
  • 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

  • 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

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. 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.

Possible errors
  • The mySmartGrid server is not reachable (e.g. no route to server, name not known, server down)
    • In this situation the globe led stays dark
  • The mySmartGrid api returns an error
    • 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

The user can now login on the msg web platform and link her device to the account by entering the shared secret. The user will then be asked to configure the device.

The following information have to be configured:

  • Network
    • Lan vs. WiFi
    • IP-address and gateway
    • in case of WiFi SSID and token
  • Sensors
    • active sensors
    • bundling of the analog sensors
    • sensor names

When the device is configured this configuration will be transmitted to the flukso with the next heartbeat. A 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.

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

When using WiFi the user can now disconnect the wired interface and the setup proces is finished.

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