Binding for Sensibo Sky available

Thank you for your efforts.

Is anyone interested in continuing the development of this binding?
As I can see the only “big” thing which needs to be added is to fetch all data from the device (not just temp and humidity).

Anyway is there someone who uses the older rules to control Sensibo? Is it still working? Which is better right now?

New implementation submitted, prebuilt binary and documentation found by reading https://github.com/openhab/openhab2-addons/pull/5576

Testing feedback welcome.

Arne

Thank you very much! I will test it this weekend!

Can it do multiple devices I will test now

I can’t install it on 2.4 stable, GSON import is missing:

Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.sensibo-2.5.0-SNAPSHOT.jar

org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.sensibo [284]

  Unresolved requirement: Import-Package: com.google.gson; version="[2.8.0,3.0.0)"

	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]

	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [10:org.apache.felix.fileinstall:3.6.4]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]

Yes, 2.5.0+ builds have gotten this dependency upgrade requirement.

You can install the newer gson bundle from maven repo; jar (235 KB)

Just copy it into the addons folder like you did with the binding file.

Hmm, I have added it, but the same error happens. Maybe a restart is required…
I will test this further on the weekend

Yes it works after restart

@seime

Thank You for getting this going excellent work.

I running openHAB 2.4.0-1 (Release Build) openhabian on RPI3
It is working good for both my sky’s
The only thing is the names come up as the mac addresses like

sensibo:sensibosky:home:45cfd940ee11:targetTemperature

Things File

Bridge sensibo:account:home "Sensibo account" [apiKey="Awesom_Work", refreshInterval=120] {
    Thing sensibosky lounge "Sensibo Sky Lounge" [ macAddress="45:cf:d9:40:ee:11" ]
    Thing sensibosky bedroom "Sensibo Sky Bedroom" [ macAddress="45:cf:58:0e:bd:d6" ]
}

The naming of the thing I thought would have been
sensibo:sensibosky:home:lounge
sensibo:sensibosky:home:bedroom

Like the hue:0210:mybridge:bulb1 example in

Thankyou again I can delete redundant rules now.

For others following along.
Easy way to find mac address is to navigate to
https://home.sensibo.com/api/v2/users/me/pods?fields=*&apiKey=YOURKEY
and find “macAddress”: “42:cb:d9:04:re:11”,

Changed things file and they are coming up as expected now.

Bridge sensibo:account:home "Sensibo account" [apiKey="ENTER_KEY_HERE", refreshInterval=120] {
    Thing sensibosky lounge "Sensibo Sky Lounge" @ "Lounge" [ macAddress="" ]
    Thing sensibosky bedroom "Sensibo Sky Bedroom" @ "Bedroom" [ macAddress="" ]
}

It does multiple devices yes

Hi @denominator;

I will try to change the channel names. The channel you are mentioning (as well as the other controlling channels) are dynamic in the sense that state values/valid values are based on lists returned by the API. So it was a bit of a headache to get it working for both discovery and thing files.

Are you sure you have not mixed the manually configured things and the auto discovered things?

Thing file based things have channel names like sensibo:account:home:lounge:currentTemperature but auto-discovered types have channel names like sensibo:account:home:<MAC ADDRESS>:currentTemperature

Thanks for explaining I didn’t know it was auto discovering them. It makes sense now

For me it doesnt work after restarting openhab. Can you try it on 2.4?

Kristof,

I am running the binding on 2.4 as well as in the latest 2.5 snapshot version. AFAIK the only changes necessary is the addition of the gson library in a newer version.

Could you send me your logs as well as the output from running bundles:list in openhab-cli?

Regards,

Arne

This is weird because I have tried it installing on my test setup (Debian VM) and there it works… on my Raspberry where I run my system, I have tried restarting the Raspberry, openHAB, nothing really helps…

The same import error. Looks like it can’t find the gson library.

The CLI says that Gson is Active:

286 │ Active    │  80 │ 2.8.5                  │ Gson

When I try to start the Sensibo bundle:

openhab> bundle:start 288
Error executing command: Error executing command on bundles:
        Error starting bundle 288: Could not resolve module: org.openhab.binding.sensibo [288]
  Unresolved requirement: Import-Package: com.google.gson.annotations; version="[2.8.0,3.0.0)"

I have tried this binding on my testing server where I was able to install it.
However there, after adding the API key, I get this error:

error fetching initial data java.lang.IllegalStateException: Expected BOOLEAN but was BEGIN_OBJECT at path $.smartMode
2019-05-11 20:48:17.893 [INFO ] [ternal.handler.SensiboAccountHandler] - Error initializing Sensibo data
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BOOLEAN but was BEGIN_OBJECT at path $.smartMode
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:927) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:994) ~[?:?]
	at org.openhab.binding.sensibo.internal.handler.SensiboAccountHandler.sendRequest(SensiboAccountHandler.java:223) ~[?:?]
	at org.openhab.binding.sensibo.internal.handler.SensiboAccountHandler.refreshModel(SensiboAccountHandler.java:203) ~[?:?]
	at org.openhab.binding.sensibo.internal.handler.SensiboAccountHandler.lambda$0(SensiboAccountHandler.java:146) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.lang.IllegalStateException: Expected BOOLEAN but was BEGIN_OBJECT at path $.smartMode
	at com.google.gson.internal.bind.JsonTreeReader.expect(JsonTreeReader.java:162) ~[?:?]
	at com.google.gson.internal.bind.JsonTreeReader.nextBoolean(JsonTreeReader.java:190) ~[?:?]
	at com.google.gson.internal.bind.TypeAdapters$3.read(TypeAdapters.java:144) ~[?:?]
	at com.google.gson.internal.bind.TypeAdapters$3.read(TypeAdapters.java:133) ~[?:?]
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) ~[?:?]
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) ~[?:?]
	... 12 more

Kristof,

please turn on DEBUG log level for this binding and send me the log.
NOTE: The log contains your API key, please remove before sending!