├── .gitattributes ├── .github └── FUNDING.yml ├── .gitignore ├── Images ├── AddDashboard.PNG ├── AddIntegration.PNG ├── AddOns.PNG ├── Advanced.PNG ├── ApexChartsCard.PNG ├── AuthorizationString.PNG ├── BackupComplete.PNG ├── BackupGoogleDrive.PNG ├── BrokerConfigured.PNG ├── BrokerConnected.PNG ├── BrokerNodeConfig.PNG ├── CardMod.PNG ├── ConfigEmpty.PNG ├── ConfigPasted.PNG ├── ConfigSuccess.PNG ├── ConfigurationYaml.PNG ├── CreateDashboardSOFAR.PNG ├── Download.png ├── Download2.png ├── Duck1.PNG ├── DuckDNSBrokenConfig.PNG ├── DuckDNSConfig1.PNG ├── DuckDNSDone.PNG ├── DuckDNSSuccess.PNG ├── DuckDNSToken.PNG ├── DuckDNSYaml.PNG ├── E7Connected.PNG ├── E7Disable.png ├── E7Flow.PNG ├── E7ImportSettings.PNG ├── E7Setup.PNG ├── EditDashboard.PNG ├── EditDashboard2.PNG ├── Enum.PNG ├── FileEditorStarted.PNG ├── GoogleDriveSetup.PNG ├── GoogleDriveStart.PNG ├── GoogleDriveStarted.PNG ├── HACSCode.PNG ├── HACSDone.PNG ├── HACSInstall.PNG ├── HACSIntegrationsFrontEnd.PNG ├── HAInRouter.PNG ├── HAInRouter2.PNG ├── HAURL.PNG ├── InverterControl.PNG ├── InverterControlPasted.PNG ├── LayoutCard.PNG ├── LocalDashboard.PNG ├── LocalLink.PNG ├── LocalLogin.PNG ├── Login.PNG ├── MQTTIntegration.PNG ├── MosquittoDone.PNG ├── MosquittoSetup.PNG ├── MosquittoStarted.PNG ├── NodeRedCredential.PNG ├── NodeRedIMPORT.PNG ├── NodeRedIntro.PNG ├── NodeRedSofarImportOptions.PNG ├── NodeRedStarted.PNG ├── NotLoaded.PNG ├── Pic1.PNG ├── Pic10.PNG ├── Pic11.PNG ├── Pic12.PNG ├── Pic2.PNG ├── Pic3.PNG ├── Pic4.PNG ├── Pic5.PNG ├── Pic6.PNG ├── Pic7.PNG ├── Pic8.PNG ├── Pic9.PNG ├── PortConfigureRouter1.PNG ├── PortConfigureRouter2.PNG ├── PowerFlowCard.PNG ├── RawConfig.PNG ├── Redownload.PNG ├── RemoteDashboard.PNG ├── RemoteLogin.PNG ├── RemoteURL.PNG ├── ReserveHARouterIP.PNG ├── Restart.PNG ├── Router1.PNG ├── SOFAR1Example.PNG ├── SankeyChartCrd.PNG ├── SofarConfig.PNG ├── SofarDashboard.PNG ├── SofarFlow.PNG ├── SofarFlowConfig1.PNG ├── TakeControl.PNG ├── Terminal.PNG ├── Terminal2.PNG ├── Terminal3.PNG └── Today.PNG ├── Integrating Sofar2mqtt with Home Assistant ├── 3.5 Hybrid.json ├── Economy7Management.json ├── ExampleSofar2mqttJSON.txt ├── InverterControlDashboard.txt ├── Sofar2MQTT 2023-01-13.json ├── Sofar2MQTT.json ├── SofarDashboard.txt ├── configuration-backup-2023-01-06.yaml ├── configuration-backup-2023-05-16.yaml ├── configuration.yaml ├── hybrid-SofarDashboard.txt └── hybrid-configuration.yaml ├── LICENSE.txt └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: dxoverdy 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /Images/AddDashboard.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/AddDashboard.PNG -------------------------------------------------------------------------------- /Images/AddIntegration.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/AddIntegration.PNG -------------------------------------------------------------------------------- /Images/AddOns.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/AddOns.PNG -------------------------------------------------------------------------------- /Images/Advanced.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Advanced.PNG -------------------------------------------------------------------------------- /Images/ApexChartsCard.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/ApexChartsCard.PNG -------------------------------------------------------------------------------- /Images/AuthorizationString.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/AuthorizationString.PNG -------------------------------------------------------------------------------- /Images/BackupComplete.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/BackupComplete.PNG -------------------------------------------------------------------------------- /Images/BackupGoogleDrive.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/BackupGoogleDrive.PNG -------------------------------------------------------------------------------- /Images/BrokerConfigured.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/BrokerConfigured.PNG -------------------------------------------------------------------------------- /Images/BrokerConnected.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/BrokerConnected.PNG -------------------------------------------------------------------------------- /Images/BrokerNodeConfig.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/BrokerNodeConfig.PNG -------------------------------------------------------------------------------- /Images/CardMod.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/CardMod.PNG -------------------------------------------------------------------------------- /Images/ConfigEmpty.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/ConfigEmpty.PNG -------------------------------------------------------------------------------- /Images/ConfigPasted.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/ConfigPasted.PNG -------------------------------------------------------------------------------- /Images/ConfigSuccess.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/ConfigSuccess.PNG -------------------------------------------------------------------------------- /Images/ConfigurationYaml.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/ConfigurationYaml.PNG -------------------------------------------------------------------------------- /Images/CreateDashboardSOFAR.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/CreateDashboardSOFAR.PNG -------------------------------------------------------------------------------- /Images/Download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Download.png -------------------------------------------------------------------------------- /Images/Download2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Download2.png -------------------------------------------------------------------------------- /Images/Duck1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Duck1.PNG -------------------------------------------------------------------------------- /Images/DuckDNSBrokenConfig.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/DuckDNSBrokenConfig.PNG -------------------------------------------------------------------------------- /Images/DuckDNSConfig1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/DuckDNSConfig1.PNG -------------------------------------------------------------------------------- /Images/DuckDNSDone.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/DuckDNSDone.PNG -------------------------------------------------------------------------------- /Images/DuckDNSSuccess.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/DuckDNSSuccess.PNG -------------------------------------------------------------------------------- /Images/DuckDNSToken.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/DuckDNSToken.PNG -------------------------------------------------------------------------------- /Images/DuckDNSYaml.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/DuckDNSYaml.PNG -------------------------------------------------------------------------------- /Images/E7Connected.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/E7Connected.PNG -------------------------------------------------------------------------------- /Images/E7Disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/E7Disable.png -------------------------------------------------------------------------------- /Images/E7Flow.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/E7Flow.PNG -------------------------------------------------------------------------------- /Images/E7ImportSettings.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/E7ImportSettings.PNG -------------------------------------------------------------------------------- /Images/E7Setup.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/E7Setup.PNG -------------------------------------------------------------------------------- /Images/EditDashboard.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/EditDashboard.PNG -------------------------------------------------------------------------------- /Images/EditDashboard2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/EditDashboard2.PNG -------------------------------------------------------------------------------- /Images/Enum.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Enum.PNG -------------------------------------------------------------------------------- /Images/FileEditorStarted.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/FileEditorStarted.PNG -------------------------------------------------------------------------------- /Images/GoogleDriveSetup.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/GoogleDriveSetup.PNG -------------------------------------------------------------------------------- /Images/GoogleDriveStart.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/GoogleDriveStart.PNG -------------------------------------------------------------------------------- /Images/GoogleDriveStarted.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/GoogleDriveStarted.PNG -------------------------------------------------------------------------------- /Images/HACSCode.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/HACSCode.PNG -------------------------------------------------------------------------------- /Images/HACSDone.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/HACSDone.PNG -------------------------------------------------------------------------------- /Images/HACSInstall.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/HACSInstall.PNG -------------------------------------------------------------------------------- /Images/HACSIntegrationsFrontEnd.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/HACSIntegrationsFrontEnd.PNG -------------------------------------------------------------------------------- /Images/HAInRouter.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/HAInRouter.PNG -------------------------------------------------------------------------------- /Images/HAInRouter2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/HAInRouter2.PNG -------------------------------------------------------------------------------- /Images/HAURL.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/HAURL.PNG -------------------------------------------------------------------------------- /Images/InverterControl.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/InverterControl.PNG -------------------------------------------------------------------------------- /Images/InverterControlPasted.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/InverterControlPasted.PNG -------------------------------------------------------------------------------- /Images/LayoutCard.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/LayoutCard.PNG -------------------------------------------------------------------------------- /Images/LocalDashboard.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/LocalDashboard.PNG -------------------------------------------------------------------------------- /Images/LocalLink.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/LocalLink.PNG -------------------------------------------------------------------------------- /Images/LocalLogin.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/LocalLogin.PNG -------------------------------------------------------------------------------- /Images/Login.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Login.PNG -------------------------------------------------------------------------------- /Images/MQTTIntegration.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/MQTTIntegration.PNG -------------------------------------------------------------------------------- /Images/MosquittoDone.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/MosquittoDone.PNG -------------------------------------------------------------------------------- /Images/MosquittoSetup.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/MosquittoSetup.PNG -------------------------------------------------------------------------------- /Images/MosquittoStarted.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/MosquittoStarted.PNG -------------------------------------------------------------------------------- /Images/NodeRedCredential.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/NodeRedCredential.PNG -------------------------------------------------------------------------------- /Images/NodeRedIMPORT.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/NodeRedIMPORT.PNG -------------------------------------------------------------------------------- /Images/NodeRedIntro.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/NodeRedIntro.PNG -------------------------------------------------------------------------------- /Images/NodeRedSofarImportOptions.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/NodeRedSofarImportOptions.PNG -------------------------------------------------------------------------------- /Images/NodeRedStarted.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/NodeRedStarted.PNG -------------------------------------------------------------------------------- /Images/NotLoaded.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/NotLoaded.PNG -------------------------------------------------------------------------------- /Images/Pic1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Pic1.PNG -------------------------------------------------------------------------------- /Images/Pic10.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Pic10.PNG -------------------------------------------------------------------------------- /Images/Pic11.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Pic11.PNG -------------------------------------------------------------------------------- /Images/Pic12.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Pic12.PNG -------------------------------------------------------------------------------- /Images/Pic2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Pic2.PNG -------------------------------------------------------------------------------- /Images/Pic3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Pic3.PNG -------------------------------------------------------------------------------- /Images/Pic4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Pic4.PNG -------------------------------------------------------------------------------- /Images/Pic5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Pic5.PNG -------------------------------------------------------------------------------- /Images/Pic6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Pic6.PNG -------------------------------------------------------------------------------- /Images/Pic7.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Pic7.PNG -------------------------------------------------------------------------------- /Images/Pic8.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Pic8.PNG -------------------------------------------------------------------------------- /Images/Pic9.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Pic9.PNG -------------------------------------------------------------------------------- /Images/PortConfigureRouter1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/PortConfigureRouter1.PNG -------------------------------------------------------------------------------- /Images/PortConfigureRouter2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/PortConfigureRouter2.PNG -------------------------------------------------------------------------------- /Images/PowerFlowCard.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/PowerFlowCard.PNG -------------------------------------------------------------------------------- /Images/RawConfig.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/RawConfig.PNG -------------------------------------------------------------------------------- /Images/Redownload.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Redownload.PNG -------------------------------------------------------------------------------- /Images/RemoteDashboard.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/RemoteDashboard.PNG -------------------------------------------------------------------------------- /Images/RemoteLogin.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/RemoteLogin.PNG -------------------------------------------------------------------------------- /Images/RemoteURL.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/RemoteURL.PNG -------------------------------------------------------------------------------- /Images/ReserveHARouterIP.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/ReserveHARouterIP.PNG -------------------------------------------------------------------------------- /Images/Restart.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Restart.PNG -------------------------------------------------------------------------------- /Images/Router1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Router1.PNG -------------------------------------------------------------------------------- /Images/SOFAR1Example.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/SOFAR1Example.PNG -------------------------------------------------------------------------------- /Images/SankeyChartCrd.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/SankeyChartCrd.PNG -------------------------------------------------------------------------------- /Images/SofarConfig.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/SofarConfig.PNG -------------------------------------------------------------------------------- /Images/SofarDashboard.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/SofarDashboard.PNG -------------------------------------------------------------------------------- /Images/SofarFlow.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/SofarFlow.PNG -------------------------------------------------------------------------------- /Images/SofarFlowConfig1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/SofarFlowConfig1.PNG -------------------------------------------------------------------------------- /Images/TakeControl.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/TakeControl.PNG -------------------------------------------------------------------------------- /Images/Terminal.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Terminal.PNG -------------------------------------------------------------------------------- /Images/Terminal2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Terminal2.PNG -------------------------------------------------------------------------------- /Images/Terminal3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Terminal3.PNG -------------------------------------------------------------------------------- /Images/Today.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dxoverdy/Integrating-Sofar2mqtt-with-Home-Assistant/1ebac464d9555a2427cf3273b8ccd80ad772d693/Images/Today.PNG -------------------------------------------------------------------------------- /Integrating Sofar2mqtt with Home Assistant/Economy7Management.json: -------------------------------------------------------------------------------- 1 | [{"id":"7895cc5729aa0d4b","type":"tab","label":"Economy 7 Management","disabled":false,"info":"","env":[]},{"id":"8b4519f06359bdd6","type":"mqtt in","z":"7895cc5729aa0d4b","name":"Sofar2mqtt","topic":"Sofar2mqtt/state","qos":"2","datatype":"auto-detect","broker":"3348075e0f83efab","nl":false,"rap":true,"rh":0,"inputs":0,"x":120,"y":200,"wires":[["1dfc0fc78bbdb355"]]},{"id":"1dfc0fc78bbdb355","type":"function","z":"7895cc5729aa0d4b","name":"Format","func":"var blnError = false;\nvar runningState = \"\";\nvar batterySOC = 0;\nvar triggerMQTT = \"\";\n\n\nif (!blnError) {\n switch (msg.payload.running_state) {\n case 0:\n runningState = \"Standby\"\n break;\n case 1:\n runningState = \"Check charge\"\n break;\n case 2:\n runningState = \"Charging\"\n break;\n case 3:\n runningState = \"Check discharge\"\n break;\n case 4:\n runningState = \"Discharging\"\n break;\n case 5:\n runningState = \"EPSState\"\n break;\n case 6:\n runningState = \"Fault\"\n break;\n case 7:\n runningState = \"Permanent Fault\"\n break;\n default:\n runningState = \"Unknown\"\n break;\n }\n}\n\n\nif (!blnError) {\n // batterySOC\n blnError = isNaN(msg.payload.batterySOC);\n if (!blnError) {\n batterySOC = parseInt(msg.payload.batterySOC);\n blnError = (batterySOC > 100);\n }\n if (!blnError) {\n // SOFAR doesn't seem to report more than 99%\n // So if idle and 99%, assume 100%\n if (batterySOC == 99 && runningState == \"Standby\") {\n batterySOC = 100;\n }\n }\n}\n\nif (!blnError) {\n var currentDateTime = new Date();\n var currentTime = new Date(0, 0, 0, currentDateTime.getHours(), currentDateTime.getMinutes(), currentDateTime.getSeconds(), 0);\n \n // Enter start and end times here\n // The parameters are\n // year, month, day, hour, minute, second, millisecond.\n // Configured below is 00:35 start and 07:25 end.\n // If you use another TOU tariff like Octopus Go\n // You may want to use 0, 35 and 4, 25 respectively.\n var economy7StartTime = new Date(0, 0, 0, 0, 35, 0, 0);\n var economy7EndTime = new Date(0, 0, 0, 7, 25, 0, 0);\n if (economy7EndTime <= economy7StartTime)\n {\n economy7EndTime.setHours(economy7EndTime.getHours() + 24);\n }\n\n var economy7EndTimePlusToleranace = new Date(economy7EndTime.getTime());\n economy7EndTimePlusToleranace.setMinutes(economy7EndTimePlusToleranace.getMinutes() + 2);\n\n\n/*\n console.log(currentTime);\n console.log(economy7StartTime);\n console.log(economy7EndTime);\n console.log(economy7EndTimePlusFiveMinutes);\n*/\n\n if (currentTime >= economy7StartTime && currentTime <= economy7EndTime)\n {\n //console.log(\"Within E7\");\n if (batterySOC == 100 && runningState != \"Standby\")\n {\n triggerMQTT = \"Standby\";\n }\n else if (batterySOC < 100 && runningState != \"Charging\")\n {\n triggerMQTT = \"Charge\";\n }\n }\n else if (currentTime > economy7EndTime && currentTime <= economy7EndTimePlusToleranace)\n {\n //console.log(\"Within E7 Tolerance\");\n triggerMQTT = \"Auto\";\n }\n else\n {\n //console.log(\"Outside E7\");\n // Do nothing\n }\n\n\n}\n\n\nmsg.payload = triggerMQTT;\n\n\nif (!blnError) {\n node.status({ fill: \"green\", shape: \"dot\", text: \"\" })\n setTimeout(() => { node.status({}); }, 3000);\n return msg;\n}\nelse {\n node.status({ fill: \"red\", shape: \"dot\", text: \"\" })\n setTimeout(() => { node.status({}); }, 3000);\n msg = null;\n throw new Error('Spurious Data');\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":200,"wires":[["9787a854f98cee32","92bc7545b886773e"]]},{"id":"9787a854f98cee32","type":"debug","z":"7895cc5729aa0d4b","name":"Raw Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":510,"y":160,"wires":[]},{"id":"92bc7545b886773e","type":"switch","z":"7895cc5729aa0d4b","name":"What To Do","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Auto","vt":"str"},{"t":"eq","v":"Charge","vt":"str"},{"t":"eq","v":"Standby","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":510,"y":220,"wires":[["b2bffd34b476c682","6a97de8929610e73"],["d61e8fefbd757dcb","b276272207bfca2a"],["a0df11feb2c083a5","a06ec95e472542ec"]],"info":"1 = Auto\r\n2 = Charge\r\n3 = Standby"},{"id":"b2bffd34b476c682","type":"debug","z":"7895cc5729aa0d4b","name":"Auto","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":710,"y":140,"wires":[]},{"id":"d61e8fefbd757dcb","type":"debug","z":"7895cc5729aa0d4b","name":"Charge","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":720,"y":220,"wires":[]},{"id":"a0df11feb2c083a5","type":"debug","z":"7895cc5729aa0d4b","name":"Standby","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":720,"y":300,"wires":[]},{"id":"1fbffb3d14eeb06f","type":"mqtt out","z":"7895cc5729aa0d4b","name":"Set Auto Mode","topic":"Sofar2mqtt/set/auto","qos":"0","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1000,"y":140,"wires":[]},{"id":"678b4ca4f86ac6cd","type":"mqtt out","z":"7895cc5729aa0d4b","name":"Set Charge Mode","topic":"Sofar2mqtt/set/charge","qos":"0","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1010,"y":240,"wires":[]},{"id":"176305b5829ad95c","type":"mqtt out","z":"7895cc5729aa0d4b","name":"Set Standby Mode","topic":"Sofar2mqtt/set/standby","qos":"0","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1010,"y":340,"wires":[]},{"id":"6a97de8929610e73","type":"change","z":"7895cc5729aa0d4b","name":"Set payload to 'auto'","rules":[{"t":"set","p":"payload","pt":"msg","to":"auto","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":180,"wires":[["1fbffb3d14eeb06f","ad0905c751ad2611"]]},{"id":"b276272207bfca2a","type":"change","z":"7895cc5729aa0d4b","name":"Set payload charge rate","rules":[{"t":"set","p":"payload","pt":"msg","to":"2000","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":770,"y":260,"wires":[["678b4ca4f86ac6cd","c0781b4b3ecf8a34"]]},{"id":"a06ec95e472542ec","type":"change","z":"7895cc5729aa0d4b","name":"Set payload to 'true'","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":340,"wires":[["176305b5829ad95c","da772b2d9a56e821"]]},{"id":"c0781b4b3ecf8a34","type":"debug","z":"7895cc5729aa0d4b","name":"Charge Payload","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1000,"y":300,"wires":[]},{"id":"ad0905c751ad2611","type":"debug","z":"7895cc5729aa0d4b","name":"Auto Payload","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":990,"y":200,"wires":[]},{"id":"da772b2d9a56e821","type":"debug","z":"7895cc5729aa0d4b","name":"Standby Payload","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1010,"y":400,"wires":[]},{"id":"3348075e0f83efab","type":"mqtt-broker","name":"Home Assistant Mosquitto","broker":"localhost","port":"1883","clientid":"HAClient","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}] -------------------------------------------------------------------------------- /Integrating Sofar2mqtt with Home Assistant/ExampleSofar2mqttJSON.txt: -------------------------------------------------------------------------------- 1 | {"running_state":"Discharging","grid_voltage":239,"grid_current":0.5,"grid_freq":50,"grid_power":0,"battery_power":110,"battery_voltage":49.4,"battery_current":2,"batterySOC":82,"battery_temp":18,"battery_cycles":995,"consumption":250,"solarPV":140,"solarPVAmps":1.5,"today_generation":0.9,"today_exported":0.07,"today_purchase":11.28,"today_consumption":10.23,"inverter_temp":36,"inverter_HStemp":28,"discharging_battery_power":110,"charging_battery_power":0,"absolute_battery_power":110,"battery_status":"Discharging","exporting_grid_power":0,"importing_grid_power":0,"absolute_grid_power":0,"grid_status":"Idle"} -------------------------------------------------------------------------------- /Integrating Sofar2mqtt with Home Assistant/InverterControlDashboard.txt: -------------------------------------------------------------------------------- 1 | views: 2 | - theme: Backend-selected 3 | title: Control 4 | badges: [] 5 | cards: 6 | - type: entities 7 | entities: 8 | - entity: sensor.sofar_inverter_state 9 | name: Inverter State 10 | - entity: sensor.sofar_battery_power_absolute 11 | name: Battery Power 12 | card_mod: 13 | style: > 14 | ha-card { 15 | 16 | color: {% if is_state('sensor.sofar_battery_status', 17 | 'Discharging') %} 18 | red 19 | {% elif is_state('sensor.sofar_battery_status', 'Charging') %} 20 | green 21 | {% else %} 22 | black 23 | {% endif %} 24 | } 25 | - entity: sensor.sofar_grid_status 26 | name: Grid State 27 | - entity: sensor.sofar_grid_power_absolute 28 | name: Grid Power 29 | - entity: sensor.sofar_load 30 | name: House Requirements 31 | title: Information 32 | - square: false 33 | columns: 1 34 | type: grid 35 | title: Normal Modes 36 | cards: 37 | - show_name: true 38 | show_icon: false 39 | type: button 40 | tap_action: 41 | action: toggle 42 | entity: button.sofar_set_auto 43 | hold_action: 44 | action: none 45 | name: Click To Set Auto Mode 46 | icon_height: 50px 47 | - show_name: true 48 | show_icon: false 49 | type: button 50 | tap_action: 51 | action: toggle 52 | entity: button.sofar_set_battery_save 53 | name: Click To Set Battery Save Mode 54 | - square: false 55 | columns: 1 56 | type: grid 57 | title: Standby Mode 58 | cards: 59 | - show_name: true 60 | show_icon: false 61 | type: button 62 | tap_action: 63 | action: toggle 64 | entity: button.sofar_set_standby 65 | hold_action: 66 | action: none 67 | name: Click To Set Standby Mode 68 | icon_height: 50px 69 | - square: false 70 | columns: 1 71 | type: grid 72 | title: Charge Mode 73 | cards: 74 | - type: entities 75 | entities: 76 | - entity: input_number.input_house_charge_watts 77 | name: Charge At (Watts) 78 | - show_name: true 79 | show_icon: false 80 | type: button 81 | tap_action: 82 | action: toggle 83 | entity: button.sofar_set_charge 84 | hold_action: 85 | action: none 86 | name: Click To Set Charge Mode 87 | icon_height: 50px 88 | - square: false 89 | columns: 1 90 | type: grid 91 | title: Discharge Mode 92 | cards: 93 | - type: entities 94 | entities: 95 | - entity: input_number.input_house_discharge_watts 96 | name: Discharge At (Watts) 97 | - show_name: true 98 | show_icon: false 99 | type: button 100 | tap_action: 101 | action: toggle 102 | entity: button.sofar_set_discharge 103 | hold_action: 104 | action: none 105 | name: Click To Set Discharge Mode 106 | icon_height: 50px 107 | show_state: false 108 | title: Anemone Inverter Control 109 | -------------------------------------------------------------------------------- /Integrating Sofar2mqtt with Home Assistant/Sofar2MQTT 2023-01-13.json: -------------------------------------------------------------------------------- 1 | [{"id":"13519045ac8fde34","type":"tab","label":"Sofar2MQTT","disabled":false,"info":"Reads all the vaules from Sofar2MQTT and assigns each to a global variable so you can pick it up in any function."},{"id":"d448e2ebed66b9e5","type":"mqtt in","z":"13519045ac8fde34","name":"Sofar2MQTT","topic":"Sofar2mqtt/state","qos":"2","datatype":"json","broker":"3348075e0f83efab","nl":false,"rap":false,"inputs":0,"x":110,"y":140,"wires":[["9556bf10533892d4","fa33eee42856a6dd"]]},{"id":"9556bf10533892d4","type":"function","z":"13519045ac8fde34","name":"Format","func":"//running_state\nvar blnError = false;\n\nif (!blnError)\n{\n var rs;\n switch (msg.payload.running_state)\n {\n \tcase 0:\n \t\trs = \"Standby\"\n \t\tbreak;\n \tcase 1:\n \t\trs = \"Check charge\"\n \t\tbreak;\n \tcase 2:\n \t\trs = \"Charging\"\n \t\tbreak;\n \tcase 3:\n \t\trs = \"Check discharge\"\n \t\tbreak;\n \tcase 4:\n \t\trs = \"Discharging\"\n \t\tbreak;\n \tcase 5:\n \t\trs = \"EPSState\"\n \t\tbreak;\n \tcase 6:\n \t\trs = \"Fault\"\n \t\tbreak;\n \tcase 7:\n \t\trs = \"Permanent Fault\"\n \t\tbreak;\n \tdefault:\n \t\trs = \"Unknown\"\n \t\tbreak;\n }\n msg.payload.running_state = rs;\n}\n\nif (!blnError)\n{\n //grid_voltage V\n msg.payload.grid_voltage = Math.round(msg.payload.grid_voltage/10);\n blnError = isNaN(msg.payload.grid_voltage);\n if (!blnError)\n {\n blnError = (msg.payload.grid_voltage > 500);\n }\n}\n\nif (!blnError)\n{\n //grid_current A\n var gc = Math.round(msg.payload.grid_current/10);\n msg.payload.grid_current = gc/10;\n blnError = isNaN(msg.payload.grid_current);\n if (!blnError)\n {\n blnError = (msg.payload.grid_current > 500);\n }\n}\n\nif (!blnError)\n{\n //grid_freq Hz\n msg.payload.grid_freq = Math.round(msg.payload.grid_freq/100);\n blnError = isNaN(msg.payload.grid_freq);\n if (!blnError)\n {\n blnError = (msg.payload.grid_freq > 500);\n }\n}\n\nif (!blnError)\n{\n //battery_power W\n var bp = parseInt(msg.payload.battery_power);\n if (bp > 65535/2)\n {\n //Discharing \n bp = parseInt((65535 - bp)*10);\n \n msg.payload.battery_power = bp\n msg.payload.discharging_battery_power = bp;\n msg.payload.charging_battery_power = 0;\n msg.payload.absolute_battery_power = bp;\n msg.payload.battery_status = \"Discharging\";\n }\n else\n {\n //Charging\n bp = parseInt(bp*10);\n bp = 0-bp;\n \n msg.payload.battery_power = bp\n msg.payload.charging_battery_power = Math.abs(bp);\n msg.payload.discharging_battery_power = 0;\n msg.payload.absolute_battery_power = msg.payload.charging_battery_power;\n msg.payload.battery_status = \"Charging\";\n }\n // Quick fix for dashboard, status to Idle if inverter status\n // something else\n if ((msg.payload.running_state != \"Discharging\" && msg.payload.running_state != \"Charging\") || msg.payload.absolute_battery_power == 0)\n {\n msg.payload.battery_status = \"Idle\";\n }\n \n blnError = isNaN(msg.payload.battery_power);\n if (!blnError)\n {\n blnError = (msg.payload.absolute_battery_power > 5000);\n }\n}\n\nif (!blnError)\n{\n //battery_voltage V\n var bv = Math.round(msg.payload.battery_voltage/10);\n msg.payload.battery_voltage = bv/10;\n blnError = isNaN(msg.payload.battery_voltage);\n if (!blnError)\n {\n blnError = (msg.payload.battery_voltage > 500);\n }\n}\n\nif (!blnError)\n{\n //battery_current A\n var bc = msg.payload.battery_current;\n if (bc > 65535/2)\n {\n //Discharing \n bc = parseInt((65535 - bc)/100);\n }\n else\n {\n bc = parseInt(bc/100);\n }\n msg.payload.battery_current = bc;\n blnError = isNaN(msg.payload.battery_current);\n if (!blnError)\n {\n blnError = (msg.payload.battery_current > 500 || msg.payload.battery_current < -500);\n }\n}\n\nif (!blnError)\n{\n //grid_power W\n var gp = msg.payload.grid_power;\n //var gp_original = gp\n if (gp > 65535/2)\n {\n //Importing \n gp = parseInt((65535 - gp)*10);\n \n msg.payload.grid_power = gp;\n msg.payload.importing_grid_power = gp;\n msg.payload.exporting_grid_power = 0;\n msg.payload.absolute_grid_power = gp;\n msg.payload.grid_status = \"Importing\";\n }\n else\n {\n //Exporting\n gp = parseInt(gp*10);\n gp = 0-gp;\n \n msg.payload.grid_power = gp;\n msg.payload.exporting_grid_power = Math.abs(gp);\n msg.payload.importing_grid_power = 0;\n msg.payload.absolute_grid_power = msg.payload.exporting_grid_power;\n msg.payload.grid_status = \"Exporting\";\n }\n // Quick fix for dashboard, status to Idle if grid status\n // something else\n if (msg.payload.absolute_grid_power == 0)\n {\n msg.payload.grid_status = \"Idle\";\n }\n blnError = isNaN(msg.payload.grid_power);\n if (!blnError)\n {\n blnError = (msg.payload.absolute_grid_power > 23000);\n }\n}\n\nif (!blnError)\n{\n //consumption W\n msg.payload.consumption = Math.round(msg.payload.consumption*10);\n \n blnError = isNaN(msg.payload.consumption);\n if (!blnError)\n {\n blnError = (msg.payload.consumption > 23000);\n }\n}\n\nif (!blnError)\n{\n //SolarPV W\n msg.payload.solarPV = Math.round(msg.payload.solarPV*10);\n blnError = isNaN(msg.payload.solarPV);\n if (!blnError)\n {\n blnError = (msg.payload.solarPV > 23000);\n }\n}\n\nif (!blnError)\n{\n //today_generation kWh\n var tg = Math.round(msg.payload.today_generation*10);\n msg.payload.today_generation = tg/1000;\n blnError = isNaN(msg.payload.today_generation);\n if (!blnError)\n {\n blnError = (msg.payload.today_generation > 500);\n }\n}\n\nif (!blnError)\n{\n //today_exported kWh\n var te = Math.round(msg.payload.today_exported*10);\n msg.payload.today_exported = te/1000;\n blnError = isNaN(msg.payload.today_exported);\n if (!blnError)\n {\n blnError = (msg.payload.today_exported > 500);\n }\n}\n\nif (!blnError)\n{\n //today_purchase kWh\n var tp = Math.round(msg.payload.today_purchase*10);\n msg.payload.today_purchase = tp/1000;\n blnError = isNaN(msg.payload.today_purchase);\n if (!blnError)\n {\n blnError = (msg.payload.today_purchase > 500);\n }\n}\n\nif (!blnError)\n{\n //today_consumption kWh\n var tc = Math.round(msg.payload.today_consumption*10);\n msg.payload.today_consumption = tc/1000;\n blnError = isNaN(msg.payload.today_consumption);\n if (!blnError)\n {\n blnError = (msg.payload.today_consumption > 500);\n }\n}\n\nif (!blnError)\n{\n //solarPVAmps A\n var sa = Math.round(msg.payload.solarPVAmps/10);\n msg.payload.solarPVAmps = sa/10;\n blnError = isNaN(msg.payload.solarPVAmps);\n if (!blnError)\n {\n blnError = (msg.payload.solarPVAmps > 500);\n }\n}\n\n\n\nif (!blnError)\n{\n // inverter_HStemp\n msg.payload.inverter_HStemp = parseInt(msg.payload.inverter_HStemp);\n blnError = isNaN(msg.payload.inverter_HStemp);\n if (!blnError)\n {\n blnError = (msg.payload.inverter_HStemp > 200);\n }\n}\n\n\nif (!blnError)\n{\n // inverter_temp\n msg.payload.inverter_temp = parseInt(msg.payload.inverter_temp);\n blnError = isNaN(msg.payload.inverter_temp);\n if (!blnError)\n {\n blnError = (msg.payload.inverter_temp > 200);\n }\n}\n\n\nif (!blnError)\n{\n // battery_temp\n msg.payload.battery_temp = parseInt(msg.payload.battery_temp);\n blnError = isNaN(msg.payload.battery_temp);\n if (!blnError)\n {\n blnError = (msg.payload.battery_temp > 200);\n }\n}\n\n\nif (!blnError)\n{\n // batterySOC\n blnError = isNaN(msg.payload.batterySOC);\n if (!blnError)\n {\n msg.payload.batterySOC = parseInt(msg.payload.batterySOC);\n blnError = (msg.payload.batterySOC > 200);\n }\n \n if (!blnError)\n {\n // SOFAR doesn't seem to report more than 99%\n // So if idle and 99%, assume 100%\n if (msg.payload.batterySOC == 99 && msg.payload.running_state == \"Standby\")\n {\n msg.payload.batterySOC = 100;\n }\n }\n}\n\nif (!blnError)\n{\n // battery_cycles\n msg.payload.battery_cycles = parseInt(msg.payload.battery_cycles);\n blnError = isNaN(msg.payload.battery_cycles);\n if (!blnError)\n {\n blnError = (msg.payload.battery_cycles > 10000);\n }\n}\n\n\nif (!blnError)\n{\n node.status({fill:\"green\", shape:\"dot\", text:\"\"})\n setTimeout(() => { node.status({}); }, 3000);\n return msg;\n}\nelse\n{\n node.status({fill:\"red\", shape:\"dot\", text:\"\"})\n setTimeout(() => { node.status({}); }, 3000);\n msg = null;\n throw new Error('Spurious Data');\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":80,"wires":[["cb04b8cf7a23160e","156c46806b5a59ff","edb2ca5970e103fc","d7e6737b94d6762b","a121779fa8fa7d42","2876aede10128e9b","79fcf3a8cb861455","a04565532f1db934","14f793544d9769df","a6be445211315019","4dbc7f7c14249a94","41ce83cbbdc9de28","3c6c82625ee25b09","feab961c126219c3","9941f1d2563f24d9","6d6c8f5943b32950","5e2958bee91ca2b1","e9439ba9cbc38de4","a96b5f0433a9197b","8ba34c3fe2ed0422","b565dc6f036096c6","1a587eea6692df5c","c1a9235355b3da35","3964c0f1f9ea7e56","c0acb967d0e23de7","42b1377511b33214","5250d24d48fd8619","3fe05f0efdac9b1d","5511dc8cbea84e8c"]],"info":"This function sets the format of each paremeter send by the inverter and asigns each on to a global variable.\nTherefore, you can either pass the msg.payload object directly to the next function or pick up inverter \nparameters in any function using something like:\n\nvar bateerySoc = global.get(\"sofarBatterySOC\");"},{"id":"cb04b8cf7a23160e","type":"debug","z":"13519045ac8fde34","name":"Output Formatted","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":810,"y":40,"wires":[]},{"id":"3bd8f8aab4937b44","type":"mqtt out","z":"13519045ac8fde34","name":"Grid Power","topic":"sofar/grid_power","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1510,"y":740,"wires":[]},{"id":"e14484e716398cb6","type":"mqtt out","z":"13519045ac8fde34","name":"Solar PV","topic":"sofar/solarPV","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1500,"y":1020,"wires":[]},{"id":"3bde9f69142a07c2","type":"mqtt out","z":"13519045ac8fde34","name":"Battery SOC","topic":"sofar/batterySOC","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1510,"y":620,"wires":[]},{"id":"794e4fd438d6aadf","type":"mqtt out","z":"13519045ac8fde34","name":"Inverter Temp","topic":"sofar/inverter_temp","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1520,"y":1400,"wires":[]},{"id":"4807e4184a098353","type":"mqtt out","z":"13519045ac8fde34","name":"Battery Power","topic":"sofar/battery_power","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1520,"y":440,"wires":[]},{"id":"08b661189c4816fa","type":"mqtt out","z":"13519045ac8fde34","name":"Today's Consumption","topic":"sofar/today_consumption","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1540,"y":1340,"wires":[]},{"id":"d61eae7b8ade8c63","type":"mqtt out","z":"13519045ac8fde34","name":"Today's Purchase","topic":"sofar/today_import","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1530,"y":1280,"wires":[]},{"id":"226fdc68ce21427c","type":"mqtt out","z":"13519045ac8fde34","name":"Today's Generation","topic":"sofar/today_generation","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1530,"y":1160,"wires":[]},{"id":"fbcab8ed566a0ec9","type":"mqtt out","z":"13519045ac8fde34","name":"House Consumption","topic":"sofar/consumption","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1540,"y":860,"wires":[]},{"id":"a4bbc9f160276612","type":"mqtt out","z":"13519045ac8fde34","name":"Today's Export","topic":"sofar/today_export","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1520,"y":1220,"wires":[]},{"id":"c89c55a6e0108bb0","type":"mqtt out","z":"13519045ac8fde34","name":"Battery Cycles","topic":"sofar/battery_cycles","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1520,"y":680,"wires":[]},{"id":"f541f10da1806b7b","type":"mqtt out","z":"13519045ac8fde34","name":"Grid Current","topic":"sofar/grid_current","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1510,"y":320,"wires":[]},{"id":"737dc919da52ab1c","type":"mqtt out","z":"13519045ac8fde34","name":"Battery Voltage","topic":"sofar/battery_voltage","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1520,"y":500,"wires":[]},{"id":"cd20fc8d7b4ce287","type":"mqtt out","z":"13519045ac8fde34","name":"Battery Current","topic":"sofar/battery_current","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1520,"y":560,"wires":[]},{"id":"f58123dfde56fa92","type":"mqtt out","z":"13519045ac8fde34","name":"Inverter HS Temp","topic":"sofar/inverter_heatsink_temp","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1530,"y":1460,"wires":[]},{"id":"156c46806b5a59ff","type":"switch","z":"13519045ac8fde34","name":"payload.running_state","property":"payload.running_state","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":940,"y":200,"wires":[["3553f1b3e0b1f435"]]},{"id":"edb2ca5970e103fc","type":"switch","z":"13519045ac8fde34","name":"payload.grid_voltage","property":"payload.grid_voltage","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":940,"y":260,"wires":[["6807f1c64ecabe1e"]]},{"id":"d7e6737b94d6762b","type":"switch","z":"13519045ac8fde34","name":"payload.grid_current","property":"payload.grid_current","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":940,"y":320,"wires":[["7a14368a0fc0649f"]]},{"id":"a121779fa8fa7d42","type":"switch","z":"13519045ac8fde34","name":"payload.grid_freq","property":"payload.grid_freq","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":930,"y":380,"wires":[["b9a11691757d6456"]]},{"id":"2876aede10128e9b","type":"switch","z":"13519045ac8fde34","name":"payload.battery_power","property":"payload.battery_power","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":940,"y":440,"wires":[["ce0a033aa8349e79"]]},{"id":"79fcf3a8cb861455","type":"switch","z":"13519045ac8fde34","name":"payload.battery_voltage","property":"payload.battery_voltage","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":950,"y":500,"wires":[["4f60787a260614bf"]]},{"id":"a04565532f1db934","type":"switch","z":"13519045ac8fde34","name":"payload.battery_current","property":"payload.battery_current","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":950,"y":560,"wires":[["c6825b346db29edb"]]},{"id":"14f793544d9769df","type":"switch","z":"13519045ac8fde34","name":"payload.batterySOC","property":"payload.batterySOC","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":930,"y":620,"wires":[["76c5904473e7cae5"]]},{"id":"a6be445211315019","type":"switch","z":"13519045ac8fde34","name":"payload.battery_cycles","property":"payload.battery_cycles","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":950,"y":680,"wires":[["056884236912af6a"]]},{"id":"4dbc7f7c14249a94","type":"switch","z":"13519045ac8fde34","name":"payload.grid_power","property":"payload.grid_power","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":940,"y":740,"wires":[["fa787c9893c5159b"]]},{"id":"41ce83cbbdc9de28","type":"switch","z":"13519045ac8fde34","name":"payload.consumption","property":"payload.consumption","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":940,"y":860,"wires":[["f2a1aeb4c4543460"]]},{"id":"3c6c82625ee25b09","type":"switch","z":"13519045ac8fde34","name":"payload.solarPV","property":"payload.solarPV","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":930,"y":1020,"wires":[["5efdd85bfb0e8c85"]]},{"id":"feab961c126219c3","type":"switch","z":"13519045ac8fde34","name":"payload.today_generation","property":"payload.today_generation","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":960,"y":1160,"wires":[["9c18a4f5906d510c"]]},{"id":"9941f1d2563f24d9","type":"switch","z":"13519045ac8fde34","name":"payload.today_exported","property":"payload.today_exported","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":950,"y":1220,"wires":[["24039675136bf384"]]},{"id":"6d6c8f5943b32950","type":"switch","z":"13519045ac8fde34","name":"payload.today_purchase","property":"payload.today_purchase","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":950,"y":1280,"wires":[["047e86587091bcb2"]]},{"id":"5e2958bee91ca2b1","type":"switch","z":"13519045ac8fde34","name":"payload.today_consumption","property":"payload.today_consumption","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":960,"y":1340,"wires":[["0daea387d1c38f97"]]},{"id":"e9439ba9cbc38de4","type":"switch","z":"13519045ac8fde34","name":"payload.inverter_temp","property":"payload.inverter_temp","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":940,"y":1400,"wires":[["3e597372987a7eab"]]},{"id":"a96b5f0433a9197b","type":"switch","z":"13519045ac8fde34","name":"payload.inverter_HStemp","property":"payload.inverter_HStemp","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":950,"y":1460,"wires":[["fd73bb3de834fe91"]]},{"id":"8ba34c3fe2ed0422","type":"switch","z":"13519045ac8fde34","name":"payload.solarPVAmps","property":"payload.solarPVAmps","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":940,"y":1520,"wires":[["56b307b2a76b577e"]]},{"id":"07a6e8f526165797","type":"mqtt out","z":"13519045ac8fde34","name":"Inverter State","topic":"sofar/inverter_state","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1520,"y":200,"wires":[]},{"id":"ede23ce9c56c59cc","type":"mqtt out","z":"13519045ac8fde34","name":"Grid Voltage","topic":"sofar/grid_voltage","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1510,"y":260,"wires":[]},{"id":"69ab209fca0bef2f","type":"mqtt out","z":"13519045ac8fde34","name":"Grid Frequency","topic":"sofar/grid_freq","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1520,"y":380,"wires":[]},{"id":"cadc79f2ffb55c37","type":"mqtt out","z":"13519045ac8fde34","name":"Solar PV Amps","topic":"sofar/solarPVAmps","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1520,"y":1520,"wires":[]},{"id":"3553f1b3e0b1f435","type":"change","z":"13519045ac8fde34","name":"payload.running_state","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.running_state","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":200,"wires":[["07a6e8f526165797"]]},{"id":"6807f1c64ecabe1e","type":"change","z":"13519045ac8fde34","name":"payload.grid_voltage","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.grid_voltage","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":260,"wires":[["ede23ce9c56c59cc"]]},{"id":"7a14368a0fc0649f","type":"change","z":"13519045ac8fde34","name":"payload.grid_current","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.grid_current","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":320,"wires":[["f541f10da1806b7b"]]},{"id":"b9a11691757d6456","type":"change","z":"13519045ac8fde34","name":"payload.grid_freq","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.grid_freq","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":380,"wires":[["69ab209fca0bef2f"]]},{"id":"ce0a033aa8349e79","type":"change","z":"13519045ac8fde34","name":"payload.battery_power","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.battery_power","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":440,"wires":[["4807e4184a098353"]]},{"id":"4f60787a260614bf","type":"change","z":"13519045ac8fde34","name":"payload.battery_voltage","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.battery_voltage","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":500,"wires":[["737dc919da52ab1c"]]},{"id":"c6825b346db29edb","type":"change","z":"13519045ac8fde34","name":"payload.battery_current","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.battery_current","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":560,"wires":[["cd20fc8d7b4ce287"]]},{"id":"76c5904473e7cae5","type":"change","z":"13519045ac8fde34","name":"payload.batterySOC","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.batterySOC","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":620,"wires":[["3bde9f69142a07c2"]]},{"id":"056884236912af6a","type":"change","z":"13519045ac8fde34","name":"payload.battery_cycles","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.battery_cycles","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":680,"wires":[["c89c55a6e0108bb0"]]},{"id":"fa787c9893c5159b","type":"change","z":"13519045ac8fde34","name":"payload.grid_power","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.grid_power","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":740,"wires":[["3bd8f8aab4937b44","fc45985ab2fb1c2c"]]},{"id":"f2a1aeb4c4543460","type":"change","z":"13519045ac8fde34","name":"payload.consumption","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.consumption","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":860,"wires":[["fbcab8ed566a0ec9","e7ef619fc849ac80"]]},{"id":"5efdd85bfb0e8c85","type":"change","z":"13519045ac8fde34","name":"payload.SolarPV","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.solarPV","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":1020,"wires":[["e14484e716398cb6","d3aca18da0655d9d"]]},{"id":"9c18a4f5906d510c","type":"change","z":"13519045ac8fde34","name":"payload.today_generation","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.today_generation","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1220,"y":1160,"wires":[["226fdc68ce21427c"]]},{"id":"24039675136bf384","type":"change","z":"13519045ac8fde34","name":"payload.today_exported","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.today_exported","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":1220,"wires":[["a4bbc9f160276612"]]},{"id":"047e86587091bcb2","type":"change","z":"13519045ac8fde34","name":"payload.today_purchase","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.today_purchase","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":1280,"wires":[["d61eae7b8ade8c63"]]},{"id":"0daea387d1c38f97","type":"change","z":"13519045ac8fde34","name":"payload.today_consumption","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.today_consumption","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1220,"y":1340,"wires":[["08b661189c4816fa"]]},{"id":"3e597372987a7eab","type":"change","z":"13519045ac8fde34","name":"payload.inverter_temp","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.inverter_temp","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":1400,"wires":[["794e4fd438d6aadf"]]},{"id":"fd73bb3de834fe91","type":"change","z":"13519045ac8fde34","name":"payload.inverter_HStemp","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.inverter_HStemp","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":1460,"wires":[["f58123dfde56fa92"]]},{"id":"56b307b2a76b577e","type":"change","z":"13519045ac8fde34","name":"payload.solarPVAmps","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.solarPVAmps","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":1520,"wires":[["cadc79f2ffb55c37","3850e4218edbe786"]]},{"id":"fa33eee42856a6dd","type":"debug","z":"13519045ac8fde34","name":"Output Raw","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":350,"y":140,"wires":[]},{"id":"bc4cf62b361ea99d","type":"mqtt out","z":"13519045ac8fde34","name":"Battery Temp","topic":"sofar/battery_temp","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1510,"y":140,"wires":[]},{"id":"a411db6128ccb27d","type":"change","z":"13519045ac8fde34","name":"payload.battery_temp","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.battery_temp","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":140,"wires":[["bc4cf62b361ea99d"]]},{"id":"b565dc6f036096c6","type":"switch","z":"13519045ac8fde34","name":"payload.battery_temp","property":"payload.battery_temp","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":940,"y":140,"wires":[["a411db6128ccb27d"]]},{"id":"1a587eea6692df5c","type":"switch","z":"13519045ac8fde34","name":"payload.exporting_grid_power","property":"payload.exporting_grid_power","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":970,"y":1660,"wires":[["dd9daff500f7e237"]]},{"id":"dd9daff500f7e237","type":"change","z":"13519045ac8fde34","name":"payload.exporting_grid_power","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.exporting_grid_power","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1250,"y":1660,"wires":[["adc4b33c13234f31","e5c3e0852c5d07f5"]]},{"id":"adc4b33c13234f31","type":"mqtt out","z":"13519045ac8fde34","name":"Exporting Grid Power","topic":"sofar/exporting_grid_power","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1600,"y":1660,"wires":[]},{"id":"7fbef0e098d1c266","type":"mqtt out","z":"13519045ac8fde34","name":"Exporting Grid Power","topic":"sofar/importing_grid_power","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1660,"y":1800,"wires":[]},{"id":"eb77fbe98c5c4a06","type":"mqtt out","z":"13519045ac8fde34","name":"Grid Status","topic":"sofar/grid_status","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1610,"y":1980,"wires":[]},{"id":"c1a9235355b3da35","type":"switch","z":"13519045ac8fde34","name":"payload.importing_grid_power","property":"payload.importing_grid_power","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":970,"y":1800,"wires":[["bf4ea21f4d1de042"]]},{"id":"3964c0f1f9ea7e56","type":"switch","z":"13519045ac8fde34","name":"payload.grid_status","property":"payload.grid_status","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":930,"y":1980,"wires":[["82551d3bfd9800ca"]]},{"id":"bf4ea21f4d1de042","type":"change","z":"13519045ac8fde34","name":"payload.importing_grid_power","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.importing_grid_power","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1290,"y":1800,"wires":[["7fbef0e098d1c266","e40917cf9ae4c452"]]},{"id":"82551d3bfd9800ca","type":"change","z":"13519045ac8fde34","name":"payload.grid_status","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.grid_status","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1250,"y":1980,"wires":[["eb77fbe98c5c4a06"]]},{"id":"3850e4218edbe786","type":"debug","z":"13519045ac8fde34","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1510,"y":1580,"wires":[]},{"id":"c0acb967d0e23de7","type":"switch","z":"13519045ac8fde34","name":"payload.absolute_grid_power","property":"payload.absolute_grid_power","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":960,"y":2060,"wires":[["ba05a625c213195c"]]},{"id":"42b1377511b33214","type":"switch","z":"13519045ac8fde34","name":"payload.charging_battery_power","property":"payload.charging_battery_power","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":970,"y":2160,"wires":[["1dd08127c5132184"]]},{"id":"5250d24d48fd8619","type":"switch","z":"13519045ac8fde34","name":"payload.discharging_battery_power","property":"payload.discharging_battery_power","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":980,"y":2260,"wires":[["62718f27793d5bc3"]]},{"id":"3fe05f0efdac9b1d","type":"switch","z":"13519045ac8fde34","name":"payload.absolute_battery_power","property":"payload.absolute_battery_power","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":970,"y":2400,"wires":[["2ade0fd375b81c79"]]},{"id":"5511dc8cbea84e8c","type":"switch","z":"13519045ac8fde34","name":"payload.battery_status","property":"payload.battery_status","propertyType":"msg","rules":[{"t":"else"}],"checkall":"true","repair":false,"outputs":1,"x":940,"y":2520,"wires":[["82d073378832e025"]]},{"id":"ba05a625c213195c","type":"change","z":"13519045ac8fde34","name":"payload.absolute_grid_power","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.absolute_grid_power","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1260,"y":2060,"wires":[["12eec52eca2f97ea"]]},{"id":"1dd08127c5132184","type":"change","z":"13519045ac8fde34","name":"payload.charging_battery_power","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.charging_battery_power","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1270,"y":2160,"wires":[["b90a520716bf35aa","927639ae653f6f8d"]]},{"id":"62718f27793d5bc3","type":"change","z":"13519045ac8fde34","name":"payload.discharging_battery_power","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.discharging_battery_power","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1280,"y":2260,"wires":[["2d06b9cbb67d391b","1c5b5e8809282fe8"]]},{"id":"2ade0fd375b81c79","type":"change","z":"13519045ac8fde34","name":"payload.absolute_battery_power","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.absolute_battery_power","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1250,"y":2400,"wires":[["3f4e4e2862f6228a","1e723a9dd3a6c6a9"]]},{"id":"82d073378832e025","type":"change","z":"13519045ac8fde34","name":"payload.battery_status","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.battery_status","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1180,"y":2520,"wires":[["26f063aa74098775","b7eada6918302465"]]},{"id":"12eec52eca2f97ea","type":"mqtt out","z":"13519045ac8fde34","name":"Absolute Grid Power","topic":"sofar/absolute_grid_power","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1560,"y":2060,"wires":[]},{"id":"b90a520716bf35aa","type":"mqtt out","z":"13519045ac8fde34","name":"Charging Battery Power","topic":"sofar/charging_battery_power","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1590,"y":2160,"wires":[]},{"id":"2d06b9cbb67d391b","type":"mqtt out","z":"13519045ac8fde34","name":"Discharging Battery Power","topic":"sofar/discharging_battery_power","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1620,"y":2260,"wires":[]},{"id":"3f4e4e2862f6228a","type":"mqtt out","z":"13519045ac8fde34","name":"Absolute Battery Power","topic":"sofar/absolute_battery_power","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1590,"y":2400,"wires":[]},{"id":"26f063aa74098775","type":"mqtt out","z":"13519045ac8fde34","name":"Battery Status","topic":"sofar/battery_status","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"3348075e0f83efab","x":1540,"y":2520,"wires":[]},{"id":"b7eada6918302465","type":"debug","z":"13519045ac8fde34","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1530,"y":2580,"wires":[]},{"id":"e5c3e0852c5d07f5","type":"debug","z":"13519045ac8fde34","name":"Exporting Grid Power","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1600,"y":1720,"wires":[]},{"id":"d3aca18da0655d9d","type":"debug","z":"13519045ac8fde34","name":"SolarPV","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1500,"y":1080,"wires":[]},{"id":"fc45985ab2fb1c2c","type":"debug","z":"13519045ac8fde34","name":"Grid Power","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1510,"y":800,"wires":[]},{"id":"e40917cf9ae4c452","type":"debug","z":"13519045ac8fde34","name":"Importing Grid Power","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1660,"y":1880,"wires":[]},{"id":"e7ef619fc849ac80","type":"debug","z":"13519045ac8fde34","name":"Consumption","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1510,"y":920,"wires":[]},{"id":"eb912bf6c1334c2c","type":"catch","z":"13519045ac8fde34","name":"","scope":null,"uncaught":false,"x":100,"y":40,"wires":[["4757e78ec66b25f1"]]},{"id":"4757e78ec66b25f1","type":"debug","z":"13519045ac8fde34","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":190,"y":440,"wires":[]},{"id":"1e723a9dd3a6c6a9","type":"debug","z":"13519045ac8fde34","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1550,"y":2460,"wires":[]},{"id":"1c5b5e8809282fe8","type":"debug","z":"13519045ac8fde34","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1570,"y":2320,"wires":[]},{"id":"927639ae653f6f8d","type":"debug","z":"13519045ac8fde34","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1550,"y":2220,"wires":[]},{"id":"3348075e0f83efab","type":"mqtt-broker","name":"Home Assistant Mosquitto","broker":"localhost","port":"1883","clientid":"HAClient","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}] -------------------------------------------------------------------------------- /Integrating Sofar2mqtt with Home Assistant/configuration-backup-2023-01-06.yaml: -------------------------------------------------------------------------------- 1 | 2 | # Loads default set of integrations. Do not remove. 3 | default_config: 4 | 5 | # Load frontend themes from the themes folder 6 | frontend: 7 | themes: !include_dir_merge_named themes 8 | 9 | # Text to speech 10 | tts: 11 | - platform: google_translate 12 | 13 | automation: !include automations.yaml 14 | script: !include scripts.yaml 15 | scene: !include scenes.yaml 16 | -------------------------------------------------------------------------------- /Integrating Sofar2mqtt with Home Assistant/configuration-backup-2023-05-16.yaml: -------------------------------------------------------------------------------- 1 | 2 | # Loads default set of integrations. Do not remove. 3 | default_config: 4 | 5 | # Load frontend themes from the themes folder 6 | frontend: 7 | themes: !include_dir_merge_named themes 8 | extra_module_url: 9 | - /hacsfiles/lovelace-card-mod/card-mod.js 10 | 11 | 12 | # Text to speech 13 | tts: 14 | - platform: google_translate 15 | 16 | automation: !include automations.yaml 17 | script: !include scripts.yaml 18 | scene: !include scenes.yaml 19 | 20 | 21 | 22 | 23 | 24 | 25 | #MQTT 26 | mqtt: 27 | button: 28 | # House Buttons 29 | - unique_id: sofar_set_standby 30 | command_topic: "Sofar2mqtt/set/standby" 31 | name: "SOFAR Set Standby" 32 | payload_press: "true" 33 | qos: 0 34 | retain: false 35 | entity_category: "config" 36 | icon: "mdi:power-standby" 37 | 38 | - unique_id: sofar_set_auto 39 | command_topic: "Sofar2mqtt/set/auto" 40 | name: "SOFAR Set Auto" 41 | command_template: "true" 42 | qos: 0 43 | retain: false 44 | entity_category: "config" 45 | icon: "mdi:lightbulb-auto" 46 | 47 | - unique_id: sofar_set_battery_save 48 | command_topic: "Sofar2mqtt/set/auto" 49 | name: "SOFAR Set Battery Save" 50 | command_template: "battery_save" 51 | qos: 0 52 | retain: false 53 | entity_category: "config" 54 | icon: "mdi:lightbulb-auto" 55 | 56 | - unique_id: sofar_set_charge 57 | command_topic: "Sofar2mqtt/set/charge" 58 | name: "SOFAR Set Charge" 59 | command_template: "{{ states('input_number.input_house_charge_watts')|int }}" 60 | qos: 0 61 | retain: false 62 | entity_category: "config" 63 | icon: "mdi:battery-positive" 64 | 65 | - unique_id: sofar_set_discharge 66 | command_topic: "Sofar2mqtt/set/discharge" 67 | name: "SOFAR Set Discharge" 68 | command_template: "{{ states('input_number.input_house_discharge_watts')|int }}" 69 | qos: 0 70 | retain: false 71 | entity_category: "config" 72 | icon: "mdi:battery-negative" 73 | 74 | 75 | 76 | 77 | #MQTT Sensors 78 | sensor: 79 | #House Sensors 80 | - device_class: "temperature" 81 | state_class: "measurement" 82 | force_update: "true" 83 | icon: "mdi:thermometer" 84 | name: "SOFAR Battery Temperature" 85 | unique_id: "sofar_battery_temp" 86 | unit_of_measurement: "°C" 87 | state_topic: "sofar/battery_temp" 88 | value_template: "{{ value | float }}" 89 | 90 | - state_class: "measurement" 91 | force_update: "true" 92 | icon: "mdi:information-variant" 93 | name: "SOFAR Inverter State" 94 | unique_id: "sofar_inverter_state" 95 | state_topic: "sofar/inverter_state" 96 | 97 | - device_class: "voltage" 98 | state_class: "measurement" 99 | force_update: "true" 100 | icon: "mdi:alpha-v" 101 | name: "SOFAR Grid Voltage" 102 | unique_id: "sofar_grid_voltage" 103 | unit_of_measurement: "V" 104 | state_topic: "sofar/grid_voltage" 105 | value_template: "{{ value | float }}" 106 | 107 | - device_class: "current" 108 | state_class: "measurement" 109 | force_update: "true" 110 | icon: "mdi:alpha-a" 111 | name: "SOFAR Grid Current" 112 | unique_id: "sofar_grid_current" 113 | unit_of_measurement: "A" 114 | state_topic: "sofar/grid_current" 115 | value_template: "{{ value | float }}" 116 | 117 | - device_class: "frequency" 118 | state_class: "measurement" 119 | force_update: "true" 120 | icon: "mdi:sine-wave" 121 | name: "SOFAR Grid Frequency" 122 | unique_id: "sofar_grid_freq" 123 | unit_of_measurement: "Hz" 124 | state_topic: "sofar/grid_freq" 125 | value_template: "{{ value | float }}" 126 | 127 | - device_class: "power" 128 | state_class: "measurement" 129 | force_update: "true" 130 | icon: "mdi:battery-charging-100" 131 | name: "SOFAR Battery Power" 132 | unique_id: "sofar_battery_power" 133 | unit_of_measurement: "W" 134 | state_topic: "sofar/battery_power" 135 | value_template: "{{ value | float }}" 136 | 137 | - device_class: "power" 138 | state_class: "measurement" 139 | force_update: "true" 140 | icon: "mdi:meter-electric-outline" 141 | name: "SOFAR System IO Power" 142 | unique_id: "sofar_system_io_power" 143 | unit_of_measurement: "W" 144 | state_topic: "sofar/systemIO_power" 145 | value_template: "{{ value | float }}" 146 | 147 | 148 | 149 | - device_class: "voltage" 150 | state_class: "measurement" 151 | force_update: "true" 152 | icon: "mdi:alpha-v" 153 | name: "SOFAR Battery Voltage" 154 | unique_id: "sofar_battery_voltage" 155 | unit_of_measurement: "V" 156 | state_topic: "sofar/battery_voltage" 157 | value_template: "{{ value | float }}" 158 | 159 | - device_class: "current" 160 | state_class: "measurement" 161 | force_update: "true" 162 | icon: "mdi:alpha-a" 163 | name: "SOFAR Battery Current" 164 | unique_id: "sofar_battery_current" 165 | unit_of_measurement: "A" 166 | state_topic: "sofar/battery_current" 167 | value_template: "{{ value | float }}" 168 | 169 | - device_class: "battery" 170 | state_class: "measurement" 171 | force_update: "true" 172 | icon: "mdi:battery" 173 | name: "SOFAR Battery SOC" 174 | unique_id: "sofar_batterySOC" 175 | unit_of_measurement: "%" 176 | state_topic: "sofar/batterySOC" 177 | value_template: "{{ value | float }}" 178 | 179 | - state_class: "measurement" 180 | force_update: "true" 181 | icon: "mdi:battery-sync" 182 | name: "SOFAR Battery Cycles" 183 | unique_id: "sofar_battery_cycles" 184 | state_topic: "sofar/battery_cycles" 185 | value_template: "{{ value | float }}" 186 | 187 | - device_class: "power" 188 | state_class: "measurement" 189 | force_update: "true" 190 | icon: "mdi:transmission-tower" 191 | name: "SOFAR Grid Power" 192 | unique_id: "sofar_grid_power" 193 | unit_of_measurement: "W" 194 | state_topic: "sofar/grid_power" 195 | value_template: "{{ value | float }}" 196 | 197 | - device_class: "power" 198 | state_class: "measurement" 199 | force_update: "true" 200 | icon: "mdi:home-import-outline" 201 | name: "SOFAR Load" 202 | unique_id: "sofar_consumption" 203 | unit_of_measurement: "W" 204 | state_topic: "sofar/consumption" 205 | value_template: "{{ value | float }}" 206 | 207 | - device_class: "power" 208 | state_class: "measurement" 209 | force_update: "true" 210 | icon: "mdi:solar-power" 211 | name: "SOFAR Solar PV Generation" 212 | unique_id: "sofar_solarPV" 213 | unit_of_measurement: "W" 214 | state_topic: "sofar/solarPV" 215 | value_template: "{{ value | float }}" 216 | 217 | - device_class: "power" 218 | state_class: "measurement" 219 | force_update: "true" 220 | icon: "mdi:solar-power" 221 | name: "SOFAR Solar PV Array 1 Generation" 222 | unique_id: "sofar_solar_pv_array_1_generation" 223 | unit_of_measurement: "W" 224 | state_topic: "sofar/Solarpv1" 225 | value_template: "{{ value | float }}" 226 | 227 | - device_class: "power" 228 | state_class: "measurement" 229 | force_update: "true" 230 | icon: "mdi:solar-power" 231 | name: "SOFAR Solar PV Array 2 Generation" 232 | unique_id: "sofar_solar_pv_array_2_generation" 233 | unit_of_measurement: "W" 234 | state_topic: "sofar/Solarpv2" 235 | value_template: "{{ value | float }}" 236 | 237 | - device_class: "energy" 238 | state_class: "total_increasing" 239 | force_update: "true" 240 | icon: "mdi:solar-power" 241 | name: "SOFAR Today's PV Generation" 242 | unique_id: "sofar_today_generation" 243 | unit_of_measurement: "kWh" 244 | state_topic: "sofar/today_generation" 245 | value_template: "{{ value | float }}" 246 | 247 | - device_class: "energy" 248 | state_class: "total_increasing" 249 | force_update: "true" 250 | icon: "mdi:transmission-tower-export" 251 | name: "SOFAR Today's Feed-In" 252 | unique_id: "sofar_today_export" 253 | unit_of_measurement: "kWh" 254 | state_topic: "sofar/today_export" 255 | value_template: "{{ value | float }}" 256 | 257 | - device_class: "energy" 258 | state_class: "total_increasing" 259 | force_update: "true" 260 | icon: "mdi:transmission-tower-import" 261 | name: "SOFAR Today's Grid Consumption" 262 | unique_id: "sofar_today_import" 263 | unit_of_measurement: "kWh" 264 | state_topic: "sofar/today_import" 265 | value_template: "{{ value | float }}" 266 | 267 | - device_class: "energy" 268 | state_class: "measurement" 269 | force_update: "true" 270 | icon: "mdi:home-import-outline" 271 | name: "SOFAR Today's Load" 272 | unique_id: "sofar_today_consumption" 273 | unit_of_measurement: "kWh" 274 | state_topic: "sofar/today_consumption" 275 | value_template: "{{ value | float }}" 276 | 277 | - device_class: "temperature" 278 | state_class: "measurement" 279 | force_update: "true" 280 | icon: "mdi:thermometer" 281 | name: "SOFAR Inverter Temperature" 282 | unique_id: "sofar_inverter_temp" 283 | unit_of_measurement: "°C" 284 | state_topic: "sofar/inverter_temp" 285 | value_template: "{{ value | float }}" 286 | 287 | - device_class: "temperature" 288 | state_class: "measurement" 289 | force_update: "true" 290 | icon: "mdi:thermometer" 291 | name: "SOFAR Inverter Heatsink Temperature" 292 | unique_id: "sofar_inverter_heatsink_temp" 293 | unit_of_measurement: "°C" 294 | state_topic: "sofar/inverter_heatsink_temp" 295 | value_template: "{{ value | float }}" 296 | 297 | - device_class: "current" 298 | state_class: "measurement" 299 | force_update: "true" 300 | icon: "mdi:alpha-a" 301 | name: "SOFAR PV Current" 302 | unique_id: "sofar_solarPVAmps" 303 | unit_of_measurement: "A" 304 | state_topic: "sofar/solarPVAmps" 305 | value_template: "{{ value | float }}" 306 | 307 | - device_class: "monetary" 308 | state_class: "total_increasing" 309 | force_update: "true" 310 | icon: "mdi:currency-gbp" 311 | name: "SOFAR Today's Total Generation Earned" 312 | unique_id: "sofar_today_total_generation_earned" 313 | unit_of_measurement: "£" 314 | state_topic: "sofar/today_generation" 315 | value_template: "{{(value | float * 0.9345) | round(2)}}" 316 | 317 | - device_class: "monetary" 318 | state_class: "total_increasing" 319 | force_update: "true" 320 | icon: "mdi:currency-gbp" 321 | name: "SOFAR Today's PV Generation Earned" 322 | unique_id: "sofar_today_generation_earned" 323 | unit_of_measurement: "£" 324 | state_topic: "sofar/today_generation" 325 | value_template: "{{(value | float * 0.623) | round(2)}}" 326 | 327 | - device_class: "monetary" 328 | state_class: "total_increasing" 329 | force_update: "true" 330 | icon: "mdi:currency-gbp" 331 | name: "SOFAR Today's Feed-In Earned" 332 | unique_id: "sofar_today_export_earned" 333 | unit_of_measurement: "£" 334 | state_topic: "sofar/today_generation" 335 | value_template: "{{(value | float * 0.3115) | round(2)}}" 336 | 337 | - device_class: "monetary" 338 | state_class: "total_increasing" 339 | force_update: "true" 340 | icon: "mdi:currency-gbp" 341 | name: "SOFAR Today's Grid Consumption Cost" 342 | unique_id: "sofar_today_import_cost" 343 | unit_of_measurement: "£" 344 | state_topic: "sofar/today_import" 345 | value_template: "{{(value | float * 0.16) | round(2)}}" 346 | 347 | - device_class: "power" 348 | state_class: "measurement" 349 | force_update: "true" 350 | icon: "mdi:transmission-tower-import" 351 | name: "SOFAR Grid Power Importing" 352 | unique_id: "sofar_importing_grid_power" 353 | unit_of_measurement: "W" 354 | state_topic: "sofar/importing_grid_power" 355 | value_template: "{{ value | float }}" 356 | 357 | - device_class: "power" 358 | state_class: "measurement" 359 | force_update: "true" 360 | icon: "mdi:transmission-tower-export" 361 | name: "SOFAR Grid Power Exporting" 362 | unique_id: "sofar_exporting_grid_power" 363 | unit_of_measurement: "W" 364 | state_topic: "sofar/exporting_grid_power" 365 | value_template: "{{ value | float }}" 366 | 367 | - device_class: "power" 368 | state_class: "measurement" 369 | force_update: "true" 370 | icon: "mdi:transmission-tower" 371 | name: "SOFAR Grid Power Absolute" 372 | unique_id: "sofar_absolute_grid_power" 373 | unit_of_measurement: "W" 374 | state_topic: "sofar/absolute_grid_power" 375 | value_template: "{{ value | float }}" 376 | 377 | - state_class: "measurement" 378 | force_update: "true" 379 | icon: "mdi:transmission-tower" 380 | name: "SOFAR Grid Status" 381 | unique_id: "sofar_grid_status" 382 | state_topic: "sofar/grid_status" 383 | 384 | - device_class: "power" 385 | state_class: "measurement" 386 | force_update: "true" 387 | icon: "mdi:battery-arrow-up" 388 | name: "SOFAR Battery Power Charging" 389 | unique_id: "sofar_charging_battery_power" 390 | unit_of_measurement: "W" 391 | state_topic: "sofar/charging_battery_power" 392 | value_template: "{{ value | float }}" 393 | 394 | - device_class: "power" 395 | state_class: "measurement" 396 | force_update: "true" 397 | icon: "mdi:battery-arrow-down" 398 | name: "SOFAR Battery Power Discharging" 399 | unique_id: "sofar_discharging_battery_power" 400 | unit_of_measurement: "W" 401 | state_topic: "sofar/discharging_battery_power" 402 | value_template: "{{ value | float }}" 403 | 404 | - device_class: "power" 405 | state_class: "measurement" 406 | force_update: "true" 407 | icon: "mdi:battery-charging" 408 | name: "SOFAR Battery Power Absolute" 409 | unique_id: "sofar_absolute_battery_power" 410 | unit_of_measurement: "W" 411 | state_topic: "sofar/absolute_battery_power" 412 | value_template: "{{ value | float }}" 413 | 414 | - state_class: "measurement" 415 | force_update: "true" 416 | icon: "mdi:battery-sync" 417 | name: "SOFAR Battery Status" 418 | unique_id: "sofar_battery_status" 419 | state_topic: "sofar/battery_status" 420 | 421 | 422 | 423 | 424 | #Sensors 425 | sensor: 426 | #House Helpers 427 | - platform: integration 428 | method: left 429 | unit_time: h 430 | unit_prefix: k 431 | source: sensor.sofar_battery_power_charging 432 | name: "SOFAR Today's Total Battery Charge" 433 | unique_id: "sofar_today_battery_charge" 434 | round: 2 435 | 436 | - platform: integration 437 | method: left 438 | unit_time: h 439 | unit_prefix: k 440 | source: sensor.sofar_battery_power_discharging 441 | name: "SOFAR Today's Total Battery Discharge" 442 | unique_id: "sofar_today_battery_discharge" 443 | round: 2 444 | 445 | - platform: integration 446 | unit_time: h 447 | unit_prefix: k 448 | source: sensor.sofar_grid_power_exporting 449 | name: "SOFAR Exported Energy" 450 | unique_id: "sofar_exported_energy" 451 | round: 2 452 | 453 | - platform: integration 454 | unit_time: h 455 | unit_prefix: k 456 | source: sensor.sofar_grid_power_importing 457 | name: "SOFAR Imported Energy" 458 | unique_id: "sofar_imported_energy" 459 | round: 2 460 | 461 | 462 | #House Utility Meters 463 | utility_meter: 464 | utility_meter_daily_sofar_exported_energy: 465 | source: sensor.sofar_exported_energy 466 | cycle: daily 467 | name: "SOFAR Utility Meter - Daily Exported Energy" 468 | unique_id: "sofar_utility_meter_daily_exported_energy" 469 | offset: 0 470 | delta_values: false 471 | net_consumption: false 472 | 473 | utility_meter_daily_sofar_imported_energy: 474 | source: sensor.sofar_imported_energy 475 | cycle: daily 476 | name: "SOFAR Utility Meter - Daily Imported Energy" 477 | unique_id: "sofar_utility_meter_daily_imported_energy" 478 | offset: 0 479 | delta_values: false 480 | net_consumption: false 481 | 482 | 483 | utility_meter_daily_sofar_battery_discharge: 484 | source: sensor.sofar_today_s_total_battery_discharge 485 | cycle: daily 486 | name: "SOFAR Utility Meter - Daily Total Battery Discharge" 487 | unique_id: "sofar_utility_meter_daily_total_battery_discharge" 488 | offset: 0 489 | delta_values: false 490 | net_consumption: false 491 | 492 | 493 | utility_meter_daily_sofar_battery_charge: 494 | source: sensor.sofar_today_s_total_battery_charge 495 | cycle: daily 496 | name: "SOFAR Utility Meter - Daily Total Battery Charge" 497 | unique_id: "sofar_utility_meter_daily_total_battery_charge" 498 | offset: 0 499 | delta_values: false 500 | net_consumption: false 501 | utility_meter_daily_sofar_battery_discharge: 502 | source: sensor.sofar_today_s_total_battery_discharge 503 | cycle: daily 504 | name: "SOFAR Utility Meter - Daily Total Battery Discharge" 505 | unique_id: "sofar_utility_meter_daily_total_battery_discharge" 506 | offset: 0 507 | delta_values: false 508 | net_consumption: false 509 | utility_meter_daily_sofar_feed_in: 510 | source: sensor.sofar_today_s_feed_in 511 | cycle: daily 512 | name: "SOFAR Utility Meter - Daily Feed-In" 513 | unique_id: "sofar_utility_meter_daily_feed_in" 514 | offset: 0 515 | delta_values: false 516 | net_consumption: false 517 | utility_meter_daily_sofar_grid_consumption: 518 | source: sensor.sofar_today_s_grid_consumption 519 | cycle: daily 520 | name: "SOFAR Utility Meter - Daily Grid Consumption" 521 | unique_id: "sofar_utility_meter_daily_grid_consumption" 522 | offset: 0 523 | delta_values: false 524 | net_consumption: false 525 | utility_meter_daily_sofar_pv_generation: 526 | source: sensor.sofar_today_s_pv_generation 527 | cycle: daily 528 | name: "SOFAR Utility Meter - Daily PV Generation" 529 | unique_id: "sofar_utility_meter_daily_pv_generation" 530 | offset: 0 531 | delta_values: false 532 | net_consumption: false 533 | utility_meter_daily_sofar_load: 534 | source: sensor.sofar_today_s_load 535 | cycle: daily 536 | name: "SOFAR Utility Meter - Daily Load" 537 | unique_id: "sofar_utility_meter_daily_load" 538 | offset: 0 539 | delta_values: false 540 | net_consumption: false 541 | utility_meter_daily_sofar_feed_in_earned: 542 | source: sensor.sofar_today_s_feed_in_earned 543 | cycle: daily 544 | name: "SOFAR Utility Meter - Daily Feed-In Earned" 545 | unique_id: "sofar_utility_meter_daily_feed_in_earned" 546 | offset: 0 547 | delta_values: false 548 | net_consumption: false 549 | utility_meter_daily_sofar_grid_consumption_cost: 550 | source: sensor.sofar_today_s_grid_consumption_cost 551 | cycle: daily 552 | name: "SOFAR Utility Meter - Daily Grid Consumption Cost" 553 | unique_id: "sofar_utility_meter_daily_grid_consumption_cost" 554 | offset: 0 555 | delta_values: false 556 | net_consumption: false 557 | utility_meter_daily_sofar_pv_generation_earned: 558 | source: sensor.sofar_today_s_pv_generation_earned 559 | cycle: daily 560 | name: "SOFAR Utility Meter - Daily PV Generation Earned" 561 | unique_id: "sofar_utility_meter_daily_pv_generation_earned" 562 | offset: 0 563 | delta_values: false 564 | net_consumption: false 565 | utility_meter_daily_sofar_total_generation_earned: 566 | source: sensor.sofar_today_s_total_generation_earned 567 | cycle: daily 568 | name: "SOFAR Utility Meter - Daily Total Generation Earned" 569 | unique_id: "sofar_utility_meter_daily_total_generation_earned" 570 | offset: 0 571 | delta_values: false 572 | net_consumption: false 573 | utility_meter_monthly_sofar_battery_charge: 574 | source: sensor.sofar_today_s_total_battery_charge 575 | cycle: monthly 576 | name: "SOFAR Utility Meter - Monthly Total Battery Charge" 577 | unique_id: "sofar_utility_meter_monthly_total_battery_charge" 578 | offset: 0 579 | delta_values: false 580 | net_consumption: false 581 | utility_meter_monthly_sofar_battery_discharge: 582 | source: sensor.sofar_today_s_total_battery_discharge 583 | cycle: monthly 584 | name: "SOFAR Utility Meter - Monthly Total Battery Discharge" 585 | unique_id: "sofar_utility_meter_monthly_total_battery_discharge" 586 | offset: 0 587 | delta_values: false 588 | net_consumption: false 589 | utility_meter_monthly_sofar_feed_in: 590 | source: sensor.sofar_today_s_feed_in 591 | cycle: monthly 592 | name: "SOFAR Utility Meter - Monthly Feed-In" 593 | unique_id: "sofar_utility_meter_monthly_feed_in" 594 | offset: 0 595 | delta_values: false 596 | net_consumption: false 597 | utility_meter_monthly_sofar_grid_consumption: 598 | source: sensor.sofar_today_s_grid_consumption 599 | cycle: monthly 600 | name: "SOFAR Utility Meter - Monthly Grid Consumption" 601 | unique_id: "sofar_utility_meter_monthly_grid_consumption" 602 | offset: 0 603 | delta_values: false 604 | net_consumption: false 605 | utility_meter_monthly_sofar_pv_generation: 606 | source: sensor.sofar_today_s_pv_generation 607 | cycle: monthly 608 | name: "SOFAR Utility Meter - Monthly PV Generation" 609 | unique_id: "sofar_utility_meter_monthly_pv_generation" 610 | offset: 0 611 | delta_values: false 612 | net_consumption: false 613 | utility_meter_monthly_sofar_load: 614 | source: sensor.sofar_today_s_load 615 | cycle: monthly 616 | name: "SOFAR Utility Meter - Monthly Load" 617 | unique_id: "sofar_utility_meter_monthly_load" 618 | offset: 0 619 | delta_values: false 620 | net_consumption: false 621 | utility_meter_monthly_sofar_feed_in_earned: 622 | source: sensor.sofar_today_s_feed_in_earned 623 | cycle: monthly 624 | name: "SOFAR Utility Meter - Monthly Feed-In Earned" 625 | unique_id: "sofar_utility_meter_monthly_feed_in_earned" 626 | offset: 0 627 | delta_values: false 628 | net_consumption: false 629 | utility_meter_monthly_sofar_grid_consumption_cost: 630 | source: sensor.sofar_today_s_grid_consumption_cost 631 | cycle: monthly 632 | name: "SOFAR Utility Meter - Monthly Grid Consumption Cost" 633 | unique_id: "sofar_utility_meter_monthly_grid_consumption_cost" 634 | offset: 0 635 | delta_values: false 636 | net_consumption: false 637 | utility_meter_monthly_sofar_pv_generation_earned: 638 | source: sensor.sofar_today_s_pv_generation_earned 639 | cycle: monthly 640 | name: "SOFAR Utility Meter - Monthly PV Generation Earned" 641 | unique_id: "sofar_utility_meter_monthly_pv_generation_earned" 642 | offset: 0 643 | delta_values: false 644 | net_consumption: false 645 | utility_meter_monthly_sofar_total_generation_earned: 646 | source: sensor.sofar_today_s_total_generation_earned 647 | cycle: monthly 648 | name: "SOFAR Utility Meter - Monthly Total Generation Earned" 649 | unique_id: "sofar_utility_meter_monthly_total_generation_earned" 650 | offset: 0 651 | delta_values: false 652 | net_consumption: false 653 | 654 | 655 | 656 | 657 | 658 | input_number: 659 | input_house_charge_watts: 660 | name: "Input House Charge Watts" 661 | initial: 3000 662 | min: 0 663 | max: 3000 664 | step: 100 665 | mode: slider 666 | icon: "mdi:battery-positive" 667 | input_house_discharge_watts: 668 | name: "Input House Discharge Watts" 669 | initial: 3000 670 | min: 0 671 | max: 3000 672 | step: 100 673 | mode: slider 674 | icon: "mdi:battery-negative" 675 | 676 | 677 | 678 | 679 | #Recorder 680 | # Pointless keeping some values over time 681 | # So looking to keep those we want to chart at any sort of frequency 682 | # Battery charging/discharging, SOC, importing/exporting, load and PV generation 683 | # And also the utility meters as they are supposedly going to keep us aggregate figures by day 684 | 685 | recorder: 686 | exclude: 687 | entities: 688 | - sensor.sofar_battery_current 689 | - sensor.sofar_battery_cycles 690 | - sensor.sofar_battery_power 691 | - sensor.sofar_battery_power_absolute 692 | - sensor.sofar_battery_power_charging 693 | - sensor.sofar_battery_power_discharging 694 | # - sensor.sofar_battery_soc 695 | - sensor.sofar_battery_status 696 | - sensor.sofar_battery_temperature 697 | - sensor.sofar_battery_voltage 698 | - sensor.sofar_grid_current 699 | - sensor.sofar_grid_frequency 700 | - sensor.sofar_grid_power 701 | - sensor.sofar_absolute_grid_power 702 | # - sensor.sofar_exporting_grid_power 703 | # - sensor.sofar_importing_grid_power 704 | - sensor.sofar_grid_status 705 | # - sensor.sofar_grid_voltage 706 | - sensor.sofar_inverter_heatsink_temperature 707 | # - sensor.sofar_inverter_state 708 | - sensor.sofar_inverter_temperature 709 | # - sensor.sofar_load 710 | - sensor.sofar_pv_current 711 | # - sensor.sofar_solar_pv_generation 712 | - sensor.sofar_today_s_battery_charge 713 | - sensor.sofar_today_s_battery_discharge 714 | - sensor.sofar_today_s_feed_in 715 | - sensor.sofar_today_s_feed_in_earned 716 | - sensor.sofar_today_s_grid_consumption 717 | - sensor.sofar_today_s_grid_consumption_cost 718 | - sensor.sofar_today_s_load 719 | - sensor.sofar_today_s_pv_generation 720 | - sensor.sofar_today_s_pv_generation_earned 721 | # - sensor.sofar_today_s_total_generation_earned 722 | # - sensor.sofar_utility_meter_daily_battery_charge 723 | # - sensor.sofar_utility_meter_daily_battery_discharge 724 | # - sensor.sofar_utility_meter_daily_feed_in 725 | # - sensor.sofar_utility_meter_daily_feed_in_earned 726 | # - sensor.sofar_utility_meter_daily_grid_consumption 727 | # - sensor.sofar_utility_meter_daily_grid_consumption_cost 728 | # - sensor.sofar_utility_meter_daily_load 729 | # - sensor.sofar_utility_meter_daily_pv_generation 730 | # - sensor.sofar_utility_meter_daily_pv_generation_earned 731 | # - sensor.sofar_utility_meter_daily_total_generation_earned 732 | 733 | # - input_number.input_house_charge_watts 734 | # - input_number.input_house_discharge_watts -------------------------------------------------------------------------------- /Integrating Sofar2mqtt with Home Assistant/configuration.yaml: -------------------------------------------------------------------------------- 1 | 2 | # Loads default set of integrations. Do not remove. 3 | default_config: 4 | 5 | # Load frontend themes from the themes folder 6 | frontend: 7 | themes: !include_dir_merge_named themes 8 | extra_module_url: 9 | - /hacsfiles/lovelace-card-mod/card-mod.js 10 | 11 | 12 | # Text to speech 13 | tts: 14 | - platform: google_translate 15 | 16 | automation: !include automations.yaml 17 | script: !include scripts.yaml 18 | scene: !include scenes.yaml 19 | 20 | 21 | 22 | 23 | 24 | 25 | #MQTT 26 | mqtt: 27 | button: 28 | # House Buttons 29 | - unique_id: sofar_set_standby 30 | command_topic: "Sofar2mqtt/set/standby" 31 | name: "SOFAR Set Standby" 32 | payload_press: "true" 33 | qos: 0 34 | retain: false 35 | entity_category: "config" 36 | icon: "mdi:power-standby" 37 | 38 | - unique_id: sofar_set_auto 39 | command_topic: "Sofar2mqtt/set/auto" 40 | name: "SOFAR Set Auto" 41 | command_template: "true" 42 | qos: 0 43 | retain: false 44 | entity_category: "config" 45 | icon: "mdi:lightbulb-auto" 46 | 47 | - unique_id: sofar_set_battery_save 48 | command_topic: "Sofar2mqtt/set/auto" 49 | name: "SOFAR Set Battery Save" 50 | command_template: "battery_save" 51 | qos: 0 52 | retain: false 53 | entity_category: "config" 54 | icon: "mdi:lightbulb-auto" 55 | 56 | - unique_id: sofar_set_charge 57 | command_topic: "Sofar2mqtt/set/charge" 58 | name: "SOFAR Set Charge" 59 | command_template: "{{ states('input_number.input_house_charge_watts')|int }}" 60 | qos: 0 61 | retain: false 62 | entity_category: "config" 63 | icon: "mdi:battery-positive" 64 | 65 | - unique_id: sofar_set_discharge 66 | command_topic: "Sofar2mqtt/set/discharge" 67 | name: "SOFAR Set Discharge" 68 | command_template: "{{ states('input_number.input_house_discharge_watts')|int }}" 69 | qos: 0 70 | retain: false 71 | entity_category: "config" 72 | icon: "mdi:battery-negative" 73 | 74 | 75 | 76 | 77 | #MQTT Sensors 78 | sensor: 79 | #House Sensors 80 | - device_class: "temperature" 81 | state_class: "measurement" 82 | force_update: "true" 83 | icon: "mdi:thermometer" 84 | name: "SOFAR Battery Temperature" 85 | unique_id: "sofar_battery_temp" 86 | unit_of_measurement: "°C" 87 | state_topic: "sofar/battery_temp" 88 | value_template: "{{ value | float }}" 89 | 90 | - state_class: "measurement" 91 | force_update: "true" 92 | icon: "mdi:information-variant" 93 | name: "SOFAR Inverter State" 94 | unique_id: "sofar_inverter_state" 95 | state_topic: "sofar/inverter_state" 96 | device_class: "enum" 97 | 98 | - device_class: "voltage" 99 | state_class: "measurement" 100 | force_update: "true" 101 | icon: "mdi:alpha-v" 102 | name: "SOFAR Grid Voltage" 103 | unique_id: "sofar_grid_voltage" 104 | unit_of_measurement: "V" 105 | state_topic: "sofar/grid_voltage" 106 | value_template: "{{ value | float }}" 107 | 108 | - device_class: "current" 109 | state_class: "measurement" 110 | force_update: "true" 111 | icon: "mdi:alpha-a" 112 | name: "SOFAR Grid Current" 113 | unique_id: "sofar_grid_current" 114 | unit_of_measurement: "A" 115 | state_topic: "sofar/grid_current" 116 | value_template: "{{ value | float }}" 117 | 118 | - device_class: "frequency" 119 | state_class: "measurement" 120 | force_update: "true" 121 | icon: "mdi:sine-wave" 122 | name: "SOFAR Grid Frequency" 123 | unique_id: "sofar_grid_freq" 124 | unit_of_measurement: "Hz" 125 | state_topic: "sofar/grid_freq" 126 | value_template: "{{ value | float }}" 127 | 128 | - device_class: "power" 129 | state_class: "measurement" 130 | force_update: "true" 131 | icon: "mdi:battery-charging-100" 132 | name: "SOFAR Battery Power" 133 | unique_id: "sofar_battery_power" 134 | unit_of_measurement: "W" 135 | state_topic: "sofar/battery_power" 136 | value_template: "{{ value | float }}" 137 | 138 | - device_class: "power" 139 | state_class: "measurement" 140 | force_update: "true" 141 | icon: "mdi:meter-electric-outline" 142 | name: "SOFAR System IO Power" 143 | unique_id: "sofar_system_io_power" 144 | unit_of_measurement: "W" 145 | state_topic: "sofar/systemIO_power" 146 | value_template: "{{ value | float }}" 147 | 148 | 149 | 150 | - device_class: "voltage" 151 | state_class: "measurement" 152 | force_update: "true" 153 | icon: "mdi:alpha-v" 154 | name: "SOFAR Battery Voltage" 155 | unique_id: "sofar_battery_voltage" 156 | unit_of_measurement: "V" 157 | state_topic: "sofar/battery_voltage" 158 | value_template: "{{ value | float }}" 159 | 160 | - device_class: "current" 161 | state_class: "measurement" 162 | force_update: "true" 163 | icon: "mdi:alpha-a" 164 | name: "SOFAR Battery Current" 165 | unique_id: "sofar_battery_current" 166 | unit_of_measurement: "A" 167 | state_topic: "sofar/battery_current" 168 | value_template: "{{ value | float }}" 169 | 170 | - device_class: "battery" 171 | state_class: "measurement" 172 | force_update: "true" 173 | icon: "mdi:battery" 174 | name: "SOFAR Battery SOC" 175 | unique_id: "sofar_batterySOC" 176 | unit_of_measurement: "%" 177 | state_topic: "sofar/batterySOC" 178 | value_template: "{{ value | float }}" 179 | 180 | - state_class: "measurement" 181 | force_update: "true" 182 | icon: "mdi:battery-sync" 183 | name: "SOFAR Battery Cycles" 184 | unique_id: "sofar_battery_cycles" 185 | state_topic: "sofar/battery_cycles" 186 | value_template: "{{ value | float }}" 187 | 188 | - device_class: "power" 189 | state_class: "measurement" 190 | force_update: "true" 191 | icon: "mdi:transmission-tower" 192 | name: "SOFAR Grid Power" 193 | unique_id: "sofar_grid_power" 194 | unit_of_measurement: "W" 195 | state_topic: "sofar/grid_power" 196 | value_template: "{{ value | float }}" 197 | 198 | - device_class: "power" 199 | state_class: "measurement" 200 | force_update: "true" 201 | icon: "mdi:home-import-outline" 202 | name: "SOFAR Load" 203 | unique_id: "sofar_consumption" 204 | unit_of_measurement: "W" 205 | state_topic: "sofar/consumption" 206 | value_template: "{{ value | float }}" 207 | 208 | - device_class: "power" 209 | state_class: "measurement" 210 | force_update: "true" 211 | icon: "mdi:solar-power" 212 | name: "SOFAR Solar PV Generation" 213 | unique_id: "sofar_solarPV" 214 | unit_of_measurement: "W" 215 | state_topic: "sofar/solarPV" 216 | value_template: "{{ value | float }}" 217 | 218 | - device_class: "power" 219 | state_class: "measurement" 220 | force_update: "true" 221 | icon: "mdi:solar-power" 222 | name: "SOFAR Solar PV Array 1 Generation" 223 | unique_id: "sofar_solar_pv_array_1_generation" 224 | unit_of_measurement: "W" 225 | state_topic: "sofar/Solarpv1" 226 | value_template: "{{ value | float }}" 227 | 228 | - device_class: "power" 229 | state_class: "measurement" 230 | force_update: "true" 231 | icon: "mdi:solar-power" 232 | name: "SOFAR Solar PV Array 2 Generation" 233 | unique_id: "sofar_solar_pv_array_2_generation" 234 | unit_of_measurement: "W" 235 | state_topic: "sofar/Solarpv2" 236 | value_template: "{{ value | float }}" 237 | 238 | - device_class: "energy" 239 | state_class: "total_increasing" 240 | force_update: "true" 241 | icon: "mdi:solar-power" 242 | name: "SOFAR Today's PV Generation" 243 | unique_id: "sofar_today_generation" 244 | unit_of_measurement: "kWh" 245 | state_topic: "sofar/today_generation" 246 | value_template: "{{ value | float }}" 247 | 248 | - device_class: "energy" 249 | state_class: "total_increasing" 250 | force_update: "true" 251 | icon: "mdi:transmission-tower-export" 252 | name: "SOFAR Today's Feed-In" 253 | unique_id: "sofar_today_export" 254 | unit_of_measurement: "kWh" 255 | state_topic: "sofar/today_export" 256 | value_template: "{{ value | float }}" 257 | 258 | - device_class: "energy" 259 | state_class: "total_increasing" 260 | force_update: "true" 261 | icon: "mdi:transmission-tower-import" 262 | name: "SOFAR Today's Grid Consumption" 263 | unique_id: "sofar_today_import" 264 | unit_of_measurement: "kWh" 265 | state_topic: "sofar/today_import" 266 | value_template: "{{ value | float }}" 267 | 268 | - device_class: "energy" 269 | state_class: "measurement" 270 | force_update: "true" 271 | icon: "mdi:home-import-outline" 272 | name: "SOFAR Today's Load" 273 | unique_id: "sofar_today_consumption" 274 | unit_of_measurement: "kWh" 275 | state_topic: "sofar/today_consumption" 276 | value_template: "{{ value | float }}" 277 | 278 | - device_class: "temperature" 279 | state_class: "measurement" 280 | force_update: "true" 281 | icon: "mdi:thermometer" 282 | name: "SOFAR Inverter Temperature" 283 | unique_id: "sofar_inverter_temp" 284 | unit_of_measurement: "°C" 285 | state_topic: "sofar/inverter_temp" 286 | value_template: "{{ value | float }}" 287 | 288 | - device_class: "temperature" 289 | state_class: "measurement" 290 | force_update: "true" 291 | icon: "mdi:thermometer" 292 | name: "SOFAR Inverter Heatsink Temperature" 293 | unique_id: "sofar_inverter_heatsink_temp" 294 | unit_of_measurement: "°C" 295 | state_topic: "sofar/inverter_heatsink_temp" 296 | value_template: "{{ value | float }}" 297 | 298 | - device_class: "current" 299 | state_class: "measurement" 300 | force_update: "true" 301 | icon: "mdi:alpha-a" 302 | name: "SOFAR PV Current" 303 | unique_id: "sofar_solarPVAmps" 304 | unit_of_measurement: "A" 305 | state_topic: "sofar/solarPVAmps" 306 | value_template: "{{ value | float }}" 307 | 308 | - device_class: "monetary" 309 | state_class: "total_increasing" 310 | force_update: "true" 311 | icon: "mdi:currency-gbp" 312 | name: "SOFAR Today's Total Generation Earned" 313 | unique_id: "sofar_today_total_generation_earned" 314 | unit_of_measurement: "£" 315 | state_topic: "sofar/today_generation" 316 | value_template: "{{(value | float * 0.9345) | round(2)}}" 317 | 318 | - device_class: "monetary" 319 | state_class: "total_increasing" 320 | force_update: "true" 321 | icon: "mdi:currency-gbp" 322 | name: "SOFAR Today's PV Generation Earned" 323 | unique_id: "sofar_today_generation_earned" 324 | unit_of_measurement: "£" 325 | state_topic: "sofar/today_generation" 326 | value_template: "{{(value | float * 0.623) | round(2)}}" 327 | 328 | - device_class: "monetary" 329 | state_class: "total_increasing" 330 | force_update: "true" 331 | icon: "mdi:currency-gbp" 332 | name: "SOFAR Today's Feed-In Earned" 333 | unique_id: "sofar_today_export_earned" 334 | unit_of_measurement: "£" 335 | state_topic: "sofar/today_generation" 336 | value_template: "{{(value | float * 0.3115) | round(2)}}" 337 | 338 | - device_class: "monetary" 339 | state_class: "total_increasing" 340 | force_update: "true" 341 | icon: "mdi:currency-gbp" 342 | name: "SOFAR Today's Grid Consumption Cost" 343 | unique_id: "sofar_today_import_cost" 344 | unit_of_measurement: "£" 345 | state_topic: "sofar/today_import" 346 | value_template: "{{(value | float * 0.16) | round(2)}}" 347 | 348 | - device_class: "power" 349 | state_class: "measurement" 350 | force_update: "true" 351 | icon: "mdi:transmission-tower-import" 352 | name: "SOFAR Grid Power Importing" 353 | unique_id: "sofar_importing_grid_power" 354 | unit_of_measurement: "W" 355 | state_topic: "sofar/importing_grid_power" 356 | value_template: "{{ value | float }}" 357 | 358 | - device_class: "power" 359 | state_class: "measurement" 360 | force_update: "true" 361 | icon: "mdi:transmission-tower-export" 362 | name: "SOFAR Grid Power Exporting" 363 | unique_id: "sofar_exporting_grid_power" 364 | unit_of_measurement: "W" 365 | state_topic: "sofar/exporting_grid_power" 366 | value_template: "{{ value | float }}" 367 | 368 | - device_class: "power" 369 | state_class: "measurement" 370 | force_update: "true" 371 | icon: "mdi:transmission-tower" 372 | name: "SOFAR Grid Power Absolute" 373 | unique_id: "sofar_absolute_grid_power" 374 | unit_of_measurement: "W" 375 | state_topic: "sofar/absolute_grid_power" 376 | value_template: "{{ value | float }}" 377 | 378 | - state_class: "measurement" 379 | force_update: "true" 380 | icon: "mdi:transmission-tower" 381 | name: "SOFAR Grid Status" 382 | unique_id: "sofar_grid_status" 383 | state_topic: "sofar/grid_status" 384 | device_class: "enum" 385 | 386 | - device_class: "power" 387 | state_class: "measurement" 388 | force_update: "true" 389 | icon: "mdi:battery-arrow-up" 390 | name: "SOFAR Battery Power Charging" 391 | unique_id: "sofar_charging_battery_power" 392 | unit_of_measurement: "W" 393 | state_topic: "sofar/charging_battery_power" 394 | value_template: "{{ value | float }}" 395 | 396 | - device_class: "power" 397 | state_class: "measurement" 398 | force_update: "true" 399 | icon: "mdi:battery-arrow-down" 400 | name: "SOFAR Battery Power Discharging" 401 | unique_id: "sofar_discharging_battery_power" 402 | unit_of_measurement: "W" 403 | state_topic: "sofar/discharging_battery_power" 404 | value_template: "{{ value | float }}" 405 | 406 | - device_class: "power" 407 | state_class: "measurement" 408 | force_update: "true" 409 | icon: "mdi:battery-charging" 410 | name: "SOFAR Battery Power Absolute" 411 | unique_id: "sofar_absolute_battery_power" 412 | unit_of_measurement: "W" 413 | state_topic: "sofar/absolute_battery_power" 414 | value_template: "{{ value | float }}" 415 | 416 | - state_class: "measurement" 417 | force_update: "true" 418 | icon: "mdi:battery-sync" 419 | name: "SOFAR Battery Status" 420 | unique_id: "sofar_battery_status" 421 | state_topic: "sofar/battery_status" 422 | device_class: "enum" 423 | 424 | 425 | 426 | #Sensors 427 | sensor: 428 | #House Helpers 429 | - platform: integration 430 | method: left 431 | unit_time: h 432 | unit_prefix: k 433 | source: sensor.sofar_battery_power_charging 434 | name: "SOFAR Today's Total Battery Charge" 435 | unique_id: "sofar_today_battery_charge" 436 | round: 2 437 | 438 | - platform: integration 439 | method: left 440 | unit_time: h 441 | unit_prefix: k 442 | source: sensor.sofar_battery_power_discharging 443 | name: "SOFAR Today's Total Battery Discharge" 444 | unique_id: "sofar_today_battery_discharge" 445 | round: 2 446 | 447 | - platform: integration 448 | unit_time: h 449 | unit_prefix: k 450 | source: sensor.sofar_grid_power_exporting 451 | name: "SOFAR Exported Energy" 452 | unique_id: "sofar_exported_energy" 453 | round: 2 454 | 455 | - platform: integration 456 | unit_time: h 457 | unit_prefix: k 458 | source: sensor.sofar_grid_power_importing 459 | name: "SOFAR Imported Energy" 460 | unique_id: "sofar_imported_energy" 461 | round: 2 462 | 463 | 464 | #House Utility Meters 465 | utility_meter: 466 | utility_meter_daily_sofar_exported_energy: 467 | source: sensor.sofar_exported_energy 468 | cycle: daily 469 | name: "SOFAR Utility Meter - Daily Exported Energy" 470 | unique_id: "sofar_utility_meter_daily_exported_energy" 471 | offset: 0 472 | delta_values: false 473 | net_consumption: false 474 | 475 | utility_meter_daily_sofar_imported_energy: 476 | source: sensor.sofar_imported_energy 477 | cycle: daily 478 | name: "SOFAR Utility Meter - Daily Imported Energy" 479 | unique_id: "sofar_utility_meter_daily_imported_energy" 480 | offset: 0 481 | delta_values: false 482 | net_consumption: false 483 | 484 | 485 | utility_meter_daily_sofar_battery_discharge: 486 | source: sensor.sofar_today_s_total_battery_discharge 487 | cycle: daily 488 | name: "SOFAR Utility Meter - Daily Total Battery Discharge" 489 | unique_id: "sofar_utility_meter_daily_total_battery_discharge" 490 | offset: 0 491 | delta_values: false 492 | net_consumption: false 493 | 494 | 495 | utility_meter_daily_sofar_battery_charge: 496 | source: sensor.sofar_today_s_total_battery_charge 497 | cycle: daily 498 | name: "SOFAR Utility Meter - Daily Total Battery Charge" 499 | unique_id: "sofar_utility_meter_daily_total_battery_charge" 500 | offset: 0 501 | delta_values: false 502 | net_consumption: false 503 | 504 | utility_meter_daily_sofar_feed_in: 505 | source: sensor.sofar_today_s_feed_in 506 | cycle: daily 507 | name: "SOFAR Utility Meter - Daily Feed-In" 508 | unique_id: "sofar_utility_meter_daily_feed_in" 509 | offset: 0 510 | delta_values: false 511 | net_consumption: false 512 | utility_meter_daily_sofar_grid_consumption: 513 | source: sensor.sofar_today_s_grid_consumption 514 | cycle: daily 515 | name: "SOFAR Utility Meter - Daily Grid Consumption" 516 | unique_id: "sofar_utility_meter_daily_grid_consumption" 517 | offset: 0 518 | delta_values: false 519 | net_consumption: false 520 | utility_meter_daily_sofar_pv_generation: 521 | source: sensor.sofar_today_s_pv_generation 522 | cycle: daily 523 | name: "SOFAR Utility Meter - Daily PV Generation" 524 | unique_id: "sofar_utility_meter_daily_pv_generation" 525 | offset: 0 526 | delta_values: false 527 | net_consumption: false 528 | utility_meter_daily_sofar_load: 529 | source: sensor.sofar_today_s_load 530 | cycle: daily 531 | name: "SOFAR Utility Meter - Daily Load" 532 | unique_id: "sofar_utility_meter_daily_load" 533 | offset: 0 534 | delta_values: false 535 | net_consumption: false 536 | utility_meter_daily_sofar_feed_in_earned: 537 | source: sensor.sofar_today_s_feed_in_earned 538 | cycle: daily 539 | name: "SOFAR Utility Meter - Daily Feed-In Earned" 540 | unique_id: "sofar_utility_meter_daily_feed_in_earned" 541 | offset: 0 542 | delta_values: false 543 | net_consumption: false 544 | utility_meter_daily_sofar_grid_consumption_cost: 545 | source: sensor.sofar_today_s_grid_consumption_cost 546 | cycle: daily 547 | name: "SOFAR Utility Meter - Daily Grid Consumption Cost" 548 | unique_id: "sofar_utility_meter_daily_grid_consumption_cost" 549 | offset: 0 550 | delta_values: false 551 | net_consumption: false 552 | utility_meter_daily_sofar_pv_generation_earned: 553 | source: sensor.sofar_today_s_pv_generation_earned 554 | cycle: daily 555 | name: "SOFAR Utility Meter - Daily PV Generation Earned" 556 | unique_id: "sofar_utility_meter_daily_pv_generation_earned" 557 | offset: 0 558 | delta_values: false 559 | net_consumption: false 560 | utility_meter_daily_sofar_total_generation_earned: 561 | source: sensor.sofar_today_s_total_generation_earned 562 | cycle: daily 563 | name: "SOFAR Utility Meter - Daily Total Generation Earned" 564 | unique_id: "sofar_utility_meter_daily_total_generation_earned" 565 | offset: 0 566 | delta_values: false 567 | net_consumption: false 568 | utility_meter_monthly_sofar_battery_charge: 569 | source: sensor.sofar_today_s_total_battery_charge 570 | cycle: monthly 571 | name: "SOFAR Utility Meter - Monthly Total Battery Charge" 572 | unique_id: "sofar_utility_meter_monthly_total_battery_charge" 573 | offset: 0 574 | delta_values: false 575 | net_consumption: false 576 | utility_meter_monthly_sofar_battery_discharge: 577 | source: sensor.sofar_today_s_total_battery_discharge 578 | cycle: monthly 579 | name: "SOFAR Utility Meter - Monthly Total Battery Discharge" 580 | unique_id: "sofar_utility_meter_monthly_total_battery_discharge" 581 | offset: 0 582 | delta_values: false 583 | net_consumption: false 584 | utility_meter_monthly_sofar_feed_in: 585 | source: sensor.sofar_today_s_feed_in 586 | cycle: monthly 587 | name: "SOFAR Utility Meter - Monthly Feed-In" 588 | unique_id: "sofar_utility_meter_monthly_feed_in" 589 | offset: 0 590 | delta_values: false 591 | net_consumption: false 592 | utility_meter_monthly_sofar_grid_consumption: 593 | source: sensor.sofar_today_s_grid_consumption 594 | cycle: monthly 595 | name: "SOFAR Utility Meter - Monthly Grid Consumption" 596 | unique_id: "sofar_utility_meter_monthly_grid_consumption" 597 | offset: 0 598 | delta_values: false 599 | net_consumption: false 600 | utility_meter_monthly_sofar_pv_generation: 601 | source: sensor.sofar_today_s_pv_generation 602 | cycle: monthly 603 | name: "SOFAR Utility Meter - Monthly PV Generation" 604 | unique_id: "sofar_utility_meter_monthly_pv_generation" 605 | offset: 0 606 | delta_values: false 607 | net_consumption: false 608 | utility_meter_monthly_sofar_load: 609 | source: sensor.sofar_today_s_load 610 | cycle: monthly 611 | name: "SOFAR Utility Meter - Monthly Load" 612 | unique_id: "sofar_utility_meter_monthly_load" 613 | offset: 0 614 | delta_values: false 615 | net_consumption: false 616 | utility_meter_monthly_sofar_feed_in_earned: 617 | source: sensor.sofar_today_s_feed_in_earned 618 | cycle: monthly 619 | name: "SOFAR Utility Meter - Monthly Feed-In Earned" 620 | unique_id: "sofar_utility_meter_monthly_feed_in_earned" 621 | offset: 0 622 | delta_values: false 623 | net_consumption: false 624 | utility_meter_monthly_sofar_grid_consumption_cost: 625 | source: sensor.sofar_today_s_grid_consumption_cost 626 | cycle: monthly 627 | name: "SOFAR Utility Meter - Monthly Grid Consumption Cost" 628 | unique_id: "sofar_utility_meter_monthly_grid_consumption_cost" 629 | offset: 0 630 | delta_values: false 631 | net_consumption: false 632 | utility_meter_monthly_sofar_pv_generation_earned: 633 | source: sensor.sofar_today_s_pv_generation_earned 634 | cycle: monthly 635 | name: "SOFAR Utility Meter - Monthly PV Generation Earned" 636 | unique_id: "sofar_utility_meter_monthly_pv_generation_earned" 637 | offset: 0 638 | delta_values: false 639 | net_consumption: false 640 | utility_meter_monthly_sofar_total_generation_earned: 641 | source: sensor.sofar_today_s_total_generation_earned 642 | cycle: monthly 643 | name: "SOFAR Utility Meter - Monthly Total Generation Earned" 644 | unique_id: "sofar_utility_meter_monthly_total_generation_earned" 645 | offset: 0 646 | delta_values: false 647 | net_consumption: false 648 | 649 | 650 | 651 | 652 | 653 | input_number: 654 | input_house_charge_watts: 655 | name: "Input House Charge Watts" 656 | initial: 3000 657 | min: 0 658 | max: 3000 659 | step: 100 660 | mode: slider 661 | icon: "mdi:battery-positive" 662 | input_house_discharge_watts: 663 | name: "Input House Discharge Watts" 664 | initial: 3000 665 | min: 0 666 | max: 3000 667 | step: 100 668 | mode: slider 669 | icon: "mdi:battery-negative" 670 | 671 | 672 | 673 | 674 | #Recorder 675 | # Pointless keeping some values over time 676 | # So looking to keep those we want to chart at any sort of frequency 677 | # Battery charging/discharging, SOC, importing/exporting, load and PV generation 678 | # And also the utility meters as they are supposedly going to keep us aggregate figures by day 679 | 680 | recorder: 681 | exclude: 682 | entities: 683 | - sensor.sofar_battery_current 684 | - sensor.sofar_battery_cycles 685 | - sensor.sofar_battery_power 686 | - sensor.sofar_battery_power_absolute 687 | - sensor.sofar_battery_power_charging 688 | - sensor.sofar_battery_power_discharging 689 | # - sensor.sofar_battery_soc 690 | - sensor.sofar_battery_status 691 | - sensor.sofar_battery_temperature 692 | - sensor.sofar_battery_voltage 693 | - sensor.sofar_grid_current 694 | - sensor.sofar_grid_frequency 695 | - sensor.sofar_grid_power 696 | - sensor.sofar_absolute_grid_power 697 | # - sensor.sofar_exporting_grid_power 698 | # - sensor.sofar_importing_grid_power 699 | - sensor.sofar_grid_status 700 | # - sensor.sofar_grid_voltage 701 | - sensor.sofar_inverter_heatsink_temperature 702 | # - sensor.sofar_inverter_state 703 | - sensor.sofar_inverter_temperature 704 | # - sensor.sofar_load 705 | - sensor.sofar_pv_current 706 | # - sensor.sofar_solar_pv_generation 707 | - sensor.sofar_today_s_battery_charge 708 | - sensor.sofar_today_s_battery_discharge 709 | - sensor.sofar_today_s_feed_in 710 | - sensor.sofar_today_s_feed_in_earned 711 | - sensor.sofar_today_s_grid_consumption 712 | - sensor.sofar_today_s_grid_consumption_cost 713 | - sensor.sofar_today_s_load 714 | - sensor.sofar_today_s_pv_generation 715 | - sensor.sofar_today_s_pv_generation_earned 716 | # - sensor.sofar_today_s_total_generation_earned 717 | # - sensor.sofar_utility_meter_daily_battery_charge 718 | # - sensor.sofar_utility_meter_daily_battery_discharge 719 | # - sensor.sofar_utility_meter_daily_feed_in 720 | # - sensor.sofar_utility_meter_daily_feed_in_earned 721 | # - sensor.sofar_utility_meter_daily_grid_consumption 722 | # - sensor.sofar_utility_meter_daily_grid_consumption_cost 723 | # - sensor.sofar_utility_meter_daily_load 724 | # - sensor.sofar_utility_meter_daily_pv_generation 725 | # - sensor.sofar_utility_meter_daily_pv_generation_earned 726 | # - sensor.sofar_utility_meter_daily_total_generation_earned 727 | 728 | # - input_number.input_house_charge_watts 729 | # - input_number.input_house_discharge_watts -------------------------------------------------------------------------------- /Integrating Sofar2mqtt with Home Assistant/hybrid-configuration.yaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Loads default set of integrations. Do not remove. 4 | default_config: 5 | 6 | # Load frontend themes from the themes folder 7 | frontend: 8 | themes: !include_dir_merge_named themes 9 | extra_module_url: 10 | - /hacsfiles/lovelace-card-mod/card-mod.js 11 | 12 | 13 | # Text to speech 14 | tts: 15 | - platform: google_translate 16 | 17 | automation: !include automations.yaml 18 | script: !include scripts.yaml 19 | scene: !include scenes.yaml 20 | 21 | 22 | 23 | 24 | 25 | 26 | #MQTT 27 | mqtt: 28 | button: 29 | # House Buttons 30 | - unique_id: sofar_set_standby 31 | command_topic: "Sofar2mqtt/set/standby" 32 | name: "SOFAR Set Standby" 33 | payload_press: "true" 34 | qos: 0 35 | retain: false 36 | entity_category: "config" 37 | icon: "mdi:power-standby" 38 | 39 | - unique_id: sofar_set_auto 40 | command_topic: "Sofar2mqtt/set/auto" 41 | name: "SOFAR Set Auto" 42 | command_template: "true" 43 | qos: 0 44 | retain: false 45 | entity_category: "config" 46 | icon: "mdi:lightbulb-auto" 47 | 48 | - unique_id: sofar_set_battery_save 49 | command_topic: "Sofar2mqtt/set/auto" 50 | name: "SOFAR Set Battery Save" 51 | command_template: "battery_save" 52 | qos: 0 53 | retain: false 54 | entity_category: "config" 55 | icon: "mdi:lightbulb-auto" 56 | 57 | - unique_id: sofar_set_charge 58 | command_topic: "Sofar2mqtt/set/charge" 59 | name: "SOFAR Set Charge" 60 | command_template: "{{ states('input_number.input_house_charge_watts')|int }}" 61 | qos: 0 62 | retain: false 63 | entity_category: "config" 64 | icon: "mdi:battery-positive" 65 | 66 | - unique_id: sofar_set_discharge 67 | command_topic: "Sofar2mqtt/set/discharge" 68 | name: "SOFAR Set Discharge" 69 | command_template: "{{ states('input_number.input_house_discharge_watts')|int }}" 70 | qos: 0 71 | retain: false 72 | entity_category: "config" 73 | icon: "mdi:battery-negative" 74 | 75 | 76 | 77 | 78 | #MQTT Sensors 79 | sensor: 80 | #House Sensors 81 | - device_class: "temperature" 82 | state_class: "measurement" 83 | force_update: "true" 84 | icon: "mdi:thermometer" 85 | name: "SOFAR Battery Temperature" 86 | unique_id: "sofar_battery_temp" 87 | unit_of_measurement: "°C" 88 | state_topic: "sofar/battery_temp" 89 | value_template: "{{ value | float }}" 90 | 91 | - state_class: "measurement" 92 | force_update: "true" 93 | icon: "mdi:information-variant" 94 | name: "SOFAR Inverter State" 95 | unique_id: "sofar_inverter_state" 96 | state_topic: "sofar/inverter_state" 97 | 98 | - device_class: "voltage" 99 | state_class: "measurement" 100 | force_update: "true" 101 | icon: "mdi:alpha-v" 102 | name: "SOFAR Grid Voltage" 103 | unique_id: "sofar_grid_voltage" 104 | unit_of_measurement: "V" 105 | state_topic: "sofar/grid_voltage" 106 | value_template: "{{ value | float }}" 107 | 108 | - device_class: "current" 109 | state_class: "measurement" 110 | force_update: "true" 111 | icon: "mdi:alpha-a" 112 | name: "SOFAR Grid Current" 113 | unique_id: "sofar_grid_current" 114 | unit_of_measurement: "A" 115 | state_topic: "sofar/grid_current" 116 | value_template: "{{ value | float }}" 117 | 118 | - device_class: "frequency" 119 | state_class: "measurement" 120 | force_update: "true" 121 | icon: "mdi:sine-wave" 122 | name: "SOFAR Grid Frequency" 123 | unique_id: "sofar_grid_freq" 124 | unit_of_measurement: "Hz" 125 | state_topic: "sofar/grid_freq" 126 | value_template: "{{ value | float }}" 127 | 128 | - device_class: "power" 129 | state_class: "measurement" 130 | force_update: "true" 131 | icon: "mdi:battery-charging-100" 132 | name: "SOFAR Battery Power" 133 | unique_id: "sofar_battery_power" 134 | unit_of_measurement: "W" 135 | state_topic: "sofar/battery_power" 136 | value_template: "{{ value | float }}" 137 | 138 | - device_class: "voltage" 139 | state_class: "measurement" 140 | force_update: "true" 141 | icon: "mdi:alpha-v" 142 | name: "SOFAR Battery Voltage" 143 | unique_id: "sofar_battery_voltage" 144 | unit_of_measurement: "V" 145 | state_topic: "sofar/battery_voltage" 146 | value_template: "{{ value | float }}" 147 | 148 | - device_class: "current" 149 | state_class: "measurement" 150 | force_update: "true" 151 | icon: "mdi:alpha-a" 152 | name: "SOFAR Battery Current" 153 | unique_id: "sofar_battery_current" 154 | unit_of_measurement: "A" 155 | state_topic: "sofar/battery_current" 156 | value_template: "{{ value | float }}" 157 | 158 | - device_class: "battery" 159 | state_class: "measurement" 160 | force_update: "true" 161 | icon: "mdi:battery" 162 | name: "SOFAR Battery SOC" 163 | unique_id: "sofar_batterySOC" 164 | unit_of_measurement: "%" 165 | state_topic: "sofar/batterySOC" 166 | value_template: "{{ value | float }}" 167 | 168 | - state_class: "measurement" 169 | force_update: "true" 170 | icon: "mdi:battery-sync" 171 | name: "SOFAR Battery Cycles" 172 | unique_id: "sofar_battery_cycles" 173 | state_topic: "sofar/battery_cycles" 174 | value_template: "{{ value | float }}" 175 | 176 | - device_class: "power" 177 | state_class: "measurement" 178 | force_update: "true" 179 | icon: "mdi:transmission-tower" 180 | name: "SOFAR Grid Power" 181 | unique_id: "sofar_grid_power" 182 | unit_of_measurement: "W" 183 | state_topic: "sofar/grid_power" 184 | value_template: "{{ value | float }}" 185 | 186 | - device_class: "power" 187 | state_class: "measurement" 188 | force_update: "true" 189 | icon: "mdi:home-import-outline" 190 | name: "SOFAR Load" 191 | unique_id: "sofar_consumption" 192 | unit_of_measurement: "W" 193 | state_topic: "sofar/consumption" 194 | value_template: "{{ value | float }}" 195 | 196 | - device_class: "power" 197 | state_class: "measurement" 198 | force_update: "true" 199 | icon: "mdi:solar-power" 200 | name: "SOFAR Solar PV Generation" 201 | unique_id: "sofar_solarPV" 202 | unit_of_measurement: "W" 203 | state_topic: "sofar/solarPV" 204 | value_template: "{{ value | float }}" 205 | 206 | - device_class: "power" 207 | state_class: "measurement" 208 | force_update: "true" 209 | icon: "mdi:solar-power" 210 | name: "SOFAR Solar PV Generation Array 1" 211 | unique_id: "sofar_solarPVArray1" 212 | unit_of_measurement: "W" 213 | state_topic: "sofar/Solarpv1" 214 | value_template: "{{ value | float }}" 215 | 216 | - device_class: "power" 217 | state_class: "measurement" 218 | force_update: "true" 219 | icon: "mdi:solar-power" 220 | name: "SOFAR Solar PV Generation Array 2" 221 | unique_id: "sofar_solarPVArray2" 222 | unit_of_measurement: "W" 223 | state_topic: "sofar/Solarpv2" 224 | value_template: "{{ value | float }}" 225 | 226 | - device_class: "power" 227 | state_class: "measurement" 228 | force_update: "true" 229 | icon: "mdi:arrow-decision" 230 | name: "SOFAR System IO Power" 231 | unique_id: "sofar_system_io_power" 232 | unit_of_measurement: "W" 233 | state_topic: "sofar/systemIO_power" 234 | value_template: "{{ value | float }}" 235 | 236 | - device_class: "power" 237 | state_class: "measurement" 238 | force_update: "true" 239 | icon: "mdi:solar-power" 240 | name: "SOFAR Solar PV Generation" 241 | unique_id: "sofar_solarPV" 242 | unit_of_measurement: "W" 243 | state_topic: "sofar/solarPV" 244 | value_template: "{{ value | float }}" 245 | 246 | - device_class: "energy" 247 | state_class: "total_increasing" 248 | force_update: "true" 249 | icon: "mdi:solar-power" 250 | name: "SOFAR Today's PV Generation" 251 | unique_id: "sofar_today_generation" 252 | unit_of_measurement: "kWh" 253 | state_topic: "sofar/today_generation" 254 | value_template: "{{ value | float }}" 255 | 256 | - device_class: "energy" 257 | state_class: "total_increasing" 258 | force_update: "true" 259 | icon: "mdi:transmission-tower-export" 260 | name: "SOFAR Today's Feed-In" 261 | unique_id: "sofar_today_export" 262 | unit_of_measurement: "kWh" 263 | state_topic: "sofar/today_export" 264 | value_template: "{{ value | float }}" 265 | 266 | - device_class: "energy" 267 | state_class: "total_increasing" 268 | force_update: "true" 269 | icon: "mdi:transmission-tower-import" 270 | name: "SOFAR Today's Grid Consumption" 271 | unique_id: "sofar_today_import" 272 | unit_of_measurement: "kWh" 273 | state_topic: "sofar/today_import" 274 | value_template: "{{ value | float }}" 275 | 276 | - device_class: "energy" 277 | state_class: "measurement" 278 | force_update: "true" 279 | icon: "mdi:home-import-outline" 280 | name: "SOFAR Today's Load" 281 | unique_id: "sofar_today_consumption" 282 | unit_of_measurement: "kWh" 283 | state_topic: "sofar/today_consumption" 284 | value_template: "{{ value | float }}" 285 | 286 | - device_class: "temperature" 287 | state_class: "measurement" 288 | force_update: "true" 289 | icon: "mdi:thermometer" 290 | name: "SOFAR Inverter Temperature" 291 | unique_id: "sofar_inverter_temp" 292 | unit_of_measurement: "°C" 293 | state_topic: "sofar/inverter_temp" 294 | value_template: "{{ value | float }}" 295 | 296 | - device_class: "temperature" 297 | state_class: "measurement" 298 | force_update: "true" 299 | icon: "mdi:thermometer" 300 | name: "SOFAR Inverter Heatsink Temperature" 301 | unique_id: "sofar_inverter_heatsink_temp" 302 | unit_of_measurement: "°C" 303 | state_topic: "sofar/inverter_heatsink_temp" 304 | value_template: "{{ value | float }}" 305 | 306 | - device_class: "current" 307 | state_class: "measurement" 308 | force_update: "true" 309 | icon: "mdi:alpha-a" 310 | name: "SOFAR PV Current" 311 | unique_id: "sofar_solarPVAmps" 312 | unit_of_measurement: "A" 313 | state_topic: "sofar/solarPVAmps" 314 | value_template: "{{ value | float }}" 315 | 316 | - device_class: "monetary" 317 | state_class: "total_increasing" 318 | force_update: "true" 319 | icon: "mdi:currency-gbp" 320 | name: "SOFAR Today's Total Generation Earned" 321 | unique_id: "sofar_today_total_generation_earned" 322 | unit_of_measurement: "£" 323 | state_topic: "sofar/today_generation" 324 | value_template: "{{(value | float * 0.9345) | round(2)}}" 325 | 326 | - device_class: "monetary" 327 | state_class: "total_increasing" 328 | force_update: "true" 329 | icon: "mdi:currency-gbp" 330 | name: "SOFAR Today's PV Generation Earned" 331 | unique_id: "sofar_today_generation_earned" 332 | unit_of_measurement: "£" 333 | state_topic: "sofar/today_generation" 334 | value_template: "{{(value | float * 0.623) | round(2)}}" 335 | 336 | - device_class: "monetary" 337 | state_class: "total_increasing" 338 | force_update: "true" 339 | icon: "mdi:currency-gbp" 340 | name: "SOFAR Today's Feed-In Earned" 341 | unique_id: "sofar_today_export_earned" 342 | unit_of_measurement: "£" 343 | state_topic: "sofar/today_generation" 344 | value_template: "{{(value | float * 0.3115) | round(2)}}" 345 | 346 | - device_class: "monetary" 347 | state_class: "total_increasing" 348 | force_update: "true" 349 | icon: "mdi:currency-gbp" 350 | name: "SOFAR Today's Grid Consumption Cost" 351 | unique_id: "sofar_today_import_cost" 352 | unit_of_measurement: "£" 353 | state_topic: "sofar/today_import" 354 | value_template: "{{(value | float * 0.16) | round(2)}}" 355 | 356 | - device_class: "power" 357 | state_class: "measurement" 358 | force_update: "true" 359 | icon: "mdi:transmission-tower-import" 360 | name: "SOFAR Grid Power Importing" 361 | unique_id: "sofar_importing_grid_power" 362 | unit_of_measurement: "W" 363 | state_topic: "sofar/importing_grid_power" 364 | value_template: "{{ value | float }}" 365 | 366 | - device_class: "power" 367 | state_class: "measurement" 368 | force_update: "true" 369 | icon: "mdi:transmission-tower-export" 370 | name: "SOFAR Grid Power Exporting" 371 | unique_id: "sofar_exporting_grid_power" 372 | unit_of_measurement: "W" 373 | state_topic: "sofar/exporting_grid_power" 374 | value_template: "{{ value | float }}" 375 | 376 | - device_class: "power" 377 | state_class: "measurement" 378 | force_update: "true" 379 | icon: "mdi:transmission-tower" 380 | name: "SOFAR Grid Power Absolute" 381 | unique_id: "sofar_absolute_grid_power" 382 | unit_of_measurement: "W" 383 | state_topic: "sofar/absolute_grid_power" 384 | value_template: "{{ value | float }}" 385 | 386 | - state_class: "measurement" 387 | force_update: "true" 388 | icon: "mdi:transmission-tower" 389 | name: "SOFAR Grid Status" 390 | unique_id: "sofar_grid_status" 391 | state_topic: "sofar/grid_status" 392 | 393 | - device_class: "power" 394 | state_class: "measurement" 395 | force_update: "true" 396 | icon: "mdi:battery-arrow-up" 397 | name: "SOFAR Battery Power Charging" 398 | unique_id: "sofar_charging_battery_power" 399 | unit_of_measurement: "W" 400 | state_topic: "sofar/charging_battery_power" 401 | value_template: "{{ value | float }}" 402 | 403 | - device_class: "power" 404 | state_class: "measurement" 405 | force_update: "true" 406 | icon: "mdi:battery-arrow-down" 407 | name: "SOFAR Battery Power Discharging" 408 | unique_id: "sofar_discharging_battery_power" 409 | unit_of_measurement: "W" 410 | state_topic: "sofar/discharging_battery_power" 411 | value_template: "{{ value | float }}" 412 | 413 | - device_class: "power" 414 | state_class: "measurement" 415 | force_update: "true" 416 | icon: "mdi:battery-charging" 417 | name: "SOFAR Battery Power Absolute" 418 | unique_id: "sofar_absolute_battery_power" 419 | unit_of_measurement: "W" 420 | state_topic: "sofar/absolute_battery_power" 421 | value_template: "{{ value | float }}" 422 | 423 | - state_class: "measurement" 424 | force_update: "true" 425 | icon: "mdi:battery-sync" 426 | name: "SOFAR Battery Status" 427 | unique_id: "sofar_battery_status" 428 | state_topic: "sofar/battery_status" 429 | 430 | 431 | 432 | 433 | #Sensors 434 | sensor: 435 | #House Helpers 436 | - platform: integration 437 | method: left 438 | unit_time: h 439 | unit_prefix: k 440 | source: sensor.sofar_battery_power_charging 441 | name: "SOFAR Today's Total Battery Charge" 442 | unique_id: "sofar_today_battery_charge" 443 | round: 2 444 | 445 | - platform: integration 446 | method: left 447 | unit_time: h 448 | unit_prefix: k 449 | source: sensor.sofar_battery_power_discharging 450 | name: "SOFAR Today's Total Battery Discharge" 451 | unique_id: "sofar_today_battery_discharge" 452 | round: 2 453 | 454 | 455 | #House Utility Meters 456 | utility_meter: 457 | utility_meter_daily_sofar_battery_charge: 458 | source: sensor.sofar_today_s_total_battery_charge 459 | cycle: daily 460 | name: "SOFAR Utility Meter - Daily Total Battery Charge" 461 | unique_id: "sofar_utility_meter_daily_total_battery_charge" 462 | offset: 0 463 | delta_values: false 464 | net_consumption: false 465 | utility_meter_daily_sofar_battery_discharge: 466 | source: sensor.sofar_today_s_total_battery_discharge 467 | cycle: daily 468 | name: "SOFAR Utility Meter - Daily Total Battery Discharge" 469 | unique_id: "sofar_utility_meter_daily_total_battery_discharge" 470 | offset: 0 471 | delta_values: false 472 | net_consumption: false 473 | utility_meter_daily_sofar_feed_in: 474 | source: sensor.sofar_today_s_feed_in 475 | cycle: daily 476 | name: "SOFAR Utility Meter - Daily Feed-In" 477 | unique_id: "sofar_utility_meter_daily_feed_in" 478 | offset: 0 479 | delta_values: false 480 | net_consumption: false 481 | utility_meter_daily_sofar_grid_consumption: 482 | source: sensor.sofar_today_s_grid_consumption 483 | cycle: daily 484 | name: "SOFAR Utility Meter - Daily Grid Consumption" 485 | unique_id: "sofar_utility_meter_daily_grid_consumption" 486 | offset: 0 487 | delta_values: false 488 | net_consumption: false 489 | utility_meter_daily_sofar_pv_generation: 490 | source: sensor.sofar_today_s_pv_generation 491 | cycle: daily 492 | name: "SOFAR Utility Meter - Daily PV Generation" 493 | unique_id: "sofar_utility_meter_daily_pv_generation" 494 | offset: 0 495 | delta_values: false 496 | net_consumption: false 497 | utility_meter_daily_sofar_load: 498 | source: sensor.sofar_today_s_load 499 | cycle: daily 500 | name: "SOFAR Utility Meter - Daily Load" 501 | unique_id: "sofar_utility_meter_daily_load" 502 | offset: 0 503 | delta_values: false 504 | net_consumption: false 505 | utility_meter_daily_sofar_feed_in_earned: 506 | source: sensor.sofar_today_s_feed_in_earned 507 | cycle: daily 508 | name: "SOFAR Utility Meter - Daily Feed-In Earned" 509 | unique_id: "sofar_utility_meter_daily_feed_in_earned" 510 | offset: 0 511 | delta_values: false 512 | net_consumption: false 513 | utility_meter_daily_sofar_grid_consumption_cost: 514 | source: sensor.sofar_today_s_grid_consumption_cost 515 | cycle: daily 516 | name: "SOFAR Utility Meter - Daily Grid Consumption Cost" 517 | unique_id: "sofar_utility_meter_daily_grid_consumption_cost" 518 | offset: 0 519 | delta_values: false 520 | net_consumption: false 521 | utility_meter_daily_sofar_pv_generation_earned: 522 | source: sensor.sofar_today_s_pv_generation_earned 523 | cycle: daily 524 | name: "SOFAR Utility Meter - Daily PV Generation Earned" 525 | unique_id: "sofar_utility_meter_daily_pv_generation_earned" 526 | offset: 0 527 | delta_values: false 528 | net_consumption: false 529 | utility_meter_daily_sofar_total_generation_earned: 530 | source: sensor.sofar_today_s_total_generation_earned 531 | cycle: daily 532 | name: "SOFAR Utility Meter - Daily Total Generation Earned" 533 | unique_id: "sofar_utility_meter_daily_total_generation_earned" 534 | offset: 0 535 | delta_values: false 536 | net_consumption: false 537 | utility_meter_monthly_sofar_battery_charge: 538 | source: sensor.sofar_today_s_total_battery_charge 539 | cycle: monthly 540 | name: "SOFAR Utility Meter - Monthly Total Battery Charge" 541 | unique_id: "sofar_utility_meter_monthly_total_battery_charge" 542 | offset: 0 543 | delta_values: false 544 | net_consumption: false 545 | utility_meter_monthly_sofar_battery_discharge: 546 | source: sensor.sofar_today_s_total_battery_discharge 547 | cycle: monthly 548 | name: "SOFAR Utility Meter - Monthly Total Battery Discharge" 549 | unique_id: "sofar_utility_meter_monthly_total_battery_discharge" 550 | offset: 0 551 | delta_values: false 552 | net_consumption: false 553 | utility_meter_monthly_sofar_feed_in: 554 | source: sensor.sofar_today_s_feed_in 555 | cycle: monthly 556 | name: "SOFAR Utility Meter - Monthly Feed-In" 557 | unique_id: "sofar_utility_meter_monthly_feed_in" 558 | offset: 0 559 | delta_values: false 560 | net_consumption: false 561 | utility_meter_monthly_sofar_grid_consumption: 562 | source: sensor.sofar_today_s_grid_consumption 563 | cycle: monthly 564 | name: "SOFAR Utility Meter - Monthly Grid Consumption" 565 | unique_id: "sofar_utility_meter_monthly_grid_consumption" 566 | offset: 0 567 | delta_values: false 568 | net_consumption: false 569 | utility_meter_monthly_sofar_pv_generation: 570 | source: sensor.sofar_today_s_pv_generation 571 | cycle: monthly 572 | name: "SOFAR Utility Meter - Monthly PV Generation" 573 | unique_id: "sofar_utility_meter_monthly_pv_generation" 574 | offset: 0 575 | delta_values: false 576 | net_consumption: false 577 | utility_meter_monthly_sofar_load: 578 | source: sensor.sofar_today_s_load 579 | cycle: monthly 580 | name: "SOFAR Utility Meter - Monthly Load" 581 | unique_id: "sofar_utility_meter_monthly_load" 582 | offset: 0 583 | delta_values: false 584 | net_consumption: false 585 | utility_meter_monthly_sofar_feed_in_earned: 586 | source: sensor.sofar_today_s_feed_in_earned 587 | cycle: monthly 588 | name: "SOFAR Utility Meter - Monthly Feed-In Earned" 589 | unique_id: "sofar_utility_meter_monthly_feed_in_earned" 590 | offset: 0 591 | delta_values: false 592 | net_consumption: false 593 | utility_meter_monthly_sofar_grid_consumption_cost: 594 | source: sensor.sofar_today_s_grid_consumption_cost 595 | cycle: monthly 596 | name: "SOFAR Utility Meter - Monthly Grid Consumption Cost" 597 | unique_id: "sofar_utility_meter_monthly_grid_consumption_cost" 598 | offset: 0 599 | delta_values: false 600 | net_consumption: false 601 | utility_meter_monthly_sofar_pv_generation_earned: 602 | source: sensor.sofar_today_s_pv_generation_earned 603 | cycle: monthly 604 | name: "SOFAR Utility Meter - Monthly PV Generation Earned" 605 | unique_id: "sofar_utility_meter_monthly_pv_generation_earned" 606 | offset: 0 607 | delta_values: false 608 | net_consumption: false 609 | utility_meter_monthly_sofar_total_generation_earned: 610 | source: sensor.sofar_today_s_total_generation_earned 611 | cycle: monthly 612 | name: "SOFAR Utility Meter - Monthly Total Generation Earned" 613 | unique_id: "sofar_utility_meter_monthly_total_generation_earned" 614 | offset: 0 615 | delta_values: false 616 | net_consumption: false 617 | 618 | 619 | 620 | 621 | 622 | input_number: 623 | input_house_charge_watts: 624 | name: "Input House Charge Watts" 625 | initial: 3000 626 | min: 0 627 | max: 3000 628 | step: 100 629 | mode: slider 630 | icon: "mdi:battery-positive" 631 | input_house_discharge_watts: 632 | name: "Input House Discharge Watts" 633 | initial: 3000 634 | min: 0 635 | max: 3000 636 | step: 100 637 | mode: slider 638 | icon: "mdi:battery-negative" 639 | 640 | 641 | 642 | 643 | #Recorder 644 | # Pointless keeping some values over time 645 | # So looking to keep those we want to chart at any sort of frequency 646 | # Battery charging/discharging, SOC, importing/exporting, load and PV generation 647 | # And also the utility meters as they are supposedly going to keep us aggregate figures by day 648 | 649 | recorder: 650 | exclude: 651 | entities: 652 | - sensor.sofar_battery_current 653 | - sensor.sofar_battery_cycles 654 | - sensor.sofar_battery_power 655 | - sensor.sofar_battery_power_absolute 656 | - sensor.sofar_battery_power_charging 657 | - sensor.sofar_battery_power_discharging 658 | # - sensor.sofar_battery_soc 659 | - sensor.sofar_battery_status 660 | - sensor.sofar_battery_temperature 661 | - sensor.sofar_battery_voltage 662 | - sensor.sofar_grid_current 663 | - sensor.sofar_grid_frequency 664 | - sensor.sofar_grid_power 665 | - sensor.sofar_absolute_grid_power 666 | # - sensor.sofar_exporting_grid_power 667 | # - sensor.sofar_importing_grid_power 668 | - sensor.sofar_grid_status 669 | # - sensor.sofar_grid_voltage 670 | - sensor.sofar_inverter_heatsink_temperature 671 | # - sensor.sofar_inverter_state 672 | - sensor.sofar_inverter_temperature 673 | # - sensor.sofar_load 674 | - sensor.sofar_pv_current 675 | # - sensor.sofar_solar_pv_generation 676 | - sensor.sofar_today_s_battery_charge 677 | - sensor.sofar_today_s_battery_discharge 678 | - sensor.sofar_today_s_feed_in 679 | - sensor.sofar_today_s_feed_in_earned 680 | - sensor.sofar_today_s_grid_consumption 681 | - sensor.sofar_today_s_grid_consumption_cost 682 | - sensor.sofar_today_s_load 683 | - sensor.sofar_today_s_pv_generation 684 | - sensor.sofar_today_s_pv_generation_earned 685 | # - sensor.sofar_today_s_total_generation_earned 686 | # - sensor.sofar_utility_meter_daily_battery_charge 687 | # - sensor.sofar_utility_meter_daily_battery_discharge 688 | # - sensor.sofar_utility_meter_daily_feed_in 689 | # - sensor.sofar_utility_meter_daily_feed_in_earned 690 | # - sensor.sofar_utility_meter_daily_grid_consumption 691 | # - sensor.sofar_utility_meter_daily_grid_consumption_cost 692 | # - sensor.sofar_utility_meter_daily_load 693 | # - sensor.sofar_utility_meter_daily_pv_generation 694 | # - sensor.sofar_utility_meter_daily_pv_generation_earned 695 | # - sensor.sofar_utility_meter_daily_total_generation_earned 696 | 697 | # - input_number.input_house_charge_watts 698 | # - input_number.input_house_discharge_watts -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------