Azure IOT HUB Integration

Tags: #<Tag:0x00007fc3f8e95bb0>

Hi Everyone, I see this is a good community of helpful people. I am trying to install and configure the azure iot hub connector to my openhab2 setup but am facing some issues.

1- the documentation page is a bit sparse on the ‘how to’ guides.
2- I cant seem to set it up. Where does this need to be configured, is it available in the paper UI or does it need to be done via the console?

Any help appreciated. Once I have worked it all out I will porvide an update for the process documentation - if that helps?

Thanks,
Kev

It’s available in PaperUI. Go to the Inbox, click the + icon and choose the Azure IOT Hub. Create the Item and paste in your API key into the appropriate field.

You will then need to link the Channels on the Thing to Items.

Hi Rich, thanks so much for responding. I dont see anything in the inbox as with other bindings, azure iot hub just isnt visible. I have set up quite a few others though and feel relatively comfortable with the process now. Any other thoughts? Thanks again.

OK so progres, it became visible in this ‘services’ section once I have installed MQTT. I can now see this view in Configuration, Services:


I have added the required information but Im now not sure of the next steps, should the data become visible withing Azure now or is there a further step? Thanks again.

I know nothing of this binding nor this technology so I’ve no idea what you should be seeing.

Ok, no worries Rich thanks for responding anyway. Much appreciated.

hy there, i have added the connection string to the configuration of the Azure HUB in the openhab Paper UI, then rebooted the raspy with the openhabian, then the things appeared in the IoT device list in the Azure IoT.

@matyasg Did you bring it to run? Are you able to control your openHab items within the Azure-IoT portal?

It sounds that @shanekuz is able to run this? Can he help us?

From my point and problem:
I was able to create my azure-IoT hub and I copy the primary link with the url inside. (Important!!!)
Look like this:

HostName=YourUniqueSmartDeviceID.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=aWoNdErFuLlKeYvErYvErYvErYvErYvErYvErYvErYlOnG

Then I paste this into the config field within the openhab-adminUI and I got this error when I switch one of my relais:

2019-08-14 16:43:38.117 [ome.event.ItemCommandEvent] - Item 'relais1Switch' received command ON

2019-08-14 16:43:38.190 [vent.ItemStateChangedEvent] - relais1Switch changed from OFF to ON

==> /var/log/openhab2/openhab.log <==

2019-08-14 16:43:38.981 [ERROR] [.iot.device.transport.IotHubSendTask] - IotHubSendTask constructor called with null value for parameter transport

2019-08-14 16:43:38.984 [ERROR] [t.device.transport.IotHubReceiveTask] - IotHubReceiveTask constructor called with null value for parameter transport

==> /var/log/openhab2/events.log <==

2019-08-14 16:43:41.214 [ome.event.ItemCommandEvent] - Item 'relais1Switch' received command OFF

2019-08-14 16:43:41.240 [vent.ItemStateChangedEvent] - relais1Switch changed from ON to OFF

2019-08-14 16:44:05.004 [ome.event.ItemCommandEvent] - Item 'relais2Switch' received command ON

2019-08-14 16:44:05.029 [vent.ItemStateChangedEvent] - relais2Switch changed from NULL to ON

==> /var/log/openhab2/openhab.log <==

2019-08-14 16:44:05.261 [ERROR] [.iot.device.transport.IotHubSendTask] - IotHubSendTask constructor called with null value for parameter transport

2019-08-14 16:44:05.262 [ERROR] [t.device.transport.IotHubReceiveTask] - IotHubReceiveTask constructor called with null value for parameter transport

==> /var/log/openhab2/events.log <==

2019-08-14 16:44:05.873 [ome.event.ItemCommandEvent] - Item 'relais2Switch' received command OFF

2019-08-14 16:44:05.902 [vent.ItemStateChangedEvent] - relais2Switch changed from ON to OFF

2019-08-14 16:51:12.290 [ome.event.ItemCommandEvent] - Item 'relais2Switch' received command ON

2019-08-14 16:51:12.308 [vent.ItemStateChangedEvent] - relais2Switch changed from OFF to ON

2019-08-14 16:51:15.328 [ome.event.ItemCommandEvent] - Item 'relais2Switch' received command OFF

2019-08-14 16:51:15.352 [vent.ItemStateChangedEvent] - relais2Switch changed from ON to OFF

But I can see the two switches on my Azure-IoT hub.

Can somebody help me?

Best regards,
HowdyHo

No i never got it working sorry, there is an issue with it and NULL values that sounds like its very hard for the developers to fix so i have given up for now hoping they can put a fix in place soon.

I guess you mean this here: