Proliphix Thermostat Error

I have the HASS.io image running in a Linux ubuntu VM. Lutron works, Sonos works, Life360 works, Proliphix gives an error. I’m a techie but not really a Linux server or python expert. When the server starts up I always get this message. Help! it would be great to get my proliphix thermostats working!

Logger: homeassistant.components.climate
Source: components/proliphix/climate.py:50
Integration: Climate (documentation, [issues]
First occurred: April 10, 2020, 4:20:00 PM (1 occurrences)
Last logged: April 10, 2020, 4:20:00 PM

Error while setting up proliphix platform for climate

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() 

File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) 

File "/usr/src/homeassistant/homeassistant/components/proliphix/climate.py", line 41, in setup_platform add_entities([ProliphixThermostat(pdp)], True) 

File "/usr/src/homeassistant/homeassistant/components/proliphix/climate.py", line 50, in __init__ self._name = self._pdp.name 

File "/usr/local/lib/python3.7/site-packages/proliphix/proliphix.py", line 183, in name return self._data['DevName'] 

KeyError: 'DevName'

This is something which worked and then stopped?

Thanks for the response! No, this is a brand new installation, new everything. Never worked. First time venturing into HA for me.

What model of proliphix do you have?

The NT150h, hardwired into ethernet. set to port 8081

This is the config file entry:

climate:

  • platform: proliphix
    host: 10.10.10.9:8081
    username: admin
    password: (password)

Have you tried without port?

Hello,

I ran into the same problem. I think it is a bug in the climate.py file.
I made an issue: https://github.com/home-assistant/core/issues/34396
And a pull request that solves the problem (at least for me): https://github.com/home-assistant/core/pull/34397

Regards,

Martijn

1 Like

I did. Same exact error. I set the thermostat to port 80 so it would respond based on the default port for http.

Appreciate the suggestion…

Thanks Martijn. This looks really promising. I have developed software over my career but have no Github experience so I have no idea how to apply the change. Is there a file to copy or GitHub thing to do? Or, do I just go into the HASS virtual machine and edit the file? looks like a line needs to be added ( pdp.update()) and one line changed (hvac_mode to _state). Can’t see if there is anything else?

Thanks again for any help.

Hi Steve,

I just installed home assistant for the first time last weekend, so I am by no means an expert, but yes you can edit the files directly.

Do note that, depending on your setup, home assistant is probably running in a docker, so you need to edit the files in the docker instance itself.

Also, if you do this, your changes will probably be overwritten during the next update, unless my pull request is merged in and becomes part of the next home assistant update.
If you test my changes and they work for you, it might help if you leave a comment in the pull request thread.

By the way, I left my thermostat at port 8080. This works, as long as the configuration file specifies host as:
host: IP_ADDRESS:8080

Regards,

Martijn

Thanks very much. I am running HA in a virtual machine on a Linux server. I believe it is running in docker and it has been a little challenging to find the path to the correct files. Already used “ls -laR” and grep and more. if you have guidance on the path I would happily make the edit and post that it work on GitHub to validate that the fix worked. I’ll keep looking also…

Thank You!

Hi Martin - I would be happy to help test the fix but I haven’t figured out where to edit the source code. There are a number of docker overlay2 directories with diff and merge subdirectories. Tried editing a few but not able to get any results.

If it would be helpful for me to test then I’ll need a little guidance as to where to make the edit - or I can just wait till the change you proposed is accepted and released (hopefully that won’t take too long : -)

Thanks for your help,
Steve

Hi,

I’m running my system on a raspberry pi 4, from the default image. But I am assuming your setup is similar, and that you can get a shell in your virtual machine.

You can run docker ps to list the docker containers on your system. One should be named homeassistant. Take note of the container id for that container.
By running docker exec -it <container id> /bin/bash you open a shell in that container, and you can explore the new file system.

In that shell you should be able to run vi /usr/src/homeassistant/homeassistant/components/proliphix/climate.py to open the file in the vi editor and you can change it.

I hope this helps. Good luck.

Regards,

Martijn

ok - ill give it a try - I think I’ve been trying the hard way by finding the “merged” subdirectory within various docker overlay2 directories. But I have just gotten to the point where I can edit a climate.py file in the proliphix folder and when I use the supervisor to restart the core I get new error msgs in the developer log. I may have been doing it all wrong but:

If I make the change on line (about 103) and change from “mode” to “state” then I get no improvement.

if I make the above change and add the pdp.update() command around line 40 then I get a new error message.

changes to proliphix/climate.py

With Mocd to State and pdp.update():

Logger: homeassistant.components.climate
Source: components/proliphix/climate.py:40
Integration: Climate (documentation, issues)
First occurred: 1:17:20 PM (1 occurrences)
Last logged: 1:17:20 PM
Error while setting up proliphix platform for climate
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 178, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/homeassistant/homeassistant/components/proliphix/climate.py”, line 40, in setup_platform
pdp.update()
File “/usr/local/lib/python3.7/site-packages/proliphix/proliphix.py”, line 93, in update
oid, value = line.split(’=’)
ValueError: not enough values to unpack (expected 2, got 1)


with Mode to State only:

Logger: homeassistant.components.climate
Source: components/proliphix/climate.py:50
Integration: Climate (documentation, issues)
First occurred: 1:30:34 PM (1 occurrences)
Last logged: 1:30:34 PM
Error while setting up proliphix platform for climate
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 178, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/homeassistant/homeassistant/components/proliphix/climate.py”, line 41, in setup_platform
add_entities([ProliphixThermostat(pdp)], True)
File “/usr/src/homeassistant/homeassistant/components/proliphix/climate.py”, line 50, in init
self._name = self._pdp.name
File “/usr/local/lib/python3.7/site-packages/proliphix/proliphix.py”, line 183, in name
return self._data[‘DevName’]
KeyError: ‘DevName’

Thanks, that was very helpful… Turns out I had made my way to that folder just by searching and greping the system. I did make that change but when I reboot I still get the same error. Happy to continue testing and providing information. Currently, I am using port 80 so my config file includes the IP address:80

Hi,

You’ll need both changes. I think I also got the same error as you at some point:

I think this indicates that it either was not able to connect to the thermostat, or it was not able to get a valid answer from it. Please check that you are using the right user-name and password.

Alternatively you can try to do a manual command to get more output.

curl -d "OID1.2=" IPADDRESS:PORT/get -u USERNAME:PASSWORD

That sends a request your thermostat to retrieve the name. The result should be something like
OID1.2=THERMOSTAT_NAME
If you get a 401 Authorization Required, then the USERNAME or PASSWORD are wrong. If you get a failure to connect, or connection refused then your IPADDRESS and/or PORT number are wrong.

Hi, I think I have made the most recent changes and Home Assistant can now see the thermostat and read the current temperature and state. However, I am getting a pdp drift error continually as follows:

FYI - I believe I made the changes above correctly. I am continually getting a PDP time drift error.

Log Details (WARNING)
Logger: proliphix.proliphix
Source: components/proliphix/climate.py:40
First occurred: April 22, 2020, 5:45:57 PM (1 occurrences)
Last logged: April 22, 2020, 5:45:57 PM
PDP time drifted by 4720 seconds, resetting

Really appreciate the effort as I have two proliphix thermostats that I really like and don’t really want to replace them.

Hi,

This happens when the time of your home assistant and your thermostat get out of sync. The time on your thermostat will automatically be adjusted to match the time of your home assistant system.

The thermostat stores time in local time instead of UTC, so the module does a conversion between time zones. Maybe your home assistant system and your thermostat are configured for different time zones? Other options include the daylights savings time setting on your thermostat.

However, 4720 seconds is a weird number. That is 1 hour and 18 minutes and 40 seconds. That does not sound like a time zone offset or DST.
Maybe one of your systems has an actual problem with its clock running fast or slow?

Regards,

Martijn

Hey, my apologies - I saw the errors coming up and thought it was an ongoing error. I had factory restarted the thermostat earlier and the time was off. But HA did not seem to update the time on the thermostat.

Also - it appears that the basic integration is working but the HA thermostat panel only reports the current temp and mode - it does not display the all the attrubutes that the example panel in the HA instructions show. Either of you know if the HA integration with proliphix will support changing the temperature or mode?

Thank you very much for your help.
Stee