Using it, I am experiencing an error with the SQL Logger of the form:
29 Oct 2020 at 17:44:01
Enabling plugin "miniUniFi 0.0.15"
Starting plugin "miniUniFi 0.0.15" (pid 71581)
Started plugin "miniUniFi 0.0.15"
miniUniFi Starting miniUniFi
miniUniFi new device 2: Starting Device
miniUniFi UniFi Cloud Key Controller G2: Starting Device
SQL Logger Error exception trying to insert row into table device_history_1825415154 ("new device 2") -- unable to modify table
SQL Logger Error ERROR: value "13125719727" is out of range for type integer at character 14741
SQL Logger Error INSERT INTO device_history_1825415154 ("port_table_5_poe_power", "switch_caps_max_aggregate_sessions", "port_table_0_tx_bytes", "port_table_1_op_mode", "port_table_4_tx_bytes", "port_table_8_sfp_serial", "port_table_4_enable", "uplink_type", "port_table_6_full_duplex", "port_table_3_tx_broadcast", "mgmt_network_id", "port_table_1_rx_bytes", "port_table_3_satisfaction", .... [full screen of fields listed]
The issue appears to be that the states causing the issue are defined to Indigo as an integer. This displays correctly in the Indigo custom states. However, the state value is being inserted by SQL Logger into an int field defined for the state in the device history for the device. The value is larger than can be accommodated for an int. It seems a bigint might be required?
According to the PostgreSQL documentation, the maximum value an int field can hold is 2147483647 and these state values exceed that. The state values are a probably lifetime total of tx and rx bytes.
Is there a way round this?