Difference between revisions of "Home Assistant"
Line 16: | Line 16: | ||
Use an MIB browser, I used iReasoning MIB Browser (https://www.ireasoning.com/mibbrowser.shtml) | Use an MIB browser, I used iReasoning MIB Browser (https://www.ireasoning.com/mibbrowser.shtml) | ||
[[File:Ups1.png| | [[File:Ups1.png|900px|center]] | ||
Install and start the iReasoning Browser. Choose "File...Open..." and go to the folder where you stored the CyberPower MIB file and select it. Start by selecting your ip address or localhost as the address in the top right box. In my image below you will see it is connected to 'localhost' since I am running the iReasoning Browser on the same computer the UPS is plugged into. If you are running this on another computer you would have to put in the IP address of the computer attached to the UPS (192.168.1.7 in my case). Easier to just run on the same Windows 10 machine. Note that my HA is running in Docker on a Ubuntu machine elsewhere on my network at 192.168.1.38 but I never need to enter this anywhere to get everything to work. | Install and start the iReasoning Browser. Choose "File...Open..." and go to the folder where you stored the CyberPower MIB file and select it. Start by selecting your ip address or localhost as the address in the top right box. In my image below you will see it is connected to 'localhost' since I am running the iReasoning Browser on the same computer the UPS is plugged into. If you are running this on another computer you would have to put in the IP address of the computer attached to the UPS (192.168.1.7 in my case). Easier to just run on the same Windows 10 machine. Note that my HA is running in Docker on a Ubuntu machine elsewhere on my network at 192.168.1.38 but I never need to enter this anywhere to get everything to work. | ||
Revision as of 11:15, 28 August 2023
CyberPower UPS
Here is my configuration.yaml for a cyberpower and the entities card setup.
First you need to download and install the latest CyberPower Panel Business V4 at https://www.cyberpowersystems.com/products/software/power-panel-business/
I installed this on my Windows 10 computer (IP 192.168.1.7). I disabled Personal Edition of CyberPower in my startup services and installed Version 4 of the Business edition that I downloaded from the link above (ppb440-setup.exe).
You launch CyberPower Business (username : admin , password: admin) and it should automatically find your UPS via the USB port connection.
I went to settings, enabled SNMP v1, and created the public and private groups and linked to 0.0.0.0 which means any computer on my network can query the snmp service. I set these to read/write
Secondly you need to download the latest MIB file from CyberPower at https://www.cyberpowersystems.com/products/software/mib-files/
Note where this is saved, mine was of course in the Windows Downloads folder. Unzip the file, mine was called MIB002-0001-10.mib and I stored it in a folder called "MIB" off the Downloads folder.
Use an MIB browser, I used iReasoning MIB Browser (https://www.ireasoning.com/mibbrowser.shtml)
Install and start the iReasoning Browser. Choose "File...Open..." and go to the folder where you stored the CyberPower MIB file and select it. Start by selecting your ip address or localhost as the address in the top right box. In my image below you will see it is connected to 'localhost' since I am running the iReasoning Browser on the same computer the UPS is plugged into. If you are running this on another computer you would have to put in the IP address of the computer attached to the UPS (192.168.1.7 in my case). Easier to just run on the same Windows 10 machine. Note that my HA is running in Docker on a Ubuntu machine elsewhere on my network at 192.168.1.38 but I never need to enter this anywhere to get everything to work.
It's not super intuitive but start after loading the MIB go down the tree with 'private...enterprises...cps...products...ups' and work your way down the folder tree in the MIB file and you will see lots of OIDs you can use. Double click a 'leaf' on the tree and it will query the OID and return a value. The OID is listed at the bottom left and the values when you double click are shown on the right hand panel.
You can try any of the OIDs to see which work on your UPS, most were OK on my Value II 1600E but if the OID is not supported it will just tell you that.
Note two things. First the OIDs from CyberPower need the ".0" at the end, you cannot use just the OID you see in a viewer. Second, look at the response data, it might be an integer; ticks (e.g. time remaining in my example below); or a series of strings, for example the "Status", which you can then use to develop the value_template in configuration.yaml. I have many examples below.
Then its time to edit the 'sensor' section of your configuration.yaml file.