Greg
animals brewing
food and drink gardening
general health
history language
music multimedia
opinion photography
politics Stones Road house
technology
Greg's diary
recent entries
Translate this page
Select day in April 2019:
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Select month:
2018 May Jun Jul Aug
2018 Sep Oct Nov Dec
2019 Jan Feb Mar Apr
Today's diary entry
Diary index
About this diary
Greg's home page
Greg's photos
Network link stats
Greg's other links
Copyright information
    
Groogle

Monday, 22 April 2019 Dereel Images for 22 April 2019
Top of page
next day
last day

Cracking the inverter data
Topic: technology, Stones Road house Link here

Yesterday I investigated sniffing the traffic between the inverter and a web browser, in the assumption that it would be easier than recreating the requests needed for communicating directly with the inverter. But Jamie Fraser and Daniel O'Connor (on IRC) saw it differently. Jamie suggested using the developer tools (F12 on most browsers, it seems). I've seen them before, but never used them in earnest, especially not to analyse HTTP streams. OK, try it out:


This should be devtools-1.png.  Is it missing?
Image title: devtools 1          Dimensions:          1188 x 979, 171 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Monday, 22 April 2019, thumbnails          All images taken on Monday, 22 April 2019, small
Diary entry for Monday, 22 April 2019 Complete exposure details

 


This should be devtools-1-detail.png.  Is it missing?
Image title: devtools 1 detail          Dimensions:          1081 x 250, 126 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Display small version of all images on this page
All images taken on Monday, 22 April 2019, thumbnails          All images taken on Monday, 22 April 2019, small
Diary entry for Monday, 22 April 2019 Complete exposure details

 

That's not immediately obvious, but none of the traffic I'm looking for appears there. Ah, says Daniel, works on Chrome and Safari. OK, find a Chrome and try again. Great improvement. Now I can see the data coming in, and as expected without any GET requests:

 
This should be devtools-2.png.  Is it missing?
Image title: devtools 2
Complete exposure details
Dimensions: 514 x 525, 225 kB
Dimensions of original: 922 x 941, 210 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Monday, 22 April 2019:
thumbnails    small images    diary entry


This should be devtools-2-detail.png.  Is it missing?
Image title: devtools 2 detail          Dimensions:          2114 x 128, 121 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Display small version of all images on this page
All images taken on Monday, 22 April 2019, thumbnails          All images taken on Monday, 22 April 2019, small
Diary entry for Monday, 22 April 2019 Complete exposure details

 

Next, click on the left hand (name) column in the network tab. What column? I don't have no steenking columns. But Daniel did:


This should be f2IFrBH.png.  Is it missing?
Image title: f2IFrBH          Dimensions:          863 x 313, 97 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Display small version of all images on this page
All images taken on Monday, 22 April 2019, thumbnails          All images taken on Monday, 22 April 2019, small
Diary entry for Monday, 22 April 2019 Complete exposure details

 
This should be f2IFrBH-detail.png.  Is it missing?
Image title: f2IFrBH detail          Dimensions:          2104 x 128, 78 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Display small version of all images on this page
All images taken on Monday, 22 April 2019, thumbnails          All images taken on Monday, 22 April 2019, small
Diary entry for Monday, 22 April 2019 Complete exposure details

 

Ah, the console is hiding it all. Remove that and we have:

 
This should be devtools-3.png.  Is it missing?
Image title: devtools 3
Complete exposure details
Dimensions: 514 x 525, 151 kB
Dimensions of original: 922 x 941, 144 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Monday, 22 April 2019:
thumbnails    small images    diary entry


This should be devtools-3-detail.png.  Is it missing?
Image title: devtools 3 detail          Dimensions:          1404 x 192, 80 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Display small version of all images on this page
All images taken on Monday, 22 April 2019, thumbnails          All images taken on Monday, 22 April 2019, small
Diary entry for Monday, 22 April 2019 Complete exposure details

 

That looks a lot better. In particular, the progress bar at the right shows that it's continuous. And sure enough, select it as a curl command, and we're away!

=== grog@eureka (/dev/pts/30) ~ 11 -> curl 'http://inverter.lemis.com/system/events/sse/stream'  -H 'Accept: text/event-stream' -H 'Referer: http://inverter.lemis.com/dashboard/main.html' -H 'Cookie: __utma=51177012.766199467.1486957619.1542435223.1545448630.4; __utmc=51177012; __utmz=51177012.1542145939.2.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); adblk=adblk_no' -H 'Connection: keep-alive' -H 'Cache-Control: no-cache' --compressed
event: /ems/sse/stream
data: { "Devices": [ { "Id": "127.0.0.1:502:1", "Pac": 3704, "SetPoint": 0, "Alarms": "", "Status": "On-grid", "SOC": 100, "VBat": 268, "PacGrid": 0, "PacBat": 0, "PacPV": 3704, "FromPV": false, "Codes": "" }, { "Id": "127.0.0.1:502:1", "W1": -2816, "W2": 0, "W3": 0 } ] }

event: /ems/sse/stream
data: { "Devices": [ { "Id": "127.0.0.1:502:1", "Pac": 3724, "SetPoint": 0, "Alarms": "", "Status": "On-grid", "SOC": 100, "VBat": 268, "PacGrid": 0, "PacBat": -2, "PacPV": 3726, "FromPV": false, "Codes": "" }, { "Id": "127.0.0.1:502:1", "W1": -2805, "W2": 0, "W3": 0 } ] }

Wonderful!

What next? Pipe the data into a database, of course. Daniel has been there before as well, and he has an application, written in python, which collects the data, puts it in a database and even generates graphics. Took a look at it and was discouraged: it's relatively long, and my Python-fu is not really up to it. There must be a simpler, if kludgier, way.


Autumn lily
Topic: gardening Link here

Walking the dogs today, found this flower:

 
This should be Autumn-lily.jpeg.  Is it missing?
Image title: Autumn lily
Display location on map
Complete exposure details
Dimensions: 600 x 450, 139 kB
Dimensions of original: 5184 x 3888, 4384 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Monday, 22 April 2019:
thumbnails    small images    diary entry

I'm sure I've seen this one before, but it's worth identifying: it's a time of year when not much is flowering. Maybe I should find a few autumn-flowering bulbs.


Tuesday, 23 April 2019 Dereel Images for 23 April 2019
Top of page
previous day

Australian building standards
Topic: Stones Road house, opinion Link here

Coming out of the bedroom this morning, caught my sleeve on the door catch, tearing it off the door frame:

 
This should be Door-furniture-3.jpeg.  Is it missing?
Image title: Door furniture 3
Complete exposure details
Dimensions: 600 x 450, 179 kB
Dimensions of original: 5184 x 3888, 5583 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Tuesday, 23 April 2019:
thumbnails    small images    diary entry
 
This should be Door-furniture-2.jpeg.  Is it missing?
Image title: Door furniture 2
Complete exposure details
Dimensions: 450 x 600, 95 kB
Dimensions of original: 3888 x 5186, 4977 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Tuesday, 23 April 2019:
thumbnails    small images    diary entry

That's not the first time. Last time I tore my shirt apart. The other side just sticks out into the room, asking to catch on something:

 
This should be Door-furniture-4.jpeg.  Is it missing?
Image title: Door furniture 4
Complete exposure details
Dimensions: 600 x 450, 106 kB
Dimensions of original: 5184 x 3889, 6279 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Tuesday, 23 April 2019:
thumbnails    small images    diary entry
 
This should be Door-latch-1.jpeg.  Is it missing?
Image title: Door latch 1
Complete exposure details
Dimensions: 440 x 613, 86 kB
Dimensions of original: 1272 x 1773, 486 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Wednesday, 24 April 2019:
thumbnails    small images    diary entry

The real surprise is that it doesn't happen more often.

Why are Australian doors of such poor quality? They don't shut properly, the joiners install them with a 3 cm gap at the bottom, and they have these positively dangerous fittings, though I suspect that JG King have chosen a particularly poor example.


More solar power software insights
Topic: technology, Stones Road house, opinion Link here

More playing around with the solar power data stream today, and managed a partial conversion to an SQL INSERT statement, complicated by my lack of recollection of the syntax. But I'm getting there. The question remains whether I should do a proper parse of the JSON data, but I think I can get by without it. Other questions are more interesting: what do I do with the data? There's one record like this every second:

      data: { "Devices": [ { "Id": "127.0.0.1:502:1", "Pac": 1016, "SetPoint": 0, "Alarms": "", "Status": "On-grid", "SOC": 58, "VBat": 271, "PacGrid": 0, "PacBat": -4450, "PacPV": 5466, "FromPV": false, "Codes": "" }, { "Id": "127.0.0.1:502:1", "W1": -18, "W2": 0, "W3": 0 } ] }

All those numbers appear to fit into 16 bits, but there are quite a few of them. 86,400 of those a day? I have a comparison with my weather database, which has been collecting one record a minute for the last 9 years. I now have 3,800,000 records, and the observations table is 280 MB in size. I can live with that, but with one record a second I would reach that size in a couple of months. For the time being I suppose I should just collect them, but probably I'm going to have to remove records older than a week or so.

And what do the fields mean? I think I have cracked most of them. These ones appear in the once-per-second records:

Identifier       Meaning       Units       Comment
Id       ?       IP address?
Pac       "Power AC"       W       Current house consumption
SetPoint       ?       numeric       Always 0
Alarms             String
Status       Inverter status       String       Only ever seen "On-grid"
SOC       "State of Charge", battery       %
VBat       Battery voltage       V
PacGrid       Power from grid       W       Does not show power to grid
PacBat       Power from battery       W       - means charging
PacPV       Power from PV array       W
FromPV       ?       Boolean       Always false, even when drawing power from PV
Codes       ?             Never seen any set
W1       Power to grid       W       One of three (possible) phases
W2       Power to grid       W       One of three (possible) phases, always 0
W3       Power to grid       W       One of three (possible) phases, always 0

And these appear about once a minute:

Identifier       Meaning       Units       Comment
Id       ?       IP address?       As before
Date       Date and time       String       Format "2019-04-22 13:57:00"
Phase       Phase number on grid       numeric       Always 3 of these, even on a single phase connect
W       Grid power       W       Negative → grid
Pac       "Power AC"       W       PV power input, not current house consumption!
PacDischarge       ?       ?       Always 0
PacCharge       ?       numeric       Digit between 0 and 3
PacPVBatt       ?       numeric       Appears to be close to Pac (power from PV array)
EMS_VBAT       Battery voltage       V       VBat in other record
EMS_SOC       State of charge       %       SOC in other record
WatDigitalInput       ?       numeric
PacRev       ?       numeric
HWOutputs       ?       numeric

Clearly there are a number of contradictions here. Different programmers, or inadequate planning? And does the thing really always output for three phases, or is this a matter of the inverter configuration?


Getting the most from solar power
Topic: general, technology, opinion Link here

I'm quite happy with the amount of power we're saving even at this time of year; the daily reports in triplicate from Spain show that I'm generating between 53% and 66% of my total usage. But it's worth thinking about how to ideally use the power. The algorithm used by the inverter is:

  1. Use power from the PV array first.
  2. If the PV array can't supply enough power, supplement from the battery.
  3. If the battery can't supply enough power, supplement from the grid.

And then there's the other view:

  1. If the PV array can supply more power than needed, charge the battery.
  2. If the battery is charged, feed the power to the grid.

All this appears to make perfect sense. But already there's a first problem: what if the battery is charged and the grid is being supplied at full rate, and there's still a reserve of energy? It gets lost. And from my observations, that happens quite a bit of the time. The second battery, when it comes, will reduce that time, but not eliminate it. So clearly there are things that should be done when the sun is shining, like running dishwashers and washing machines.

And then there's another situation that is even more difficult to understand: should I charge the battery first and only then feed to the grid? Today the battery started charging round 8:00 and was done by 12:00. Then I fed to the grid for a total of about 3 hours, in the process running into the limits. If I had started feeding in to the grid earlier, I would have been able to feed in more, possibly double the quantity, and still charge the battery.

The problem is: I know that now. How could I have known it this morning?


Air-fried Bratwurst again
Topic: food and drink, opinion Link here

Another attempt at “air-fried” Bratwurst today. Based on previous experience, decided to “fry” them hotter and longer, 210° and 15 minutes instead of the 200° for 12 minutes last time. The higher temperature seems to have been a good idea, but it seems that the original time was sufficient. Here before and after:

 
This should be Bratwurst-1.jpeg.  Is it missing?
Image title: Bratwurst 1
Complete exposure details
Dimensions: 600 x 449, 89 kB
Dimensions of original: 5191 x 3888, 3811 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Tuesday, 23 April 2019:
thumbnails    small images    diary entry
 
This should be Bratwurst-3.jpeg.  Is it missing?
Image title: Bratwurst 3
Complete exposure details
Dimensions: 600 x 450, 101 kB
Dimensions of original: 5187 x 3888, 4361 kB
Display this image:
thumbnail    hidden   alone on page
Display all images on this page as:
thumbnails    this size
Show for Tuesday, 23 April 2019:
thumbnails    small images    diary entry

That seems to be a reasonable time from now on. That's a left-over Wiener Schnitzel on the left. Despite the appearance, it tasted very good.


This page contains (roughly) yesterday's and today's entries. I have a horror of reverse chronological documents, so all my diary entries are chronological. This page normally contains the last two days, but if I fall behind it may contain more. You can find older entries in the archive. Note that I often update a diary entry a day or two after I write it.     Do you have a comment about something I have written? This is a diary, not a “blog”, and there is deliberately no provision for directly adding comments. But I welcome feedback and try to reply to all messages I receive. See the diary overview for more details. If you do send me a message relating to something I have written, please indicate whether you'd prefer me not to mention your name. Otherwise I'll assume that it's OK to do so.


Greg's home page This month Greg's photos Greg's links

RSS 2.0 Valid XHTML 1.0!