Closed abuisine closed 4 months ago
Will come!
Do you plan to correct this on the actual implementation, or are you waiting for the rewrite ?
I am asking because I plan to modulate the boiler from opentherm through the curve offset and would need to go in the negative values.
@abuisine , sorry for the late response. I am currently abroad, leisure time is limited.
I reworked the current development branch with improvements concerning https://github.com/j0ta29/esphome/issues/2 (not finally finished) and this issue (ready to test). See the example below how to use this branch.
As I currently have limited testing possibility (only VPN, but 1500km between me and my boiler) I'm not able to verify that negative values are correctly written to the Viessmann unit. At least reading the values with a sensor
says that it should be okay.
If you are willing to perform a test and give me feedback there are a few points to consider:
text_sensor
s now require a mode
configuration value (one of MAP
, RAW
, DEVICE_INFO
, STATE_INFO
, ...), the configuration value raw
is discontinued.
optolink
's configuration values device_info
and state
are discontinued. Use a text_sensor
with fitting mode
instead (see above).
Example:
external_components:
- source:
type: git
url: https://github.com/j0ta29/esphome
ref: weekly_schedules
components: [ optolink ]
optolink:
protocol: P300
text_sensor:
- platform: optolink
mode: DEVICE_INFO
name: Device info
update_interval: 600s
I will give it a try this WE
Unfortunately I was not able to compile :
src/esphome/components/optolink/number/optolink_number.cpp: In member function 'virtual void esphome::optolink::OptolinkNumber::datapoint_value_changed(uint8_t)':
src/esphome/components/optolink/number/optolink_number.cpp:26:20: error: 'sint8_t' was not declared in this scope
publish_state((sint8_t) state);
^~~~~~~
src/esphome/components/optolink/number/optolink_number.cpp:26:20: note: suggested alternative: 'uint8_t'
publish_state((sint8_t) state);
^~~~~~~
uint8_t
src/esphome/components/optolink/number/optolink_number.cpp: In member function 'virtual void esphome::optolink::OptolinkNumber::datapoint_value_changed(uint16_t)':
src/esphome/components/optolink/number/optolink_number.cpp:34:20: error: 'sint16_t' was not declared in this scope
publish_state((sint16_t) state);
^~~~~~~~
src/esphome/components/optolink/number/optolink_number.cpp:34:20: note: suggested alternative: 'uint16_t'
publish_state((sint16_t) state);
^~~~~~~~
uint16_t
src/esphome/components/optolink/number/optolink_number.cpp: In member function 'virtual void esphome::optolink::OptolinkNumber::datapoint_value_changed(uint32_t)':
src/esphome/components/optolink/number/optolink_number.cpp:42:20: error: 'sint32_t' was not declared in this scope
publish_state((sint32_t) state);
^~~~~~~~
src/esphome/components/optolink/number/optolink_number.cpp:42:20: note: suggested alternative: 'uint32_t'
publish_state((sint32_t) state);
^~~~~~~~
uint32_t
*** [.pioenvs/optolink/src/esphome/components/optolink/number/optolink_number.cpp.o] Error 1
========================= [FAILED] Took 73.45 seconds =========================
For the record I use some numbers in my configuration (which works fine with the usual branch) :
number:
- platform: optolink
name: Reduced room temperature setpoint
unit_of_measurement: °C
address: 0x3307
bytes: 1
min_value: 3
max_value: 37
step: 1
mode: box
icon: "mdi:home-thermometer-outline"
device_class: temperature
update_interval: 120s
- platform: optolink
name: Heating curve level
address: 0x3304
bytes: 1
# min_value: -13 not accepted
min_value: 0
max_value: 40
step: 1
mode: box
icon: "mdi:chart-bell-curve-cumulative"
disabled_by_default: true
device_class: temperature
update_interval: 120s
- platform: optolink
name: Heating curve slope
address: 0x3305
bytes: 1
step: 0.1
div_ratio: 10
min_value: 0.2
max_value: 3.5
mode: box
icon: "mdi:chart-bell-curve-cumulative"
disabled_by_default: true
update_interval: 120s
Which version of ESPHome do you use?
ESPHome 2023.12.5
Okay, I forgot to test the ESP32 platform. Would you give it another try?
Seems to be ok :
I do not have access right now to verify on the boiler itself, and temperatures are too high for the boiler to be heating.
Side notes :
update_interval
to be reduced is quite cool, I would maybe rather use another term than "reduce" which will be interpreted as reduce value => we want to augment the value right, to reduce the pressureIn any case, thanks a lot ! I leave it running as is and will report any issue
Fixed and tested in new release.
Context: Some addresses, while being considered as a
number
, can receive negative values. Example : The heating curveshift
parameter should be settable from -14°C to +40°C.Problem: The current implementation does not allow negative values. Example : The heating curve
shift
parameter is actually limited to the 0°C/+40°C range.