Hi
Does anyone have the Actron Air Conditioner add-on in HA
I have seen Mike Mcguires one but never implemented it.
My reason for not bothering with it was I still wanted to leave the actron connect app in play externally to my house.
I decided to utilise a combination of reading data locally from the Air-Conditioner itself and sending commands to Actronâs Hosted system.
So this needs a little bit of digging to get some of the information. I also admit that I am still a novice at playing with the Home Assistant thing so please give any improvements you can make.
First thing you will need to do find out the specific information for your Air-Conditioner.
Using chrome (because it is easy) go to Actronâs website and go to the Demo and login with your account details.
Use the chrome menu to open up tools->Developer tools (ctrl+shift+j)
Open up the network tab of the developer tools
Click one of the command buttons (I turned off Zone 1 of 3 for the below command)
you should see something allong the lines of aconnect000000000000000000_0_x_y?user_access_token=somehorrendouslookingstring
click on it and you should see the request url which contains all the information we need for this step.
Request URL:
https://que.actronair.com.au/rest/v0/device/ACONNECT{yourSpecificUnit}?user_access_token={yourSpecificUserAccessToken}
The Request Payload:
{DA: [0, 1, 1, 0, 0, 0, 0, 0]}
For those of you that get bored easily and like to dig further, you can do the same thing for each of the buttons. But I didnât want to replicate the app so you can investigate those bits further and replicate how you want.
Step 2
work out the IP address of your air conditioner
Using the very helpful app on actronâs website go to the settings section, click on airconditioner and it will tell you your IP address of your Air conditioner. (for example I will use 192.168.1.9)
Step 3
You now have all the information you need to replicate what I have done.
For reading data from the air conditioner directly there is either multiple reads and then decoding the JSON for each read for individual sensors, Or you can decode the entire JSON and then use templates.
For reference
6.json is the status information
{"isOn":false,"mode":2,"fanSpeed":2,"setPoint":24.5,"roomTemp_oC":27.4,"isInESP_Mode":false,"fanIsCont":0,"compressorActivity":2,"errorCode":"","individualZoneTemperatures_oC":[null,null,null,null,null,null,null,null],"enabledZones":[0,1,1,0,0,0,0,0],"liveTimer":null}
4.json is the values that the AC has read from the Actron server (useful information for later on)
{"amOn":false,"tempTarget":24.5,"mode":2,"fanSpeed":2,"enabledZones":[0,1,1,0,0,0,0,0]}
Add the below to Configuration.yaml
- platform: rest
resource: http://192.168.1.9/6.json
method: GET
name: InsideTemp_AC
value_template: '{{value_json.roomTemp_oC}}'
unit_of_measurement: "°C"
resource: http://192.168.1.9/6.json
name: ac_status
json_attributes:
- isOn
- setPoint
- fanSpeed
- mode
- isInESP_Mode
- roomTemp_oC
- fanIsCont
- compressorActivity
- enabledZones
- platform: template
sensors:
ac_sts_running:
friendly_name: "AC On"
#unit_of_measurement: ''
value_template: '{{ states.sensor.ac_status.attributes["isOn"] }}'
ac_sts_setpoint:
friendly_name: "AC Current Setpoint"
unit_of_measurement: "°C"
value_template: '{{ states.sensor.ac_status.attributes["setPoint"]}}'
insidetemp_ac:
friendly_name: "Inside Air Temperature"
unit_of_measurement: "°C"
value_template: '{{ states.sensor.ac_status.attributes["roomTemp_oC"] }}'
ac_fan_speed:
friendly_name: "AC Fan Speed"
#unit_of_measurement: ""
value_template: '{{ states.sensor.ac_status.attributes["fanSpeed"]}}'
Cool we now have the data from the Air conditioner. There is more stuff you can get but you get the picture.
Now how do we command the Air Conditioner to do our bidding?
We add the following. The first 2 commands are pretty straightforward. Turn it On and Turn it OFF.
The third command is one that will take a setpoint and write it to actronâs server. See more info below.
rest_command:
turn_ac_on:
url: https://que.actronair.com.au/rest/v0/device/ACONNECT{yourSpecificUnit}?user_access_token={yourSpecificUserAccessToken}
method: put
payload: '{"DA": {"amOn": true} }'
content_type: 'application/json; charset=utf-8'
turn_ac_off:
url: https://que.actronair.com.au/rest/v0/device/ACONNECT{yourSpecificUnit}?user_access_token={yourSpecificUserAccessToken}
method: put
payload: '{"DA": {"amOn": false} }'
content_type: 'application/json; charset=utf-8'
set_ac_setpoint:
url: https://que.actronair.com.au/rest/v0/device/ACONNECT{yourSpecificUnit}?user_access_token={yourSpecificUserAccessToken}
method: put
payload: >
{"DA": {"tempTarget":
{{ new_aircon_sp }}
}}
content_type: 'application/json; charset=utf-8'
I created an internal HA input number to allow me to have a setpoint within Home assistant for me to manipulate to send the commands to the Actron system.
This setpoint is not live updated from the Air conditioner. I havenât done that bit a magic yet to auto update it when the value from the AC changes. I do have a refresh button that does transfer the value from the AC into the internal variable.
input_number:
ha_aircon_sp:
name: Air Conditioner Setpoint Control
initial: 25
min: 20
max: 34
mode: box
unit_of_measurement: "°C"
step: 0.5
icon: mdi:home-thermometer
Next there needs to be some scripts to call the rest services.
Turn AC On
Create Script with Action type âCall Serviceâ then select rest_command.turn_ac_on as the service.
Turn AC off
Create Script with Action type âCall Serviceâ then select rest_command.turn_ac_off as the service.
I have buttons to increase and decrease the internal HA AC setpoint, so I created scripts for this. This increments the setpoint by the âStepâ value in the settings for the variable
Decrease AC Temperature
Create script with action type âCall Serviceâ then select input_number.decrement then select the entity input_number.ha_aircon_sp
Increase AC Temperature
Create script with action type âCall Serviceâ then select input_number.increment then select the entity input_number.ha_aircon_sp
For Reseting the internal setpoint to the current air conditioner setpoint, create a script.
you will need to manually edit the yaml
data_template:
entity_id: input_number.ha_aircon_sp
value: '{{states(''sensor.ac_sts_setpoint'') | float}}'
service: input_number.set_value
For writing the air conditioner setpoint to the actron server you will need to create another script and then edit the yaml
data_template:
new_aircon_sp: '{{states(''input_number.ha_aircon_sp'') | float}}'
service: rest_command.set_ac_setpoint
Now to put it all together onto a page. You can either do it yourself using standard buttons etc. I have all the settings laid out on a page using vertical and horizontal stacks etc so it goes well on a single page that is set up as in panel mode.
Create a vertical stack with the following YAML
cards:
- cards:
- cards:
- entity: script.1580612095306
icon: 'mdi:arrow-up-bold'
icon_height: 60px
name: Up
show_icon: true
show_name: false
tap_action:
action: toggle
type: entity-button
- entities:
- entity: input_number.ha_aircon_sp
name: Control SP
icon_height: 60px
show_icon: true
show_name: true
type: entities
- entity: script.1580612306016
icon: 'mdi:refresh'
icon_height: 60px
name: Reset
show_icon: true
show_name: false
tap_action:
action: toggle
type: entity-button
type: horizontal-stack
- cards:
- entity: script.1580612134575
icon: 'mdi:arrow-down-bold'
icon_height: 60px
name: Down
show_icon: true
show_name: false
tap_action:
action: toggle
type: entity-button
- entities:
- entity: sensor.ac_sts_setpoint
name: Current SP
icon_height: 60px
show_icon: true
show_name: true
type: entities
- entity: script.1580602518504
icon: 'mdi:check'
icon_height: 40px
name: Apply Setpoint
show_icon: true
show_name: true
tap_action:
action: toggle
type: entity-button
type: horizontal-stack
- cards:
- entity: script.1580527413443
icon: 'mdi:fan-off'
icon_height: 60px
name: 'Off'
show_icon: true
show_name: false
tap_action:
action: toggle
type: entity-button
- entity: script.1580527392555
icon: 'mdi:fan'
icon_height: 60px
name: 'On'
show_icon: true
show_name: false
tap_action:
action: toggle
type: entity-button
- entities:
- entity: sensor.ac_sts_running
icon: 'mdi:fan'
name: AC Running
icon_height: 60px
show_icon: true
show_name: true
type: entities
type: horizontal-stack
type: vertical-stack
- entities:
- entity: sensor.insidetemp_ac
icon: 'mdi:thermometer'
name: Current Inside Temp
icon_height: 60px
show_icon: true
show_name: true
type: entities
- entities:
- entity: sensor.ac_sts_setpoint
name: Setpoint
- entity: sensor.insidetemp_ac
name: Temperature
hours_to_show: 10
refresh_interval: 0
type: history-graph
title: AC control
type: vertical-stack
This is a picture of what my final dashboard looks like.
I will add extra items as I have time to implement them.
My goal is to add in:
- Zone control and status
- Mode Selection and status
- 0 = Auto
- 1 = Heat
- 2 = Cool
- 3 = Fan
- Fan Speed Selection and status
- 0 = Low
- 1 = Med
- 2 = High
- Compressor Activity - This is just information
- 0 = Heating
- 1 = Cooling
- 2 = Off
That looks great Keith youâve been busy!
Just be aware that the Air Conditioner unique identifier does change occasionally. As I learnt when mine suddenly stopped working.
In my case the first part remained the same, as it is based on MAC address but the last digit changed. Possibly a version number of some sort.
Thanks very much for the information, i been thinking about this for awhile and also did not want to go down path of not having remote app.
Your details above lead me to this which shoul dhelp decipher the rest of the api
https://que.actronair.com.au/api/
Once i know more iâll post some info on it also.
Cheers
mark
Hi Keith, thank you so much for the work youâre doing getting Actron air conditioners to work with hass. Im not very good with scripts so Iâm not exactly sure how to implement what youâve done so far but Iâm very excited with your progress.
Cheers,
Shaun
Hi Keith,
Quick question for you, I am able to follow along to extract the data required from Chrome Dev Tools, but when it comes to creating the config, i am getting stuck.
On Step 3, you state that we should just add the code to configuration.yaml, but when i do, i get errors. I THINK i have worked out that i need to add the sensor: integration before the - platform: template line so that it codes like this (possibly also have this wrong)
sensor:
- platform: template
sensors:
ac_sts_running:
friendly_name: "AC On"
#unit_of_measurement: ''
value_template: '{{ states.sensor.ac_status.attributes["isOn"] }}'
ac_sts_setpoint:
friendly_name: "AC Current Setpoint"
unit_of_measurement: "°C"
value_template: '{{ states.sensor.ac_status.attributes["setPoint"]}}'
insidetemp_ac:
friendly_name: "Inside Air Temperature"
unit_of_measurement: "°C"
value_template: '{{ states.sensor.ac_status.attributes["roomTemp_oC"] }}'
ac_fan_speed:
friendly_name: "AC Fan Speed"
#unit_of_measurement: ""
value_template: '{{ states.sensor.ac_status.attributes["fanSpeed"]}}'
but I cannot work out what to add before the
- platform: rest
resource: http://10.0.20.171/6.json
method: GET
name: InsideTemp_AC
value_template: '{{value_json.roomTemp_oC}}'
unit_of_measurement: "°C"
resource: http://10.0.20.171/6.json
name: ac_status
json_attributes:
- isOn
- setPoint
- fanSpeed
- mode
- isInESP_Mode
- roomTemp_oC
- fanIsCont
- compressorActivity
- enabledZones
any help would be greatly appreciatedâŚ
Iâll jump onto my system tonight or tomorrow and see if I can replicate the issue. But I am thinking the platform template bit may need to come after the platform rest bit because the template bit references the stuff inside the ac_status.
But iâll have a look at what I have got above the platform:rest
looks like my order of things is
sensor:
-
platform: xxxxx (my inverter for solar)
-
platform: rest (as above)
-
platform: template (as above)
Thankyou for checking.
You will have to excuse my lack of coding ability, I am more of a script copier than a writer⌠once i get it working (after a lot of trial and error) i can normally pick up how it works⌠On that note, I have another question to throw at youâŚ
I have the code working BUT have written it as follows,
Sensor:
- platform: rest
resource: http://10.0.20.171/6.json
method: GET
name: InsideTemp_AC
value_template: '{{value_json.roomTemp_oC}}'
unit_of_measurement: "°C"
- platform: rest
resource: http://10.0.20.171/6.json
method: GET
name: "AC On"
value_template: '{{value_json.isOn}}'
unit_of_measurement: ""
- platform: rest
resource: http://10.0.20.171/6.json
method: GET
name: "AC Current Setpoint"
value_template: '{{value_json.setPoint}}'
unit_of_measurement: "°C"
- platform: rest
resource: http://10.0.20.171/6.json
method: GET
name: "AC Fan Speed"
value_template: '{{value_json.fanSpeed}}'
unit_of_measurement: ""
# - platform: template
# sensors:
# ac_sts_running:
# friendly_name: "AC On"
# #unit_of_measurement: ''
# value_template: '{{ states.sensor.ac_status.attributes["isOn"] }}'
# ac_sts_setpoint:
# friendly_name: "AC Current Setpoint"
# unit_of_measurement: "°C"
# value_template: '{{ states.sensor.ac_status.attributes["setPoint"]}}'
# insidetemp_ac:
# friendly_name: "Inside Air Temperature"
# unit_of_measurement: "°C"
# value_template: '{{ states.sensor.ac_status.attributes["roomTemp_oC"] }}'
# ac_fan_speed:
# friendly_name: "AC Fan Speed"
# #unit_of_measurement: ""
# value_template: '{{ states.sensor.ac_status.attributes["fanSpeed"]}}'
as i was missing entities if i added it as you have it above.
Just so i understand, should i have only used one of the two different sections, ie:
- platform: rest
resource: http://10.0.20.171/6.json
method: GET
name: InsideTemp_AC
value_template: '{{value_json.roomTemp_oC}}'
unit_of_measurement: "°C"
OR
- platform: rest
resource: http://10.0.20.171/6.json
name: ac_status
json_attributes:
- isOn
- setPoint
- fanSpeed
- mode
- isInESP_Mode
- roomTemp_oC
- fanIsCont
- compressorActivity
- enabledZones
- platform: template
sensors:
ac_sts_running:
friendly_name: "AC On"
#unit_of_measurement: ''
value_template: '{{ states.sensor.ac_status.attributes["isOn"] }}'
ac_sts_setpoint:
friendly_name: "AC Current Setpoint"
unit_of_measurement: "°C"
value_template: '{{ states.sensor.ac_status.attributes["setPoint"]}}'
insidetemp_ac:
friendly_name: "Inside Air Temperature"
unit_of_measurement: "°C"
value_template: '{{ states.sensor.ac_status.attributes["roomTemp_oC"] }}'
ac_fan_speed:
friendly_name: "AC Fan Speed"
#unit_of_measurement: ""
value_template: '{{ states.sensor.ac_status.attributes["fanSpeed"]}}'
Slightly off-topic, but people looking for info about the EasyConnect app could head here
Iâve made very small progress toward connecting to that service, but thought people that some EasyConnect users might end up here, and might want to come and help
It looks like the demo is no longer available. Any other methods to get the API?
EDIT:
i found on Log in after I log in to my account using inspector and searching for keyword âapiâ a key that I believe is correct.
After accessing the link it returns this info -
{âtypeâ:âaconnectâ,âserialâ:âACONNECT*******â,âidâ:âms1Ewo4axVAZKvw0c7heHPs4**********************=â,âissuedâ:â2021-11-21T08:25:04.6510578+00:00â,âexpiresâ:â3021-11-21T08:25:04.6510578+00:00â,âdescriptionâ:âActron Connect (ACONNECT******************)â,â_linksâ:{âselfâ:{âhrefâ:â/api/v0/client/ac-systems/ms1Ewo4axVAZKvw0c7heHPs4**********************%3Dâ}}}
I recently got a new Actron Advance system installed but specâd it with their ICUNO-MOD modbus card and the L-series controllers rather than a Neo controller. It was surprisingly easy to get working in home assistant via the modbus climate integration and using a cheap modbus TCP to RTU adapter. If anyone is interested here is my yaml config for it. This option gives full local control direct from HA without any cloud stuff.
modbus:
- type: tcp
host: 192.168.222.243
port: 8887
climates:
- name: Actron Advance
address: 851
precision: 1
scale: 0.1
target_temp_register: 102
max_temp: 30
min_temp: 16
temp_step: 0.5
temperature_unit: C
hvac_onoff_register: 1
hvac_mode_register:
address: 101
values:
#off: 0
auto: 3
cool: 2
heat: 1
fan_only: 4
slave: 1
switches:
- name: Actron Zone1
slave: 1
address: 5001
verify:
address: 5001
input_type: holding
- name: Actron Zone2
slave: 1
address: 5002
verify:
address: 5002
input_type: holding
- name: Actron Zone3
slave: 1
address: 5003
verify:
address: 5003
input_type: holding
- name: Actron Zone4
slave: 1
address: 5004
verify:
address: 5004
input_type: holding
- name: Actron Zone5
slave: 1
address: 5005
verify:
address: 5005
input_type: holding
- name: Actron Zone6
slave: 1
address: 5006
verify:
address: 5006
input_type: holding
- name: Actron Zone7
slave: 1
address: 5007
verify:
address: 5007
input_type: holding
sensors:
- name: Actron WC1
unit_of_measurement: °C
precision: 1
scale: 0.1
slave: 1
address: 6001
- name: Actron WC2
unit_of_measurement: °C
precision: 1
scale: 0.1
slave: 1
address: 6002
- name: Actron WC3
unit_of_measurement: °C
precision: 1
scale: 0.1
slave: 1
address: 6003
- name: Actron Outside
unit_of_measurement: °C
precision: 1
scale: 0.1
slave: 1
address: 852
- name: Actron Indoor
unit_of_measurement: °C
precision: 1
scale: 0.1
slave: 1
address: 851
That is brilliant. Do you have any pictures of your installation? I would like to see how the connections are made between the main controller and BMS / TCP device.
How much did the modbus card cost you? I am in the process of getting an Actron advance unit and they are wanting crazy money for the modbus card, nearly $1000 for supply only.
might be a bit of a stupid question but has anyone researched the ability to potentially use an off the shelf smart thermostat (nest/ecobee etc) as a remote control to send these commands/display this data?
@JoelyMoley Those thermostats are designed for the American market that uses relatively dumb control commands. Typically using basic circuits to send/receive on/off commands.
Typically the RCAC systems in Australia use proprietary data connections to communicate between the control panel and the unit. This allows a lot more 2-way information to be communicated with the controller and other more intelligent operating modes like partial speeds for inverters, zone control etc. It also makes it hard to integrate other controllers. I dont think Actron publish their protocol and havenât seen anyone reverse engineer it.
apologies, absolute HA novice, can i get some more detail as to how this script is created, what the action type is or better yet does someone mind posting their own? managed to get the rest working but caught on this bit! thanks again