#Hi all I want to send a negative value

1 messages · Page 1 of 1 (latest)

jovial briar
opaque arch
#

what are you trying to do exactly?

jovial briar
#

I want to charge/discharge a Battery through an inverter. The Inverter has a modbus adress that accepts positive values to discharge to grid, negative to charge from grid

#

discharge works as expected, cant enter negative values through HA to start charging from grid when the dynamic tariff is low

#

not sure if relevant, but in order to discharge with 1000 Watts i need to send 2 values 0, 1000. let me make a screenshot. I found that example on the forum and it was the only time it worked because the modbus adress is two 16bit integers or something like that

jovial briar
#

i found a solution

#

65535, 64536 to set negative 1000

opaque arch
#

oh very nice

#

I think it depends on the register you're writing to whether negative values are allowed or not

#

some have unsigned type, some signed