Jump to content

Goose66

Members
  • Posts

    2414
  • Joined

  • Last visited

Everything posted by Goose66

  1. I have released an initial version of the iopool node server for PG3 (v3.0.1) that interfaces with iopool public API to allow IoX to access iopool EcO pool monitors. Installation instructions, release notes, and version history can be found here: https://github.com/Goose66/NSDocs/blob/main/iopool-pg3.md. There is a 1-month trial period and then the node server is $10.95 for perpetual license. While the company has said there was a one request per second limit on accessing the API, it appears that the EcO devices only update the web service once every 15 minutes, so no need for a frequent polling interval (default short poll is 60 seconds; long poll not used). There is no "connected" status, but there is a timer since the last valid measurement was retrieved, so that can be monitored to indicate a problem with the EcO device, the cloud service, the API, or your network connection.
  2. +1 for the order of evaluation (not, and, then or) problem, but more specifically it may be a mixture of the order of evaluation and the program re-entrant nature of the IoX programming model. Remember that each of these programs is going to get called twice as someone moves through the stairwell, once for the Hall-Up Sensor motion and once for the Hall Entry Sensor motion. In addition, the programs will both get called and sunrise and sunset each day, cancelling any running timers (and subsequent "Turn Off" commands). Here's what may be happening: 1. Hall-Up Sensor is triggered 2. Both programs run their Then branch (because of the order of evaluation problem), turn on their respective scenes, and start their respective waits. 3. Hall Entry Sensor is triggered within a few seconds the Hall-up Sensor 4. Both programs are run again, cancelling their respective waits (and subsequent Turn Off commands), and depending on whether it's day or night, one of the programs Then branch is run and the other's Else branch is run. Depending on what order things happen, that may be why the lights are being left on. Either way, this is not the behavior you are expecting, I imagine. Looking at it more broadly, you may need to rethink your approach to programming in IoX (IMO, of course). Many of these types of anomalies that arise for the event-driven and re-entrant natures of the IoX model can be avoided by having two tiers of programs, a first for testing for trigger events to execute the program(s), and another for testing for conditions for conditional execution of statements (i.e., "Then" vs. "Else" branches). So in your case, a first program (e.g. "Hallway Motion"): If ‘Hallways / Hall-Up Sensor / Hall-Up.1 Motion’ is switched On Or ‘Hallways / Hall Entry Sensor / Entry.1 Motion’ is switched On Then Run Program "Hallway Lights" (If) Else -No Actions And then a second program ("Hallway Lights"): If From Sunrise To Sunset (same day) Then Set ‘Hallways / Hall Lights Day’ on Wait 35 seconds Set ‘Hallways / Hall Lights Day’ off Else Set ‘Hallways / ‘Hall Night Lights’ on wait 20 seconds Set ‘Hallways / Hall Night Lights’ off The first program "Hallway Motion" is enabled. The second program "Hallway Lights" is disabled. What you have now is that the "Hallway Motion" program ensures that, upon motion from either sensor, the "Hallway Lights" program will be run. The "Hallway Lights" program then decides which scene to turn on based on the time of day and starts the respective wait timer. Since the "Hallway Lights" program is disabled, it will never be triggered on its own. This approach is handy in most situations where the trigger events and the conditional events are really separate things, i.e. where you have conditions that you don't want to act as triggers to the programs. In addition, if there are multiple levels of conditional statements ("nested ifs") that need to be tested, then you can add additional tiers of programs to accomplish that. Moreover, again IMO, having your programs structured this way makes them more clearly self-documenting of their intended functionality.
  3. That is one possible solution. Or map names to indexes in custom parameters. Another solution is for the node server to somewhat arbitrarily but reproducibly map the names to index numbers (e.g., a short integer hash) and then the IoX user/administrator/programmer would just have to learn the index number through observation. Or the node server could generate these indexes into profile entries and update the profile for the node server, and then send a notification for the user to reboot IoX. These are all possibilities. The UD folks have functionality on their roadmap that could make this easier. It would allow the node server to send the state value of the last user with both an (arbitrarily assigned) index values as well as the user name from Schlage. Both would be displayed in the Admin Console. From that, the IoX user could learn what index values went with what user names, and setup programs accordingly. I think this functionality is coming in the near term, but I don't have a date yet.
  4. In regard to comments about polling intervals and updates: there are no pushed state updates from Schlage available here - it is 100% polling. Like in MyQ and iAquaLink node server, the concern is that frequent polling using a non-public API may alert Schlage of the the use and they may make moves to cut it off. So the Schlage node server uses the same strategy as those other node servers to have active polling (short poll interval) for around five minutes when any activity is detected, and otherwise have non-active polling (long poll interval) for the periods between detected activity. Unfortunately, in the case of wanting to turn on lights or disarm alarm systems when the door is unlocked, this may not work well unless the long poll interval is set to a potentially unacceptable short duration. Setting the long poll interval to a short duration could result, however, in constant frequent polling of the Schlage cloud service, which may create other problems (such as Schlage locking us and/or the pyschlage library out). The "Force Update" is also implemented to deal with this sort of thing. Sending the "Force Update" not only results in an immediate status update request sent to Schlage (with all state values being returned to IoX regardless of change), but it puts the node server into active polling mode. So, for example, if you had a program that sensed motion in your driveway or activity at your front door, e.g., via a motion sensor or ring camera, you could have that program do a Force Update to the appropriate Schlage lock(s) putting them in active polling mode. Then, coupled with a frequent yet hopefully acceptable short polling interval of, say, 5 or 10 seconds, you could detect unlocking by a user and then disarm alarms and turn on lights in a relatively timely fashion. We will have to wait and see how the pyschlage library usage unfolds over the coming months to see what's possible here.
  5. The challenge with the last user functionality is that the library I am using, and I believe, in fact, the non-public API that library is accessing, provides log entries with a GUID (which is a very long string of hexadecimal characters) and a name (a text string) to identify the user. It also provides a timestamp for the log entry. None of these (GUID, text string name, timestamp) are values that are supported by UD's Node Server API. It only supports integers and floating point values. In some other node servers, such as the Envisalink-DSC node server, the device (DSC Panel) provides an integer index, e.g. "02" for the last user or disarm/unlock code. That integer index can be passed to IoX as a status value for the node labeled, e.g., "Last user code" and then it's just up to the IoX administrator/programmer to know who or what that index means based on the configuration of the device itself. In the case of the Schlage locks, however, neither the GUID or the name text string can be passed to identify the last user. There are some workarounds (hacks, if you will) but these require a lot of coding and dynamic modification and frequent reloading of the "Profile," which is not an attractive option. Similarly the timestamp value is tricky to deal with. In the case of MyQ, I take the timestamp of the last action on a garage door opener and turn it into an (integer) duration in seconds since the last action. This works but generates a lot of "chatter" in the communication between the node server and IoX, which is not really desirable. It may take some time to come up with a viable strategy and implement it, unfortunately, but it is certainly on the roadmap.
  6. Goose66

    Schlage Encode

    @MrBill and @hart2hart Guys, let's move the discussion to the forum below in order to make the info more accessible:
  7. This topic was create to discuss current and future functionality of the Schlage Node Server in order to pull some conversations from elsewhere on the forum into this space.
  8. Goose66

    Schlage Encode

    I don't know what to tell you. It's been there for a while for me: Perhaps @bmercier will come up with something this evening. Sorry for the issues.
  9. Goose66

    Schlage Encode

    @bmercier Uh, oh. Now it's there twice. I won't fool with it anymore.
  10. Goose66

    Schlage Encode

    Ok, it's there again. Let's see if it sticks this time. 😬
  11. Goose66

    Schlage Encode

    Got it. Thanks. Truth is, I wanted to tag @bpwwer, but for some reason I can never remember his handle. I try "bpau..." and "pb..." and "bob..." but can never get it to come up. 🙂
  12. Goose66

    Schlage Encode

    Ok, now it's gone for in me in just the last two minutes. @GeddyWhat's up?
  13. Goose66

    Schlage Encode

    Hmmm, I show 117. @Geddy Is there some reason a newly submitted Node Server would not be showing up in other's Node Server Store? Also, @MrBill are you on Polisy or eISY (PG3 or PG3x)?
  14. Goose66

    Schlage Encode

    Try refreshing your store. I just checked again after being away for a couple of hours and I still see it in the store.
  15. Goose66

    Schlage Encode

    I have released an initial version of the Schlage node server. See here: Right now just locks with lock and unlock. The one thing I can see adding in the next version is last action from the log (time, action, and MAYBE user number or name).
  16. I have released an initial version of the Schlage node server for PG3 (v3.0.1 - the v3.x.x convention kept for PG3 node server conversions). Installation instructions, release notes, and version history can be found here: https://github.com/Goose66/NSDocs/blob/main/schlage-pg3.md. There is a 1-month trial period and then the node server is $10.95 for perpetual license. Unfortunately, after installing a FW update, my Schlage Encode lock will not lock or unlock, either through the node server, app, or keypad. It just jams. A lesson in "if it ain't broke..." Anyway, please test locking and unlocking from the node server and let me know if there are any issues. Also, this node server uses a third-party library pyschlage that itself has a lot of dependencies. With several disparate versions of PG3 and PG3x floating around on two different platforms (Polisy and eISY), there may be some installation issues, so let me know what problems you have.
  17. You say you tried it in Chrome, do you mean you typed it into address bar and it worked? If so, then change your HTTP command here to GET.
  18. Goose66

    Schlage Encode

    I usually code node servers for retrieving and updating state, and leave configuration (properties) changes to the native app. What's a use case for managing access codes (specifically if it turns out that you can just see them in a list and delete them) from the ISY vs. just using the Schlage app?
  19. Goose66

    Schlage Encode

    @MrBill sorry I misread your posts above regarding the capabilities (or lack thereof) of this API. Let me look into the code and license model.
  20. Goose66

    Schlage Encode

    The API options I have looked at are Yonomi and Seam. Both of these companies are IoT platform companies offering a single (web-based, unfortunately) API across a variety of devices. Yonomi is owned by Schlage or the same company as Schlage, and as an IoT platform supports Schlage, Honeywell, Ecobee, Philips Hue, Resideo, Kasa, Sonos, and more. Seam has an even longer list of supported devices and manufacturers. Both of these companies also offer "developer" accounts that allow limited access and/or limited device counts. I guess it would be possible to develop a node server that integrated with a developer account, and then require each person to establish a developer account at the company in order to utilize the node server. I believe that is how the Honeywell Thermostat node server works today. But I have to admit that being web-based and all the rigamarole is a bit de-incentivizing to making a good node server. The other possibility would be to try and establish a paid account with one of these platforms (they both allow multiple user accounts to segment devices), but I doubt the node server sales income would cover the costs. I'll keep looking and let you know what more I find out. BTW, this is exactly the sort of BS I am hoping Matter eliminates.
  21. It's also possible this is a PG3x thing and not a PG3 thing, so that may narrow down where to look.
  22. @bpwwer, AFAIK from the two attached node server log files, both node servers are running along swimmingly, and then udi_interface logs this message: 2023-06-21 13:05:54,611 MQTT udi_interface.interface INFO interface:_disconnect: MQTT Unexpected disconnection. Trying reconnect. rc: 16 About 10 seconds later, the udi_interface throws this error: 023-06-21 13:06:09,269 MQTT udi_interface.interface ERROR interface:_disconnect: MQTT Connection error: An exception of type timeout occured. Arguments: ('_ssl.c:1117: The handshake operation timed out',) Traceback (most recent call last): File "/var/polyglot/pg3/ns/0021b90261c8_1/.local/lib/python3.9/site-packages/udi_interface/interface.py", line 460, in _disconnect self._mqttc.reconnect() File "/var/polyglot/pg3/ns/0021b90261c8_1/.local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1073, in reconnect sock.do_handshake() File "/usr/local/lib/python3.9/ssl.py", line 1310, in do_handshake self._sslobj.do_handshake() socket.timeout: _ssl.c:1117: The handshake operation timed out It then appears that the node server is "restarted," or at least all of the initialization routines are performed again. Another 10 seconds, the udi_interface throws the same "handshake operation timed out." The node server continues to run and attempt to update the node driver values (it's initializing) but gets dozens of warnings and errors like these: 2023-06-21 13:06:37,775 MainThread udi_interface.interface WARNING interface:send: MQTT Send waiting on connection :: {'config': {'version': '3.0.8'}} 2023-06-21 13:06:40,782 MainThread udi_interface.interface ERROR interface:send: MQTT Send timeout :: {'config': {'version': '3.0.8'}}. That goes on for a few minutes and then the user evidently pulled the plug. These events are almost exactly the same in both node server log files as well as having similar timestamps. Note that my node server (EnvisaLink-DSC) doesn't rely on or have a connection to an Internet service - just a direct connection to the Envisalink device over the local network. It appears to me that it was PG3x (or the MQTT broker) that yacked when the Internet connection went down and the node servers (specifically, udi_interface) were never able to reconnect. Perhaps you can get @GTenchto give you a PG3 log file.
  23. The log file contains the same errors here as in the EnvisaLink-DSC log file you posted earlier. Again, this appears to be a PG3/PG3x issue. I suggest you post a message with the log file(s) in the PG3 or PG3x support forum regarding this issue.
  24. All those errors are from the udi_interface (the PG3/PG3x) side of the node server interface. @bpwwer would be the man to investigate here.
  25. How short? Also, are you talking about Internet outage or local network outage? Do you have a log file where the disconnect happened?
×
×
  • Create New...