-
Notifications
You must be signed in to change notification settings - Fork 540
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
Conversation
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.
This resolves #32 |
What that ever merged? |
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. |
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. |
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. |
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 |
guess there's no interest in this. I've moved off of smartthings so time for me to move on! |
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.