[New Addon] Pentair Screenlogic

Then I believe I have a mqtt problem…

Brian
Let me ask you a question , if you send a message thru mqtt explorer, would you expect screenlogic to change state. See below, I send a message of OFF to circuit/505/command , it shows as off in explorer, but does not change my filter to off

An update, even putting in a mqtt test switch i get the same behavor, so it has to be my mqtt???

First of all, thanks this addon is awesome! I am very new to Home Assistant and the only devices I have so far come from the smartthings integration and this Pentair addon. I have a couple questions, I was hoping someone could help.

  • How do i add a friendly name and change the icon? I am able to customize the smartthings devices but i cant seemt to figure out how to do it for any of the pentair devices.
  • Is it possible to have a sensor that reads the salt output, or maybe something that looks like a dimmer control or something to change the salt chloronation level? For example the pentair app shows 50% output and lets me change that level.
  • I cant seem to control the pump or light from HA. I am able to read the state but i cannot change it. I read through these posts and can only assume its an MQTT problem but i dont see any errors in any of the logs.

Daryl:

This is not my add-on, I am having the same problems

In regard to your first bullet

sensor.pentair_airtemp:
friendly_name: ‘Air Temp’

On the second bullet

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

The third bullet - if you find an answer , please let me know

@darylgibson

Hi Daryl - I’m pretty new to this myself, but as you probably read, this addon will require customizing the configuration.yaml file as linked by @osufnl499 earlier in the thread here, pointing to @krk628’s repository.

So for example, if you want to customize the following entry for the pool temperature sensor:

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

You could do this:

  - platform: mqtt
    name: "Pool Temperature"
    device_class: temperature
    state_topic: pentair/pooltemp/state
    unit_of_measurement: '°F'

That adds a more friendly name. It also categorizes the information from the Pentair equipment as temperature data (device_class), while assigning Fahrenheit (unit_of_measurement).

You can add the Pool Temperature sensor to an entities card by searching for “sensor.pool_temperature”. A thermostat icon is applied automatically based on the device_class designation.

Here’s another example. For the pool pump switch, you can change this:

  - platform: mqtt
    name: pentair_pool
    command_topic: pentair/circuit/505/command
    state_topic: pentair/circuit/505/state

Into this:

  - platform: mqtt
    name: "Pool Pump"
    icon: mdi:engine
    command_topic: pentair/circuit/505/command
    state_topic: pentair/circuit/505/state

This adds a friendly name, while assigning an icon of an engine - the closest thing I could find to a pump.

You can learn more about modification here. Icons can be found here.

Again, I’m pretty new to all of this, but that’s how I’ve recently modified my own configurations.yaml file.

i assume you mean add that to customize.yaml, i tried that and it didnt take.

This shows the current salt level (3300). I am looking for the chlorinator output setting (0-100, 50 by default)

Thanks for the reply. I wasnt sure if it was best practice to leave the switch name pentair_pool and then customize it somewhere else. That appears to be how most of the other devices i have work.

hi @bwoodworth this is a great add=on, awesome work!
unfortunately it seems I have the same issue as @samceccola; I installed the add-on based on docs, mqtt works fine and I see the messages; I get the sensors data however my switches don’t work; it shows the pool is ON for example but when I try to turn it off or turn the spa ON nothing happens and the trigger goes back to the previous state (but i see the command in mqtt);

Pentair Screenlogic logs:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
 version=POOL: 5.2 Build 738.0 Rel
 pool ok=1
 pool active=true
 pool temp=75
 pool settemp=62
 pool heatStatuse=0
 pool heatStatuse=off
 spa active=false
 spa temp=75
 spa settemp=69
 spa heatStatuse=off
 salt ppm=3050
 pH=0
 orp=0
 saturation=0
 air temp=70
 freezeMode=0
 alarms=0
 Number of circuitArray Objects=14
 calcium=0
 cyanuric acid=0
 alkalinity=0
 controller is in celsius=false
 controllerId=100
 pumpCircArray=0,0,0,0,0,0,0,0
 Number of bodyArray Objects=14
 bodyArray=
   circuitId: 500
     name: Spa
   circuitId: 501
     name: Pool Light
   circuitId: 502
     name: Spa Light
   circuitId: 503
     name: Air Blower
   circuitId: 505
     name: Pool
   circuitId: 510
     name: Feature 1
   circuitId: 511
     name: Feature 2
   circuitId: 512
     name: Feature 3
   circuitId: 513
     name: Feature 4
   circuitId: 514
     name: Feature 5
   circuitId: 515
     name: Feature 6
   circuitId: 516
     name: Feature 7
   circuitId: 517
     name: Feature 8
   circuitId: 519
     name: AuxEx
numPumps=0

attached a printscreen from mqtt

sensors working:

I was messing around a little and put retain: true for the switch, then I tried turning on the light and it ended up turning it on about 10 mintues later. I also noticed I am receiving sensor updates every 10 minutes, does that sound like the right polling interval? fbuzila, samceccola and I seem to have the same problem.

@bwoodworth, I found the problem. My setup does not have any real “pumps” the pump is just another circuit. The call to send_state_to_ha.ja was hanging when it got to the part about this.getPumpStatus(0)

I am not sure if this is the best fix, but i changed that section here:


  }).on('controllerConfig', function(config) {
    //this.getPumpStatus(pumpID);  REMOVE THIS
    var i;
    for(i = 0; i < config.pumpCircArray.length; i++)
    {
      if (config.pumpCircArray[i] != 0)
      {
        numPumps++;
      }
    }
    if (numPumps > 0 )
    {
        this.getPumpStatus(0);   //only call this if a pump exists?
    }
    else
    {
        this.getSaltCellConfig();
    }
  }).on('getPumpStatus', function(status) {

Now that i changed that, I can turn the light on and off instantly. I am also geting updates in MQTT every 10 seconds (instead of 10 minutes), and i can now see the saltcelllevel1 property, which is the one i was asking about earlier. It never got that far because the call to this file timed out before hitting it.

Where do in find the file to make the same change?

I don’t have any pumps either, the spa and pool are just different circuits, so I might have the same issue;
how/where did you change it?
I’m running this as an hassio-addon; maybe I have to clone this repo, do the changes and reinstall it?

EDIT:
I fixed mine too by cloning the repo and removing the pump; the important thing is to make sure in logs you see the last line “closing connection”
this way you know the initialize.js works fine

@darylgibson Fantastic! I will make a change and get it released soon. Thank you for digging into that. I wasn’t able to reproduce it since I have other pumps.

1.26 Released

HassIO is still showing 1.25 is the latest… Thanks!

Reload on the Add-On Store page:

Hi, Im a little bit new with MQTT so maybe is a silly question. I foolow the instructions but I cannot make it work. Here is my configuration and the logs

MQTT Broker Config

logins:
  - username: ####
    password: ####
anonymous: false
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

Add-On Configuration

MQTT_server: 192.168.1.141
MQTT_port: '1883'
MQTT_user: ####
MQTT_password: ####
ScreenLogic_server: 192.168.1.26

Add-On Log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
 version=POOL: 5.2 Build 738.0 Rel
 pool ok=1
 pool active=false
 pool temp=23
 pool settemp=32
 pool heatStatuse=0
 pool heatStatuse=off
 spa active=false
 spa temp=35
 spa settemp=35
 spa heatStatuse=off
 salt ppm=0
 pH=0
 orp=0
 saturation=0
 air temp=25
 freezeMode=0
 alarms=0
 Number of circuitArray Objects=18
 calcium=0
 cyanuric acid=0
 alkalinity=0
 controller is in celsius=true
 controllerId=100
 pumpCircArray=65,0,0,0,0,0,0,0
 Number of bodyArray Objects=18
 bodyArray=
   circuitId: 500
     name: Spa
   circuitId: 501
     name: Air Blower
   circuitId: 502
     name: Pool Light
   circuitId: 503
     name: Fiber Optic
   circuitId: 504
     name: Fountain
   circuitId: 505
     name: Pool
   circuitId: 506
     name: Spillway
   circuitId: 507
     name: Aux 6
   circuitId: 508
     name: Aux 7
   circuitId: 510
     name: Feature 1
   circuitId: 511
     name: Feature 2
   circuitId: 512
     name: Feature 3
   circuitId: 513
     name: Feature 4
   circuitId: 514
     name: Feature 5
   circuitId: 515
     name: Feature 6
   circuitId: 516
     name: Feature 7
   circuitId: 517
     name: Feature 8
   circuitId: 519
     name: AuxEx
numPumps=1
 pumpID 0 watts=0
 pumpID 0 rpms=0
 pumpID 0 gpms=0
 salt cell installed=false
 salt cell satus=0
 salt cell level 1=50
 salt cell level 2=2
CLOSING CONNECTION

MQTT Log (just the last 10)

1601943744: New client connected from 172.30.32.1 as mosq-zsmbY2UtgLW6lYTdPp (p2, c1, k60, u'MQTT_User').
1601943744: Client mosq-zsmbY2UtgLW6lYTdPp disconnected.
1601943744: New connection from 172.30.32.1 on port 1883.
1601943744: New client connected from 172.30.32.1 as mosq-dRR2K5qIN3HeHJhq4C (p2, c1, k60, u'MQTT_User').
1601943744: Client mosq-dRR2K5qIN3HeHJhq4C disconnected.
1601943744: New connection from 172.30.32.1 on port 1883.
1601943744: New client connected from 172.30.32.1 as mosq-q9yDDN0qaBPtl23by1 (p2, c1, k60, u'MQTT_User').
1601943744: Client mosq-q9yDDN0qaBPtl23by1 disconnected.
1601943744: New connection from 172.30.32.1 on port 1883.
1601943744: New client connected from 172.30.32.1 as mosq-KfPvVrd1hIy6IbvRSv (p2, c1, k60, u'MQTT_User').
1601943744: Client mosq-KfPvVrd1hIy6IbvRSv disconnected.
1601943744: New connection from 172.30.32.1 on port 1883.
1601943744: New client connected from 172.30.32.1 as mosq-ox26fMbAszuRP21gB4 (p2, c1, k60, u'MQTT_User').
1601943744: Client mosq-ox26fMbAszuRP21gB4 disconnected.
1601943744: New connection from 172.30.32.1 on port 1883.
1601943744: New client connected from 172.30.32.1 as mosq-CntcetQqF3pHe4cEWX (p2, c1, k60, u'MQTT_User').
1601943744: Client mosq-CntcetQqF3pHe4cEWX disconnected.
1601943744: New connection from 172.30.32.1 on port 1883.
1601943744: New client connected from 172.30.32.1 as mosq-SsvrXsTqtado4vPK0r (p2, c1, k60, u'MQTT_User').
1601943744: Client mosq-SsvrXsTqtado4vPK0r disconnected.
1601943744: New connection from 172.30.32.1 on port 1883.
1601943744: New client connected from 172.30.32.1 as mosq-luZFvazBVwGddhmS91 (p2, c1, k60, u'MQTT_User').

I hope you can help me, thank you in advance.

Confirmed 1.26 works for my setup.