SleepIQ Binding issue polling Sleep Number API

I unistalled, I cleared cache. I put the jar file in the addons folder and it is not showing up when I do bundle:list, but all of my other jar files in the addons folder are. I am at a loss why it is not working.

It should workā€¦ I have been running the new binding since 1/25.

openhab@automation40:/opt/openhab/addons $ ls -l
total 92
-rw-r--r-- 1 openhab openhab 91947 Jan 25 13:17 org.openhab.binding.sleepiq-3.3.0-SNAPSHOT.jar
openhab@automation40:/opt/openhab/addons $ 

Thanks for your help. Looking at your screenshot, made me realize I was not downloading correctly. All is fixed now. I have the file download correctly.

Guys, I have a version of the binding that polls for the daily sleep data (sleepIQ, heart rate, resp rate) a little differently (the poll is triggered using the ā€œinBed/outOfBedā€ status). Hopefully it will reduce the flapping that occurs as a result of the hourly polling, but Iā€™m not terribly confident until I test it. And I havenā€™t been able to test it because I havenā€™t been home in a while. Hope to get to that this week. Itā€™s a bit of a pain because my dev environment is in one home, and the bed is in another home, and my home-to-home VPN tunnel isnā€™t working yet thanks to Comcastā€™s new Fiber-to-the-Home service. :sob: How can you roll out a service when your support people donā€™t know how it works??? :roll_eyes: Hoping to get that sorted out this week, too, but we shall see.

@jjennings308 Glad you got the issue with loading the binding sorted out. I was going to suggest that you might not be downloading the actual binding, but instead just an HTML page. But @Dan_H beat me to it. :wink:

Please post any issues you have with the version youā€™re running. So far, itā€™s been running very smoothly for me and Dan_H.

Just installed the Openhab3.2 addon as I was seeing the same thing with the default version, API disconnecting frequently.

Will update with what I see, if still requested.

@siperkins The production milestone build does not have the latest binding that Mark has been working on. Once you get this test binding installed it will be very stable. I have been running versions of this for 30+ days and it never disconnects.

BTW, I posted a new version that handles the daily and monthly sleep data a little bit better.

Any time bed status changes from inBed to outOfBed, I wait 5 minutes, then pull the daily and monthly sleep data for that specific sleeper. Itā€™s been running well for me for the past week or two. Only quirk I see so far is if you get out of bed briefly in the middle of the night., it will see the bed status change and pull the daily and monthly data. Thereā€™s no real downside to this, since the daily and monthly data get updated when you get out of bed for good.

Would be curious to get other opinions on this.

I now have a rule that triggers when I walk in the kitchen in the morning. It tells me how badly I slept. LOL

Does that require OH3.3? Iā€™m currently on OH3.2 so installed that version.

No. Itā€™ll work work fine on 3.2

@mhilbush I am now running the latest snapshot. I will let you know if I notice anything.

All looking good for me too so far, way more stable on the API, Sleep number modifications works fine. I just have a basic list with a the values/settings so far, but will try and get it in to a widget as my understanding of openhab improves.

Iā€™m new to openhab, but is there an easy way that Iā€™m missing for changing the measurement values to different units (say minutes to hours for sleep goal, etc)

Do you know if the ā€œPrivacy Modeā€ and other options are open on the API? It would be nice to be able schedule that, another improvement would be accessibility to the flex base settings.

Willing to help in any way I can, but my programing skill set is basic and unruly.

The API supports privacy mode (the API calls it ā€œpauseā€). But I havenā€™t added a channel to be able to turn it ON and OFF. Should be an easy change that I can get to within the next few days.

Iā€™m not sure about the flex base settings.

Well, it ended up being more than a few days. :roll_eyes: I got a bit busy and never got around it.

But, I just posted a new version that add a privacyMode switch channel. Sending an ON to this channel will turn on privacy mode.

I will install and soak it today. Do you know when this binding will make it to a milestone build?

Itā€™s pretty close to being ready to submit the PR. I had been procrastinating on updating the READMEā€¦ Hope to submit it in the next week or so. But I canā€™t predict when it might be reviewed and accepted. There are an extensive amount of changes, so the review likely will take some time.

Not a problem. Understood. It is exciting to have a solid SleepIQ binding again!

@mhilbush I found an issue with the latest snapshot this morning.

When I enabled the new snapshot i see the following log messages:

2022-03-29 08:44:17.814 [DEBUG] [eepiq.internal.SleepIQHandlerFactory] - Creating SleepIQ cloud thing handler
2022-03-29 08:44:17.815 [DEBUG] [eepiq.internal.SleepIQHandlerFactory] - Registering bed discovery service
2022-03-29 08:44:17.829 [DEBUG] [internal.handler.SleepIQCloudHandler] - CloudHandler: Authenticating at the SleepIQ cloud service
2022-03-29 08:44:18.306 [DEBUG] [binding.sleepiq.api.impl.SleepIQImpl] - SleepIQ: login: status=200, content={"userId":"****","key":"***","registrationState":13,"edpLoginStatus":200,"edpLoginMessage":"not used"}
2022-03-29 08:44:18.307 [DEBUG] [eepiq.internal.SleepIQHandlerFactory] - Creating SleepIQ dual bed thing handler
2022-03-29 08:44:18.329 [DEBUG] [ternal.handler.SleepIQDualBedHandler] - BedHandler: Registering SleepIQ bed status listener for bedId=****
2022-03-29 08:44:18.330 [DEBUG] [internal.handler.SleepIQCloudHandler] - CloudHandler: Refreshing SLEEPERS
2022-03-29 08:44:18.330 [DEBUG] [ternal.handler.SleepIQDualBedHandler] - BedHandler: Updating bed properties for bedId=***
2022-03-29 08:44:18.331 [DEBUG] [internal.handler.SleepIQCloudHandler] - CloudHandler: Get bed object for bedId=-*****
2022-03-29 08:44:18.331 [DEBUG] [binding.sleepiq.api.impl.SleepIQImpl] - SleepIQ: cloudGetRequest: Invoke endpoint=/rest/sleeper
2022-03-29 08:44:18.333 [DEBUG] [binding.sleepiq.api.impl.SleepIQImpl] - SleepIQ: cloudGetRequest: Invoke endpoint=/rest/bed
2022-03-29 08:44:18.334 [DEBUG] [binding.sleepiq.api.impl.SleepIQImpl] - SleepIQ: doGet: request url=https://api.sleepiq.sleepnumber.com/rest/bed?_k=wiHVLuiHOgiVE
2022-03-29 08:44:18.335 [DEBUG] [binding.sleepiq.api.impl.SleepIQImpl] - SleepIQ: doGet: request url=https://api.sleepiq.sleepnumber.com/rest/sleeper?_k=wiHVLuiHOgiVE
2022-03-29 08:44:18.399 [DEBUG] [internal.handler.SleepIQCloudHandler] - CloudHandler: Updating bed properties for bed=***
2022-03-29 08:44:18.463 [DEBUG] [internal.handler.SleepIQCloudHandler] - CloudHandler: Refreshing BED STATUS, updating chanels with status, sleepers, and sleep data
2022-03-29 08:44:18.464 [DEBUG] [binding.sleepiq.api.impl.SleepIQImpl] - SleepIQ: cloudGetRequest: Invoke endpoint=/rest/bed/familyStatus
2022-03-29 08:44:18.466 [DEBUG] [binding.sleepiq.api.impl.SleepIQImpl] - SleepIQ: doGet: request url=https://api.sleepiq.sleepnumber.com/rest/bed/familyStatus?_k=wiHVLuiHOgiVE
2022-03-29 08:44:18.516 [DEBUG] [internal.handler.SleepIQCloudHandler] - CloudHandler: Informing listeners with bed status for bedId=****
2022-03-29 08:44:18.517 [DEBUG] [ternal.handler.SleepIQDualBedHandler] - BedHandler: Updating bed status channels for bed ***
2022-03-29 08:44:18.519 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NoSuchMethodError: 'void org.openhab.core.library.types.DecimalType.<init>(java.lang.Number)'
	at org.openhab.binding.sleepiq.internal.handler.SleepIQDualBedHandler.onBedStateChanged(SleepIQDualBedHandler.java:183) ~[?:?]
	at org.openhab.binding.sleepiq.internal.handler.SleepIQCloudHandler.lambda$2(SleepIQCloudHandler.java:306) ~[?:?]
	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:?]
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658) ~[?:?]
	at org.openhab.binding.sleepiq.internal.handler.SleepIQCloudHandler.refreshBedStatus(SleepIQCloudHandler.java:306) ~[?:?]
	at org.openhab.binding.sleepiq.internal.handler.SleepIQCloudHandler.lambda$1(SleepIQCloudHandler.java:152) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]

Once I saw this I deleted the existing thing and tried to recreate it. I received the same messages. I deleted everything again and loaded the previous snapshot and the binding worked correctly.

What version of openHAB are you running? I know they made some changes to core that affected the constructors of DecimalType, which is what this seems to be complaining about.

java.lang.NoSuchMethodError: 'void org.openhab.core.library.types.DecimalType.<init>(java.lang.Number)'

3.3.0.M1 - Milestone Build

It is on my list to go to M2. I can do that later today.