ImperiHome binding 2.0

Hi all,

Since the original ImperiHome binding is not compatible with OH2, I’ve decided to take the work on me and create a new one. It’s not nearly finished, but the most essential device types (for me) are now supported.
Take a look at https://github.com/pdegeus/openhab2-addons/tree/master/addons/io/org.openhab.io.imperihome for a download link and configuration details.

Please report issues on my Github for now: https://github.com/pdegeus/openhab2-addons/issues.
I’m planning to create a pull request to get it added to the OH2 distribution when the device support is more extensive and it’s been used a little more.

@Kai If you have time, can you have a look and check if the code would be acceptable for integration?

EDIT: the download link is not part of the readme anymore. You’ll find the current snapshot build at https://dl.dvelop.nl/oh-imperihome/.

4 Likes

Hi @pdegeus - Wow - Thanks for taking this on! I’ve been wanting to move over to OH2 - but I needed Imperihoem support.

I hope to play with this later today.

Just looking at the readme on your github - is the formatting broken? It looks like the bits you wanted in {code} tags are not and those not are…

Very excited …Only just found this!

…ah …mmmm…ah…how can I install this?

My OH2 Instance is reasonably new ( from less than a day or so old ). In PaperUI I went into Configuration/System and already had “Include Experimental Extensions” set to ON - but it not listed in installable options within Extentions/Misc.

What am I missing ( other than skill :wink: )

To installation the binding you Will have to build it fom source and copy the jar into your addons folder, Just lije OH1. The reason you cant use paperui is that it isnt part og the Official build yet :grinning:

1 Like

Oh no… Ive not the skills to build it. Unless there is a really easy walkthrough??

Is it possible for anyone to host the jar file?? ( I realise that sounds lazy, but I don’t have the time right now to learn this, and would love to test and provide feedback on the binding.

Hi @greg, thanks for your feedback.
I’ve fixed the readme, Github is quite strict it seems.

There’s a build available at https://dl.dvelop.nl/oh-imperihome/. The link was in the readme, but since my pull request will be merged by @Kai soon I already updated the text to the normal installation instructions.

Let me know if everything works for you!

@pdegeus - Thanks for the jar.

It works!

I’ve added a few devices to my items file and all seem to work correctly. Ill hopefully do the remainder over the next few days and test it further!

Only one thing i noticed not working, was the Imperhome graphing for a DevTemperature device . This was handy with Vera, but never worked properly for me with the 1.x Imperihab binding, so not greatly missed, but was nice to have sometimes for some sensors( like pool temperature ) - Should this work with your binding?

Once again - Thank you for developing this!

@greg The graphs did work until a few weeks ago. Looking at my own logs it seems something in openHAB providing the default persistence service broke.
I’ll take a look at this when I have some spare time.

@greg I’ve just looked at the graphs and found out openHAB doesn’t automatically pick the first (or only) persistence service as the default anymore.
You can fix this by opening the Paper UI and going to Configuration > System > Persistence (bottom of the page). Set the Default Service to the persistence storage you’re using and click Save.

By doing so my graphs started working again. There’s currently no support to use a non-default persistence storage if you’ve set up more than one.

Let me know if this works for you. If not, it would help to get some openHAB debug logging from you when trying to open a graph in ImperiHome.

By the way, I’ve just added support for the ‘invert’ tag to the binding, allowing you to invert the state of on/off items when needed.

Hi @pdegeus
Graphs now work after i set it as default in PaperUI - i use InfluxDB.
Nice to have this back working properly - Thank you!

Im also using your newer jar.

Ive been adding my sensors back in and so far only have one issue.
With DevGenericSensor - you only support Item Type as “Number” - previously ( with old 1.x binding) ive used the DevGenericSensor for String types too. Could this be included?

eg:
String Weather_Condition “Condition [%s]” [“iss:room:Weather”,“iss:type:DevGenericSensor”] {weather=“locationId=home, type=condition, property=text”, imperihab=“room:Weather,type:DevGenericSensor” }

( ill remove the old imperihab settings later)

Cheers,
Greg

1 Like

This may be a dumb questions and apologies

But where do you place the jar file? I put in in /usr/share/openhab2/addons, and tried including the binding in the addons.cfg file.

But I do not see the ability to enable the binding the paper UI, misc area.

Hi Paul.

That’s the correct location, and No need to add to addon’s.cfg…Just copy in the jar and update your items file.

@greg

Thanks. So I should have it in the correct location. But I don’t see the binding show under Misc to activate it.

I tried connecting via the ImperHome App to my OH2 setup but it failed currently. So thinking I it needs to be actived somehow.

I did restart OH2 after adding the binding as well.

EDIT. Just saw in the wiki the change in the url to imperihome/iss. So got it connect. Just need to start trying to add some lights and switches.

@ptmuldoon Good to hear you got it up and running :slight_smile: Unfortunately the readme is a bit confusing at the moment, because it’s already updated for official integration into openHAB, making the binding available through the Paper UI.

@greg I’ve added support for String items to the generic sensor device. The snapshot jar at my server is updated.

@pdegeus - Thanks for adding string to the genericsensor type. From the opehab logs it looks like its working…but…

i now cannot get imperihome to load any devices!.
This happened after i copied over the new jar file.
Unfortunantly i didnt keep a copy of the older version, so i cannot go back and retest with it.

Using a web browser the api pages do return data…ie:

http://hal.lions.home:8011/imperihome/iss/rooms
http://hal.lions.home:8011/imperihome/iss/devices
http://hal.lions.home:8011/imperihome/iss/system

and using IH’s “configuration wizzard” it does return with the “system found” ( and some guid string)…but when i try to reload devices, it says:

Error
8a8d589a-99cd-43d5-9725-464ef4f2608c ( Imperihome Standard System):iss: Could not get device infos.

Ive tried a bunch of things:
-Get fresh version of OH2 snapshot build

  • Looked for any errors in debug imperihome loging (none found - although i did have one entry in my items trying to use DevLock , which isnt yet supported - i removed, but no change with the issue…)
    -restarted OH2 with start.sh clean ( so as to clear any internal configuration settings - i dont think your binding stores anything?)

Any ideas?

I can also see in the Openhab log, my device performing the refresh. Here is part of it:

13:24:10.756 [DEBUG] [rihome.internal.ImperiHomeApiServlet] - 10.8.0.2: GET /imperihome/iss/devices
13:24:10.758 [DEBUG] [.internal.handler.DevicesListHandler] - Device list response: DeviceList{devices=[AbstractDevice{id='5a623ee6288ee3bcd07f6bb33336929ece98b903', name='Deck Wall Lights', room='b7efb76a74598f9f246f303d790fc5073191889d', type=SWITCH, invert=false, links={energy=DeckWallLightsWatts}}, AbstractDevice{id='ed8578658976a3efb4f929a02d3cd878cc937f0c', name='PoolTest Mode:', room='778627418cb4b30cdfe47281afdbf30f1a173700', type=MULTI_SWITCH, invert=false, links={}}, HygrometryDevice{super=AbstractDevice{id='a0b5aebaa47da27beb13bcd98388c7907ed7c665', name='Hugo Room Humidity', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=HYGROMETRY, invert=false, links={}}, unit='%'}, ElectricityDevice{super=AbstractDevice{id='acfe6c7a120bf6a457a990e2dfad6a82ea2ba2ba', name='Entry FloorLight Watts', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=ELECTRICITY, invert=false, links={}}, unit='null'}, AbstractDevice{id='9a8dbae6e3a0a2bd884c5849791b537b2fb71f3f', name='Deck Pendant', room='b7efb76a74598f9f246f303d790fc5073191889d', type=DIMMER, invert=false, links={energy=DeckPendantsWatts}}, ElectricityDevice{super=AbstractDevice{id='9a04b6dfbc898e310da6747f42421da3f88e06af', name='Deck Wall Lights Watts', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=ELECTRICITY, invert=false, links={}}, unit='null'}, RainDevice{super=AbstractDevice{id='30e6168b703399218e8b742616b37af56aa43400', name='Pool pH', room='778627418cb4b30cdfe47281afdbf30f1a173700', type=RAIN, invert=false, links={}}, unit='pH'}, ElectricityDevice{super=AbstractDevice{id='5d12b982394a792f3caefa21348354881e31dd1', name='Driveway Light Watts', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=ELECTRICITY, invert=false, links={}}, unit='null'}, TemperatureDevice{super=AbstractDevice{id='df03abcec07defdbb0349e645a1efb9162b95215', name='Pool Temp', room='778627418cb4b30cdfe47281afdbf30f1a173700', type=TEMPERATURE, invert=false, links={}}, unit='°C'}, HygrometryDevice{super=AbstractDevice{id='99e16ce1e18d71f64bc662f3e476628d3cbde3c8', name='Kids Bathroom Humidity', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=HYGROMETRY, invert=false, links={}}, unit='%'}, AbstractDevice{id='ff5cff3c53476e7656e7e102f0b4953f2f5ec7b0', name='Garage Stair Light Mode:', room='f614ac324abb74a228247af73545afac53e42a36', type=MULTI_SWITCH, invert=false, links={}}, AbstractDevice{id='89abbad3d4233e6cfe5d1f6045149cb78e61fa9e', name='Bedroom TV', room='7508ff85f394eebbe8e502794dfa370c82469523', type=SWITCH, invert=false, links={energy=BedroomTVWatts}}, AbstractDevice{id='9afe0161fcd9e797c4e85392decb32ded31c32de', name='Wall Lights', room='fe3883f67033184e5229046b65087587fd75b629', type=SWITCH, invert=false, links={energy=DiningEntryDownWallLights_Watts}}, TemperatureDevice{super=AbstractDevice{id='cd4640092bd2b0f01609c363241b6bb18f119edb', name='Temperature', room='284af3e8882bbc45760521be2f100a2d104ff5d8', type=TEMPERATURE, invert=false, links={}}, unit='°C'}, AbstractDevice{id='617781280d1c554212d48e8ad25696031034b08', name='PoolTest Mode:', room='6e30c487d66bab37d41a2be627d8e378327a38c7', type=MULTI_SWITCH, invert=false, links={}}, AbstractDevice{id='29815edfb74300a4310b96cc75e6df849113ed52', name='Sonoff Switch 1', room='25ff70b3a0f68511a1861a4b49ea46c31bbf2ea3', type=SWITCH, invert=false, links={}}, TempHygroDevice{super=AbstractDevice{id='9eacefafd7e4dd47edc3258fdb7246f7f632bb7e', name='Kids Bathroom Temperature', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=TEMP_HYGRO, invert=false, links={hygro=HumidSensor_KidsBath}}, unit='°C'}, TempHygroDevice{super=AbstractDevice{id='c22183b240ec7ee3e4cd406b1a9b64090f80fb73', name='Bianca Room Temp', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=TEMP_HYGRO, invert=false, links={hygro=HumidSensor_Bianca}}, unit='°C'}, HygrometryDevice{super=AbstractDevice{id='f6c778b0255a5c2a7114288937c68f3023e764f2', name='Heidi Room Humidity', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=HYGROMETRY, invert=false, links={}}, unit='%'}, AbstractDevice{id='d087045cd5a0400042f7420435589d0e6e0f565a', name='Chandelier', room='25ff70b3a0f68511a1861a4b49ea46c31bbf2ea3', type=DIMMER, invert=false, links={energy=ChandelierWatts}}, AbstractDevice{id='a94e78f47bdd9e61ce1a9d472134d91cddeaf6cd', name='Lifx 1', room='18618c0e1e71a7995c1470d7258dd8963728818', type=RGB_LIGHT, invert=false, links={}}, HygrometryDevice{super=AbstractDevice{id='21bf3e24f9428f6cbd8ad1562a175202e3dc437e', name='Bianca Room Humidity', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=HYGROMETRY, invert=false, links={}}, unit='%'}, ElectricityDevice{super=AbstractDevice{id='924aeb599113dbb62a890d1b89f6e7742ad2a2f8', name='Entry Down and Wall Lights Watts', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=ELECTRICITY, invert=false, links={}}, unit='null'}, ElectricityDevice{super=AbstractDevice{id='99d2d5fc32de154593c0239ba6b8afa319bde190', name='Deck Pendant Watts', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=ELECTRICITY, invert=false, links={}}, unit='null'}, AbstractDevice{id='105d68907ec8983ad4c676dfc1ee57c64e2d27ba', name='Tall Light', room='9c8fc5313f3d816c04eb01d3076ca00172044ac4', type=SWITCH, invert=false, links={energy=TallLightStatus_Watts}}, AbstractDevice{id='868549086a613f1ed231c5fe270458dea675212b', name='TV Light', room='9c8fc5313f3d816c04eb01d3076ca00172044ac4', type=SWITCH, invert=false, links={energy=TVLightStatus_Watts}}, HygrometryDevice{super=AbstractDevice{id='c8046dee2bb0f63d28e773297ed3ee30db114d', name='Living Room Humidity', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=HYGROMETRY, invert=false, links={}}, unit='%'}, TempHygroDevice{super=AbstractDevice{id='f2cdb1eb3db65e5fce72a68876f0e6572f65f556', name='Living Room Temperature', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=TEMP_HYGRO, invert=false, links={hygro=HumidSensor_LivingRm}}, unit='°C'}, AbstractDevice{id='c57e8fa720b3560b0fd59f5bc56d34ea260f139e', name='Pool Light', room='778627418cb4b30cdfe47281afdbf30f1a173700', type=SWITCH, invert=false, links={}}, ElectricityDevice{super=AbstractDevice{id='d02cd6c265470239ac3b00656ab32fe6277f30f5', name='Bedroom TV Watts', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=ELECTRICITY, invert=false, links={}}, unit='null'}, AbstractDevice{id='4039041ef02a269878dfcf131d5de8bd7f43b4df', name='Kitchen Downlights', room='18618c0e1e71a7995c1470d7258dd8963728818', type=SWITCH, invert=false, links={}}, AbstractDevice{id='a21fa67222d70cbaf3f281a2395abbd289aa95fa', name='Deck Spot Lights', room='b7efb76a74598f9f246f303d790fc5073191889d', type=SWITCH, invert=false, links={energy=DeckSpotsWatts}}, AbstractDevice{id='f343d65216412ecc86104464deeae9a9590d2205', name='Island Bench', room='18618c0e1e71a7995c1470d7258dd8963728818', type=SWITCH, invert=false, links={}}, AbstractDevice{id='645f419c0320cefba11c61d7d4167d39a6a9b0bb', name='Sliding Door Lock', room='9c8fc5313f3d816c04eb01d3076ca00172044ac4', type=DOOR, invert=false, links={}}, ElectricityDevice{super=AbstractDevice{id='81fac2e2e86abacca6b2f785bc5094ab7c0e1eda', name='Chandelier Watts', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=ELECTRICITY, invert=false, links={}}, unit='null'}, ElectricityDevice{super=AbstractDevice{id='23e9e096541c390b820911a081030d6b28e7273a', name='TV Light Watts', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=ELECTRICITY, invert=false, links={}}, unit='null'}, AbstractDevice{id='c1ee20894f36f0a58e2bb63169fae5e97db331d7', name='Family Room Downlights', room='9c8fc5313f3d816c04eb01d3076ca00172044ac4', type=DIMMER, invert=false, links={}}, TempHygroDevice{super=AbstractDevice{id='4ba0106886d978b667e292c0757f65a4e209d471', name='Master Bedroom Temp', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=TEMP_HYGRO, invert=false, links={hygro=HumidSensor_MasterBed}}, unit='°C'}, AbstractDevice{id='c28ef9fab87c115722823f278b4e01adcc68795b', name='Floor Light', room='fe3883f67033184e5229046b65087587fd75b629', type=SWITCH, invert=false, links={energy=DiningEntryFloorLight_Watts}}, ElectricityDevice{super=AbstractDevice{id='3cebb4ea9413fa5101cf743709193d5d87eb8c55', name='Tall Light Watts', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=ELECTRICITY, invert=false, links={}}, unit='null'}, TempHygroDevice{super=AbstractDevice{id='bc7073ea23c2a092ebdb54b787edc8e93b87bf18', name='Hugo Room Temp', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=TEMP_HYGRO, invert=false, links={hygro=HumidSensor_Hugo}}, unit='°C'}, HygrometryDevice{super=AbstractDevice{id='4073c736fb45d47fe68064aefa07d450dd292a1e', name='Master Bedroom Humidity', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=HYGROMETRY, invert=false, links={}}, unit='%'}, HygrometryDevice{super=AbstractDevice{id='de1a199fff1111a8d4b6838c64f4df789175e2f', name='Laundry Humidity', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=HYGROMETRY, invert=false, links={}}, unit='%'}, AbstractDevice{id='786c8dd03ecb624bc2bbf72b0b06c75a004e1ddf', name='Runs Bedtime Scene', room='f77fd1fdb9f4cff6b858579ce147342ecf28dcd0', type=SWITCH, invert=false, links={}}, GenericSensorDevice{super=AbstractDevice{id='fdc49cbeab2b6383cca65e67eeb9025739e95c28', name='Pool Status', room='778627418cb4b30cdfe47281afdbf30f1a173700', type=GENERIC_SENSOR, invert=false, links={}}, unit='null'}, GenericSensorDevice{super=AbstractDevice{id='f7b0044b0e0b4ddf6bfb94861381d9b7704a00bb', name='Condition', room='284af3e8882bbc45760521be2f100a2d104ff5d8', type=GENERIC_SENSOR, invert=false, links={}}, unit='null'}, AbstractDevice{id='b5b16b03fdb9646527e5a5c9b7cb74e09d7a5af6', name='Driveway Lights', room='b7efb76a74598f9f246f303d790fc5073191889d', type=SWITCH, invert=false, links={energy=DrivewayLightWatts}}, AbstractDevice{id='78ac56f8900c8e2621c09d8c6c1d9aad5cb233d1', name='Downlights', room='fe3883f67033184e5229046b65087587fd75b629', type=SWITCH, invert=false, links={energy=DiningEntryDownWallLights_Watts}}, AbstractDevice{id='840736cc1d1499ce80a5babee04bf4d730d38af2', name='Party Time', room='f77fd1fdb9f4cff6b858579ce147342ecf28dcd0', type=SWITCH, invert=false, links={}}, HygrometryDevice{super=AbstractDevice{id='680d76732d0e0e482ee4130e2941514fb59b7589', name='Humidity', room='284af3e8882bbc45760521be2f100a2d104ff5d8', type=HYGROMETRY, invert=false, links={}}, unit='%'}, TempHygroDevice{super=AbstractDevice{id='9f64732a68cf4e198fc388769f4634d2bd56da8c', name='Heidi Room Temp', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=TEMP_HYGRO, invert=false, links={hygro=HumidSensor_Heidi}}, unit='°C'}, AbstractDevice{id='5a15bb67309201bb0bc6169ed157dff573676e84', name='Lifx 2', room='18618c0e1e71a7995c1470d7258dd8963728818', type=RGB_LIGHT, invert=false, links={}}, TemperatureDevice{super=AbstractDevice{id='4e703b5aef5243b75ee52c70dc1f14dd24788195', name='Roof Temp', room='778627418cb4b30cdfe47281afdbf30f1a173700', type=TEMPERATURE, invert=false, links={}}, unit='°C'}, WindDevice{super=AbstractDevice{id='e3b6a9efd7db7328c0f7098357eccc95b9c1843c', name='Windspeed', room='284af3e8882bbc45760521be2f100a2d104ff5d8', type=WIND, invert=false, links={}}, unit='km/h'}, ElectricityDevice{super=AbstractDevice{id='82c46438e00604c5de5a4524cbd559f63dc98d96', name='Deck Spot Watts', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=ELECTRICITY, invert=false, links={}}, unit='null'}, TempHygroDevice{super=AbstractDevice{id='215acb91e6e110ad2060d6a464ad99fcc965ba8b', name='Laundry Temp', room='e260913dd53f657d4706c7a608213d2ebb53280a', type=TEMP_HYGRO, invert=false, links={hygro=HumidSensor_Laundry}}, unit='°C'}, RainDevice{super=AbstractDevice{id='c26a75ad8d170fcc7aca8977fa2e1959860221d9', name='Rain', room='284af3e8882bbc45760521be2f100a2d104ff5d8', type=RAIN, invert=false, links={}}, unit='mm/h'}]}
13:24:11.481 [INFO ] [marthome.event.ItemStateChangedEvent] - GarageDoorMQTT_LastUpdate changed from 2016-10-31T13:24:03.613+1100 to 2016-10-31T13:24:11.476+1100
13:24:14.135 [DEBUG] [ernal.model.device.TemperatureDevice] - Device item TempSensor_RoofTemp (Type=NumberItem, State=57.4, Label=Roof Temp, Category=temperature, Tags=[iss:unit:°C, iss:type:DevTemperature, iss:room:Pool], Groups=[gPool, gSensors]) state changed to 57.4
13:24:14.138 [INFO ] [marthome.event.ItemStateChangedEvent] - TempSensor_RoofTemp changed from 57.8 to 57.4
13:24:14.141 [DEBUG] [ernal.model.device.TemperatureDevice] - Device item TempSensor_PoolWater (Type=NumberItem, State=24.3, Label=Pool Temp, Category=temperature, Tags=[iss:unit:°C, iss:type:DevTemperature, iss:room:Pool], Groups=[gPool, gSensors]) state changed to 24.3
13:24:14.147 [DEBUG] [ome.internal.model.device.RainDevice] - Device item Pool_pH (Type=NumberItem, State=8.4, Label=Pool pH, Category=pressure, Tags=[iss:type:DevRain, iss:unit:pH, iss:room:Pool], Groups=[gPool, gSensors]) state changed to 8.4
13:24:14.152 [INFO ] [marthome.event.ItemStateChangedEvent] - PoolStatusUpdateMQTT changed from 2016-10-31T13:23:43.945+1100 to 2016-10-31T13:24:14.144+1100

Hmm, I haven’t seen that error before.
Can you post/attach the output of /rooms, /devices and /system?

HI @pdegeus - Ive sent these to you via direct message ( i hope).

Thanks for looking at it.

Greg

@pdegeus Hi, I have dug deeper and the issue looks to be related to the last change to DevGenericSensor returning some extra bits…

I raised an issue in guthub for this.

Thanks.

Cool, thanks. With the details you provided I (hopefully ;)) fixed the bug.
New build available at https://dl.dvelop.nl/oh-imperihome/.