I purchased this wi-fi door/window sensor:
it looks like this:
and after configuration in the SPC IoT app, it works just as expected: if the door opens, there’s a “SPC Aperior opened!” notification, and if the door closes, there’s a “SPC Aperio closed!” notification.
Since there is no SPC binding for this product, is there a ‘generic’ binding that can be used to integrate this sensor in OpenHab?
Thank you very much!
Does the device have a API? This would be something the manufacturer would provide. You may be able to use HTTP to access the device.
Edit to Add:
It says it works with Alexa and Google assistant both of which have bindings in OpenHAB.
I can see the sensor’s IP in the network. I tried to connect directly to it in a browser, but, as expected, I got a ERR_CONNECTION_TIMED_OUT.
Since its name in the network is ESP_9566D2, I believe this device is based on a ESP processor. I searched for an API, but found none.
Does knowing it is named ESP_9566D2 help in any way? Might there be other devices based on the same hardware that could give a clue on what binding to use?
Thank you very much!
I just read your edit.
This is a really basic question, @Andrew_Rowe (sorry for that!), but I need a Google Home device to be able to use the google binding as you suggested, right?
is this your first device? Do you have OpenHAB running on a machine yet? I see you are new member, welcome to the openhab community, don’t worry about asking basic questions, that is why we are here
To answer your specific question, there is no such thing as a “generic” binding. You have high level bindings (Zwave, Zigbee, etc.) that provide a way to integrate with specific APIs or technologies. And you have low level bindings that give you the tools to build a connection to devices using that device’s API.
Since there is no API for these devices, there is not going to be a binding that is possible. The fact that it’s based on ESP may mean you can flash it with alternative firmware (e.g. Tasmota, ESP Easy) which does provide an API that OH can interact with. But that usually requires some soldering and purchase of a programmer.
Yes, I’m really a noob
Thank you very much for being wiling to answer even very basic questions! That means a lot to me and says a lot about this community. Many thanks!!
I already tried other devices like the Phillips Hue and Xiaomi Mi smart lamp, but I’m still trying to figure out what will work the best for me. I’m not looking for a full-blown solution. I’d like to integrate many different technologies so that I learn a bit in the process.
These sensors, from SPC (https://www.spc.es/smarthome), are low-cost and they seem to work quite well, but I’d need them to work with OpenHab, of course, but I still haven’t managed to do that.
If I understood correctly, there are different implementations of APIs to interact with ESP hardware, so there isn’t a unique way that works across all devices. If I flash a device with a known firmware, than OH could communicate with its API. OK, now it’s clear, thanks for the explanation!
I wonder if the companies that re-brand these sensors (I believe they are manufactured in China and then re-branded in Europe) would be willing to share some information about the API. Wouldn’t it be positive for those companies that more people could use their hardware with OpenHab? @rlkoshak Do you think it is worth it to ask them?
Thanks a lot!
No because the data they can collect while you are using the devices is almost if not more profitable than the money they made selling you the device. They can also leverage the fact that you are stuck in their walled garden to get you to buy more of their stuff.
But, it’s always worth asking. The worst they can do is say no.