[RELEASE] SensorPush Gateway Driver

I think its fine. i changed to 20 minute schedule interval and it schedules nicely.
I tried it at 1 minute and it polls every minute just as expected.

1 Like

Could be the way I programmed the scheduling of the cron job, certain values may not work with the format I used. I might take a look sometime soon.

Glad to hear you got it working.

Forgot to mention, if you're keen to setup an hourly refresh before I look at the built in schedule, you can turn off the automatic polling and setup an rm rule to do a device refresh on the gateway device on an hourly schedule.

20 minutes is fine. i just didn't want to yield undue load on their cloud endpoint. i know a company that almost got killed by amazon after their user community flooded their system with too many api calls.

1 Like

Looks like I got the scheduling parameters around the wrong way... So worked out well that it came up as a question during your install. It will always poll at 1 minute intervals, the preference setting just changes the second within the minute when this occurs. I'll update the driver shortly.

Simon

I have updated the Sensor Push Gateway Driver to correct an issue with the automatic polling, it now honours the interval setting correctly.

I still haven't got my drivers into HPM, so you will need to update the drtiver code manually, then open the gateway device and click "Save Preferences" for the change to take effect.

Thanks,
Simon

Hi Simon,

I was visiting friends over the weekend so just got this updated today.
Works like a charm. I added another sensor to the gateway before i left but i didn't do anything to include it into hubitat. This morning i updated the driver, hit refresh and boom i got my new sensor there. Changed the polling to 1 minute to test things out before i set it back to 20 minutes.

Awesome work!

The required screenshot... :slight_smile:

Screenshot 2021-04-19 144806

1 Like

Glad to hear you had such a good experience, thanks for the feedback.

Its great stuff. I'll send you a virtual stogie :clap: :clap: :clap:

1 Like

Made another correction to the CRON job settings, not sure how I still got it wrong last time... It should now honour the number of minutes configured for the device.

Changes to SensorPush Gateway Driver:

HTTP calls to the SensorPush API are asynchronous to reduce the load on the HE hub
Driver is now available through HPM (version 1.0.1)

If you decide to install the driver via HPM but already have it installed, you will need to update the gateway virtual device to point to the copy HPM installs, then remove the old driver from the Drivers Code section. Use the timestamp in the Drivers Code screen as an indicator of which is the more recent copy.

1 Like

Released fix for new asynchronous HTTP calls which causes errors in retrieving temperature and humidity readings once an access token expires. Please update to the latest version (1.0.2) if you had previously applied the last update I released (1.0.1).

1 Like

Thanks for this!

However, for some reason I have hit Auth token and refresh every morning cause it loses its communication every night? Anything to this? Setting I am missing?

I currently have an rm rule to get this each night, but intend to add this in to the driver itself at some point

So what RM are you using then? I am going to do a refresh at midnight. However, I might be wrong, I usually have to hit "authtoken" each time as well to get the values to sync again.

I'll need to double-check in 2-3 hrs, but yes, I believe it is the auth token command.

K. Let me k kw as I can not find a way to do this. Only to refresh.

The run custom action is what you need to include in the rm rule. I will provide a screenshot when I look up my rule

Awesome, I would appreciate it. Not finding it on my own. Hopefully sending this command nightly will fix this issue. Not sure if it can be hardcoded either so this no longer occurs.

Here are the screenshots. I intend to put in a nightly routine as part of the driver so you don't need to do this. Not sure I will make it configurable, but probably need some way to either turn it off or detect that it is not required.

Screenshot of the Rule:

Screenshot of the Action: