The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
[NEW UPDATE] Plugwise Smile P1 (v2.0.0)
Plugwise smile P1
Homey app to integrate Plugwise Smile P1 energy meter. A direct connection over IP is used, so there is no need for the Plugwise Stretch.
The app logs and provides flow cards for the following data:
- Actual power usage/production (W, 10s interval)
- Totalized power meter (kWh)
- All individual power meters (kWh)
- Recent gas usage (m3, of the previous hour)
- Gas meter (m3)
- Tariff change (off-peak, true or false)
Ledring screensaver:
- See how much energy you are using or producing just by looking at your Homey!
- Is the wash-dryer ready? Am I now producing power to the grid?
The power is totalized for consumed and produced power, during off-peak and peak hours. Production to the powergrid is displayed as negative watts. Only changed values are logged.
To setup go to "Devices" and enter the IP-address and Smile ID. The ID can be found printed on the device, or can be found in the original app from Plugwise. The polling interval can be changed in the device settings.
Donate:
If you like the app you can show your appreciation by posting it in the forum, and if you really like it you can buy me a beer. Feature requests can be placed on the forum.
Version changelog
v2.0.0 2018.01.14 Complete rewrite to sdk2.
v1.1.2 2017.04.19 Added polling interval setting
V1.1.1 2017.01.07 Fix for flow tokens fw 1.1.2
v1.1.0 2016.12.02 More robust for corrupt smile data. Changed titles of
individual power meters in Insights and device card.
v1.0.0 2016.11.26 Stable release for Homey v1.0. Update xml2js to 0.4.17. Added
all individual power meter readings (re-pair is required to use)
v0.9.16 2016.11.07 Compatibility 0.10.9. Breaking fw change: Device must be
deleted and paired again. Fix 'cannot read property' crash. Improved gas
usage logging in insights.
v0.9.15 2016.10.18 Removing 0 readings after app restart
v0.9.14 2016.10.01 Compatibility 0.10.1+. Breaking fw change: Device must be
deleted and paired again. offPeak and gas usage can now corectly logged
in Insights (Thank you Athom!). Fix for occasional crash.
v0.9.13 2016.08.27 Compatibility 0.9.3+
v0.9.12 2016.08.15 Icons inverted. Bug in kWh production fixed.
v0.9.11 2016.08.08 Fixed bug for negative power meter values. Changed power
meter back to kWh (bug: Insights still shows Wh). Changed off-peak icon.
v0.9.10 2016.08.07 Modified for compatibility to Homey firmware 0.9.2+. Added
custom capabilities for gas usage and off-peak. Logs for these are still
missing.
v0.9.9 2016.07.05 Added settings for device card. Ledring settings added. New
internal device datastructure and migration from v0.9.8. Init after
pairing changed to Homey firmware compatibility 0.8.33+. Code cleanup
and optimizations.Testing insights (again) for Tariff. Fixed bug for
occasional crash on device delete. Fix for crash when no gasmeter present.
v0.9.8 2016.06.13 Fixed bug that made app not work correctly for firmware 0.8.37+.
Added trigger cards and tokens for power change and tariff change. Added
condition card for tariff change. Added ledring screensaver. Changed meter
power to wH instead of kWh to match Homey firmware 0.8.35+. Improved
connection validation after successful pairing. Some code optimizations.
v0.9.7 2016.06.03 Added meter mapping to cope with different smart meter brands
v0.9.6 2016.06.02 Improved validation process during pairing
v0.9.5 2016.06.01 Release candidate
Comments
Edit: v0.9.7 just got approved. Download the new version in the app store if the app crashes after pairing!
Was waiting for this
Going to test it en keep you posted
Very Nice
Still waithing for the replacement homey to arrive
But if it is installed this will be the first app running
I got the following crash error when trying to connect my Plugwise Smile P1:
Stack trace:
TypeError: Cannot read property '0' of undefined
at /drivers/smilep1/driver.js:40:46
at Parser.<anonymous> (/node_modules/xml2js/lib/xml2js.js:484:18)
at emitOne (events.js:77:13)
at Parser.emit (events.js:169:7)
at Object.onclosetag (/node_modules/xml2js/lib/xml2js.js:445:26)
at emit (/node_modules/xml2js/node_modules/sax/lib/sax.js:640:35)
at emitNode (/node_modules/xml2js/node_modules/sax/lib/sax.js:645:5)
at closeTag (/node_modules/xml2js/node_modules/sax/lib/sax.js:905:7)
at Object.write (/node_modules/xml2js/node_modules/sax/lib/sax.js:1449:13)
at Parser.exports.Parser.Parser.parseString (/node_modules/xml2js/lib/xml2js.js:503:31)
* Is it a clean install, or did you upgrade?
* Has it ever worked, or do you always get this error when pairing?
* which Homey firmware are you using?
* Could you do the following: with a webbrowser go to
http://[ip address of your homey]/core/modules
login with:
username: smile
password: your SmileID (the one you also use during pairing)
You should get an XML output. Could you please send me this xml (in a personal message)?
Thx!
It is a new install (with a second-hand Smile P1).
And i think i found the culprit; If I login to the smile p1 itself, it doesn't show any meters. It does show receiving telegrams, but somehow it is not parsing them correctly. The plugwise app isn't working as well.
XML is pretty empty ( I didn't have to login, btw)
<modules></modules>
So I don't think it is your app. Although you might add some error checking to prevent the crashing when no meter data is shown.
Now I have to figure out why the Smile isn't showing any data. Probably data is corrupt which prevents parsing of new telegrams...
well, actually during pairing I am checking for certain data structures to be present. So if the xml output is indeed <modules></modules> it should not pair!
I think it shows an empty xml if you tried to login before with the wrong password. You could close your browser and try again to login. Also you could try to login to:
http://[ip address of your homey]
this should provide a webinterface where it shows the firmware version etc. of the Smile. The current version is 2.1.7.
Did you install the android/ios app from plugwise? There also you can check the firmware version. If you have an old firmware in the Smile you can upgrade it from there.
If you still manage to get a xml output, please do send it to me so I can check why my app is pairing to your Smile, but then is not able to read the expected data...
It's running 2.17 ; but I am still not sure if any telegram messages are arriving; I get some weird output on the status page of the web interface:
Applicatie
If I change the date (e.g. other timezone, the 'last telegram' will also update to the name of that timezone. It seems so be the last characters of the 'laatste verwerking' part.
But this is all a bit offtopic for your app. ;-)
call them and they will send you a new cable to connect to your meter
older versions have problems with the new dsrm 4 meters
i got the new cable including small pcb changed the old one for the new one and i had data instantly
I will also add extra code to check the validity of the data every time it reads the smile (which is every 10 seconds). If the data is corrupt the device will be reported offline to Homey. I will release this update within a few days on GitHub. I will upload a new version for the Homey app store after the Homey firmware gets an official update.
Changes:
* Condition card for tariff change.
* A very cool ledring screensaver that shows actual power use / production.
* Changed meter power to wH instead of kWh to match Homey firmware 0.8.35+.
* Improved connection validation after successful pairing to prevent app crash for faulty data / faulty Smile device
going to download github now
no plugwise in insights
Think that's when I installed 0.8.38...
What I meant was that the old data was gone. I still receive meter-reading on the app-page though. However, the flow (change>200 W) doesn't trigger anymore (probably the same as bug 682)
Yes, the issues you both have must be caused by the new test firmware from Homey (.38). I have de-installed and tested the Smile app again myself to check (GitHub version), but on my stable/official release 0.8.32 everything is running perfect and very stable!
Emile already tolt that the api has changed
So maybe a rewrite is needed
I think I found a bug that was causing the insights and flowcards issues. I uploaded again to GitHub. Please let me know if this fixes things for you.
v0.9.8 2016.06.13 Fixed bug that made app not work correctly for firmware 0.8.37+. Added trigger cards and tokens for power change and tariff change. Added condition card for tariff change. Added ledring screensaver. Changed meter power to wH instead of kWh to match Homey firmware 0.8.35+. Improved connection validation after successful pairing. Some code optimizations.
invalid device?
Could you provide some more info? Eg. What firmmware release are you on, did you do a clean install or an upgrade, did it work before , is it a consistant crash or just sometimes, could you check/send me the xml output as described here gruijter_dev said:
Did you try to do a clean install of the app?
1) Remove all flows where the SmileP1 device is used
2) Remove the SmileP1 app (in Settings - Apps)
3) Reboot Homey (in Settings - System)
4) Install SmileP1 app from the appstore
5) Pair the SmileP1 device
6) Create the flows you want to use