Closed johnluber closed 3 years ago
Did you update Homebridge / npm or anything recently?
Yes, all are current. Homebridge is at 1.0.4 and npm is at 6.14.5.
Sent from my iPad
On May 12, 2020, at 8:35 PM, sfeakes notifications@github.com wrote:
Did you update Homebridge / npm or anything recently?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sfeakes/homebridge-aqualinkd/issues/2#issuecomment-627672837, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIRUXR57ZN27XG6ABN2ZMGLRRHTLHANCNFSM4M7BBEIQ.
I’m wondering if you updated Homebridge and that’s when the problem started. It looks like something may have changed in the latest version around thermostat characteristic.
I’ve grepped my logs and it looks like the first occurrence of this message is well before the 1.0.4 release. Here’s that snippet:
[3/18/2020, 7:18:50 PM] [aqualinkd] Device Pool Heater has changed it's type. Recreating... [3/18/2020, 7:18:50 PM] [aqualinkd] Registering new platform accessory! (Pool Heater | e4923ec7-ca7c-427e-b3fe-0ed8dcba7cb0) [3/18/2020, 7:18:50 PM] [aqualinkd] Device Spa Heater has changed it's type. Recreating... [3/18/2020, 7:18:50 PM] [aqualinkd] Registering new platform accessory! (Spa Heater | bda28628-38fd-4754-ab67-556b6f00f155) [3/20/2020, 7:16:26 PM] [aqualinkd] getCharacteristic failed For: Spa Heater undefined [3/20/2020, 7:16:26 PM] [aqualinkd] getCharacteristic failed For: Spa Heater undefined [3/20/2020, 7:16:53 PM] [aqualinkd] getCharacteristic failed For: Spa Heater undefined [3/20/2020, 7:16:53 PM] [aqualinkd] getCharacteristic failed For: Spa Heater undefined
I didn’t realize until grepping this that the pool heater also through a similar message as well. Interestingly, the issue with the Pool Heater self-corrected on May 9 but the Spa Heater is still ongoing. On 5/9 I did a significant rework of my automation (but not aqualinkd) in that I tossed my Wink hub (due to their recent demand for a monthly fee) and replaced it with a SmartThings Hub. However, aqualinkd was not connected to the pool that day, ion fact, it was connected until yesterday for reasons I explain below.
Some additional background…
Everything had been working ok with aqualinkd until a few weeks ago. I have a bit of an unusual setup in that I was powering the rpi over POE from a switch that was also powering an AP. Something happened 3-4 weeks ago where the AP would power cycle continuously. It was a bit difficult to isolate but when removing the rpi from the configuration then the AP worked properly again. Further isolating showed the POE splitter going to the rpi to be bad.
However, even supplying direct power to the rpi showed anomalies. For example, if aqualinkd was running then our pool remote and the iaqualink web software did not. Removing the rpi from the situation fixed that and so I determined the rs485 adapter was having issues.
Yesterday, I replaced the rs485 adapter with this one https://www.amazon.com/gp/product/B07SD65BVF/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1 and everything appears to be normal except for the message that I initially reported. FWIW, I had been using the OctagonStar adapters but have had several failures with them so decided to try this new adapter. I like that it’s more compact and enclosed in a case.
My setup is much cleaner now in that I have installed an AC outlet at the point of the rpi (I was trying to avoid that hassle) and also have nicer wiring with the new adapter.
Anyhow, I probably just noticed the error being thrown because I was paying more attention to the whole setup. From the logs I don’t believe the messages are related to the latest release of homebridge or even the hardware/POE issues I had as they go back much farther than either of those changes.
I hope this makes sense. It is still curious as to why the difference between the Pool and Spa heater behaviors.
On May 12, 2020, at 9:00 PM, sfeakes notifications@github.com<mailto:notifications@github.com> wrote:
I’m wondering if you updated Homebridge and that’s when the problem started. It looks like something may have changed in the latest version around thermostat characteristic.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sfeakes/homebridge-aqualinkd/issues/2#issuecomment-627680793, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIRUXR2GW3BPCDT3EJBP25DRRHWL3ANCNFSM4M7BBEIQ.
Heaters (spa & pool), Freeze protect & SaltWater generator all use an accessory type of Thermostat when working correctly. Heaters will also use an accessory type of Switch when AqualinkD can't find a way to set the "temperature set point". To set temperature for heaters takes a lot of RS485 message that all have to be perfectly timed, and this is usually the first thing to fail when there are issues with the RS485 connection / buss. That's why they can come up as either Switch or Thermostat in both webUI and Homebridge.
The message in your log [3/18/2020, 7:18:50 PM] [aqualinkd] Device Spa Heater has changed it's type. Recreating...
, means AqualinkD saw an issue and change the type. (either from Thermostat to Switch, or Switch to Thermostat). AqualinkD does the test on startup, and sets the appropriate type at that point and will not re-test until next startup. Homebridge-aqualinkd will re-check the type every 5 minutes by polling AqualinkD directly, and change the type if necessary. (this is the message in the log). It's done like this so you AqualinkD and homebridge-aqualinkd can be re-started independently of each other.
So hope the above helps in understanding how it works. So, first thing to check is in the AqualinkD webUI, are the heaters coming up as switches or thermostats? If thermostats, all is good with AqualinkD & RS485 connections, if switches then check RS458 connections.
The message [3/20/2020, 7:16:26 PM] [aqualinkd] getCharacteristic failed For: Spa Heater undefined
is the one that I'm more concerned with. It kind-a looks like there is some bad cache going on in homebridge against some of the devices. Easiest way to fix that is to stop homebridge delete cache and start homebridge. BUT I do not advise that if your homebridge instance is doing/hosting more than just homebridge-aqualinkd, as it will mean you loose everything on your HomeKit instance and not all plugins will automatically re-create devices like aqualinkd-homebridge does. Can you describe your homebridge instance in more detail, or post the config.json and I can work it out from that. If you do post config.json please delete "username" and "pin" for security reasons.
Thanks for the explanation; that does help me understand what’s happening from an operational perspective.
It looks like both heaters are being detected as switches based on the icons I see. Here’s a screenshot for you to see:
[cid:CFA3CA39-A240-47F8-B8EB-12E0EC95EDFD@luberfamily.net]
You’re right that my config is more that aqualinkd. I’ve got about 45 devices in it including the aqualinkd devices. I did, as part my switch over from wink to SmartThings, blow away the caches and would prefer not to do that again if it can be avoided. But, it’s not that bad to have to do it.
My config includes bridging about 25 Z-Wave devices via SmartThings, 5 Ubiquiti Cameras, about 10 Sonos speakers, some switches that run scripts, and a really cool switch that I put together to toggle my kid’s video game system’s access to the internet. My config.json is below. Note that the aqualinkd excludedDevices were just added yesterday after replacing the RS485 adapter.
{ "bridge": { "name": "Homebridge", "username": "port": 51826, "pin": }, "description": "Homebridge configuration", "accessories": [ { "accessory": "HTTP-SWITCH", "name": "Video Games", "switchType": "stateful", "onUrl": "http://ubuntu1.luberfamily.net/UniFi-API-client/examples/games_on.php", "offUrl": "http://ubuntu1.luberfamily.net/UniFi-API-client/examples/games_off.php", "statusUrl": "http://ubuntu1.luberfamily.net/UniFi-API-client/examples/games_stat.php", "pullInterval": "15000" }, { "accessory": "Script2", "name": "Sonos Default", "on": "/usr/local/bin/sonos-default", "off": "/usr/local/bin/sonos-default" }, { "accessory": "Script2", "name": "Sonos Love", "on": "/usr/local/bin/sonos-love", "off": "/usr/local/bin/sonos-love" }, { "accessory": "Script2", "name": "Play Khalid", "on": "/usr/local/bin/sonos-khalid", "off": "/usr/local/bin/sonos-khalid" } ], "platforms": [ { "platform": "SmartThings-v2", "name": "SmartThings-v2", "app_url": "https://graph-na04-useast2.api.smartthings.com:443/api/smartapps/installations/", "app_id": "5e455366-8cba-4ab9-bd98-2f9a024d0020", "access_token": "54d6d8f5-f2c7-477a-8483-9bcb9dce51f2", "temperature_unit": "F", "validateTokenId": false, "logConfig": { "debug": false, "showChanges": true, "hideTimestamp": false, "hideNamePrefix": false, "file": { "enabled": false } } }, { "platform": "aqualinkd", "name": "aqualinkd", "server": "192.168.1.24", "port": "80", "mqtt": { "host": "192.168.1.24", "port": 1883, "topic": "aqualinkd" }, "excludedDevices": ["Solar_Heater", "SWG", "Freeze_Protect", "Pool_Heater", "Aux_4", "Aux_5", "Aux_6", "Aux_7"], "accessories": [] }, { "platform": "ZP", "service": "light", "brightness": true }, { "platform": "Camera-ffmpeg", "cameras": [ { "name": "Front Door", "active": true, "videoConfig": { "maxStreams": 6, "source": "-rtsp_transport tcp -re -i rtsp://192.168.1.1:7447/OkPd03NBTKqNJ8iE", "maxWidth": 1920, "maxHeight": 1080, "maxFPS": 30 } }, { "name": "Aquarium", "active": true, "videoConfig": { "maxStreams": 6, "source": "-rtsp_transport tcp -re -i rtsp://192.168.1.1:7447/wsxP1hvVYVIh1anw", "maxWidth": 1920, "maxHeight": 1080, "maxFPS": 30 } }, { "name": "Pool Camera", "active": true, "videoConfig": { "maxStreams": 6, "source": "-rtsp_transport tcp -re -i rtsp://192.168.1.1:7447/UNGgRjQh0yvvnGdu", "maxWidth": 1920, "maxHeight": 1080, "maxFPS": 30 } }, { "name": "Driveway Camera", "active": true, "videoConfig": { "maxStreams": 6, "source": "-rtsp_transport tcp -re -i rtsp://192.168.1.1:7447/WsPibtgrhIEF6gV7", "maxWidth": 1920, "maxHeight": 1080, "maxFPS": 30 } }, { "name": "Backyard Camera", "active": true, "videoConfig": { "maxStreams": 6, "source": "-rtsp_transport tcp -re -i rtsp://192.168.1.1:7447/czDTdM2EoEWxnc0Z", "maxWidth": 1920, "maxHeight": 1080, "maxFPS": 30 } } ] } ] }
On May 13, 2020, at 9:48 AM, sfeakes notifications@github.com<mailto:notifications@github.com> wrote:
Heaters (spa & pool), Freeze protect & SaltWater generator all use an accessory type of Thermostat when working correctly. Heaters will also use an accessory type of Switch when AqualinkD can't find a way to set the "temperature set point". To set temperature for heaters takes a lot of RS485 message that all have to be perfectly timed, and this is usually the first thing to fail when there are issues with the RS485 connection / buss. That's why they can come up as either Switch or Thermostat in both webUI and Homebridge.
The message in your log [3/18/2020, 7:18:50 PM] [aqualinkd] Device Spa Heater has changed it's type. Recreating... , means AqualinkD saw an issue and change the type. (either from Thermostat to Switch, or Switch to Thermostat). AqualinkD does the test on startup, and sets the appropriate type at that point and will not re-test until next startup. Homebridge-aqualinkd will re-check the type every 5 minutes by polling AqualinkD directly, and change the type if necessary. (this is the message in the log). It's done like this so you AqualinkD and homebridge-aqualinkd can be re-started independently of each other.
So hope the above helps in understanding how it works. So, first thing to check is in the AqualinkD webUI, are the heaters coming up as switches or thermostats? If thermostats, all is good with AqualinkD & RS485 connections, if switches then check RS458 connections.
The message [3/20/2020, 7:16:26 PM] [aqualinkd] getCharacteristic failed For: Spa Heater undefined is the one that I'm more concerned with. It kind-a looks like there is some bad cache going on in homebridge against some of the devices. Easiest way to fix that is to stop homebridge delete cache and start homebridge. BUT I do not advise that if your homebridge instance is doing/hosting more than just homebridge-aqualinkd, as it will mean you loose everything on your HomeKit instance and not all plugins will automatically re-create devices like aqualinkd-homebridge does. Can you describe your homebridge instance in more detail, or post the config.json and I can work it out from that. If you do post config.json please delete "username" and "pin" for security reasons.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sfeakes/homebridge-aqualinkd/issues/2#issuecomment-627998842, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIRUXR63RAFRMFW7VYSXYJLRRKQMJANCNFSM4M7BBEIQ.
If the heaters are coming up as switches rather than thermostats, then you should fix that first before going further / into homebridge-aqualinkd. Have a look in Aqualinkd log file (or system log file depending on your configuration). Look for errors in there. I'm guessing you're getting some bad packet errors on RS485 bus. If you set aqualinkd to debug mode and restart you'll get some more information.
So, not sure this helps, but after putting it into debug mode both pool and spa are reporting as thermostats now. I put it back into INFO logging and they persist as thermostats.
Here’s the log from Homebridge:
[5/13/2020, 10:18:33 AM] [aqualinkd] Device Spa Heater has changed it's type. Recreating... [5/13/2020, 10:18:33 AM] [aqualinkd] Registering new platform accessory! (Spa Heater | bda28628-38fd-4754-ab67-556b6f00f155)
And, the web presents them as thermostats as well.
Perhaps a timing issue wrt to the differences in logging????
On May 13, 2020, at 10:12 AM, sfeakes notifications@github.com<mailto:notifications@github.com> wrote:
If the heaters are coming up as switches rather than thermostats, then you should fix that first before going further / into homebridge-aqualinkd. Have a look in Aqualinkd log file (or system log file depending on your configuration). Look for errors in there. I'm guessing you're getting some bad packet errors on RS485 bus. If you set aqualinkd to debug mode and restart you'll get some more information.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sfeakes/homebridge-aqualinkd/issues/2#issuecomment-628016343, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIRUXR7IVKL763I6463GZJ3RRKTFJANCNFSM4M7BBEIQ.
Everything still looks ok with this so I guess it was just some sort of a fluke.
Thanks for the pointers in troubleshooting it; I appreciate that you took the time.
Sent from my iPad
On May 13, 2020, at 10:27 AM, John Luber John@luberfamily.net wrote:
So, not sure this helps, but after putting it into debug mode both pool and spa are reporting as thermostats now. I put it back into INFO logging and they persist as thermostats.
Here’s the log from Homebridge:
[5/13/2020, 10:18:33 AM] [aqualinkd] Device Spa Heater has changed it's type. Recreating... [5/13/2020, 10:18:33 AM] [aqualinkd] Registering new platform accessory! (Spa Heater | bda28628-38fd-4754-ab67-556b6f00f155)
And, the web presents them as thermostats as well.
Perhaps a timing issue wrt to the differences in logging????
On May 13, 2020, at 10:12 AM, sfeakes notifications@github.com<mailto:notifications@github.com> wrote:
If the heaters are coming up as switches rather than thermostats, then you should fix that first before going further / into homebridge-aqualinkd. Have a look in Aqualinkd log file (or system log file depending on your configuration). Look for errors in there. I'm guessing you're getting some bad packet errors on RS485 bus. If you set aqualinkd to debug mode and restart you'll get some more information.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sfeakes/homebridge-aqualinkd/issues/2#issuecomment-628016343, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIRUXR7IVKL763I6463GZJ3RRKTFJANCNFSM4M7BBEIQ.
It was probably just that the last time AqualinkD was started, it had issues getting the set points (maybe due to new rs adapter) so it went to switches and not thermostat. It just needed to be restarted to get the set point / thermostat working again.
On May 13, 2020, at 5:08 PM, johnluber notifications@github.com wrote:
Everything still looks ok with this so I guess it was just some sort of a fluke.
Thanks for the pointers in troubleshooting it; I appreciate that you took the time.
Sent from my iPad
On May 13, 2020, at 10:27 AM, John Luber John@luberfamily.net wrote:
So, not sure this helps, but after putting it into debug mode both pool and spa are reporting as thermostats now. I put it back into INFO logging and they persist as thermostats.
Here’s the log from Homebridge:
[5/13/2020, 10:18:33 AM] [aqualinkd] Device Spa Heater has changed it's type. Recreating... [5/13/2020, 10:18:33 AM] [aqualinkd] Registering new platform accessory! (Spa Heater | bda28628-38fd-4754-ab67-556b6f00f155)
And, the web presents them as thermostats as well.
Perhaps a timing issue wrt to the differences in logging????
On May 13, 2020, at 10:12 AM, sfeakes notifications@github.com<mailto:notifications@github.com> wrote:
If the heaters are coming up as switches rather than thermostats, then you should fix that first before going further / into homebridge-aqualinkd. Have a look in Aqualinkd log file (or system log file depending on your configuration). Look for errors in there. I'm guessing you're getting some bad packet errors on RS485 bus. If you set aqualinkd to debug mode and restart you'll get some more information.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sfeakes/homebridge-aqualinkd/issues/2#issuecomment-628016343, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIRUXR7IVKL763I6463GZJ3RRKTFJANCNFSM4M7BBEIQ.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
I'm seeing the subject message in the homebridge logs at start up. Not sure when it started or if it's related to something I did. I don't think it's me as I haven't changed anything on the aqualinkd setup in a long while.