Smappee Controller (V1.0.3) Information

Posted on
Tue Dec 23, 2014 1:32 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Smappee Controller (V1.0.3) Information

This Plugin controls a Smappee. :)

Introduction
The Smappee is a device that is physically connected to an electricity consumer unit / PV Inverter to measure electricity usage (consumption) and solar generation. Its unique selling point is that it is able to detect when individual appliances switch on and off by detecting their "electrical signatures". It is also able to control wireless actuators (plugs). It communicates wirelessly with the Smappee "cloud" server to upload usage/solar information, appliance information and actuator states.

The plugin interrogates the Smappee server to provide a representation of the Smappee to Indigo. It does this by way of a factory device that comprises a Usage device and a Solar device. These devices (both optional) are represented as Energy Meters. Appliances are individually represented by as Energy Meter devices (though they don't actually record energy usage, just current values). Actuators (plugs) are represented by Relay devices. It is up to the user as to what devices are defined by choosing from a list of identified appliances / actuators.

The Usage / Solar values are automatically zeroed at midnight, so the Total Usage displayed is for today's total (this maps to how the Smappee shows the info). The Smappee identification of appliances switching on and off can be a bit hit and miss and so it probably isn't advisable to use this for triggers in Indigo (though it is perfectly possible). Actuators are one-way, this means you can turn them on and off but you can't verify that your request was actioned as no confirmation is returned.

It is strongly recommended to read this documentation to familiarise yourself with how to set up the Smappee to ensure you have as trouble free experience as possible E&OE :wink:

Improvements

Corrected in V1.0.3 (12th March 2015)
  • Bug correction to enable the plugin to start without failing.
Corrected in V1.0.1 (24th December 2014)
  • Minor code improvements and removal of spurious debug messages from Indigo Event Log.

Download

The Plugin (V 1.0.3) is now available for download here :)

Installation

Prerequisites

The first and most essential pre-requisite is that you have a Smappee device (obviously) and that you are signed up with Smappee as a User and also that you have additionally requested a client_id & client_secret by sending an email to support(AT)smappee.com - see this page.

This plugin has been developed and tested on OS X (Mavericks 10.9.5).

Plugin Configuration

Download and install the Plugin as normal and then configure as follows:
Smappee_plugin_config.png
Smappee Plugin Config
Smappee_plugin_config.png (84.73 KiB) Viewed 16130 times

The plugin configuration dialogue has a number of options:
  • Address
    For Information; this is the address of the Smappee Server
  • Client ID
    Client ID you have requested from Smappee
  • Secret
    Secret code you you have requested from Smappee (came with the Client ID)
  • User Name
    User name you use to sign into the Smappee iPhone App
  • User Name
    Password associated with your Smappee User Name
  • Status Polling
    Should be ticked for normal use in order for the Smappee state to be updated
  • Poll Smappee
    Frequency of polling
  • Poll Smappee
    Frequency of polling
  • Logging
    Not recommended for normal use but if logging options selected will send debugging info to the Indigo Event Log.


Devices Configuration
Once the Plugin has started, it is time to define you Smappee devices.This is best described by way of example:

Select New... in in the Indigo Devices Home Window to create a new device. Select a device type of Autolog Smappee. A 'factory device' dialogue similar to the following will be displayed:
smappee_define_device.png
Smappee Define Device
smappee_define_device.png (86.21 KiB) Viewed 16130 times

Your Smappee Location ID (Number) and Name will be displayed - this is non-modifiable.

To add a Usage (consumption) device, click the Add Usage Device button. Likewise, click the Add Solar Device button to add a Solar (generation) device. These devices will be created in Indigo as soon as you click the button. Once added, Remove buttons become available as in the next example:
smappee_Usage_added.png
Smappee Usage Added
smappee_Usage_added.png (89.77 KiB) Viewed 16130 times

In the Appliance section, there are two lists: The first shows Appliance Devices that are defined in Indigo and the second list shows Appliances that known to Smappee and not defined in Indigo. These appliances are named using the id known to Smappee (prefixed with an 'A' for Appliance) and the name known to Smappee. The intention being (as far as possible) for there not to be a name conflict when the Appliance is added to Indigo. It is possible subsequently to edit the device (as normal) and change the name if it isn't suitable.

To Add an Appliance, select one or more of the available Smappee Appliances and then click Queue Add Appliance(s). This will queue the device to be created when you click Close on the dialogue. Note: It has to be done this way to avoid Indigo adding the Appliances as part of the Usage/Solar factory device.

Actuators are handled the same way as Appliances. Their names are prefixed with a 'P' (for plug).

When an Appliance or Actuator is queued for adding, the dialogue will look similar to this:
smappee_queued_adds.png
Smappee Queued Adds
smappee_queued_adds.png (90.65 KiB) Viewed 16130 times

If you inadvertently selected an Appliance or Actuator for adding, just select it and click the relevant Queue Add button to toggle the queueing. Once you are satisfied with your selection click Close. The Appliances and/or Actuators will now be created in the background.

Once the main Usage and/or Solar Smappee devices have been created it is best to use Edit (Define & Sync) to add and remove Smappee devices. So, taking the following example:
smappee_edit_define_and_sync.png
Smappee Edit, Define & Sync
smappee_edit_define_and_sync.png (87.12 KiB) Viewed 16130 times

Here a Smappee Usage device has been selected and Edit... clicked. and then Define and Sync... clicked.
The dialogue shows two Indigo Smappee Devices (Usage and Solar). They are an Indigo 'factory device'. Two Remove buttons are available to remove one or both of them. However, if you want to remove both it is best to delete one of the devices in the main Indigo Home Window which will delete both of them. Not doing this may leave an untidy device that needs to be deleted separately. In future, the plugin will prevent this from happening.

Moving further on in this example dialogue, there are two Appliance devices known to Indigo and one actuator known to Indigo. So in summary; to add an Appliance or Actuator (plug) do it from an Edit... | Define and Sync.. (as this is the only way they can be added) and to delete one of these devices, do it from the main Indigo Home Window as normal.

Once the devices are defined they can be edited.

To edit a Usage device, select the device, click Edit... and then Edit Device Settings... :
smappee_usage_edit.png
Smappee Usage Edit
smappee_usage_edit.png (158.01 KiB) Viewed 16130 times

Most of the options are self explanatory, but the Options is worth explaining in more detail. The plugin is retrieving 5 minute updated values from Smappee. So if the poll interval was set to say 30 minutes then during this time the Smappee Server would have recorded 6 readings. In this case (well even on a five minute polling) the current power value will be out-of-date. So the Options enables you to select how you want the values collected during the polling time period displayed:
  • Mean (average) of recorded values
  • Minimum recorded value
  • Maximum recorded value
  • Last recorded value


To edit a Solar device, select the device, click Edit... and then Edit Device Settings... :
smappee_solar_edit.png
Smappee Solar Edit
smappee_solar_edit.png (163.68 KiB) Viewed 16130 times

Again, Most of the options are self explanatory and the Options is handled in the same way as the Usage device (above). As solar doesn't work at night there are a couple of options to suppress zero generation values and no generation change values from being output to the Indigo Event log.

To edit an Appliance device, select the device, click Edit... and then Edit Device Settings... :
smappee_appliance_edit.png
Smappee Appliance Edit
smappee_appliance_edit.png (131.36 KiB) Viewed 16130 times

Again, Most of the options are self explanatory. When an appliance event occurs a message will be output to the Indigo Event log. Because the event can be out-of-date (depends on the polling frequency, you might get a number of messages at the same time. The plugin includes the Smappee detected time in the message, for example:
Code: Select all
  Autolog Smappee                 recorded Smappee Appliance '[A002] Dishwasher' event at [19:02:20], reading: 2233 W
  Autolog Smappee                 recorded Smappee Appliance '[A002] Dishwasher' event at [19:02:38], reading: -2255 W
  Autolog Smappee                 recorded Smappee Appliance '[A002] Dishwasher' event at [19:03:30], reading: 2220 W
  Autolog Smappee                 recorded Smappee Appliance '[A002] Dishwasher' event at [19:03:50], reading: -2208 W
These messages can be suppressed if not wanted.

Usage
[TO BE CONTINUED]

I have probably documented enough to get started and will continue to add to this in due course :)
Last edited by autolog on Thu Mar 12, 2015 7:27 am, edited 3 times in total.
Reason: V1.0.3 Now Available

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests