DIY – Dirty Optics https://dirtyoptics.com Jack of all trades, Master of none Wed, 09 Sep 2020 05:13:18 +0000 en-US hourly 1 Batrium integration with Home Assistant https://dirtyoptics.com/batrium-integration-with-home-assistant/ https://dirtyoptics.com/batrium-integration-with-home-assistant/#comments Sun, 06 Sep 2020 11:07:39 +0000 https://dirtyoptics.com/?p=54815 The ultimate goal is to be able to monitor my power-wall in the Home Assistant (HA) dashboard. In my case, HA runs on a 10″ android tablet out in the Kitchen. Firstly, I need to throw some recognition to a couple of people. The first being @Wolf. Absolute legend helped me out with some Node-red issues, and basically, without him, the 2-3 days development time would have turned into weeks. A Full list of recognition is at the bottom of the past! Enjoy!

Oh and yes I could have done this whole install on Docker/Portainer and I most likely will go down that route, but for now, this is the down-and-dirty version line by line.

Prerequisites

  • Ubuntu 20.04 LTS Server Installed on a VM or PC.
  • A Batrium Watchmon on the same network as your VM/PC.
  • Node-Red Flow (JSON file) Download Here.
  • Grafana Dashboard (JSON File) Download Here.

Step 1 – Update/Upgrade

Step 2 – Install Grafana

Step 3 – Install InfluxDB and Chronograf

INFLUXDB Install

CHRONOGRAF Install (Not Essential, but good for fault finding.)

CREATE INFLUX DATABASE (For use with Grafana)

Step 4 – Install Node-Red

NODE-RED BOOT ON STARTUP

Step 5 – Configure Node-Red

Once Node-Red is installed we need a few additional packages installed to allow Node-Red to interpret the UDP data coming from the Batrium Watchmon. The 3 packages are:

  • Binary-Parser (Install via Linux CLI)
  • node-red-contrib-influxdb (Installed in Node-Red GUI)
  • node-red-dashboard (Installed in Node-Red GUI)

The latter two items can be installed via the “Manage Palette” function in the Node-Red Settings. The Binary Parser function needs to be installed via the CLI.

Now you need to import the Flow into Node-Red. You can download the flow here. Of note here is that this flow is set up to listen for the Batrium UDP data on port 18542. We opened up this UDP port during the Node-Red install. This flow is also set up for a string of 14 longmons. If you have more as I do, then you will need to edit some of the nodes to reflect this.

 

node-red influx configWe now need to configure a couple of nodes in Node-Red. The main configuration is pointing node-red influx flow to the database we created after we installed influxDB. In this tutorial we created a database called “batrium” and we know that the port for influx is 8086.

 

deploy and debugNow we need to Deploy the Node-Red flow and check the debug tab for any errors. If you see some “TypeErrors” then it is usually because the Binary-Parser was not installed correctly. Also, you can toggle the green msg.payload debug filters on and off to see the data being received in the debug window.

Step 6 – Configure Grafana

We now need to set up Grafana. In a nutshell, we need to do two things. First, add the influxdb data source. Secondly, import the Dashboard that Mr @Wolf has been nice enough to allow us to share. You can find a copy of the JSON file here.

Setup Data Source:

Import Dashboard:

grafana dashboardDepending on your battery type, amount of longmons, etc. you will need to play around with the visualization. If you have come this far I’ll let you figure out your ideal settings.

Step 7 – Configure Home Assistant

We are going to add the Grafana dashboard into Home Assistant using an embed from Grafana. Log back into your Grafana instance and locate the share button on your dashboard.

Find the Grafana Dashboard share/embed tab:

Use the link created in Grafana to create a new entity in HA. I also append the following to my link to ensure it opens in ‘fullscreen’ and ‘kiosk’ mode in HA. &kiosk&fullscreen 

If your dashboard does not show up in HA, read on below to fix.

Dashboard embed fix – From what I have found online, most users report that just enabling the ‘allow_embedding = true’ function sorted the issue. I had to allow anonymous logins also. But that is probably because I have not set up a user in Grafana for Home Assistant. Use the anonymous logins at your own risk.

Well it’s been emotional, thanks for sticking with me. If you find something wrong here let me know and I’ll fix it up asap. I hope it helps and again, thanks to the contributors.

Batrium in Home Assistant

Recognition

https://github.com/Bloats/Powerwall-stuff – Bloats for the original Flow

https://secondlifestorage.com/showthread.php?tid=8645&pid=59143 – Of course, the Second Life Storage Forum!

https://discourse.nodered.org/t/flow-to-decode-binary-data-and-a-walk-through-on-how-to-install-the-npm-module/5174 – Binary-Parser info

https://github.com/daromer2 – For his initial work with the UDP listener!

]]>
https://dirtyoptics.com/batrium-integration-with-home-assistant/feed/ 10
Epoxy Infilled Wooden Flags https://dirtyoptics.com/epoxy-infilled-wooden-flags/ https://dirtyoptics.com/epoxy-infilled-wooden-flags/#respond Mon, 31 Aug 2020 01:30:48 +0000 https://dirtyoptics.com/?p=54753 As some of you may be aware I am trying to fund the batteries for my Electric Vehicle project by selling a few custom made epoxy infilled wooden flags. The motivation for this project also was to have a go at some 3D carving on my CNC and learn how to pour epoxy successfully. Both of which I have never attempted before. After a bit of trial an error I do believe I found a method and end state which look pretty cool!

3D Carved Flag materialsMaterials

Wood – At first I tried to glue and join 2 x flat 19mm pieces of jointed pine together, this turned into an epic failure as the glue did not hold on at the joints and the router eventually chipped away at the carve. Also, weight was an issue here as it made the flag WAY to heavy for the wall. I ended up opting for using a singular piece of 19mm Pine and living with the fact that the waves of flag would not be so deep!

Epoxy – For the epoxy side of things, I did try 3 different types and they all seemed to work. The art epoxy in a 2:1 mix ration was plenty as the pockets I was filling were not too deep.

Epoxy Tip – Make sure you use some kind of sealing agent in the pockets, the porous nature of the Pine meant that you could easily see the ‘bleeding’ of colored epoxy into the wood. I ended up just using clear epoxy to seal the wood after pocketing. This works ok, but you need to make sure you get into all the small crevices thoroughly.

Sanding Pads  – Because I carved the waves of the flag into the wood, a flat disc on the orbital sander was not going to work. I was able to pick up some 15mm foam sanding pad attachments that work with any hook and loop orbital sander. This allows the sanding pad to follow the contour of the flags.

Varnish/Sealer – Depending on the finish you want to achieve you will want to experiment with some different wood finishing products. I have about 5 different types. Including a wax.

 

3D Carved Flag CNC routerCNC Routing the Flags

Though time-consuming, this is actually the easiest part. The problem I had, is that you can not just go ahead and carve the 3D flag into the wood and then fill with epoxy. You need to pocket the flag, then fill with epoxy, let it set, and then do the 3D Carve. If you try to do it in reverse the epoxy will flow out of the areas you want to fill as it is no longer level. This process does waste a bit of epoxy, but the results speak for themselves.

I decided on 2 sizes of flags, 250×500 and 1000×500. The process is the same for each size, however, time on the machine for all tool paths is extended on the larger flag.

 

The Results

No matter the finish I tried to achieve I think all generally turned out pretty good. I ended up with a blue wash flag, a burnt flag, a high gloss flag, and even some flags with presentation plates indented. If you have any other ideas for finishes let me know! I’d be happy to give them a shot.

]]>
https://dirtyoptics.com/epoxy-infilled-wooden-flags/feed/ 0
The most solid DIY outdoor table ever! https://dirtyoptics.com/the-cheapest-most-solid-diy-outdoor-table-ever/ https://dirtyoptics.com/the-cheapest-most-solid-diy-outdoor-table-ever/#respond Thu, 16 Jan 2020 12:52:52 +0000 https://dirtyoptics.com/?p=54551 When was the last time you went shopping for a large outdoor table? How about the prices of them? You’re easily looking at $1000-$2000 for a complete set. Even then, half of them feel flimsy and look like they won’t outlast the Australian summer! ‘So build one yourself then smart -arse’…..ok, challenge accepted.

A few weeks back I had to re-do the benchtop on an outdoor kitchen, I searched high and low for some good solid wood that I could use for the bench. I finally came across a place north of me that sold slabs of victorian ash at a VERY good price. The pieces are not perfect, a few knots here and there, but they are solid.

I actually decided upon the tops before I even decided on the legs. The legs I thought would be the easy part. Just go to bunnings and grab some legs yea…..naaa. These tops came in lengths of 2400 x 641 wide, and I wanted to use two side by side. Bunnings legs were not going to cut it. So after a bit of surfing the Facebook market place I came across an ex-boily who had welded up some frames for similar purposes. His forte certainly was not paining though as it has some really crappy grey sh*t on it that had to go.

Well, that’s enough jabbering on, a picture tells a thousand words. (See Below.)

BOM:

  • 2 x Vic Ash Bench Tops (2400 x 641 ) – $120ea
  • Solid Steel Frame (Facebook marketplace) $150
  • Flappy disks for Grinder (Remove paint) – $7
  • Primer x 2 cans – $24
  • Epoxy Black Satin Paint x 3 Cans – $48
  • Clear-Coat x 2 cans – $24
  • Feast And Weston Weatherproof Stain and Seal – $59

Approx Total: $552 (Haven’t even got the chairs yet…)

Labour Times:

  • Sanding Tops – 120grit, 240 Grit, 400 Grit. – 2-4 hours.
  • Seal – Tops had 3-4 coats with 12 hours between.
  • Light sand between coats with 400 grit sandpaper
  • Strip metal frame – 2-3 hours
  • Paint Frame – 3-4 coats all up. 20min per coat

Approx time: WAY too much

]]>
https://dirtyoptics.com/the-cheapest-most-solid-diy-outdoor-table-ever/feed/ 0
Surframe V2 – Surfboard Photo Frame https://dirtyoptics.com/surframe-v2-surfboard-photo-frame/ https://dirtyoptics.com/surframe-v2-surfboard-photo-frame/#respond Mon, 10 Jun 2019 00:13:26 +0000 https://www.dirtyoptics.com/?p=53590 It’s a Sunday and it’s raining! So why not revisit one of the old projects and see if we could make some improvements! I’ve had these pine panel in the workshop for months and figured it was a good time to do some revisions. Every time I have made a photo frame like this the photo tends to get drowned out. So we went big! 12″ x 28″! That’s 304 mm x 711 mm for us metric minded people. Going that big had me playing with the size of the board and no doubt you can tell by the pics where I made the errors. Can you spot them?

CNC – The lazy man’s router…

The CNC router has served me well. Even though I don’t really do a lot with it, it sure makes cutting 2D items super easy and quick. For this design, I decided to widen the board slightly so that the corners of where the photo and acrylic sit is a bit stronger. I was a bit worried that where the pine is laminated it could split apart. However, after cutting it seems to be pretty strong. The laminated panels I’m using are 450mm wide and somehow, as you can see I managed to cut outside the panel slightly. This was because I got a bit lazy and didn’t measure properly. (I also assumed my ‘zero’ reference points were wider than the cut, obviously not!)

Also, not sure if you have spotted it, but I had to use the ’tile’ function in my CAM software as the router is not long enough. This can be tricky, but having one straight edge is good to slide the panel through. This keeps everything aligned.

Manual Labour

I still have not figured out how to do a beveled edge on my router, so against my will, I did this by hand. This gives the frame a bit more of that actual surfboard feel. It’s the little things that finish it off. Oh, I also sanded a whole lot. 250 grit, 120 grit and even 1200 wet and dry to see if I could get that ultra-smooth look.

okay, okay, so I made two frames…

As you may have noticed I did make two frames. The first was only 12″ x 18″. I felt the picture was drowned out a bit by the board, so I went to the larger format which I think will be a much better setup. The first frame I finished in a clear coat stain. I wanted to try and make the Pine ‘pop’. I am still undecided about this and will try some different stains over the next week or so. Anyhoo, I am sure you are sick of reading my babble so check out the progress pics below.

 

]]>
https://dirtyoptics.com/surframe-v2-surfboard-photo-frame/feed/ 0