Jump to content

Polling error


Go to solution Solved by vspete,

Recommended Posts

Posted

Just installed the plug-in (1.12.2). After startup completed, the eISY was correctly populated with my shades and scenes. However, no status or controls are available in admin console.  the PGx plug-in log shows the following errors :

 
2024-09-15 10:50:09.585 Thread-2707 (poll) udi_interface INFO Controller:getHomeG2: getHomeG2 gateway good 192.168.46.37, ['192.168.46.37']
2024-09-15 10:50:09.667 Thread-2707 (poll) udi_interface INFO Controller:updateAllFromServerG2: rooms = [35548, 14454, 18230, 51882, 4711, 5942, 22692, 41649, 39979, 14194, 40449, 59435, 54655, 34988]
2024-09-15 10:50:09.762 Thread-2707 (poll) udi_interface INFO Controller:updateAllFromServerG2: shades = [53098, 10015, 53439, 13409]
2024-09-15 10:50:09.851 Thread-2707 (poll) udi_interface INFO Controller:updateAllFromServerG2: [59315, 46541, 3024, 46928, 50762, 41272, 1496, 22300, 1604, 27025]
2024-09-15 10:50:09.851 Thread-2707 (poll) udi_interface INFO Controller:updateAllFromServerG2: updateAllfromServerG2 = OK
2024-09-15 10:50:09.851 Thread-2707 (poll) udi_interface INFO Controller:poll: event(total) = [{'evt': 'home', 'shades': [53098, 10015, 53439, 13409], 'scenes': [59315, 46541, 3024, 46928, 50762, 41272, 1496, 22300, 1604, 27025]}]
2024-09-15 10:50:19.465 Thread-2738 (poll) udi_interface INFO Shade:events: shortPoll shade 53098 update
2024-09-15 10:50:19.465 Thread-2739 (poll) udi_interface INFO Shade:events: shortPoll shade 10015 update
2024-09-15 10:50:19.465 Thread-2740 (poll) udi_interface INFO Shade:events: shortPoll shade 53439 update
2024-09-15 10:50:19.465 Thread-2741 (poll) udi_interface INFO Shade:events: shortPoll shade 13409 update
2024-09-15 10:50:19.465 Thread-2742 (poll) udi_interface INFO Scene:events: shortPoll scene 59315 update
2024-09-15 10:50:19.465 Thread-2743 (poll) udi_interface INFO Scene:events: shortPoll scene 46541 update
2024-09-15 10:50:19.465 Thread-2744 (poll) udi_interface INFO Scene:events: shortPoll scene 3024 update
2024-09-15 10:50:19.466 Thread-2745 (poll) udi_interface INFO Scene:events: shortPoll scene 46928 update
2024-09-15 10:50:19.466 Thread-2746 (poll) udi_interface INFO Scene:events: shortPoll scene 50762 update
2024-09-15 10:50:19.466 Thread-2747 (poll) udi_interface INFO Scene:events: shortPoll scene 41272 update
2024-09-15 10:50:19.466 Thread-2748 (poll) udi_interface INFO Scene:events: shortPoll scene 1496 update
2024-09-15 10:50:19.466 Thread-2749 (poll) udi_interface INFO Scene:events: shortPoll scene 22300 update
2024-09-15 10:50:19.466 Thread-2750 (poll) udi_interface INFO Scene:events: shortPoll scene 1604 update
2024-09-15 10:50:19.466 Thread-2751 (poll) udi_interface INFO Scene:events: shortPoll scene 27025 update
2024-09-15 10:50:19.467 Thread-2742 (poll) udi_interface ERROR Scene:events: scene event error sid = 59315
2024-09-15 10:50:19.467 Thread-2743 (poll) udi_interface ERROR Scene:events: scene event error sid = 46541
2024-09-15 10:50:19.467 Thread-2744 (poll) udi_interface ERROR Scene:events: scene event error sid = 3024
2024-09-15 10:50:19.467 Thread-2745 (poll) udi_interface ERROR Scene:events: scene event error sid = 46928
2024-09-15 10:50:19.467 Thread-2746 (poll) udi_interface ERROR Scene:events: scene event error sid = 50762
2024-09-15 10:50:19.468 Thread-2747 (poll) udi_interface ERROR Scene:events: scene event error sid = 41272
2024-09-15 10:50:19.468 Thread-2748 (poll) udi_interface ERROR Scene:events: scene event error sid = 1496
2024-09-15 10:50:19.468 Thread-2749 (poll) udi_interface ERROR Scene:events: scene event error sid = 22300
2024-09-15 10:50:19.468 Thread-2750 (poll) udi_interface ERROR Scene:events: scene event error sid = 1604
2024-09-15 10:50:19.468 Thread-2751 (poll) udi_interface ERROR Scene:events: scene event error sid = 27025
 
This sequence repeats at every shortpoll interval. Any help would be greatly appreciated.
Posted (edited)

So, looks like you have one G2 gateway & it is good & it is finding a list of shades & scenes.

Your lists don't look quite right.

Do you really have 14 rooms in the app, with only 4 shades and 10 scenes?

So you either really have 14 rooms and the plugin is not finding all the shades/scenes or the app has a bunch of empty rooms which may be messing up the sifting of the arrays

I don't have a G2 so all my troubleshooting has been with a few users;  I need to ask some questions.

Can you look at what you have in the power view app and report back what's there.  Even feel free to delete rooms or scenes you are not using.

Let me know what are the numbers of rooms, which have what shades.  And the scenes you have.  Also if you are using the multi-room scene option (the scene spans rooms).

thx

 

Edited by sjenkins
Posted

Thanks for the speedy reply. I didn't get notified of your post which is why this response is so late.

I cleaned up the empty rooms leaving me with 3 "real rooms" and a "default" room where the multi-room scenes are registered.  I also removed a couple of seldom used scenes using the app.  Once this was complete, I removed the plug-in and reinstalled to a different slot. Unfortunately, when the plug-in "discovered" the rooms and shades, it created nodes for the scenes that I had previously deleted. The logs show the same scene errors as before.

I expect that troubleshooting this will be a challenge.  I have some other ways (using network resources and web "get" commands), to control the shades from the eISY, so for now I think I will use that method.

I had used the hunter douglas apple homekit integration prior to trying the PG3x plug-in. I expect that is where the shadeless rooms came from.  I removed that integration prior to the testing described above, but things may be cached somewhere and not cleared (despite an accurate home showing in the hunter douglas app).

Thanks again for your help.  If I learn anything of interest, I will report it here.

Best/Pete

Posted

@vspete , this should ping you this time.

if you send me, PM me if you like, the results of these url's I may be able to find the issue, and make the plugin more resilient, for others as well.

http://{g}/api/shades

http://{g}/api/scenes

with {G} being replaced with your gateway, 192.168.46.37 from above if still the same.

 

Posted

I used these url's back in 2021 when I programmed the Network Resources (using GET method) on my ISY to activate the scenes I needed. Hre are the list of IDs:

Scene IDs:
46541 - Back Close
3024 -  All Open
50762 - Front Close
46928 - Front Open
1496 -  DiningRm Afternoon
22300 - LivingRm Close
1604 -  Dinner Close
27025 - Theater Close
59315 - LivingRm Front Close
41272 - LivingRm Back Close

Room IDs:
51882 - Living Room
22692 - Kitchen
41649 - Dining Room
14194 - All Rooms

Shade IDs:
11630 - Kitchen
53439 - Dining Room
53098 - Living Room Rear
10015 - Living Room Front

I can reinstall the plug-in and capture the logs if that would help you.  While the Network Resource method works, it does throw an error which needs to be ignored.  I have yet to contact UDI to see if there is a way to keep errors from being reported in UD Mobile.  Thanks again for your kind offer to work on the plug-in.

Best / Pete

 

Posted

@vspete , 

if you could send me the verbatim from those links it would be great. I’m thinking the error is from my parsing of the json array in the plugin. Since I don’t have the G2 I’m wondering if they are just different enough in your case from my other G2 tester.  Maybe because of your journey with the HomeKit. Just a text file with a few spaces between them is fine. Appreciate your patience. 

Posted

@vspete , 

Found an error in the scene node which only applies to G2 when it is looking for events, for background the arrays have a few different labels between G2/3.  This line only fires when it needs to rename the node so I am only so confident that this bug is squashed.  

I also think you are my first user of multi-room scenes but that will not be a problem until you try to activate one of them (one bug at a time).

If you would be so kind to go to the Non-production store and install from there.  We can iterate on the beta before pushing to production.  Would appreciate the logs as well.

Thanks so much!

 

Posted (edited)

@vspete,

from the logs it looks like nodes were created and the shades were updating.  The scenes were for sure erroring.  Sometimes you need to restart the admin panel & in pg3 you may have to go back to the Dashboard and back into the node to see the nodes created.

Either way I added some error proofing to the G2 code & if you are willing to stick with me and install again from the beta & do a restart & send me the logs.  It would me much appreciated.

 

Edited by sjenkins
Posted

@sjenkins

I think you have fixed all errors. Everything works and log is clean of errors.  The plug-in is quite usable now for G2 hubs.  Here are a couple of observations so far:

1. Multi-Room scenes receive the name "default room"

2. When a scene is activated, the activation parameter shows "True" briefly (one or two seconds) and than returns to "False" making it marginally usable.

3. Individual shade "Motion" remains "False" regardless of whether the shade is in motion. 

4. "Primary" for a Bottom Up capable shade reports 0-100 with 100 being fully open and 0 being fully closed. This seems to update on the long Poll. To be useful, I will shorten the poll time closer to the time it takes to actually close a shade.

5. I tested "set shade position" function and it seems to work perfectly.

Thanks again for working on my G2 hub issues.

Best/Pete

Posted (edited)

@vspete ,

so glad it’s working for you!

Also going to complement you on your quick observations, I think you picked out all the G2/3 differences. G3 gave some real improvements through an sse or event server. Sending real time events. In G3 I update through events, polling, and of course send commands. G2 remove the events.  
 

1. Default room is the name in the array from the controller. These are not a thing in G3 and none of my other G2 users used them (or mentions them. I could substitute something else for it?  Did you try them? Reason I ask is in G2 multi-room scenes were activated with a separate command. Again you are the first on using them. Let me know. 
 

2. G2 gives me no feedback when the scene is no longer active. G3 does.  Let’s say you move the shade manually, eventually all scenes would be random. So in G2 you can command activation & I leave it on for a time for feedback ease of use. Previous G2 users actually did all their movement using ISY programs.

3. Motion is a G3 event feature. Sorry it’s a zombie in G2. Design decision to use the same node for both versions. I added G2 later when I got requests. Looking back the program would have been cleaner with separate nodes.

4. Again this is how G3 shows in the app. 0 to approx 65500 is the G2 way in the opposite direction. This seemed easier. You are absolutely right to shorten the poll rate; I think I even mention that in the config instructions for G2. 
 

5. Yay!

 

As you can see this node server is prejudiced to G3. I originally wrote it for me and shared even with text that it was NOT for G2 ; then I got a couple requests from people willing to work with me as I had no G2. Feel free to give feedback or feature requests; as long as you’re willing to debug with me. I’ve never written a program right the first time even after 45 years of programming. Either way I hope this plugin provides some good use to you!

Edited by sjenkins
Edit to #1
  • Solution
Posted (edited)

@sjenkins,

Version 1.12.3 of the plug-in is working fine accross the board (at the level supported by the G2 API).  While a G3 hub might be better, I cannot justify replacing the G2 given my use case. I have tested all of the scenes and they are working fine. I will address some of your comments above from what I have observed. 

1. For the G2, "default room" is only used as the "room descriptor" for scenes involving shades in multiple rooms. In IoX I place the shades and scenes in separate folders and rename them for clarity. All the scenes work as expected. The "Activated" field shows "True" while the shades are in motion and then returns to "False"

2. For me, using defined scenes gets the job done with a minimum of commands. I seldom position the shades manually. If I need to know their current status, I could make decisions using the shade's "Primary" value.

3. As I only use scenes to set the shades and "Activated" works like "Motion" there isn't any issue. All my shades are hardwired for power, so "Battery" always reports "High" Anyone installing and automating these shades today would undoubtedly use a G3 hub, so I wouldn't bother with creating separate G2 & G3 versions.

4. You do suggest shortening the polling rate in the config instructions. I set the Long Poll at 40 seconds as it takes about 35 seconds for my longest shade to go from open to closed.

5. Having the ability to "Set Shade Position" is a nice feature of the plug-in (works great). Don't know what "Set Shade Position: False" is for?

Stephen, thanks again for the great plug-in and your steller support. Let me know if I can be of assistance should you wish to test any additional changes for G2 hub impact.

Edited by vspete
Posted

@vspete ,

Thanks for the detailed response!

To answer your position False question, it is a quirk of position setting. I could have used a blank, just means you are not currently setting the position. 
On the topic of upgrading to G3; from what I know G2 shades are tied to a G2 gateway. Pretty sure on this but the first time I asked that question I got a different answer. 
I will for sure reach out if a G2 feature request comes up. 
Also, feel free to mark this stream “solved”. 
Enjoy the plugin!

  • Thanks 1
Guest
This topic is now closed to further replies.

×
×
  • Create New...