This plugin for Indigo extends the Indigo Home Automation system with an interface to the Dutch Smart Meters which comply to DSMR (Dutch Smart Meter Requirements), also known as ‘Slimme meter’ or ‘P1 poort’. The plugin can be found in the Indigo plugin store.
This plugin supports DSMR version 2.2, V3, V4 andV5. This documentation is up to date for version 0.1 of the plugin. The plugin is licensed according to the GNU General Public License.
- You will need this plugin from the Indigo plugin store.
- Python 2.7 is needed for Indigo plugins.
- The plugin is tested with Indigodomo Version 7.4.
- Buy a cable which connects the Smart Meter to the USB port of your Indigo server. Take care: not all cables seem to work with all Dutch Smart Meters. This cable can be bought at lots of places, e.g. Robbshop or SosSolutions.
- Optional if you want to make nice graphs or save some history think of
Download and install the plugin in the usual way for Indigo. It will announce itself in the log with the words “P1Meter”. Configure the plugin. It will show the configuration screen like this:
The Connection type tells if your USB stick is connected local to your Indigo server, or via a network connection. The Serial Port will define the USB port used for this interface. The Smart meter cable will present itself as a FTDI USB to Serial adapter.
Next select your DSMR Version for your meter. This will define the speed of the interface used. If you select the wrong one you will not break if, but probably will not receive meaningful information.
Define the time you want between measurements. the P1 interface will supply you with fresh information every second. But be realistic here. This will probably keep your server very busy. Suggest to use once per minute (60 seconds) as a minimum here, but even 300 seconds will do nicely.
The last two options are for debugging purposes. With Show raw telegram the plugin presents the received information directly into the log. The Log level (verbose or normal) tells you have much information you want to receive from this plugin. “Normal” should do perfect once everything is setup.
Save your setup. The plugin will pick up this information and start accordingly.
You do not need to create a device yourself. The plugin will organise that for you. The plugin will create a device with the name ‘P1 Master’ and type ‘P1 Meter’. This device will have the default Indigo device properties. Next to that it will have the following custom properties:
|timestamp||Timestamp of last seen measurement in ISO 8601 format. Note that although the measurement time in the plugin may be smaller, the meter could be slower in presenting new values. Typical an electricity meter will change its value every 1 second.|
|dsmrVersion||Version number of the telegram received from the smart meter.|
|masterState||General device state as shown in the State column of this device. “Started”, “Stopped” are defined for this device. Next to that it will tell “Consuming <Z>W” or “Generating <Z>W” where <Z> is the power used or generated at this moment.|
|meterType||Type information received from the meter.|
|netManager||Acronym for the local netManager|
|textMessage||The P1 telegram has the ability to show messages to the user. If there is no message present in the telegram it will tell “(none)”.|
|currentNowPhase<X>||These properties shows you the power in Amps on a phase at the moment of measuring.|
|currentTariff||Tells you the tariff level currently used for the power generated or consumed. In Netherlands it will be 1 or 2 (“laag”, “hoog”). You could use this property to decide when to start or stop using high usage devices.|
|generatedNowPhase<X>||Shows you the amount of power in Watts currently generated by your house installation for a phase. This will only show a value if you have active solar panels.|
|generatedT<Y>||Shows the amount of power generated to the net from the start of this meter in kWh for tariff level 1 (“laag”) or 2 (“hoog”).|
|meterID||The id of the electricity meter given by your network manager.|
|nowGenerated||Shows the amount generated in nowUnit by your solar panels towards the net at this moment. Note that this number might actually be less than actual generated if you are consuming electricity at the same time.|
|nowUnit||The unit of measurement for the values in nowGenerated and nowUsage.|
|nowUsage||Shows the amount consumed from the net at this moment. Note that this number might actually be higher than shown if you are generating electricity at the same time.|
|outagesLongCount||The number of longer duration outages registered for your meter|
|outagesLongRecentDuration||Duration in seconds of the most recent outage of longer duration.|
|outagesLongRecentTimestamp||Timestamp in ISO 8601 format for the most recent outage of long duration registered in your meter.|
|OutagesShortCount||The number of outages counted in this meter of short duration.|
|tariffUnit||Measurement unit used to show the amounts for the used and generated properties.|
|usedNowPhase<X>||current used power in the unit nowUsage for each phase.|
|usedT<Y>||Total used power in the unit tariffUnit since the start of this meter.|
|voltageNowPhase<X>||current voltage (V) on this phase.|
|voltageToHighCountPhase<X>||Count of times the voltage on this phase was too high.|
|voltageToLowCountPhase<X>||Count of times the voltage on this phase was too low.|
|equipmentType||Number of this device on the measurement bus.|
|gasmeterID||The id of the gas meter given by your network manager.|
|gastariffUnit||Unit of measurement for this meter. For gas it will be m3.|
|gastimestamp||Timestamp of last seen measurement in ISO 8601 format. Note that although the measurement time in the plugin may be smaller, the meter could be slower in presenting new values. Typical a gas meter will change its value every 5 minutes.|
|gasused||Total used in the unit tariffUnit since the start of this meter.|
Y indicates the tariff level and will be 1 or 2
Once the plugin has created this device you are free to change its name or store it into a device folder. The states above can be used e.g. on a control panel. If you accidentely delete this devices, the plugin will re-create it. However the history will get lost in the SQL logger.
If everything works as expected and the config has expected values, the plugin will create devices when the first measurements are coming in. From that moment on the plugin will deliver the output to the devices in the agreed intervals. No more actions are needed. Have fun.
Some errors have occured during testing which might help you if things do not work out.
- Did you use the right port? Check your Mac, System Preferences
- There are known issues with the FTDI kext drivers. If both the Apple and the FTDI drivers are installed this might interfere, which stops the measurements after some time.
- Not all P1 cables work with all type of meters. Ensure you buy a cable which fits your equipment.