Benodigdheden voor deze How-To:
- je free@home is gekoppeld aan Openhab 3.0 en NodeRed
- System Access Point 2.0
- Local APi is geactiveerd in je free@home nexxt App
- SolarEdge gekoppeld aan OpenHab
- Je SolarEdge API key
- Vrije tijd
Stap 1: Het creëren van het Virtual Device (Omvormer) in free@home.
Op de website https://developer.eu.mybuildings.abb.com/fah_local/ vind je heel veel informatie over de local APi en het maken en gebruiken van Virtual Devices.
- Ga naar <IP-adres van System Access Point>/swagger
Klik op Authorize en vul de login informatie in die je kunt vinden in free @ home next app "Settings -> Local API". Je wachtwoord is het wachtwoord voor de installateurs account. Bevestig met "Login" en druk daarna op " Close" om de popup te sluiten.
Klik vervolgens op de knop "Create virtual device", daarna op "try out" en vul vervolgens het veld in volgens de afbeelding. LET OP: vervang " Switching Actuator " door "EnergyInverterMeterBattery" en bedenk een passende displayname
{ "type": "EnergyInverterMeterBattery", "properties": { "ttl": "-1", "displayname": "Virtual Solar Plant" } }
Een Virtuele "Solar power device" zou nu gecreeerd moeten zijn in free@home. Dit device kun je vervolgens op de bekende wijze plaatsen in de juiste ruimte. Bij het overzicht met devices ziet het er alsvolgt uit:
Voor nu ben je klaar aan de kant van free@home!
Deel 2: Openhab 3.0
- Installeer de binding " SolarEdge"
Ga na installatie van de binding vervolgens naar " Things" en zoek daar naar "SolarEdge". Klik hier op de pijl naar rechts volgens onderstaande afbeelding.
Nu komt het deel waar je de API key nodig hebt voor jouw specifieke SolarEdge Installatie. Deze key vind je op monitoring.solaredge.com. Kopieer de Key en plak deze in het veld in Openhab 3.0.
Heb je net als ik ook een energiemeter in je solaredge installatie, zet dan de betreffende slider op "On" (de een-na-onderste, zie bovenstaande afbeelding)
Nu is het tijd om de benodigde kanalen aan te gaan maken in je SolarEdge Thing. Onderstaand eerst een afbeelding hoe dat eruit ziet. Bij veel kanalen zie je een 1, bij andere een 2. Dit heeft te maken met andere functionaliteiten die ik gebruik buiten free@home.
Let vooral nu goed op, de 2e screenshot toont 2 waardes, 1 met de toevoeging kW, de andere is slechts een cijfer. Voor free@home is het van belang om de waardes op een juiste manier aan te bieden, anders werkt het simpelweg niet. Op veel plaatsen heeft free@home " Number" nodig, op andere plaatsen "Number.Class", om terug te pakken naar de voorgaande afbeelding, of 1.14 of 1.14kW. Onderstaand een screenshot van mijn flows in NodeRed. Hier zie je heel duidelijk welke uitvoering van de waardes ik gebruik.
De groene velden zijn de kanalen die je aangemaakt hebt in Openhab 3.0 voor het Thing " SolarEdge". De function velden in het midden veranderen de waarden zodanig dat free@home deze waarden kan gaan toepassen en visualiseren. De waarden uit Openhab worden dus vertaald en vervolgens gekoppeld aan een datapunt van het Virtual Device wat we in deel 1 gemaakt hebben.
Voorbeeld:
Het groene veld spreekt voor zich denk ik. In het veld Function doen we het volgende:
Vanuit dit veld gaat de flow door naar free@home en wordt daarheen gestuurd door een node:
Door je username:Password@ toe te voegen aan de url kan de data worden geschreven in free@home.
Je ziet aan het eind van het veld URL in het bovenstaande voorbeeld ch0000.odp0002 De .odp0002 zie je ook terug in de benaming van het veld. Daar waar alleen .odp00XX staat heeft het betrekking op ch0000, staat er 1.odp0001 dan betekent dat .ch0001.odp0001.
Koppel alle juiste Openhab input aan de juiste datapunten van free@home en de date van je omvormer is zichtbaar in je App en Webui. Nog leuker? Energiemanagement! Via het actiemenu kun je allerlei leuke dingen instellen om je eigen verbruik te vergroten!
Ik ben benieuwd naar jullie resultaten!
Om het gemakkelijker te maken heb ik mijn flow hier ook geplaatst:
[{"id":"76091014.60e7c","type":"tab","label":"SolarEdge","disabled":false,"info":""},{"id":"fb5b3ba6.cd2ee8","type":"openhab2-in","z":"76091014.60e7c","name":"","controller":"69c4a1b8.038a98","itemname":"SolarEdge_Live_Production","x":180,"y":100,"wires":[["19801514.ca631b"],[]]},{"id":"3b8bec13.0dc344","type":"inject","z":"76091014.60e7c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"238.55","payloadType":"num","x":130,"y":180,"wires":[["19801514.ca631b"]]},{"id":"1225f1c1.a1f55e","type":"inject","z":"76091014.60e7c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"240000.567","payloadType":"num","x":150,"y":220,"wires":[["19801514.ca631b"]]},{"id":"82545d58.72544","type":"debug","z":"76091014.60e7c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1020,"y":120,"wires":[]},{"id":"19801514.ca631b","type":"function","z":"76091014.60e7c","name":"","func":"var gerundet = Math.round( msg.payload * 10 ) / 10;\nmsg.payload = gerundet;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":440,"y":160,"wires":[["5bfd2d71.d0a344","ba6c3029.fb0a6"]]},{"id":"91d0c2fa.94821","type":"function","z":"76091014.60e7c","name":"","func":"var gerundet = Math.round( msg.payload * 10 ) / 10;\nmsg.payload = gerundet;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":480,"y":340,"wires":[["82545d58.72544","498f7c52.548f84"]]},{"id":"38f096b9.8eed4a","type":"inject","z":"76091014.60e7c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0.37","payloadType":"num","x":1490,"y":720,"wires":[[]]},{"id":"fa5ea2a7.02e65","type":"inject","z":"76091014.60e7c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":1490,"y":680,"wires":[[]]},{"id":"e7e0104a.b4aa6","type":"inject","z":"76091014.60e7c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1000","payloadType":"num","x":1490,"y":640,"wires":[[]]},{"id":"e7109bf5.753f58","type":"http request","z":"76091014.60e7c","name":"Battery level 2-odp0000","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.2.8/fhapi/v1/api/rest/datapoint/00000000-0000-0000-0000-000000000000/ABB1E892D534.ch0002.odp0000","tls":"","persist":false,"proxy":"","authType":"basic","x":1030,"y":1300,"wires":[["82545d58.72544"]]},{"id":"e9e605d2.433648","type":"inject","z":"76091014.60e7c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"100","payloadType":"num","x":1490,"y":800,"wires":[[]]},{"id":"c181a99f.2ce048","type":"inject","z":"76091014.60e7c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"788","payloadType":"num","x":1490,"y":760,"wires":[[]]},{"id":"f34bbc5c.db99c","type":"openhab2-in","z":"76091014.60e7c","name":"","controller":"69c4a1b8.038a98","itemname":"SolarEdge_Live_Consumption","x":140,"y":880,"wires":[["dd5f41f4.715c8","703ae23c.9d154c"],[]]},{"id":"5caa2c81.9cc5c4","type":"inject","z":"76091014.60e7c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":1490,"y":600,"wires":[[]]},{"id":"1bc7c969.3054d7","type":"openhab2-in","z":"76091014.60e7c","name":"","controller":"56236f31.4fbee","itemname":"SolarEdge_Production","x":120,"y":320,"wires":[["91d0c2fa.94821"],[]]},{"id":"3f7190f0.f93bc","type":"openhab2-in","z":"76091014.60e7c","name":"","controller":"56236f31.4fbee","itemname":"SolarEdge_Export_Aggregate_Day_NoValue","x":190,"y":440,"wires":[["7af7681d.281e98","703ae23c.9d154c"],[]]},{"id":"21c3d20b.c96fae","type":"openhab2-in","z":"76091014.60e7c","name":"","controller":"56236f31.4fbee","itemname":"SolarEdge_Import_novalue","x":130,"y":1000,"wires":[["965a65e6.e9fd38","703ae23c.9d154c"],[]]},{"id":"2c155266.222a3e","type":"openhab2-in","z":"76091014.60e7c","name":"","controller":"56236f31.4fbee","itemname":"SolarEdge_Aggregate_Day_SelfConsumptionCoverage","x":220,"y":700,"wires":[["29f1c4e7.32c19c"],[]]},{"id":"9446c933.8c58a8","type":"function","z":"76091014.60e7c","name":"","func":"var gerundet = Math.round( msg.payload / 10 );\nmsg.payload = gerundet;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1720,"y":460,"wires":[[]]},{"id":"35c439a7.11bee6","type":"inject","z":"76091014.60e7c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0.41","payloadType":"num","x":1490,"y":560,"wires":[[]]},{"id":"965a65e6.e9fd38","type":"function","z":"76091014.60e7c","name":"","func":"var gerundet = Math.round( msg.payload * 10 ) / 10;\nmsg.payload = gerundet;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":440,"y":1040,"wires":[["4bf28a28.851eb4"]]},{"id":"439f01c0.be79d","type":"openhab2-in","z":"76091014.60e7c","name":"","controller":"56236f31.4fbee","itemname":"SolarEdge_Export_Live_NoValue","x":150,"y":940,"wires":[["b6e82b62.c3a1d8","703ae23c.9d154c"],[]]},{"id":"e2823c6e.abe33","type":"function","z":"76091014.60e7c","name":"","func":"var gerundet = Math.round( msg.payload * 10 ) / 10;\nmsg.payload = gerundet;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":480,"y":540,"wires":[["7b17f53.8b0750c"]]},{"id":"90ebd264.5c932","type":"debug","z":"76091014.60e7c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":410,"y":1160,"wires":[]},{"id":"8c4fe7fc.c011d8","type":"websocket in","z":"76091014.60e7c","name":"f@h websocket","server":"","client":"640b2cab.576684","x":100,"y":1260,"wires":[["342b85b3.57397a","90ebd264.5c932"]]},{"id":"8c91f320.deffa","type":"function","z":"76091014.60e7c","name":"","func":"if (msg.payload[\"00000000-0000-0000-0000-000000000000\"].datapoints[\"6000F8EA6248/ch0000/idp0002\"]){\nvar x = msg.payload[\"00000000-0000-0000-0000-000000000000\"].datapoints[\"6000F8EA6248/ch0000/idp0002\"];\n\nmsg.payload = x;\n\nreturn msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":760,"y":1260,"wires":[["e7109bf5.753f58","c1a38c42.d5d01"]]},{"id":"6c79b6d9.e2cad8","type":"http request","z":"76091014.60e7c","name":"Battery Power 2-odp0001","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.2.8/fhapi/v1/api/rest/datapoint/00000000-0000-0000-0000-000000000000/ABB1E892D534.ch0002.odp0001","tls":"","persist":false,"proxy":"","authType":"basic","x":1130,"y":1400,"wires":[[]]},{"id":"c1a38c42.d5d01","type":"function","z":"76091014.60e7c","name":"","func":"var gerundet = Math.round( msg.payload - 30 ) / 10;\nmsg.payload = gerundet;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":840,"y":1380,"wires":[["6c79b6d9.e2cad8"]]},{"id":"342b85b3.57397a","type":"json","z":"76091014.60e7c","name":"","property":"payload","action":"","pretty":false,"x":420,"y":1280,"wires":[["90ebd264.5c932","8c91f320.deffa","b80049a1.0ed6d8"]]},{"id":"b80049a1.0ed6d8","type":"link out","z":"76091014.60e7c","name":"Free@home WebOut","links":["5c4893a3.da44bc","c7fd5c31.cb89d","cf78e61.5db6918","a811ebf2.385e18","2802d49.900422c","c30238c3.fef338","4f60647f.8aa4ac"],"x":485,"y":1380,"wires":[]},{"id":"7af7681d.281e98","type":"function","z":"76091014.60e7c","name":"","func":"var gerundet = Math.round( msg.payload * 10 ) / 10;\nmsg.payload = gerundet;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":480,"y":440,"wires":[["e7770829.410458"]]},{"id":"71bc581a.277418","type":"openhab2-in","z":"76091014.60e7c","name":"","controller":"56236f31.4fbee","itemname":"SolarEdge_Import_novalue","x":130,"y":520,"wires":[["e2823c6e.abe33","703ae23c.9d154c"],[]]},{"id":"51f9c2b6.13f44c","type":"openhab2-in","z":"76091014.60e7c","name":"","controller":"56236f31.4fbee","itemname":"SolarEdge_Live_Consumption","x":140,"y":820,"wires":[["c9bc7d83.1ceac"],[]]},{"id":"977a3b6e.e7e9a8","type":"function","z":"76091014.60e7c","name":"","func":"var gerundet = Math.round( msg.payload * 10 ) / 10;\nmsg.payload = gerundet;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":460,"y":620,"wires":[["5d6ecf7b.f421f"]]},{"id":"dd5f41f4.715c8","type":"function","z":"76091014.60e7c","name":"","func":"if (msg.payload > 0 ) {\n msg.payload = msg.payload*-1;} \n \n else {msg.payload = \"0\";}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":420,"y":880,"wires":[["a300b297.61aae"]]},{"id":"7fa1b826.7a5588","type":"template","z":"76091014.60e7c","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"This is the payload: {{payload}} !","output":"str","x":1730,"y":380,"wires":[[]]},{"id":"7874d5b5.9c852c","type":"debug","z":"76091014.60e7c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":2310,"y":560,"wires":[]},{"id":"b6e82b62.c3a1d8","type":"function","z":"76091014.60e7c","name":"","func":"if (msg.payload >= 0 ) {\n msg.payload = msg.payload;} \n \n else {msg.payload = \"0\";}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":420,"y":960,"wires":[["a300b297.61aae"]]},{"id":"1afe1955.7ea797","type":"openhab2-in","z":"76091014.60e7c","name":"","controller":"56236f31.4fbee","itemname":"SolarEdge_Aggregate_Day_SelfConsumptionCoverage","x":220,"y":760,"wires":[["213eeeac.227ff2"],[]]},{"id":"703ae23c.9d154c","type":"link out","z":"76091014.60e7c","name":"","links":["3e916e79.68b852"],"x":385,"y":920,"wires":[]},{"id":"5bfd2d71.d0a344","type":"http request","z":"76091014.60e7c","name":"Solar Energie momentan-odp0000","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.2.8/fhapi/v1/api/rest/datapoint/00000000-0000-0000-0000-000000000000/ABB1E892D534.ch0000.odp0000","tls":"","persist":false,"proxy":"","authType":"basic","x":720,"y":140,"wires":[[]]},{"id":"ba6c3029.fb0a6","type":"http request","z":"76091014.60e7c","name":"odp0001","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.2.8/fhapi/v1/api/rest/datapoint/00000000-0000-0000-0000-000000000000/ABB1E892D534.ch0000.odp0001","tls":"","persist":false,"proxy":"","authType":"basic","x":620,"y":260,"wires":[[]]},{"id":"498f7c52.548f84","type":"http request","z":"76091014.60e7c","name":"Solar Energy today-odp0002","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.2.8/fhapi/v1/api/rest/datapoint/00000000-0000-0000-0000-000000000000/ABB1E892D534.ch0000.odp0002","tls":"","persist":false,"proxy":"","authType":"basic","x":720,"y":380,"wires":[[]]},{"id":"e7770829.410458","type":"http request","z":"76091014.60e7c","name":"odp0003","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.2.8/fhapi/v1/api/rest/datapoint/00000000-0000-0000-0000-000000000000/ABB1E892D534.ch0000.odp0003","tls":"","persist":false,"proxy":"","authType":"basic","x":680,"y":440,"wires":[[]]},{"id":"7b17f53.8b0750c","type":"http request","z":"76091014.60e7c","name":"Energy from grid 24h -odp0004","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.2.8/fhapi/v1/api/rest/datapoint/00000000-0000-0000-0000-000000000000/ABB1E892D534.ch0000.odp0004","tls":"","persist":false,"proxy":"","authType":"basic","x":730,"y":520,"wires":[[]]},{"id":"5d6ecf7b.f421f","type":"http request","z":"76091014.60e7c","name":"odp0005","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.2.8/fhapi/v1/api/rest/datapoint/00000000-0000-0000-0000-000000000000/ABB1E892D534.ch0000.odp0005","tls":"","persist":false,"proxy":"","authType":"basic","x":660,"y":600,"wires":[[]]},{"id":"29f1c4e7.32c19c","type":"http request","z":"76091014.60e7c","name":"Self consumption 1-odp0000","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.2.8/fhapi/v1/api/rest/datapoint/00000000-0000-0000-0000-000000000000/ABB1E892D534.ch0001.odp0001","tls":"","persist":false,"proxy":"","authType":"basic","x":720,"y":680,"wires":[[]]},{"id":"213eeeac.227ff2","type":"http request","z":"76091014.60e7c","name":"Self sufficiency 1-odp0001","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.2.8/fhapi/v1/api/rest/datapoint/00000000-0000-0000-0000-000000000000/ABB1E892D534.ch0001.odp0001","tls":"","persist":false,"proxy":"","authType":"basic","x":720,"y":740,"wires":[[]]},{"id":"c9bc7d83.1ceac","type":"http request","z":"76091014.60e7c","name":"Comsumption live 1-odp0002","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.2.8/fhapi/v1/api/rest/datapoint/00000000-0000-0000-0000-000000000000/ABB1E892D534.ch0001.odp0002","tls":"","persist":false,"proxy":"","authType":"basic","x":720,"y":800,"wires":[[]]},{"id":"a300b297.61aae","type":"http request","z":"76091014.60e7c","name":"to-from Grid right now 1-odp0003","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.2.8/fhapi/v1/api/rest/datapoint/00000000-0000-0000-0000-000000000000/ABB1E892D534.ch0001.odp0003","tls":"","persist":false,"proxy":"","authType":"basic","x":740,"y":860,"wires":[[]]},{"id":"4bf28a28.851eb4","type":"http request","z":"76091014.60e7c","name":"from Grid 24h 1-odp0004","method":"PUT","ret":"txt","paytoqs":"ignore","url":"http://192.168.2.8/fhapi/v1/api/rest/datapoint/00000000-0000-0000-0000-000000000000/ABB1E892D534.ch0001.odp0004","tls":"","persist":false,"proxy":"","authType":"basic","x":710,"y":980,"wires":[[]]},{"id":"69c4a1b8.038a98","type":"openhab2-controller","name":"BOS","protocol":"http","host":"localhost","port":"8080","path":"","username":"","password":""},{"id":"56236f31.4fbee","type":"openhab2-controller","name":"BOS","protocol":"http","host":"localhost","port":"8080","path":"","username":"","password":""},{"id":"640b2cab.576684","type":"websocket-client","path":"ws://192.168.2.8/fhapi/v1/api/ws","tls":"","wholemsg":"false"}]
Kies een afbeelding
Beeldformaten image/gif, image/jpeg, image/jpg, image/png
Max. bestandsgrootte 10 MB
URL-informatie toevoegen
Hier kunt u URL-informatie toevoegen
Zo zal het eruit zien