Sending Notifications to Phones from Home Assistant

As I build out my smart home systems, I have realized that I wanted to be able to push notifications from it to my phone. I have other services that do this through Email, so I wanted to set up something similar with home assistant. I have a list of a few things I would like notifications of, and getting one or two of them off the list will at least prove out my implementation and give me some more capability from my home assistant setup.

Some things to notify me of

  • water leaks
  • washing machine done
  • chest freezer without power
Continue reading “Sending Notifications to Phones from Home Assistant”

Testing the G8 Lens on the Ortur Laser Master 2

I’ve been using the ortur laser master 2 for a while now, and while I had seen plenty of chatter about the G8 lens, I didn’t think it would be that major of an upgrade for me, but I was Very wrong. I recently picked up the G8 to try it out and once it was focused, the beam was tighter than it ever could be with the stock lens. This gave me high hopes for the test cuts.

I ran one cut job on some brown AstroBright paper that I was using a few days ago. With the stock ortur lens, I found that 900 mm/min at 100% power for 2 passes would give a clean cut through and require minimal to no hand work to split the papers apart. For my test with the G8, I started with one pass, and that’s all I needed, everything was perfectly cut apart, no tabs between the pieces, nothing. I did run into one snag with that first test run, some of my cuts were inaccurate, lines not lining up and some corners shifted. I noticed while focusing the lens that it was really loose in the mount. I pulled it out, put 2 wraps of teflon tape around the threads, and put it back in the laser. Second test cut went 100% perfectly, all pieces fell apart, no shifting of lines/corners.

The G8 lens is absolutely worth getting and installing on the ortur laser master 2. The tighter focus will help with both cutting and engraving and let you run the machine faster.

Setting up Z-Wave in Home Assistant on Proxmox

Recently I have ended up with 2 Z-Wave devices in my home, and while the devices work just fine without it enabled, I wanted to mess around with them in home assistant. I’ve seen lots of information on Z-Wave and Zigbee devices and sensors and had been looking at getting some anyway, so I used this as a reason to jump in.

Since I run Home Assistant on a VM via Proxmox, my setup will end up being a bit different than the usual “just plug in the USB Z-Wave controller and go” for those running Home Assistant on a Raspberry Pi or NUC.

Continue reading “Setting up Z-Wave in Home Assistant on Proxmox”

NextCloud “Maintenance” Mode Error Resolution

For a while my NextCloud server decided to stop allowing my phone or desktop to upload to it due to it being in “maintenance mode”, however I could log into the webui with no problems, and nothing in the logs showed it being in maintenance mode. This started to frustrate me as I could find nothing to signify why my clients thought the server couldn’t be used. I tried a number of things:

  • Clearing out the file locks table (there were 600,000 entries in it, and I’m the only user on the server)
  • occ db:add-missing-columns
  • occ db:add-missing-indices
  • occ db:add-missing-primary-keys
    What finally worked:
  • occ files:scan –all

Finally with the files:scan –all it started working again and my app was able to start uploading to the server. If you have a NextCloud server and have been running into “maintenance mode” errors when your server is not in maintenance mode, this is certainly worth trying.

Some GitHub Issues worth checking:

Time Lapse 3d print

I wanted to create a time lapse of a 3D print however I wasn’t sure the best way to do this. I’ve made time lapses using octoprint before, but for that to work, octoprint needed to be the machine driving the printer. I tend to prefer running my Ultimaker from the SD card as I’ve forgotten what all my previous octoprint settings were to get it running as smoothly as the Cura settings from the card. I also wanted to work on a more generic way to create a time lapse.

Continue reading “Time Lapse 3d print”

BlueIris and the No Signal Camera

I recently setup a few new cameras on my BlueIris box, however one camera in particular was giving me problems. I tried a few different configurations and each time I got a no signal error. I could change the IP to another camera and all was well, but this one in particular was angry at me. I could log into the web interface and view the feeds, so I knew it was working, it just had something up in the configuration. I ended up looking at the Blue Iris status UI to see that I was getting about 1.5FPS through with a slightly lower bitrate than the camera was configured to at the time. I updated the camera config to drop the bitrate and voila, signal, smooth video.

The root cause is something in the cable, either too much interference from AC wiring, or an end isn’t as well crimped as it could be. Either way, I got my camera up in my Blue Iris instance and things worked fine after that.

Ortur Laser Master 2 Vacuum Table

The Ortur laser is completely open air, providing no assistance or infrastructure to vent the fumes away. I decided to work on a vacuum table for the laser as the second component to fume management alongside the enclosure. The vacuum table also has some other added benefits when working with thinner materials like paper that may warp up while being cut.

Goals

  • Hold pieces down and prevent them from moving under the pressure of the air assist
  • Pull away smoke and soot from the machine and exhaust it elsewhere
Continue reading “Ortur Laser Master 2 Vacuum Table”

Apt Key Expired in Ubuntu

I was updating my boxes as usual when I encountered an error when trying to run updates on my unifi controller. This lives on a slightly older box (I tried upgrading it at one point and not all the dependencies were supported yet on the newer version), and I ran into an error when running the apt commands. One of the keys was expired for a component needed by the controller. So lets figure out how to update that key so we can update the box once more.

Continue reading “Apt Key Expired in Ubuntu”

Calling HASS API from Various Shells

While working on making my macro pad trigger Home Assistant automations, I found the API would be the easiest way to integrate the systems. Here’s some of my experimenting with the API and how to call it from Linux curl and PowerShell Invoke-WebRequest

Linux Curl

Using the Linux curl command is pretty straight forward.

curl -X POST http://hass.local:8123/api/services/switch/toggle -H 'Authorization: Bearer ABCDEF' -d '{"entity_id": "switch.testsubject_test_subject"}'

PowerShell Invoke-WebRequest

PowerShell is a bit more annoying to get everything right, as Invoke-WebRequest is a bit pickier on its input arguments.

Invoke-WebRequest -Method POST -Uri "http://hass.local:8123/api/services/switch/toggle" -H @{"Authorization"="Bearer ABCDEF"} -Body '{"entity_id": "switch.testsubject_test_subject"}'

Apparently windows has a build of the official Unix curl and tar commands, but my PowerShell prompts all had curl as an alias to Invoke-WebRequest. I did find that if i call curl.exe, it would run the official curl command.

Conclusion

Do be careful when copying and pasting between shells, I found that copying out of the PowerShell prompt and back in would yield an invalid token. This was also encountered in the WSL terminal as well.

The API is pretty straight forward after a little bit of trying things out. The documentation covers the capability but doesn’t have as many examples as I would have liked otherwise.

Resources