Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update method for determining hub uptime #33

Closed
wants to merge 3 commits into from
Closed

Update method for determining hub uptime #33

wants to merge 3 commits into from

Conversation

raman325
Copy link

Hub properties are not being written to InfluxDB

h.hub.getDataValue("uptime") is returning null which is causing the write to fail since Influx expects an integer and is instead getting the value "null". h.hub.uptime returns the unix timestamp of the last time the hub booted up and can be used to calculate uptime. Changed the variable name to better reflect the value being stored.

h.hub.getDataValue("uptime") is returning null which is causing the database write to fail. h.hub.uptime returns the unix timestamp of the last time the hub booted up and can be used to calculate uptime. Changed the variable name to better reflect the value being stored.
@raman325 raman325 mentioned this pull request Jan 16, 2018
@raman325
Copy link
Author

This resolves #32

@edasque
Copy link

edasque commented May 7, 2018

What that ever merged?

tteggelit added a commit to tteggelit/SmartThingsInfluxDB that referenced this pull request Nov 26, 2018
@freddyrayes
Copy link

This method does not resolve correct uptime, it replaces it with last bootup time of the device. You could take the timestamp of hub last boot and subtract current time to get real "uptime" of the device.

@raman325
Copy link
Author

correct... I submitted it as a quick fix to get the rest of the properties written to InfluxDB properly and mentioned in the description that it does not calculate uptime. With that being said, I ended up fixing it on my end but did not update the original PR. I will add the changes shortly.

@freddyrayes
Copy link

nice, thanks. I ended up merging with 46894f1 from pull request 27

using h.hub.getDataValue("uptime")), I haven't verified it yet with my influx database.

@raman325
Copy link
Author

I think you will run into the same issue that I had which led me to submitting this PR. But give it a shot, and if it doesn't work you can try the changes here

@raman325
Copy link
Author

raman325 commented Mar 5, 2022

guess there's no interest in this. I've moved off of smartthings so time for me to move on!

@raman325 raman325 closed this Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants