New pentair integration 2021.4

Hello…

1st of all, thank you for this!!

question about this integration…
I notice there are a few things that I am not able to access and wondering if these are something that can be added?

airtemp - is created with this integration, but, there are other temp sensors currently missing

is there a direct sensor for:
pool temp
solar temp
spa temp

there are also a few IntelliChem chemistry settings missing

based on a previous mqtt integration I was using, I was expecting to see availability of the following sensors

Thanx in advance

dave

- platform: mqtt
    name: pentair_pooltemp
    state_topic: pentair/pooltemp/state

  - platform: mqtt
    name: pentair_spatemp
    state_topic: pentair/spatemp/state

  - platform: mqtt
    name: pentair_airtemp
    state_topic: pentair/airtemp/state

  - platform: mqtt
    name: pentair_alkalinity
    state_topic: pentair/alkalinity/state

  - platform: mqtt
    name: pentair_calcium
    state_topic: pentair/calcium/state

  - platform: mqtt
    name: pentair_cyanuricacid
    state_topic: pentair/cyanuricacid/state

  - platform: mqtt
    name: pentair_ph
    state_topic: pentair/ph/state

  - platform: mqtt
    name: pentair_orp
    state_topic: pentair/orp/state

  - platform: mqtt
    name: pentair_saltppm
    state_topic: pentair/saltppm/state

  - platform: mqtt
    name: pentair_saltcellstatus
    state_topic: pentair/saltcellstatus/state

  - platform: mqtt
    name: pentair_saltcelllevel1
    state_topic: pentair/saltcelllevel1/state

  - platform: mqtt
    name: pentair_saltcelllevel2
    state_topic: pentair/saltcelllevel2/state

  - platform: mqtt
    name: pentair_saturation
    state_topic: pentair/saturation/state```
1 Like

I also would like to give a big THANK YOU to whoever put this together.

In my installation I see pool temp as the attribute “current_temperature” under “pool heat”. Likewise, spa temp is “current_temperature” under “spa heat”. I don’t see solar temp anywhere either. As for your chemistry questions, can’t help you there. I don’t have any of that.

1 Like

ah ha… so I would have to set up a template sensor to display those attributes in lovelace.

newish to homeassistant so still learning.

Thanx

What’s interesting is, I used the “Add To Lovelace” button on the Device view and it automatically added 2 temperature gauges that show the pool temp and spa temp attributes, as well as all the entities. Pretty slick.

1 Like

ohhh, I didn’t try it that way… I just added them to my existing card by searching for the sensors and switches… will have to give that a try!

nope, just checked… not there, need to use the attribute method

I have and i9+3s… wonder if that is the difference

but, I do know those items are there, based on another add-on that I have been using

Love this new integration!

I am migrating from the add-on and everything I need seems to be there and working ok except for the lighting commands. The add-on had scripts to run to set the Spa Light to different colors and sequences. I don’t see how to do that with this new integration. Once I can do the light commands, I can uninstall the add-on as well as mqtt!

@bwoodworth @dieselrabbit Any suggestions?

Script example from add-on: Payload number varies for light on, off, colors and sequences:

service: mqtt.publish
data_template:
topic: pentair/light/command
payload: 5

Thanks for the tag @TermiNader . I am the code owner for the screenlogic integration and the creator of the source API (screenlogicpy). I’m really happy people are finding it useful.

@bsp9493 There are no direct sensors for pool temp or spa temp. As @carealtor mentioned, there are climate entities for the pool and spa where the temperature is reported in the current_temperature attribute, and displayed in Lovelace if you use the thermostat card. Currently, if you need a separate sensor entity your have to create a template sensor to reference that value. One thing to note, regardless of if they were a seperate sensor or not, the temperature for the pool or spa are only accurate when that mode is active. ie. the pool temperature is only updated when the controller is in pool mode and the spa temperature is only updated when the pool controller is in spa mode. This is a ScreenLogic limitation as far as I can tell. One thing you can do is use a conditional card in your Lovelace dashboard to only show the thermostat card of the climate entity for the active mode.

As for the solar temperature, that data does not currently exist in the source API library. I don’t have a solar system so that data wasn’t readily available for me to identify and decode. If you can point me to the MQTT implementation you are using, I can take a look and see if I can add it.
Edit: You don’t list solar temperature as one of your previously existing sensors. Does that data exist yet?

I regards to the missing Intellichem data, that is coming! Not a lot of information is out there in regards to decoding the more advanced ScreenLogic responses so it’s been a bit of trial and error. It seems that MQTT implementation supports it, so hopefully I can look at that to help speed things along. My goal is to have these entities added but start as disabled if the pool doesn’t have Intellichem.
Edit: The more detailed salt cell data is not currently part of the Intellichem data query. I can add that to the list.

@TermiNader The color lights and Intellibright commands are coming as well! The most recent version (v0.3.0) of the source API supports it, and I have it working as a custom service in the integration, but there is still some work to do before I can submit it. There are some quirks with the fact that a user can have multiple screenlogic integrations/gateways set up so I need to make sure the maintainers of Home Assistant are ok with how I’ve implemented the service.

Please let me know if you have any other questions.

4 Likes

Here’s what I am using for my Lovelace interface. I have a jacuzzi and no pool. I have two water fountains and yard lights connected to my Pentair. I have scripts that I use to turn the Jacuzzi on and off which include the heater and the temperature settings as well as using the filter pump, booster pump and an air blower for the jacuzzi jets. I have migrated everything over to this new integration except for the colors and Intellibright which are still on mqtt and the add-on. Once I started using the add-on, I discontinued using the physical handheld device that came with the Pentair system since I can access all of this from my phone.

2 Likes

@dieselRabbit

Thanks for integration and looking forward to the enhancements you noted!

I’m very new to HA and need to learn how to customize displays and make templates but no matter what, it looks like I’ll be able to make my pool interface much better than the crappy Pentair Screen Logic app on Android.

1 Like

hi @dieselRabbit

I am also using the MQTT version of pentair add-on, from the following repository. https://github.com/bwoodworth/hassio-addons

on startup after polling the pentair brick it returns the following items for use via mqtt. It has been quite stable and functional and I really appreciate Brians work on this as well.

version=POOL: 5.2 Build 738.0 Rel
pool ok=1
pool active=false
pool temp=48
pool settemp=69
pool heatStatuse=0
pool heatStatuse=off
spa active=false
spa temp=49
spa settemp=0
spa heatStatuse=off
salt ppm=0
pH=7.9
orp=525
saturation=-0.01
air temp=86
freezeMode=0
alarms=1
Number of circuitArray Objects=13
calcium=250
cyanuric acid=30
alkalinity=120
controller is in celsius=false
controllerId=100
pumpCircArray=6,1,0,0,0,0,0,0
Number of bodyArray Objects=13
bodyArray=
circuitId: 500
name: Edge
circuitId: 501
name: Lights
circuitId: 505
name: Pool
circuitId: 540
name: Vacuum
circuitId: 541
name: Pool L
circuitId: 542
name: Pool M
circuitId: 543
name: Pool H
circuitId: 544
name: Edge L
circuitId: 545
name: Edge M
circuitId: 546
name: Edge H
circuitId: 547
name: Pool - CL
circuitId: 548
name: Edge - CL
circuitId: 549
name: Solar On
numPumps=2
pumpID 0 watts=0
pumpID 0 rpms=0
pumpID 0 gpms=0
pumpID 1 watts=0
pumpID 1 rpms=0
pumpID 1 gpms=0
salt cell installed=false
salt cell satus=1
salt cell level 1=3
salt cell level 2=1

1 Like

I’m trying to add the ability to set the pool lights using the service listed in the Pentair integration but running into a problem. I’m still new to HA so don’t know enough to make sure I’m calling the service properly. When I press the button, the following error shows on the screen:

Failed to call service screenlogic/set_color_mode. extra keys not allowed @ data['target']

Here’s a bit of the code I added as a test:

  - title: Pool Light Test
    cards:
      -  type: button
         name: Lights On
         tap_action:
           action: call-service
           service: screenlogic.set_color_mode
           service_data:
             target: switch.pentair_lights
             color_mode: all_on

Appreciate any help!

Thanks

Were you able to get this working? I am having the same issue - can’t figure out how to change color mode.

I was able to get it to work. I was told that going into the Services tab in the Developer Tools page allows you to pick the service and the associated inputs and then click on the Go to YAML mode to see the code for that service. This is what it looks like for that service:

service: screenlogic.set_color_mode
data:
  color_mode: american
target:
  device_id: xxx (generated by HA)

I created scripts for each color mode and this is what it looks like for the party mode:

pool_light_party:
  alias: pool_light_party
  sequence:
  - service: screenlogic.set_color_mode
    target:
      device_id: xxx (generated by HA)
    data:
      color_mode: party
  mode: single

This is the Lovelace button that calls the script:

      - type: vertical-stack
        title: Pool Light Mode
        cards:
        - type: button
          name: Party
          tap_action:
            action: call-service
            service: screenlogic.set_color_mode
            service_data:
              color_mode: party
            target:
              device_id: xxx

It’s functional but the display aesthetics need a lot of help. My dashboard is a work in progress as I learn HA. :grinning: :+1:

I added all the pool controls to the Google Assistant integration so I don’t even have to use the UI anymore - it passes the wife test :slight_smile:

Does anyone know what the Chemistry Alarm sensor is? I don’t have the IntelliChem module but I see it switch from Problem to OK now and again.

Thanks for the latest updates! I have completely removed the old Pentair Add-on as well as MQTT!! All works great!

Hello. Any chance you can share the code for the Pool Light Color dropdown?

Thanks

Sure, although I use Node-Red since I personally find it easier to use. I created a dropdown helper under the Configuration menu to create the list. Then I wired it up to a switch in Node-Red. I am sure there is a much more compact way to do this but I am a Node-Red novice and this works just fine for me.

Here is my flow.

[{"id":"b39ee046.c8145","type":"tab","label":"Pool","disabled":false,"info":""},{"id":"68e5901b.632ff","type":"api-call-service","z":"b39ee046.c8145","name":"Green","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"green\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":20,"wires":[["fa61e19b.2ca3c"]]},{"id":"35a392cd.e2f8ae","type":"server-state-changed","z":"b39ee046.c8145","name":"Set pool light color","server":"1d112e9e.b96771","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_select.pool_light_color","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":110,"y":460,"wires":[["f2b3919a.b4a36"]]},{"id":"f2b3919a.b4a36","type":"switch","z":"b39ee046.c8145","name":"Save","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"green","vt":"str"},{"t":"eq","v":"red","vt":"str"},{"t":"eq","v":"blue","vt":"str"},{"t":"eq","v":"magenta","vt":"str"},{"t":"eq","v":"white","vt":"str"},{"t":"eq","v":"color_swim","vt":"str"},{"t":"eq","v":"party","vt":"str"},{"t":"eq","v":"romance","vt":"str"},{"t":"eq","v":"caribbean","vt":"str"},{"t":"eq","v":"american","vt":"str"},{"t":"eq","v":"sunset","vt":"str"},{"t":"eq","v":"royal","vt":"str"},{"t":"eq","v":"save","vt":"str"},{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"hold","vt":"str"},{"t":"eq","v":"next_mode","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":17,"x":370,"y":460,"wires":[["68e5901b.632ff"],["a3362d5a.32c3e"],["ff0cdd5d.6e3cf"],["9565113e.9ae44"],["293b3813.4975d8"],["3ef610ff.d157"],["4f61e9eb.da8278"],["d0f4159c.4a8d78"],["145891e7.9816ae"],["4d2cf454.acc0dc"],["c234b2b5.6e084"],["ba576fe4.29568"],["decb3ec7.e6f55"],["762676ae.207fe8"],["519edec.71fb22"],["3766e10e.479dee"],["5b0d719b.b5cfb"]]},{"id":"ff0cdd5d.6e3cf","type":"api-call-service","z":"b39ee046.c8145","name":"Blue","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"blue\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":140,"wires":[["fa61e19b.2ca3c"]]},{"id":"a3362d5a.32c3e","type":"api-call-service","z":"b39ee046.c8145","name":"Red","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"red\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":80,"wires":[["fa61e19b.2ca3c"]]},{"id":"9565113e.9ae44","type":"api-call-service","z":"b39ee046.c8145","name":"Magenta","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"magenta\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":640,"y":200,"wires":[["fa61e19b.2ca3c"]]},{"id":"293b3813.4975d8","type":"api-call-service","z":"b39ee046.c8145","name":"White","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"white\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":260,"wires":[["fa61e19b.2ca3c"]]},{"id":"3ef610ff.d157","type":"api-call-service","z":"b39ee046.c8145","name":"Color Swim","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"color_swim\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":650,"y":320,"wires":[["fa61e19b.2ca3c"]]},{"id":"4f61e9eb.da8278","type":"api-call-service","z":"b39ee046.c8145","name":"Party","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"party\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":380,"wires":[["fa61e19b.2ca3c"]]},{"id":"d0f4159c.4a8d78","type":"api-call-service","z":"b39ee046.c8145","name":"Romance","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"romance\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":640,"y":440,"wires":[["fa61e19b.2ca3c"]]},{"id":"145891e7.9816ae","type":"api-call-service","z":"b39ee046.c8145","name":"Caribbean","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"caribbean\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":650,"y":500,"wires":[["fa61e19b.2ca3c"]]},{"id":"4d2cf454.acc0dc","type":"api-call-service","z":"b39ee046.c8145","name":"American","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"american\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":640,"y":560,"wires":[["fa61e19b.2ca3c"]]},{"id":"c234b2b5.6e084","type":"api-call-service","z":"b39ee046.c8145","name":"Sunset","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"sunset\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":true,"x":640,"y":620,"wires":[["fa61e19b.2ca3c"]]},{"id":"ba576fe4.29568","type":"api-call-service","z":"b39ee046.c8145","name":"Royal","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"royal\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":680,"wires":[["fa61e19b.2ca3c"]]},{"id":"decb3ec7.e6f55","type":"api-call-service","z":"b39ee046.c8145","name":"Save","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"save\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":740,"wires":[["fa61e19b.2ca3c"]]},{"id":"762676ae.207fe8","type":"api-call-service","z":"b39ee046.c8145","name":"All On","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"all_on\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":800,"wires":[["fa61e19b.2ca3c"]]},{"id":"519edec.71fb22","type":"api-call-service","z":"b39ee046.c8145","name":"Hold","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"hold\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":860,"wires":[["fa61e19b.2ca3c"]]},{"id":"3766e10e.479dee","type":"api-call-service","z":"b39ee046.c8145","name":"Next Mode","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"next_mode\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":650,"y":920,"wires":[["fa61e19b.2ca3c"]]},{"id":"5b0d719b.b5cfb","type":"api-call-service","z":"b39ee046.c8145","name":"All Off","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"screenlogic","service":"set_color_mode","entityId":"switch.pentair_11_11_11_pool","data":"{\"color_mode\":\"all_off\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":980,"wires":[["f124f7fa.a279c8"]]},{"id":"fa61e19b.2ca3c","type":"api-call-service","z":"b39ee046.c8145","name":"Turn on Pool Lights","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.pentair_11_11_11_lights","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1030,"y":420,"wires":[[]]},{"id":"f124f7fa.a279c8","type":"api-call-service","z":"b39ee046.c8145","name":"Turn off Pool Lights","server":"1d112e9e.b96771","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.pentair_11_11_11_lights","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":930,"y":980,"wires":[[]]},{"id":"1ccd241b.65dcec","type":"api-call-service","z":"b39ee046.c8145","name":"All Off","server":"1d112e9e.b96771","version":1,"debugenabled":true,"service_domain":"input_select","service":"select_option","entityId":"input_select.pool_light_color","data":"{\"option\":\"all_off\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":310,"y":760,"wires":[[]]},{"id":"11844ab2.c7d995","type":"server-state-changed","z":"b39ee046.c8145","name":"Set pool light color","server":"1d112e9e.b96771","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.pentair_11_11_11_lights","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":110,"y":760,"wires":[["1ccd241b.65dcec"],[]]},{"id":"1d112e9e.b96771","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true}]
1 Like

Thanks! I don’t use Node Red but will take a look into it. Appreciate your help!

Noticed a few updates ago that pump RPM has disappeared

I still get GPM and Watts, but no RPM

just me, or anyone else notice this?

I’m still hopeful that Solar Temp will become available. I’m currently getting this from my ISY994’s Polyglot for Pentair, but it would be nice to get it directly in HA;s Pentair integration.