Connecting to Azure Event Hubs?

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
RajenK
Posts: 12
Joined: 17 Nov 2014 21:28

Connecting to Azure Event Hubs?

Post by RajenK »

Hi all,

I'm quite new to Razberry/Z-Way, but one of my goals is wiring it up to Azure Event Hubs (http://azure.microsoft.com/en-us/services/event-hubs/) to log all the activity. What would you suggest be the easiest way to trigger a call to Event Hubs on every action on the Razberry (switches, data collection, etc.)?

Thanks!

Erasmuz
Posts: 29
Joined: 01 Dec 2014 23:23

Re: Connecting to Azure Event Hubs?

Post by Erasmuz »

I'm not sure about all activity, but I think it shouldn't be hard to alter the datalogging module for your needs.

There's a data logging module that already exists to save data pulled from specific devices into json format on the hard drive. I didn't look into deeply, but I would bet it wouldn't be too difficult to make a duplicate of the module that posts the data to azure, or gets it there however it needs it.

I know this isn't a 100% answer on how to do it, but hopefully that could get you started in the right direction.

pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Connecting to Azure Event Hubs?

Post by pz1 »

Extensive sensor logging to the RaZberry SD card does not seem a good idea to me. These cards do not have the robustness of harddisks and high en SSD's. Would be nice if it was possible to redirect the loggers to some other space in your home network where you have a more robust peripheral.
If you don't mind handing over your data to people with bad intentions, I think you could link up with Azure, but as in Eramuz's response you would have to fiddle with the logging module as well.
Since 29-12-2016 I am no longer a moderator for this forum

Erasmuz
Posts: 29
Joined: 01 Dec 2014 23:23

Re: Connecting to Azure Event Hubs?

Post by Erasmuz »

pz1 is correct about storing the data locally on the razberry.

Something I didn't realize until I just looked at the module is it supports logging to remote location out of the box.
Because of this you might not even have to fiddle with the data logging module's code as I was expecting would be the case (I've never used azure so I'm not sure how the data gets fed in. i.e. if there's a way to use a stream, if it supports posting, etc.) The other thing you might be able to do more quickly is if you can add a REST interface your azure application you can directly send values to the REST url using the datalogging module and write a server side script that takes those values and feeds it into your data feed how ever you want to.

RajenK
Posts: 12
Joined: 17 Nov 2014 21:28

Re: Connecting to Azure Event Hubs?

Post by RajenK »

Thanks a lot for the information, guys! That logging module will definitely provide me the starting point!

Also, what did you mean with handing over your data to people with bad intentions, pz1?

pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Connecting to Azure Event Hubs?

Post by pz1 »

Also, what did you mean with handing over your data to people with bad intentions, pz1?
I do not trust such public services are there for my interest. So I try to avoid those as much as possible.
Since 29-12-2016 I am no longer a moderator for this forum

Erasmuz
Posts: 29
Joined: 01 Dec 2014 23:23

Re: Connecting to Azure Event Hubs?

Post by Erasmuz »

RajenK, I created a usermodule based off of the datalogging module to submit data to smartenergygroups.com.

If you want to trust them with your data it's free, and allows to view usage in graphs, drill down in data, download data for your use, etc.

You can find it in the recipe section of the forum. Alternatively, it will give you another example of how to alter the module to send data to an external location.

pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Connecting to Azure Event Hubs?

Post by pz1 »

Looks nice. Thanks for sharing with the community!
Since 29-12-2016 I am no longer a moderator for this forum

RajenK
Posts: 12
Joined: 17 Nov 2014 21:28

Re: Connecting to Azure Event Hubs?

Post by RajenK »

pz1 wrote:
Also, what did you mean with handing over your data to people with bad intentions, pz1?
I do not trust such public services are there for my interest. So I try to avoid those as much as possible.
Fair enough, but to be complete: Azure Event Hubs offers the capability to create your own instance of the service, complete with security of choice. It's not a public service and no one else can access your data.
Erasmuz wrote:RajenK, I created a usermodule based off of the datalogging module to submit data to smartenergygroups.com.

If you want to trust them with your data it's free, and allows to view usage in graphs, drill down in data, download data for your use, etc.

You can find it in the recipe section of the forum. Alternatively, it will give you another example of how to alter the module to send data to an external location.
Thanks for the tip, it will definitely give me an idea on how to alter the module!

Post Reply