Skip to content

Commit

Permalink
Swaped brine in/out
Browse files Browse the repository at this point in the history
Added background pictures
  • Loading branch information
ThermIQ committed Dec 11, 2021
1 parent 3a9ea34 commit b328ad5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
12 changes: 7 additions & 5 deletions custom_components/thermiq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async def async_setup(hass, config):
dbg=conf.get(CONF_MQTT_DBG)
if dbg == True:
conf.cmd_topic = conf.get(CONF_MQTT_NODE) + "/mqtt_dbg"
_LOGGER.debug("MQTT Debug write enabled");
_LOGGER.debug("MQTT Debug write enabled")
else:
conf.cmd_topic = conf.get(CONF_MQTT_NODE) + "/write"
_LOGGER.info("data:" + conf.data_topic)
Expand All @@ -99,6 +99,7 @@ async def async_setup(hass, config):
hass.data[DOMAIN] = {}
hass.data[DOMAIN] = ThermIQ_MQTT(config[DOMAIN])
hass.states.async_set('thermiq_mqtt.time_str','Waiting on '+conf.data_topic)
hass.data[DOMAIN]._data['mqtt_counter']=0

for platform in THERMIQ_PLATFORMS:
_LOGGER.debug("platform:" + platform)
Expand All @@ -109,7 +110,7 @@ async def async_setup(hass, config):
for k,v in reg_id.items():
id_reg[v[0]]=k
hass.states.async_set('thermiq_mqtt.'+v[0],-1)
_LOGGER.debug("id_reg[%s => %s]",v[0],k)
_LOGGER.debug("id_reg[%s] => %s",v[0],k)

# ###
@callback
Expand Down Expand Up @@ -159,7 +160,7 @@ def message_received(message):
hass.data[DOMAIN]._data['rf0']=-1
hass.data[DOMAIN]._data['indr_t']=-1


hass.data[DOMAIN]._data['mqtt_counter']+=1
hass.states.async_set(MSG_RECEIVED_STATE,json_dict['timestamp'])
hass.states.async_set('thermiq_mqtt.time_str',json_dict['time'])
hass.bus.fire("thermiq_mqtt_msg_rec_event", {})
Expand Down Expand Up @@ -222,11 +223,12 @@ def write_id_service(call):
_LOGGER.debug("message.bitmask:[%s]", call.data.get("bitmask"))
_LOGGER.debug("msg:[%s]", msg)

if value != hass.data[DOMAIN]._data[reg]:
if (value != hass.data[DOMAIN]._data[reg]):
hass.data[DOMAIN]._data[reg]=value
hass.states.async_set("thermiq_mqtt."+id_reg[kstore],value)
_LOGGER.debug("set reg[%s]=%d",reg,hass.data[DOMAIN]._data[reg])
hass.async_create_task(hass.components.mqtt.async_publish(conf.cmd_topic, msg,2,False))
if (hass.data[DOMAIN]._data['mqtt_counter']>3):
hass.async_create_task(hass.components.mqtt.async_publish(conf.cmd_topic, msg,2,False))
else:
_LOGGER.debug(
"No need to write"
Expand Down
10 changes: 5 additions & 5 deletions custom_components/thermiq/thermiq_regs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
'supplyline_t' : ['r05', 'temperature', 'ºC', ],
'returnline_t' : ['r06', 'temperature', 'ºC', ],
'boiler_t' : ['r07', 'temperature', 'ºC', ],
'brine_in_t' : ['r08', 'temperature', 'ºC', ],
'brine_out_t' : ['r09', 'temperature', 'ºC', ],
'brine_out_t' : ['r08', 'temperature', 'ºC', ],
'brine_in_t' : ['r09', 'temperature', 'ºC', ],
'cooling_t' : ['r0a', 'temperature', 'ºC', ],
'supply_shunt_t' : ['r0b', 'temperature', 'ºC', ],
'current_consumed_a' : ['r0c', 'sensor', 'A', ],
Expand Down Expand Up @@ -156,8 +156,8 @@
'supplyline_t' : 'Supplyline temp.',
'returnline_t' : 'Returnline temp.',
'boiler_t' : 'Hotwater temp.',
'brine_in_t' : 'Brine out temp.',
'brine_out_t' : 'Brine in temp.',
'brine_out_t' : 'Brine out temp.',
'brine_in_t' : 'Brine in temp.',
'cooling_t' : 'Cooling temp.',
'supply_shunt_t' : 'Supplyline temp., shunt',
'current_consumed_a' : 'Electrical Current',
Expand Down Expand Up @@ -293,8 +293,8 @@
'supplyline_t' : 'ºC',
'returnline_t' : 'ºC',
'boiler_t' : 'ºC',
'brine_in_t' : 'ºC',
'brine_out_t' : 'ºC',
'brine_in_t' : 'ºC',
'cooling_t' : 'ºC',
'supply_shunt_t' : 'ºC',
'current_consumed_a' : 'A',
Expand Down
2 changes: 1 addition & 1 deletion lovelace_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
- entity: sensor.thermiq_returnline_t
- entity: sensor.thermiq_boiler_t
- entity: sensor.thermiq_integral1
- entity: sensor.thermiq_brine_in_t
- entity: sensor.thermiq_brine_out_t
- entity: sensor.thermiq_brine_in_t
- entity: sensor.thermiq_supply_shunt_t
- entity: sensor.thermiq_cooling_t
- entity: sensor.thermiq_supply_pump_speed
Expand Down
Binary file added vp_base.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vp_base_hgwon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vp_base_hw.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b328ad5

Please sign in to comment.