syssi / esphome-apc-ups

ESPHome component to monitor and control a APC UPS via RS232
Apache License 2.0
32 stars 7 forks source link

add last_polling_command #7

Closed ananyevgv closed 10 months ago

ananyevgv commented 10 months ago

I looked through your code, added several sensors (12). changed last_polling_command (27). The sensor polling time has increased. Can the number of sensors (required) be added to the component setup?

apc_ups:

syssi commented 10 months ago

I don't understand your question. There is no sensor required in general. If you add a sensor to your YAML the required command gets added to the list of periodically transmitted commands.

If you want to change the update interval this is the correct configuration parameter:

apc_ups:
  - id: ups0
    uart_id: uart_0
    update_interval: 15s

The default is 1 request per second. (update_interval: 1s)

ananyevgv commented 10 months ago

image

ananyevgv commented 10 months ago

I added the sensors to your code a little bit, and a question arose with the number of sensors and their survey

ananyevgv commented 10 months ago

image

syssi commented 10 months ago

Because of the slow baud rate the slow update interval (1 req/s) is recommended. Some APC UPSs doesn't respond anymore if the client is too fast. Don't try to speed up the update interval.

syssi commented 10 months ago

Are you happy or do you still miss something?