JoseMR
New Member
"UPS like functionality for inverters supporting Solar-Assistant or similar."
Hi, so long story short, well sorta.
I've recently switched from expensive/weak computer oriented UPS devices to a little AIO inverter(posted here) since my homelab grown a bit, while I'm completely satisfied with my choice I've quickly started missing the UPS functionality(NUT) to properly shutdown my ZFS storage/jails server and some other networked machines during battery/battery_low etc. state conditions.
So I've paired my EASun/SRNE AIO with Solar-Assistant and found that nice MQTT broker feature I can use for such purpose, so after some thinkering I've opted to develop a simple shell script to perform said basic UPS functions by using the popular `mosquitto_sub` MQTT broker.
Now I'm happy again that my servers can be auto-shutdown properly and I get an email alert on such event, so I can left them unattended now.
I hope the script may be useful for some, it is hosted on GitHub under the name of `mqtt_ups_sched` for sharing, the script is on beta/test stage.
Hopefully will have some time after new year to improve the little script its functionality.
Sample output:
Regards!
Hi, so long story short, well sorta.
I've recently switched from expensive/weak computer oriented UPS devices to a little AIO inverter(posted here) since my homelab grown a bit, while I'm completely satisfied with my choice I've quickly started missing the UPS functionality(NUT) to properly shutdown my ZFS storage/jails server and some other networked machines during battery/battery_low etc. state conditions.
So I've paired my EASun/SRNE AIO with Solar-Assistant and found that nice MQTT broker feature I can use for such purpose, so after some thinkering I've opted to develop a simple shell script to perform said basic UPS functions by using the popular `mosquitto_sub` MQTT broker.
Now I'm happy again that my servers can be auto-shutdown properly and I get an email alert on such event, so I can left them unattended now.
I hope the script may be useful for some, it is hosted on GitHub under the name of `mqtt_ups_sched` for sharing, the script is on beta/test stage.
Hopefully will have some time after new year to improve the little script its functionality.
Sample output:
Code:
root@mserver: ~# mqtt_ups_sched help
Usage: mqtt_ups_sched [option]
Options:
start Start mqtt_ups_sched script.
stop Stop mqtt_ups_sched sctipt.
stats Display raw device states.
stats_json Display device states in JSON format.
version Display mqtt_ups_sched version.
help Display this help message.
root@nas-mserver: ~# mqtt_ups_sched version
mqtt_ups_sched 1.5.02
root@mserver: ~# mqtt_ups_sched stats
[iSolar-MLV-3KW-U] 2024-01-21 11:26:36 DEVICE STATUS:
solar_assistant/inverter_1/pv_voltage/state 0.0
solar_assistant/inverter_1/grid_frequency/state 60.02
solar_assistant/inverter_1/pv_power/state 0
solar_assistant/inverter_1/battery_voltage/state 27.6
solar_assistant/inverter_1/load_apparent_power/state 331
solar_assistant/inverter_1/temperature/state 50.6
solar_assistant/inverter_1/load_percentage/state 11
solar_assistant/inverter_1/battery_current/state 0.2
solar_assistant/inverter_1/grid_power/state 331
solar_assistant/inverter_1/device_mode/state Grid
solar_assistant/inverter_1/grid_voltage/state 118.2
solar_assistant/inverter_1/ac_output_frequency/state 60.02
solar_assistant/inverter_1/pv_current/state 0.0
solar_assistant/inverter_1/ac_output_voltage/state 118.6
solar_assistant/inverter_1/load_power/state 277
solar_assistant/total/battery_power/state 6
solar_assistant/total/battery_state_of_charge/state 100
solar_assistant/total/bus_voltage/state 333.5
Regards!
Last edited: