Can you check what Unifi OS and Network API versions your two different systems are running? Just out of curiosity sake... but either way if I can find a way to "fix" this I would love to.
Updated Version(s):
- ALL DRIVERS UPDATED
Change(s):
- A flaw was found in the ProcessEvent function that is present in ALL of my drivers. I am going through and correcting that on them as quickly as possible, with the UnifiNetwork ones now completed and published.
- While correcting that I am also going through and replacing the driver-specific attributes that had spaces in their names to remove the spaces. The "old" attributes will be removed the next time you Save Preferences on a device.
Got a friend asking about your plans for support of the UXG-Lite from Ubiquti. T.I.A.
If someone buys one and can provide me with some basic information I can add support in readily enough for recognition and data. Any further ie: more advanced possible functions (if a device has any) will require more data/assistance from whoever buys one.
That is pretty standard for any device really.
Thanks. I just tried this on my presence devices and I still have duplicate state variables.
I'll get back with them about that happening.
@snell ever since the last update I am getting the request time out errors checking presence. Again this was happening every hour at a specific minute before when I was traveling earlier this year but I am home now and this started happening again since updating to your latest release yesterday evening.
PresenceCheck is working correctly as I has me present and the other device as not present but for whatever reason at 21 minutes past the hour the function fails. I am happy to let it continue if you want me to try any debugging. Please let me know.
Update:
Happened again at 9:21:
I was refreshing the UDM SE device at the time to view the scheduled jobs:
I noticed the Login and Refresh functions occur just before the PresenceCheck run. I have the Controller Stats Refresh Rate set to 10 minutes. Could this be a situation where the login/refresh functions are still running thus causing a timeout for the PresenceCheck?
Refresh can take some time for the API to return the data... so it is quite possible that the API cannot handle the additional request for the Presence if it is not ready yet.
This was one of the main reasons I wondered if there was other stuff happening. It could be the problem right there. Plus it is tough to avoid because the PresenceCheck happens so frequently compared to Refresh.
I will have to think on it a bit to come up with a solution (if possible) because even offsetting the time is unlikely to help much.
As for the duplicate variables listed... Doing a quick check of the code I forgot to remove "Driver Status" (SIGH). Driver Name and Driver Version should go away... This is the problem with updating and publishing so many drivers in one stretch like I did. I just counted and (including child drivers) I updated and posted 100 drivers (somehow it is EXACTLY that many at this time) and missed that. Two lines of code I will have to add to almost all of them... but that will NOT be a separate update just for that.
About an hour ago I decided to click Save Preferences in my UDM device. I didn’t change any settings, just clicked Save. That seems to have stopped the hourly error because it didn’t happen at 9:21 PM.
So again this started happening immediately after I used HPM to update the drivers. I recall an update in January just before I left for a work trip too. Could an update cause this?
I cannot see how an update could. I will say that when you Save Preferences it resets the scheduled activities. So maybe they got "spaced out" more and are not interfering? Just guessing.
Hello Snell,
I had this same problem with the error for presence. I was running 2.3.7.146 on a C8 unit. I updated to 2.3.8.122 and those errors all stopped showing up.
I am the user that asked @wsramz about adding the UXG-Lite into the drivers. What information can I provide to get that over to you?
Thanks in advance
Lets see if I can attach a screenshot now of the errors before and after the update.
I apologize for sending 3 messages back to back. The system limits me as I am new to the forum and I was not aware of that prior to posting.
No worries about the multiple messages. So the current thinking is that the Timeout is that the controller is too busy replying to the refresh to be able to process a PresenceCheck. That somewhat makes sense. Save Preferences performs the "update" function which resets the schedule for the parent device's tasks. So if there was the conflict before it might reset it into a schedule that is less likely to conflict now.
As for the UXG-Lite, I assume it has a child device created for it, probably using the generic child? In that case, please check the State Variables and let me know what the value is for the Model I should be able to make a child device. It does not seem like it has any direct features itself so I should not need much more than the basic commands in the driver.
Regarding the PresneceCheck it sounds like a good idea that it was related to a timing process BUT for me I made no changes outside of doing the firmware update and the reboot that came with it. I had not been checking logs to see the error in there until I had read the thread here and seen someone having it and checked and sure enough I had them but they had stopped.
My logs only go back to February 14th and I see the errors back then. I performed a system update on February 4th so I cannot see the logs before that date to see when it started.
Regarding the UXG-Lite there is a child device that loads and it is a Gateway device so it has more stats available to it that has some of the same options as the UXG-Pro but not all of them.
Regarding the 'state variables' are you speaking of this line: Model : UXG ???
It shows a variety of information from the child driver for it. Such as ports, speeds of said ports, CPU, RAM and such. It does not have PoE so I figure that data can be removed from it.
Let me know if that is not it and I can look for what details you are looking for.
Thanks
-edited-
I guess I should have READ the full list there and seen 'state variables' listed there. Here is a screenshot of the full list with localized data removed.
Yes, the model is UXG. Even when a device is using the generic child driver I try to populate it with all the information. The PoE stuff that is part of the ports is actually returned by the API. Since it is used for a bunch of other types of devices it just makes it easier to keep it all consistent.
I will try to work on a child driver tonight, I am "off to work" now.
Updated Version(s):
- UnifiNetworkAPI.groovy = 0.4.58
- UnifiNetworkChild-UXG.groovy = NEW, added to list in initial post and HPM
Change(s):
- Added recognition for Unifi Gateway Lite (UXG) device into parent driver as well as initial version of a child driver
- Removes "Driver Status" attribute and state next time Save Preferences is run on the parent device.
The UnifiNetworkChild-UDMP has a number of "State Variables".
How can I access the values of these variables?
It seems that I can only access the "Current States" values:
State Variables are not readily accessible versus Current States (Events/Attributes). I do not make every variable into events/attributes because some are meant to help support functions or identify the device (overrides and Model for example) and not really relevant. Some are left as States just because I thought there might be SOME use if people wanted to glance at it but likely would not be useful for Rules or nobody has asked for them. The way my driver code works is that everything that has a Current State will also have a corresponding State Variable (for example: I check new data values against the corresponding State value in the driver to see if it changed and thus is worth posting an event).
Which one(s) would you want to be "promoted" to the Current States?
Greetings,
I just updated the system and all looks to be working fine. The Child UXG shows up and I changed the driver over to it for the UXG-Lite.
Just curious if you will be adding any additional information into the Current States side from the State Variables side? Like maybe a WAN availability or IP (which shows the current WAN IP) ? I figure it has some of the same stats to show as the old USG-Pro4 as well as the UXG-Pro.
But outside of that all is good to go in my view. Thank you again!
Cheers