codersaur / SmartThings

Samsung SmartThings SmartApps and Device Handlers
Apache License 2.0
300 stars 541 forks source link

influxdb pooling: add ability to pool db writes #27

Open schulzad opened 6 years ago

schulzad commented 6 years ago
schulzad commented 6 years ago

look like https://github.com/codersaur/SmartThings/pull/20 might also fix the null value error. I can rebase off that if need be.

schulzad commented 6 years ago

Is this being maintained anymore? If not, can you add me to this repo or fork the influxdb stuff to another repo so we can get some of these changes in?

posborne commented 5 years ago

@codersaur I'm one of the SmartThings developers (as is @schulzad). Several of the core team use this integration and really enjoy it. This patch is fairly important for correct operations with a large number of devices as otherwise the softPoll generates an HubAction for each configured device. If a large number of things are configured, this results in dropped requests as the cloud has a max queue depth for LAN messages to the hub.

These errors are not exposed directly to users as the queue depth restriction is handled by a different edge service managing the connections with the hub but you can see a pretty clear 5 minute spike of errors for my home setup due to the softPoll capping out the LAN queue. This can also affect other LAN automations that may be doing something more important than syncing data to influx.

This PR collapses down all of the requests that would happen on softPoll down to a single HTTP request which keeps this from being a problem. Please let us know if you have any questions.

image

SmartCarrion commented 5 years ago

Did you guys think about creating an active fork or something? Seems abandoned here.

schulzad commented 4 years ago

Did you guys think about creating an active fork or something? Seems abandoned here.

Unfortunately the way the licensing is setup, this cannot be forked and maintained. At least not officially.