crismc/homeassistant_addons

THANK YOU!

Closed this issue · 9 comments

Im buying you a coffee! You have no idea how long ive been trying to get my display to work! After weeks with no luck, you figured it out! THANK YOU SO MUCH!

This is the kit i bought which i can confirm it works flawlessly on Home Assistant OS on RPI4B

https://wiki.52pi.com/index.php?title=ZP-0130-4wire

I do have a question though. My display is 128X64. It is working but if i wanted to modify the code to be able to make the font larger or icons, is that possible?

Thanks very much :) Much appreciated. Makes me happy that my addon can help others.

As for the font and image sizing....
This is a tricky one given how the content is positioned. Resizing the fonts may be possible via the Screens.fonts method, but images haven't been abstracted. Additionally, when resizing, it will likely overflow off the screen. It may be possible to add an encapsulating wrapper to calculate and reposition screen content dynamically, possibly within the draw method, but this could cause quite an overhead making it use an unnecessary amount of service resources - especially for those that wouldn't use the resizing. I will have a ponder on this, but dare say, this one may be a bit more involved. Open to suggestions if anyone has dug into the code and has a better idea for this?

Honestly it looks great as it is so if its that much of a headache, i wouldn't bother. I would be interested in figuring out a way to lower the screen brightness or even turn off option that could be used by an input_boolean toggle or even a light sensor to turn the brightness down or up or off completely.

Im buying you a coffee! You have no idea how long ive been trying to get my display to work! After weeks with no luck, you figured it out! THANK YOU SO MUCH!

This is the kit i bought which i can confirm it works flawlessly on Home Assistant OS on RPI4B

https://wiki.52pi.com/index.php?title=ZP-0130-4wire

Do you have the ability to go to this website and see if you could figure out a way to get the led's in this fan to work as well. Id be willing to pay you if you could figure this out. Im stumped.

Ijust realized the CPU load data does not populate. It's showing 0.000.00%

Ijust realized the CPU load data does not populate. It's showing 0.000.00%

Interesting. What happens if in a bash terminal you run
top -bn1 | grep load

Can you confirm what OS you're running on the RPi?

Do you have the ability to go to this website and see if you could figure out a way to get the led's in this fan to work as well. Id be willing to pay you if you could figure this out. Im stumped.

Looking at the specs of this rig, the fan appears to use the GPIO. As HomeAssistant discontinued support for this, this may be pretty involved, and outside the scope of this repo (which uses I2C).
There do appear to be some HA addons which do get around it, and allow access to GPIO controlling fan speeds and lights etc, but as I dont have a fan similar in nature, I'm unable to verify if any of these work. This would indeed be a separate project and repo if it involves any dev effort, but don't think I have the bandwidth for undertaking this task currently.

However, in looking through the supporting repo for the ZP-0130-4wire, located here: https://github.com/rm-hull/luma.examples.git, there do seem to be a nice collection of OLED screens, which are well made and nicely abstracted. So if they don't already work on a HA distribution, think this may be convertible. When I get capacity, and buy a 128x64 display, I may look at forking this repo to work in HA.

Ijust realized the CPU load data does not populate. It's showing 0.000.00%

Interesting. What happens if in a bash terminal you run top -bn1 | grep load

Can you confirm what OS you're running on the RPi?

Found it. Silly mistake.
Command being run was this:
top -bn1 | grep load | awk '{printf "%.2f", $(NF-2)}'

should be this (load should be Load):
top -bn1 | grep Load | awk '{printf "%.2f", $(NF-2)}'

Created a new issue specific to the CPU load #4 and rolled out an update