waterfurnace_aurora 1.4.12 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c4bed015e5efbf7e4ec8dddafc69b15e0134c2b0889f0c50855cf7c1dfbfa38
4
- data.tar.gz: fd869a81144c60fcd019e20117854324b2ca06b66b325dc5991dc9b8d9731277
3
+ metadata.gz: 17aca7ac9e30306139488ac3cf493e783f3d06fe8b676de9a29ac7d953895064
4
+ data.tar.gz: 1b89fc8bd7a3b8746d3f1aec892d84739fcc2c18459207e7a0ef155d27a3a385
5
5
  SHA512:
6
- metadata.gz: 0e45fe5fa6161a9356a179b1da06db3f16eff1494d16871ff325c144f26dee80ea8d15c65bc9a5b9a8a16596c4e4ef41f4c18827797402010d27ea66749b8e81
7
- data.tar.gz: d9a5b40f3b33b43900f09e34cd90cbc8b2a20f2a919746060284adc001e21cb92c7faa334077ee49c2e62564656a6c68072c8a56d04bc57f471506a3591c6b4a
6
+ metadata.gz: 3932ed17dad06d64c7d0bff5cc4438fd0e049f1849129e62edfeeba584fb78076766dffe5c4c70d4c7a7c7b49ccbce1eea0d0649b2e4195dc7231211eae3daff
7
+ data.tar.gz: 24e95b2711a709fbb491731f1f9b65dfb042ba329596428c7caaecf76d9bce65f4393524f5c5113ebda4ec9533248f4f1b607f64016fb1625a43d51230b9b1c7
@@ -2,8 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "aurora"
5
- require "homie-mqtt"
6
- require "mqtt/home_assistant"
5
+ require "mqtt/homie/home_assistant"
7
6
  require "ccutrer-serialport"
8
7
  require "uri"
9
8
  require "optparse"
@@ -584,8 +583,7 @@ class MQTTBridge
584
583
  node.property("enabled",
585
584
  "Enabled",
586
585
  :boolean,
587
- @abc.dhw.enabled,
588
- hass: { switch: { icon: "mdi:water-boiler" } }) do |value|
586
+ @abc.dhw.enabled) do |value|
589
587
  @mutex.synchronize { @abc.dhw.enabled = value }
590
588
  end
591
589
  node.property("running",
@@ -598,27 +596,46 @@ class MQTTBridge
598
596
  :float,
599
597
  @abc.dhw.set_point,
600
598
  format: 100..140,
601
- unit: "°F",
602
- hass: { number: { step: 5 } }) do |value|
599
+ unit: "°F") do |value|
603
600
  @mutex.synchronize { @abc.dhw.set_point = value }
604
601
  end
605
602
  node.property("water-temperature",
606
603
  "Water Temperature",
607
604
  :float,
608
605
  @abc.dhw.water_temperature,
609
- unit: "°F",
610
- hass: { sensor: { device_class: :temperature,
611
- state_class: :measurement } })
606
+ unit: "°F")
607
+ @homie.mqtt.unpublish_hass_switch("dhw_enabled", node_id: @homie.id)
608
+ @homie.mqtt.unpublish_hass_number("dhw_set-point", node_id: @homie.id)
609
+ @homie.mqtt.unpublish_hass_sensor("dhw_water-temperature", node_id: @homie.id)
610
+ node.hass_water_heater(current_temperature_property: "water-temperature",
611
+ mode_property: "enabled",
612
+ modes: %i[off heat_pump],
613
+ mode_command_template: <<~JINJA,
614
+ {% if value == 'off' %}
615
+ false
616
+ {% else %}
617
+ true
618
+ {% endif %}
619
+ JINJA
620
+ mode_state_template: <<~JINJA,
621
+ {% if value == 'true' %}
622
+ heat_pump
623
+ {% elif value == 'false' %}
624
+ off
625
+ {% endif %}
626
+ JINJA
627
+ temperature_property: "set-point",
628
+ icon: "mdi:water-boiler")
612
629
  end
613
630
  end
614
631
 
615
632
  if @abc.humidistat
616
633
  @humidistat = @homie.node("humidistat", "Humidistat", "Humidistat") do |node|
617
634
  if @abc.humidistat.humidifier?
618
- node.property("humidifier-running",
619
- "Humidifier Running",
620
- :boolean,
621
- @abc.humidistat.humidifier_running?)
635
+ running = node.property("humidifier-running",
636
+ "Humidifier Running",
637
+ :boolean,
638
+ @abc.humidistat.humidifier_running?)
622
639
  if @abc.awl_communicating?
623
640
  node.property("humidifier-mode",
624
641
  "Humidifier Mode",
@@ -636,21 +653,22 @@ class MQTTBridge
636
653
  @mutex.synchronize { @abc.humidistat.humidification_target = value }
637
654
  end
638
655
  node.hass_humidifier("humidifier-running",
639
- target_property: "humidification-target",
656
+ target_humidity_property: "humidification-target",
640
657
  mode_property: "humidifier-mode",
641
- id: "humidifier",
658
+ object_id: "humidifier",
642
659
  name: "Humidifier",
643
- device_class: :humidifier)
660
+ device_class: :humidifier,
661
+ command_topic: "#{running.topic}/set")
644
662
  end
645
663
  end
646
664
 
647
665
  # VSDrive can perform active dehumidification, even without a dedicated dehumidifier
648
666
  if @abc.humidistat.dehumidifier? ||
649
667
  @abc.compressor.is_a?(Aurora::Compressor::VSDrive)
650
- node.property("dehumidifier-running",
651
- "Dehumidifier Running",
652
- :boolean,
653
- @abc.humidistat.dehumidifier_running?)
668
+ running = node.property("dehumidifier-running",
669
+ "Dehumidifier Running",
670
+ :boolean,
671
+ @abc.humidistat.dehumidifier_running?)
654
672
  if @abc.awl_communicating?
655
673
  node.property("dehumidifier-mode",
656
674
  "Dehumidifier Mode",
@@ -668,11 +686,12 @@ class MQTTBridge
668
686
  @mutex.synchronize { @abc.humidistat.dehumidification_target = value }
669
687
  end
670
688
  node.hass_humidifier("dehumidifier-running",
671
- target_property: "dehumidification-target",
689
+ target_humidity_property: "dehumidification-target",
672
690
  mode_property: "dehumidifier-mode",
673
- id: "dehumidifier",
691
+ object_id: "dehumidifier",
674
692
  name: "Dehumidifier",
675
- device_class: :dehumidifier)
693
+ device_class: :dehumidifier,
694
+ command_topic: "#{running.topic}/set")
676
695
  end
677
696
  end
678
697
  next unless @abc.awl_communicating?
@@ -819,17 +838,16 @@ class MQTTBridge
819
838
  mode_property: "target-mode",
820
839
  temperature_high_property: "cooling-target-temperature",
821
840
  temperature_low_property: "heating-target-temperature",
822
- templates: {
823
- action_template: <<~JINJA
824
- {% if value.startswith('h') %}
825
- heating
826
- {% elif value.startswith('c') %}
827
- cooling
828
- {% elif value == 'standby' %}
829
- idle
830
- {% endif %}
831
- JINJA
832
- })
841
+ action_template: <<~JINJA
842
+ {% if value.startswith('h') %}
843
+ heating
844
+ {% elif value.startswith('c') %}
845
+ cooling
846
+ {% elif value == 'standby' %}
847
+ idle
848
+ {% endif %}
849
+ JINJA
850
+ )
833
851
  end
834
852
  end
835
853
 
@@ -236,7 +236,7 @@ module Aurora
236
236
  end
237
237
  @outdoor_temperature = registers[31_003]
238
238
  @air_coil_temperature = registers[20]
239
- @locked_out = !registers[25].nobits?(0x8000)
239
+ @locked_out = registers[25].anybits?(0x8000)
240
240
  @current_fault = registers[25] & 0x7fff
241
241
  @derated = (41..46).cover?(@current_fault)
242
242
  @safe_mode = [47, 48, 49, 72, 74].include?(@current_fault)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Aurora
4
- VERSION = "1.4.12"
4
+ VERSION = "1.5.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waterfurnace_aurora
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.12
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-28 00:00:00.000000000 Z
11
+ date: 2025-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ccutrer-serialport
@@ -25,25 +25,25 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: mqtt-homeassistant
28
+ name: mqtt-homie-homeassistant
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.1'
33
+ version: '1.0'
34
34
  - - ">="
35
35
  - !ruby/object:Gem::Version
36
- version: 0.1.5
36
+ version: 1.0.2
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: '0.1'
43
+ version: '1.0'
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 0.1.5
46
+ version: 1.0.2
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: net-telnet-rfc2217
49
49
  requirement: !ruby/object:Gem::Requirement