{"id":36922,"date":"2021-11-30T10:01:46","date_gmt":"2021-11-30T10:01:46","guid":{"rendered":"https:\/\/www.alananna.co.uk\/blog\/?p=36922"},"modified":"2023-02-27T16:27:05","modified_gmt":"2023-02-27T16:27:05","slug":"building-a-solax-wordpress-plugin","status":"publish","type":"post","link":"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/","title":{"rendered":"Building a Solax WordPress Plugin"},"content":{"rendered":"\n<p>I couldn&#8217;t resist building a Solax WordPress plugin as a project following the <a href=\"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/solar-panels\/\">installation of our new solar panels and battery<\/a>. The Solax Inverter has a Wi-Fi dongle that uploads data to Solax Servers where we can see various stats about the usage on the Solax Cloud portal. There is also a Solax App that allows to to see this on our phones too.<\/p>\n\n\n\n<div class=\"wp-block-jetpack-tiled-gallery aligncenter is-style-rectangular has-rounded-corners-10\"><div class=\"tiled-gallery__gallery\"><div class=\"tiled-gallery__row\"><div class=\"tiled-gallery__col\" style=\"flex-basis:74.65412%\"><figure class=\"tiled-gallery__item\"><a href=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Solax-Cloud.jpg\"><img decoding=\"async\" srcset=\"https:\/\/i1.wp.com\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Solax-Cloud.jpg?strip=info&#038;w=600&#038;ssl=1 600w,https:\/\/i1.wp.com\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Solax-Cloud.jpg?strip=info&#038;w=900&#038;ssl=1 900w\" alt=\"Solax Cloud\" data-height=\"456\" data-id=\"36923\" data-link=\"https:\/\/www.alananna.co.uk\/blog\/?attachment_id=36923\" data-url=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Solax-Cloud.jpg\" data-width=\"900\" src=\"https:\/\/i1.wp.com\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Solax-Cloud.jpg?ssl=1\" data-amp-layout=\"responsive\"\/><\/a><\/figure><\/div><div class=\"tiled-gallery__col\" style=\"flex-basis:25.34588%\"><figure class=\"tiled-gallery__item\"><a href=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/energy-flow.jpg\"><img decoding=\"async\" srcset=\"https:\/\/i1.wp.com\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/energy-flow.jpg?strip=info&#038;w=600&#038;ssl=1 600w\" alt=\"Solax App\" data-height=\"899\" data-id=\"36912\" data-link=\"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/solar-battery-storage-and-force-charging\/energy-flow\/\" data-url=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/energy-flow.jpg\" data-width=\"600\" src=\"https:\/\/i1.wp.com\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/energy-flow.jpg?ssl=1\" data-amp-layout=\"responsive\"\/><\/a><\/figure><\/div><\/div><\/div><\/div>\n\n\n\n<p>That&#8217;s all well and good and the data there is displayed in a nice format for the most part. It does have a few flaws though. <\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>There is no easy way of sharing the data or embedding it into our own website for others to see.<\/li>\n\n\n\n<li>The &#8216;Yield&#8217; that is reported by the Solax data includes any discharge from the battery as well as that from the solar panels. I wanted to know how much the Solar panels themselves were producing.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">The Solax API<\/h2>\n\n\n\n<p>Some of the data is available through a <a href=\"https:\/\/www.eu.solaxcloud.com\/phoebus\/resource\/files\/userGuide\/Solax_API_for_End-user_V1.0.pdf\">Solax API<\/a>. This in itself is fairly limited. Essentially, it is a URL that returns JSON fomatted data via the http protocol. There isn&#8217;t a huge amount of data in the JSON file but it had enough for me to work on. Here&#8217;s an example of the JSON data<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\"exception\":\"Query success!\",\"result\":{\"inverterSN\":\"xxxxxxxxxxx\",\"sn\":\"xxxxxxxxxxx\",\"acpower\":2124.0,\"yieldtoday\":0.8,\"yieldtotal\":116.3,\"feedinpower\":-17.0,\"feedinenergy\":10.19,\"consumeenergy\":299.97,\"feedinpowerM2\":0.0,\"soc\":83.0,\"peps1\":0.0,\"peps2\":null,\"peps3\":null,\"inverterType\":\"3\",\"inverterStatus\":\"102\",\"uploadTime\":\"2021-11-30 08:03:14\",\"batPower\":-2186.0,\"powerdc1\":2.0,\"powerdc2\":0.0,\"powerdc3\":null,\"powerdc4\":null},\"success\":true}<\/pre>\n\n\n\n<p>As you can see, it&#8217;s simply a list of data, some of which is incorrect as far as I was concerned due to point 2 listed above. There was however enough data for me to fix that.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Building a WordPress Plugin<\/h2>\n\n\n\n<p>As our website (that you are reading this on) is based on WordPress I decided it would be a nice little project to build a WordPress plugin that would<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Retrieve the JSON data from the Solax API.<\/li>\n\n\n\n<li>Insert the data into a MySQL database on the webserver.<\/li>\n\n\n\n<li>Manipulate the data to show the figures I was interested in,<\/li>\n\n\n\n<li>Use the data to create some nice looking charts for display on the website.<\/li>\n<\/ol>\n\n\n\n<p>Retrieving the JSON data from the Solax API was relatively straight forward once I allowed access to the Solax server through the webhosts firewall. <\/p>\n\n\n\n<p>Inserting that data into a MySQL database was easy too. The Solax API is updated at 5 minute intervals. I didn&#8217;t want to store the data from every 5 minute update as a separate row in the database though. I thought it would be unnecessary and would soon result in a very large database. Instead I decided that a single row for each day would be sufficient. <\/p>\n\n\n\n<p>So, the first bit of logic was to write a quick script that Inserted a new row into the database for the first entry of the day and then subsequently updated the row for the rest of the day. Relatively straight forward so far. I wanted to know things such as the peak output for the day and the times of first generation and last generation as well. So a few columns were added to the database to store this information and some logic written into the script to calculate the values and update the database accordingly.<\/p>\n\n\n\n<p>With the main database Insert and Update scripts written it was time to set up a Cron Job on the webserver. This would trigger every five minutes and run the script that would retrieve the JSON data and add it to the database.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Building a Plugin<\/h2>\n\n\n\n<p>Next was to make this into a proper plugin for WordPress. This involved creating a settings page within the WordPress admin panel where I (and others if I release it) could enter various settings needed for the plugin to work. This included the Token ID and Serial number needed to communicate with the Solax server. I also added settings to individualise the specifications of a particular solar installation. This included details such as the power of the solar array, the capacity of the battery and such like.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"901\" height=\"525\" src=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Settings-Page.jpg\" alt=\"Plugin Settings Page\" class=\"wp-image-36924\" srcset=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Settings-Page.jpg 901w, https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Settings-Page-200x117.jpg 200w\" sizes=\"auto, (max-width: 901px) 100vw, 901px\" \/><figcaption class=\"wp-element-caption\">Plugin Settings Page<\/figcaption><\/figure>\n\n\n\n<p>These specification numbers would be used to make calculations on the data and draw the various charts.<\/p>\n\n\n\n<p>The plugin itself was a fairly simple affair. Essentially it performed the various calculations, drew the various graphs and then formatted all of this in an easy to read format and was output to a WordPress page via a WordPress ShortCode. <\/p>\n\n\n\n<p>Essentially once installed all someone needed to do was add the parameters to the settings page and insert a Shortcode into a WordPress page and it would all be displayed. Although, saying that I have put some Google Chart code into a custom header for the page so I might need to find out how to incorporate that into the plugin rather than the theme if I&#8217;m going to release it as a plugin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Yield Measurements<\/h2>\n\n\n\n<p>As I mentioned above, I wasn&#8217;t happy with the fact that the Solax &#8216;Yield&#8217; data included any energy discharged from the battery as well as the energy coming from the solar panels. The reason for this is that the measurement for this data point is taken downstream of the inverter rather than downstream of the solar panels. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"832\" height=\"384\" src=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/yield-measurement2.jpg\" alt=\"Solax Yield Measurement\" class=\"wp-image-36913\" srcset=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/yield-measurement2.jpg 832w, https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/yield-measurement2-200x92.jpg 200w\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" \/><figcaption class=\"wp-element-caption\">Solax Yield Measurement<\/figcaption><\/figure>\n\n\n\n<p>If we weren&#8217;t force charging the battery from the grid on cheap rate electricity overnight then this wouldn&#8217;t be an issue because energy in the battery would have come from the solar panels anyway. However, we are (over the winter) force charging the battery from the grid. This allows us to maximise our time using cheap rate electricity when there isn&#8217;t enough solar power to meet our needs. <\/p>\n\n\n\n<p>The problem is, we are putting around 5.22kWh of energy into the battery from the grid each night (90% of its total capacity). This is then measured as &#8216;yield&#8217; when it is discharged. Some days we might actually produce less than 1kWh from the solar panels, but Solax will report the yield as over 6kWh because it includes this 5.22kWh discharged from the battery. I&#8217;ve emailed Solax about this issue with their reporting of the data but haven&#8217;t heard back from them.<\/p>\n\n\n\n<p>It won&#8217;t be an issue when Force Charging is off but at the moment it means that we don&#8217;t have a &#8216;yield&#8217; value that even closely approximates the actual yield from the solar panels. Solax also uses this &#8216;yield&#8217; figure to calculate monthly, yearly and total yields too. All of which will be highly inaccurate when force-charging is on. Fortunately I could fix this to a certain extent in the Plugin I was building.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Data Manipulation<\/h2>\n\n\n\n<p>I therefore added a setting to the settings page that allowed me to register if Force-charging was on or off (unfortunately that isn&#8217;t a piece of data recorded in the Solax API). If force charging is off then I use the Solax &#8216;yield&#8217; data as it should be accurate. I however, if force-charging is on I do some calculations on the yield data to subtract the yield coming from the battery. <\/p>\n\n\n\n<p>As none of this is measured directly I did have to make a few assumptions that might skew the data slightly, but only by a small amount, if at all. The calculation is based on the capacity of the battery, the maximum state of charge reached that day and the current state of charge. I also added a slight adjustment to take into consideration the roundtrip efficiency of charging and discharging. There are of course some small loses during the process of force-charging and discharging which means that what comes out of the battery is actually slightly less than its actual capacity. This roundtrip efficiency adjustment accounts for these. I might even add in a factor that increases this adjustment based on the age of the battery as its performance will of course degrade a little over time.<\/p>\n\n\n\n<p>This is the basic equation,<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/equation-2.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"93\" src=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/equation-2.jpg\" alt=\"Calculation of yield minus the yield from the battery\" class=\"wp-image-36927\" srcset=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/equation-2.jpg 900w, https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/equation-2-200x21.jpg 200w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/a><figcaption class=\"wp-element-caption\">Calculation of yield minus the yield from the battery<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Graphs and Charts<\/h2>\n\n\n\n<p>With much of the maths done it was time to move onto the graphs and charts and some slightly more involved MySQL database queries. The gauges for the live yield from the solar panels and the battery capacity were quite straight forward. I also included the peak power output from the panels that day and the figures from yesterday as a comparison.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"601\" src=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/gauges.jpg\" alt=\"Gauges\" class=\"wp-image-36928\" srcset=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/gauges.jpg 900w, https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/gauges-200x134.jpg 200w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><figcaption class=\"wp-element-caption\">Gauges<\/figcaption><\/figure>\n\n\n\n<p> I wanted to show the daily yields for the current month. I also added the peak power output for each day to this graph.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"548\" src=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Yield-per-day-this-month.jpg\" alt=\"Yield and Peak Power per day this month\" class=\"wp-image-36929\" srcset=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Yield-per-day-this-month.jpg 900w, https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Yield-per-day-this-month-200x122.jpg 200w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><figcaption class=\"wp-element-caption\">Yield and Peak Power per day this month<\/figcaption><\/figure>\n\n\n\n<p>I also wanted to show the average daily yield for each month. I can&#8217;t check this until I have more data but it should show how the daily yield varies throughout the year.<\/p>\n\n\n\n<p>A similar graph was added to the &#8216;<a href=\"https:\/\/www.alananna.co.uk\/blog\/solar-generation\/?action=records\">records and averages page<\/a>&#8216; that will show the average total yield for each calendar month too. Again, until I have more data I can&#8217;t check if this is working as intended.<\/p>\n\n\n\n<p>I also created a little flow diagram to show the flow of energy through the system at any given time.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1466\" height=\"1012\" src=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Flow.jpg\" alt=\"Energy Flow Diagram\" class=\"wp-image-36930\" srcset=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Flow.jpg 1466w, https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Flow-200x138.jpg 200w\" sizes=\"auto, (max-width: 1466px) 100vw, 1466px\" \/><figcaption class=\"wp-element-caption\">Energy Flow Diagram<\/figcaption><\/figure>\n\n\n\n<p>While I was at it I did a few calculations to work out the time of sunrise, sunset and the civil twilight hours for today and yesterday and presented these alongside the times of first and last power generation from the solar panels. I find this kind of interesting!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"457\" src=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Production-Times.jpg\" alt=\"Almanac and Production Times\" class=\"wp-image-36931\" srcset=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Production-Times.jpg 900w, https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Production-Times-200x102.jpg 200w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><figcaption class=\"wp-element-caption\">Almanac and Production Times<\/figcaption><\/figure>\n\n\n\n<p>I also use the yields I&#8217;ve calculated that doesn&#8217;t include the yield from the battery to present daily, monthly, annual and lifetime yield totals that will be much more accurate than those presented by the Solax Cloud or App. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"169\" src=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Totals.jpg\" alt=\"Accurate Totals\" class=\"wp-image-36932\" srcset=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Totals.jpg 900w, https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/Totals-200x38.jpg 200w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><figcaption class=\"wp-element-caption\">More Accurate Totals<\/figcaption><\/figure>\n\n\n\n<p>By comparison at the time of writing, the Solax figures are reporting a daily yield of 1.7kWh (all from the battery), and a Monthly, Annual and Lifetime Yield of 102.1kWh &#8211; almost 3 times as much as we have actually produced!<\/p>\n\n\n\n<p>I&#8217;m quite pleased with it so far and might add some extra analysis pages to it in the future once I have more data. You can see it in action here: <a href=\"https:\/\/www.alananna.co.uk\/blog\/solar-generation\/\">https:\/\/www.alananna.co.uk\/blog\/solar-generation\/<\/a><\/p>\n\n\n\n<p>It all ties in nicely with the <a href=\"https:\/\/www.alananna.co.uk\/blog\/borth-ynyslas-weather-station\/\">Weather Station<\/a> data from our garden also reported on this site. The weather station has over 15 years worth of data and now that we have solar panels I might add a solar radiation sensor to it one day so that I can add the data from it to the Solar Generation pages.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I couldn&#8217;t resist building a Solax WordPress plugin as a project following the installation of our new solar panels and battery. The Solax Inverter has a Wi-Fi dongle that uploads data to Solax Servers where we can see various stats about the usage on the Solax Cloud portal. There is also a Solax App that&#46;&#46;&#46;<\/p>\n","protected":false},"author":1312,"featured_media":36928,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[5],"tags":[1684],"class_list":["post-36922","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-solar"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Building a Solax WordPress Plugin - A Simple Life of Luxury<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building a Solax WordPress Plugin - A Simple Life of Luxury\" \/>\n<meta property=\"og:description\" content=\"I couldn&#8217;t resist building a Solax WordPress plugin as a project following the installation of our new solar panels and battery. The Solax Inverter has a Wi-Fi dongle that uploads data to Solax Servers where we can see various stats about the usage on the Solax Cloud portal. There is also a Solax App that&#046;&#046;&#046;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/\" \/>\n<meta property=\"og:site_name\" content=\"A Simple Life of Luxury\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/justal\/\" \/>\n<meta property=\"article:author\" content=\"http:\/\/www.facebook.com\/justal\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-11-30T10:01:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-27T16:27:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/gauges.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"601\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Alan Cole\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@justalcole\" \/>\n<meta name=\"twitter:site\" content=\"@justalcole\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alan Cole\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2021\\\/11\\\/building-a-solax-wordpress-plugin\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2021\\\/11\\\/building-a-solax-wordpress-plugin\\\/\"},\"author\":{\"name\":\"Alan Cole\",\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/45ecde6c89b31a9e21f97fdde4c21372\"},\"headline\":\"Building a Solax WordPress Plugin\",\"datePublished\":\"2021-11-30T10:01:46+00:00\",\"dateModified\":\"2023-02-27T16:27:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2021\\\/11\\\/building-a-solax-wordpress-plugin\\\/\"},\"wordCount\":1731,\"commentCount\":16,\"publisher\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/45ecde6c89b31a9e21f97fdde4c21372\"},\"image\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2021\\\/11\\\/building-a-solax-wordpress-plugin\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/gauges.jpg\",\"keywords\":[\"Solar\"],\"articleSection\":[\"Technology\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2021\\\/11\\\/building-a-solax-wordpress-plugin\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2021\\\/11\\\/building-a-solax-wordpress-plugin\\\/\",\"url\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2021\\\/11\\\/building-a-solax-wordpress-plugin\\\/\",\"name\":\"Building a Solax WordPress Plugin - A Simple Life of Luxury\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2021\\\/11\\\/building-a-solax-wordpress-plugin\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2021\\\/11\\\/building-a-solax-wordpress-plugin\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/gauges.jpg\",\"datePublished\":\"2021-11-30T10:01:46+00:00\",\"dateModified\":\"2023-02-27T16:27:05+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2021\\\/11\\\/building-a-solax-wordpress-plugin\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2021\\\/11\\\/building-a-solax-wordpress-plugin\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2021\\\/11\\\/building-a-solax-wordpress-plugin\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/gauges.jpg\",\"contentUrl\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/gauges.jpg\",\"width\":900,\"height\":601},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2021\\\/11\\\/building-a-solax-wordpress-plugin\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building a Solax WordPress Plugin\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/\",\"name\":\"A Simple Life of Luxury\",\"description\":\"Tales from a down-shifted family - Making the most of modest means in West Wales\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/45ecde6c89b31a9e21f97fdde4c21372\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/45ecde6c89b31a9e21f97fdde4c21372\",\"name\":\"Alan Cole\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Selfie.jpg\",\"url\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Selfie.jpg\",\"contentUrl\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Selfie.jpg\",\"width\":950,\"height\":713,\"caption\":\"Alan Cole\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Selfie.jpg\"},\"description\":\"Alan is a Freelance Website Designer, Sports &amp; Exercise Science Lab Technician and full time Dad &amp; husband with far too many hobbies: Triathlete, Swimming, Cycling, Running, MTBing, Surfing, Windsurfing, SUPing, Gardening, Photography.... The list goes on.\",\"sameAs\":[\"https:\\\/\\\/www.pixelwave.co.uk\",\"http:\\\/\\\/www.facebook.com\\\/justal\\\/\",\"https:\\\/\\\/x.com\\\/justalcole\"],\"url\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/author\\\/justal123\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building a Solax WordPress Plugin - A Simple Life of Luxury","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/","og_locale":"en_GB","og_type":"article","og_title":"Building a Solax WordPress Plugin - A Simple Life of Luxury","og_description":"I couldn&#8217;t resist building a Solax WordPress plugin as a project following the installation of our new solar panels and battery. The Solax Inverter has a Wi-Fi dongle that uploads data to Solax Servers where we can see various stats about the usage on the Solax Cloud portal. There is also a Solax App that&#46;&#46;&#46;","og_url":"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/","og_site_name":"A Simple Life of Luxury","article_publisher":"http:\/\/www.facebook.com\/justal\/","article_author":"http:\/\/www.facebook.com\/justal\/","article_published_time":"2021-11-30T10:01:46+00:00","article_modified_time":"2023-02-27T16:27:05+00:00","og_image":[{"width":900,"height":601,"url":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/gauges.jpg","type":"image\/jpeg"}],"author":"Alan Cole","twitter_card":"summary_large_image","twitter_creator":"@justalcole","twitter_site":"@justalcole","twitter_misc":{"Written by":"Alan Cole","Estimated reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/#article","isPartOf":{"@id":"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/"},"author":{"name":"Alan Cole","@id":"https:\/\/www.alananna.co.uk\/blog\/#\/schema\/person\/45ecde6c89b31a9e21f97fdde4c21372"},"headline":"Building a Solax WordPress Plugin","datePublished":"2021-11-30T10:01:46+00:00","dateModified":"2023-02-27T16:27:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/"},"wordCount":1731,"commentCount":16,"publisher":{"@id":"https:\/\/www.alananna.co.uk\/blog\/#\/schema\/person\/45ecde6c89b31a9e21f97fdde4c21372"},"image":{"@id":"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/#primaryimage"},"thumbnailUrl":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/gauges.jpg","keywords":["Solar"],"articleSection":["Technology"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/","url":"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/","name":"Building a Solax WordPress Plugin - A Simple Life of Luxury","isPartOf":{"@id":"https:\/\/www.alananna.co.uk\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/#primaryimage"},"image":{"@id":"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/#primaryimage"},"thumbnailUrl":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/gauges.jpg","datePublished":"2021-11-30T10:01:46+00:00","dateModified":"2023-02-27T16:27:05+00:00","breadcrumb":{"@id":"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/#primaryimage","url":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/gauges.jpg","contentUrl":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/gauges.jpg","width":900,"height":601},{"@type":"BreadcrumbList","@id":"https:\/\/www.alananna.co.uk\/blog\/2021\/11\/building-a-solax-wordpress-plugin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.alananna.co.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"Building a Solax WordPress Plugin"}]},{"@type":"WebSite","@id":"https:\/\/www.alananna.co.uk\/blog\/#website","url":"https:\/\/www.alananna.co.uk\/blog\/","name":"A Simple Life of Luxury","description":"Tales from a down-shifted family - Making the most of modest means in West Wales","publisher":{"@id":"https:\/\/www.alananna.co.uk\/blog\/#\/schema\/person\/45ecde6c89b31a9e21f97fdde4c21372"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.alananna.co.uk\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/www.alananna.co.uk\/blog\/#\/schema\/person\/45ecde6c89b31a9e21f97fdde4c21372","name":"Alan Cole","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/06\/Selfie.jpg","url":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/06\/Selfie.jpg","contentUrl":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/06\/Selfie.jpg","width":950,"height":713,"caption":"Alan Cole"},"logo":{"@id":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/06\/Selfie.jpg"},"description":"Alan is a Freelance Website Designer, Sports &amp; Exercise Science Lab Technician and full time Dad &amp; husband with far too many hobbies: Triathlete, Swimming, Cycling, Running, MTBing, Surfing, Windsurfing, SUPing, Gardening, Photography.... The list goes on.","sameAs":["https:\/\/www.pixelwave.co.uk","http:\/\/www.facebook.com\/justal\/","https:\/\/x.com\/justalcole"],"url":"https:\/\/www.alananna.co.uk\/blog\/author\/justal123\/"}]}},"jetpack_featured_media_url":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/11\/gauges.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/posts\/36922","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/users\/1312"}],"replies":[{"embeddable":true,"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=36922"}],"version-history":[{"count":4,"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/posts\/36922\/revisions"}],"predecessor-version":[{"id":38862,"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/posts\/36922\/revisions\/38862"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/media\/36928"}],"wp:attachment":[{"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=36922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=36922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=36922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}