Giter Club home page Giter Club logo

azure-iot-remote-monitoring's Introduction

azure-iot-remote-monitoring's People

Contributors

aguilaaj avatar alphonzo79 avatar anhashia avatar aribeironovaes avatar azaslonov avatar clecompt-msft avatar darrenchuang avatar dominicbetts avatar dricha avatar dsajanice avatar handeadiguzel avatar inspiravetion avatar jamesweb-ms avatar joyhui avatar jtanner-msft avatar kapil-ms avatar keithcraig avatar krangel avatar manashty avatar matrixlice avatar princjef avatar rafarhat avatar riteshrao avatar sethreidnz avatar v-limliu avatar vertigo-davidb avatar wesselkranenborg avatar xzsheng avatar zhang-hua avatar zzcodework avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-iot-remote-monitoring's Issues

problem with telemetry data

Hi,
Occasionally the telemetry data history does not show (it seems that the display gets stuck on the original axes settings). This happened to me a number of times after restarting the web app. Any ideas why?

Thanks
dashboardproblem

PrepareIotSample.ps1 error s with Azure cmdlets 1.3.0

Hello there,
I am attempting a local deploy with the latest master code + VS2015 (Enterprise) + Azure Cmdlets 1.3.0 but I am getting several errors as below.
Any idea about how to fix this?

C:\Users\ddiprod\Documents\DashboardTest\azure-iot-remote-monitoring-master>C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Unrestricted -Command C:\Users\ddiprod\Documents\DashboardTest\azure-iot-remote-monitoring-master\\Common\Deployment\PrepareIoTSample.ps1 -environmentName local -configuration Debug
WARNING: This script Azure Cmdlets was tested with 1.0.3
WARNING: Found 1.3.0 installed; continuing, but errors might
occur
Import-Module : The required module 'Azure.Storage' is not
loaded. Load the module or remove the module from
'RequiredModules' in the file 'C:\Program Files (x86)\Microsoft
SDKs\Azure\PowerShell\ServiceManagement\Azure\Azure.psd1'.
At C:\Users\ddiprod\Documents\LingangDashboard\azure-iot-remote-m
onitoring-master\Common\Deployment\DeploymentLib.ps1:913 char:37
+         Get-ChildItem $modulePath | Import-Module
+                                     ~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (C:\Program F
   ile...zure\Azure.psd1:String) [Import-Module], MissingMember
  Exception
    + FullyQualifiedErrorId : Modules_InvalidManifest,Microsoft.
   PowerShell.Commands.ImportModuleCommand

nuget.exe not found. Downloading from http://www.nuget.org/nuget.exe ...
Library Microsoft.IdentityModel.Clients.ActiveDirectory not found, loading...
Microsoft.IdentityModel.Clients.ActiveDirectory Library Nuget doesn't exist. Downloading now ...
Loading Microsoft.IdentityModel.Clients.ActiveDirectory.dll Assembly ...
Library WindowsAzure.ServiceBus not found, loading...
WindowsAzure.ServiceBus Library Nuget doesn't exist. Downloading now ...
Loading Microsoft.ServiceBus.dll Assembly ...
Library WindowsAzure.Storage not found, loading...
WindowsAzure.Storage Library Nuget doesn't exist. Downloading now ...
Loading Microsoft.WindowsAzure.Storage.dll Assembly ...
Get-AzureAccount : The 'Get-AzureAccount' command was found in
the module 'Azure', but the module could not be loaded. For more
information, run 'Import-Module Azure'.
At C:\Users\ddiprod\Documents\LingangDashboard\azure-iot-remote-m
onitoring-master\Common\Deployment\DeploymentLib.ps1:537 char:16
+     $account = Get-AzureAccount
+                ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-AzureAccount:
   String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

Signing you into Azure...
Add-AzureAccount : The 'Add-AzureAccount' command was found in
the module 'Azure', but the module could not be loaded. For more
information, run 'Import-Module Azure'.
At C:\Users\ddiprod\Documents\LingangDashboard\azure-iot-remote-m
onitoring-master\Common\Deployment\DeploymentLib.ps1:542 char:20
+         $account = Add-AzureAccount
+                    ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Add-AzureAccount:
   String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

Logging in
Login-AzureRmAccount : The term 'Login-AzureRmAccount' is not
recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At C:\Users\ddiprod\Documents\LingangDashboard\azure-iot-remote-m
onitoring-master\Common\Deployment\DeploymentLib.ps1:559 char:9
+         Login-AzureRmAccount | Out-Null
+         ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Login-AzureRmAcco
   unt:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Save-AzureRmProfile : The term 'Save-AzureRmProfile' is not
recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At C:\Users\ddiprod\Documents\LingangDashboard\azure-iot-remote-m
onitoring-master\Common\Deployment\DeploymentLib.ps1:560 char:9
+         Save-AzureRmProfile -Path $profilePath
+         ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Save-AzureRmProfi
   le:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Get-AzureRmSubscription : The term 'Get-AzureRmSubscription' is
not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At C:\Users\ddiprod\Documents\LingangDashboard\azure-iot-remote-m
onitoring-master\Common\Deployment\DeploymentLib.ps1:790 char:21
+         $accounts = Get-AzureRmSubscription
+                     ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-AzureRmSubscr
   iption:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Available subscriptions:
You cannot call a method on a null-valued expression.
At C:\Users\ddiprod\Documents\LingangDashboard\azure-iot-remote-m
onitoring-master\Common\Deployment\DeploymentLib.ps1:800 char:20
+ ...      while
(!$accounts.SubscriptionId.Contains($global:SubscriptionId ...
+
+ CategoryInfo          : InvalidOperation: (:) [], RuntimeE

xception
+ FullyQualifiedErrorId : InvokeMethodOnNull

Select-AzureRmSubscription : The term
'Select-AzureRmSubscription' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the
path is correct and try again.
At C:\Users\ddiprod\Documents\LingangDashboard\azure-iot-remote-m
onitoring-master\Common\Deployment\DeploymentLib.ps1:823 char:5

  • Select-AzureRmSubscription -SubscriptionId
    
    $global:SubscriptionId
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (Select-AzureRmSub
      scription:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Available locations:

Option Region


 1 East US
 2 North Europe
 3 East Asia
 4 West US
 5 West Europe
 6 Southeast Asia

Select an option from the above list:




HTTP 405 "Method Not Allowed" Error When Bootstrapping a New DocumentDb Database

When you create a new environment and spin up the simulator, the CreateDeviceCollection() method in DocDbRestUtility throws a HTTP 405 exception: "Method not allowed". The exception only occurs the first time you attempt to spin up the environment. On subsequent runs of the simulator, the CreateDeviceCollection() method does not get called b/c the logic skips the call if the database already exists, albeit without the collection! I believe this fix solves the problem: dc758a6

Steps to Reproduce:

  1. In the Azure portal, delete the DevMgmtDB database. You may also need to delete the action table in blob storage too -- not sure. I recall there is a hook to initialize the data if the actions are missing.
  2. Run the simulator

Figure 1 -- Creating the document should set the _dbId member variable, not the _collectionId

image

Min/Max Latitude & Longitude

A little bug found in Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Infrastructure.BusinessLogic.DeviceLogic
If I set up all the devices, for example, in Europe, I get always -122.3 as minLong because all Longitudes in Europe are greater than 0.
I suggest to change the default values like these:
double minLat = 181;
double maxLat = -181;
double minLong = 181;
double maxLong = -181;

A little question as a newbie: is possible to compile and deploy all the projects except the "Web" one? For example, I change something in "Infrastructure" project and a colleague change something in "Web" project. Can we deploy separately without syncronize the code every time?

build.cmd local error

to execute the command (build.cmd local) generates the following error

MSBUILD : error MSB1008: Only one project can be specified

IG\azure-iot-remote-monitoring-master\Build_Output\

tnk

Diagnostic Log

I set the "Storage Settings" on my Web Application to a newly created blob. Every time I build a new version of my web app, this setting is deleted and I lost some important informations.
Is it a problem of the build operation? Or a bug of the platform?

Consider using pricing plans that allow continuous running when using an MSDN subscription

Currently when using this example project, azure credits are diminished very quickly! I believe it is important for people to be able to develop the solution so would suggest that the following changes are made:

},
    "storageAccountSku": {
        "type": "string",
        "defaultValue": "Standard_LRS",
        "metadata": {
            "description": "The storage Sku"
        }


    },
    "iotHubSku": {
        "type": "string",
        "defaultValue": "S1",
        "metadata": {
            "description": "The Iothub Sku"
        }


    },
    "webSku": {
        "type": "string",
        "defaultValue": "Basic",
        "metadata": {
            "description": "The Sku type of the webapp"
        }


    },
    "webJobSku": {
        "type": "string",
        "defaultValue": "Basic",
        "metadata": {
            "description": "The Sku type of the webjob"
        }

this allows running for about 3 weeks out of 4 without any (seen) problems... It would be nice to get to a full month but this is a start...

Local build error: "Get-AzureResourceGroup" not recognized

My local build is failing. Any ideas? I'm using the Developer Command Prompt for VS 2015 in admin mode, and Azure Powershell seems to be installed 1.0.

Get-AzureResourceGroup : The term 'Get-AzureResourceGroup' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At C:\Users\dick\Documents\petropi-remote-monitoring\Common\Deployment\DeploymentLib.ps1:725 char:13

  • $null = Get-AzureResourceGroup -ErrorAction SilentlyContinue -Err ...
    
  •         ~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (Get-AzureResourceGroup:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Get-AzureResourceGroup : The term 'Get-AzureResourceGroup' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At C:\Users\dick\Documents\petropi-remote-monitoring\Common\Deployment\PrepareIoTSample.ps1:36 char:26

  • $legacyNameExists = (Get-AzureResourceGroup -Tag @{Name="IotSuite ...
    
  •                      ~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (Get-AzureResourceGroup:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Running web application issue after deploying "build.cmd local"

We follow this Wiki for deploying locally via build.cmd local command - https://github.com/Azure/azure-iot-remote-monitoring/wiki/Local-deployment-and-debugging and it looks successfully.

However when we run the Web and manage to see the portal BUT there is no data in dashboad and we checked under Devices on left handside there is no device on listed. So we added a new device and just spin and spin.

In VS 2015, the error is in infrastructure\Repository\DeviceRegistryRepository.cs line 41

Task.Run(() => _docDbRestUtil.InitializeDatabase()).Wait()

Any ideas?

UPDATE:
The issue is related on this:
_The remote name could not be resolved: 'localrmd0819.documents.azure.com' _ and this is a bit odd due to DocumentDB Account exists ?!?!

Commandstatus remains pending

Hi,

Not sure if this is an issue, or that we are doing anything wrong. When we send a command to a device the command status remains pending. This happens when sending a command to a simulated device, but also to a custom device we wrote. The device is received correctly, but status is pending forever.

Configuration error with .less mimetype definition

IIS Express places an applicationhost.config file in the solution directory (.svn/applicationhost.config) with the .less mimetype arleady defined. The addition of the .less mimetype in the web.config file throws a configuration error unless the entry is first removed. Please see:

bmillerbma@6f23f98

Iot suit EventProcessor web job is always in "Pending Restart" status.

We have created a custom device and trying to Send Command to this device , but Command status is unable to change from "Peding" to "Success".
We have deployed the azure-iot-remote-monitoring solution , using "Cloud deploy" option. For deployment we followed the commands as given here .
After deploying , everything is working fine except the Eventprocessor Web Job.
Eventprocessor webjob stastus is always in "Pending Restart" state.
Please see below screenshot.

image

Any help would be greatly apreciated.

simulated device (october intergration)

Hi,
are simulated devices currently working in the branch "October intergration"? When I add simulated devices (I haven't tried real devices yet either) the devices state stays as pending forever! Also the add device page suggests that I should follow the cooler sample instructions, please add the documentation or change the pages text.

Bug in account for DeploymentLib.Ps1

the function GetAzureAccountInfo on line 535 is expecting that $account.Id (from Get-AzureAccount) is a string, when it is in fact an array. When you try to use it as a string, it automatically casts the array to a string which works just fine when you only have access to one subscription, but fails when you have access to multiple subs.

The fix is something like this:

$accountId = $account.Id

if($account.Id -is [system.array]) {
    $accountId = $account.Id[0]
}

And then just use $accountId instead of $account.Id in the code below.

Multi-tenant support

Hello,

This is more a question than an issue: Does the remote monitoring application is designed to supports multi-tenancy? In other terms, does it implement data isolation (such as tables with one partition key per tenant or blob containers per tenant)?
If this is not supported yet, are there any future plans to integrate multi-tenancy in the remote monitoring solution?

Thank you for your help.

Stephane

Problem with Simulator.WebJob

Hi there

We found this very strange that the Simulator.Webjob exe one has throwing an error (see below). But the telemetry history showing the data no problem (keep refreshing every 10 seconds). Occasionally, the telemetry data gets stuck and no data. The way to fix this is by restarting the app again.

In regards to Simulator.WebJob ... try to debug (step into it) and we couldn't find the error.

simulation_job_error

Failed local deployment

Hi , I followed the Wiki instructions for local deployment but I am getting the following error:

Get-AzureResource : {
"Error": {
"Code": "ResourceNotFound",
"Message": "The Resource
'Microsoft.DocumentDb/databaseAccounts/iotsuitelocalaed50' under resource
group 'IotSuiteLocal' was not found.",
"Target": null,
"Details": null
}
}
At C:\Users\Plantronics\Documents\GitHub\azure-iot-remote-monitoring\Common\Dep
loyment\DeploymentLib.ps1:172 char:12

  • return Get-AzureResource -ResourceName $resourceName -ResourceGroupName
    
    $res ...
  • 
    
    + CategoryInfo          : CloseError: (:) [Get-AzureResource], ErrorRespon
   seMessageException
    + FullyQualifiedErrorId : ResourceNotFound,Microsoft.Azure.Commands.Resour
   ceManager.Cmdlets.Implementation.GetAzureResourceCmdlet

Get-AzureResource : {
  "Error": {
    "Code": "ResourceNotFound",
    "Message": "The Resource
'Microsoft.Eventhub/namespaces/IotSuiteLocald629a' under resource group
'IotSuiteLocal' was not found.",
    "Target": null,
    "Details": null
  }
}
At C:\Users\Plantronics\Documents\GitHub\azure-iot-remote-monitoring\Common\Dep
loyment\DeploymentLib.ps1:172 char:12
+     return Get-AzureResource -ResourceName $resourceName -ResourceGroupName
$res ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : CloseError: (:) [Get-AzureResource], ErrorRespon

seMessageException
+ FullyQualifiedErrorId : ResourceNotFound,Microsoft.Azure.Commands.Resour
ceManager.Cmdlets.Implementation.GetAzureResourceCmdlet

Provisioning resources, if this is the first time, this operation can take up 10
minutes...
New-AzureResourceGroupDeployment : Error 1:
Code=InvalidDeploymentParameterValue; Message=The value of deployment
parameter 'docDBSku' is null. Please specify the value or use the parameter
reference. See http://aka.ms/arm-deploy/#parameter-file for details.
At C:\Users\Plantronics\Documents\GitHub\azure-iot-remote-monitoring\Common\Dep
loyment\PrepareIoTSample.ps1:127 char:11

  • $result = New-AzureResourceGroupDeployment -ResourceGroupName
    $resourceGroupName ...
  • 
    
    + CategoryInfo          : CloseError: (:) [New-AzureResourceGroupDeploymen
   t], ArgumentException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.NewAzureResou
   rceGroupDeploymentCommand

WARNING: The output object of this cmdlet will be modified in a future release.
WARNING: The output object of this cmdlet will be modified in a future release.
Provisioing failed
At C:\Users\Plantronics\Documents\GitHub\azure-iot-remote-monitoring\Common\Dep
loyment\PrepareIoTSample.ps1:132 char:5
+     throw "Provisioing failed"
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Provisioing failed:String) []
   , RuntimeException
    + FullyQualifiedErrorId : Provisioing failed

Build.cmd Issues

Some issues with the build command script::

  • The "clean" (i.e., rmdir) operation can fail and requires closing Visual Studio (the vshost.exe file is in use)
  • The msbuild command does not work wit VisualStudio 2015
  • msbuild must be in your path to execute the script
  • The cmd script is sparsely documented and cannot be debugged

The following powershell script can be used to replace the build shell script:

bmillerbma@67bacf8

Problems caused by inconsistent deviceId/DeviceID/DeviceId case

The samples in Azure IoT SDKs write deviceId with various uppercase/lowercase combinations. This causes problems in the Remote Monitoring sample application.

For example, in the Node.js sample in https://github.com/Azure/azure-iot-sdks/blob/master/node/device/samples/remote_monitoring.js, this ID is written as "DeviceID". This works fine for the deviceMetaData message, but not for "data" messages. In "data" messages, it should be written as "DeviceId". The reason is that, in azure-iot-remote-monitoring/DeviceAdministration/Infrastructure/Repository/DeviceTelemetryRepository.cs, there is a filter on the "DeviceId" property of a deserialized C# object. Since C# is case sensitive, deserialization will initialize the DeviceId to null if the property is named "DeviceID" instead of "DeviceId". When this happens, even though the telemetry data is written to a CSV in blob storage, the remote monitoring application doesn't display any data.

Note that also changing the "DeviceID" on the metadata message will cause similar problems: in this case, the remote monitoring application will fail to see that the device sent its metadata and it will be stuck in Pending state.

Also note that samples for the IoT SDKs in other languages use other variations of "DeviceId" as well.

A possible way to fix this would be, in the Stream Analytics queries on data coming from the devices, to add "DeviceId AS DeviceId" (or "DeviceID AS DeviceID" for metadata messages) in the SELECT clauses to convert any variations to the expected one.

Get-AzureResourceGroup may not exist in new Azure PowerShell 1.0.1 release

Hi.

Now I started to build and deploy azure iot hub - remote monitoring demo, following the Wiki steps described below:
https://github.com/Azure/azure-iot-remote-monitoring/wiki

The build step was successful. But when I tried to deploy local i.e. "build.cmd local", the Azure PowerShell commandlet Get-AzureResourceGroup in DeploymentLib.ps1 failed.

Because Azure PowerShell 1.0.1 (November 2015) was released recently, that Get-AzureResourceGroup commandlet may be removed (or my environment is not upgraded from older version...).

Thanks.

Build.cmd vs Build.ps1 user poll

There has been a request to replace the build.cmd with a powershell version instead. I'm biased and prefer powershell (which backs everything behind build.cmd), but there were requests in Private Preview to using build.cmd run through VSDev cmd shell.

This issue is to gauge feedback as to which one to use. BMillerbma has already done the legwork to provide a PS interface and is advocating to replace the build.cmd with it. I'm suspecting we might want to keep both, but would like feedback from those using the solution. Please add a comment to this issue if you have a preference for one or the other.

Refresh issues : Telemetry history and device parameters

Hello,

After deploying the "Remote Monitoring" preconfigured solution, the dashboard is displayed without any data in the 'Telemetry History' & 'telemetry grid' panel. I sometime get the following error in a popup : 'Unable to retrieve device telemetry from service'. Other data are correct, including alerts.

I assume this is due to a timeout issue as all the telemetry data are properly generated in the blob storage ('devicetelemetry' container).
I have tried to increase the refreshMilliseconds parameter to 9000 (file _DashboardDevicePane.cshtml ) and restarted the server, but it did not solved the issue.
Note that I connect from a rather slow connection and my solution is deployed in 'North Europe'.

Other issue: when editing and updating a device parameter (such as manufacturer name or gps coordinates) the update is applyied for a few minutes and then the parameters are restored to their initial values.

Thank you for your help.
By the way, this application is great and really promising!

Stephane

DeploymentLib.ps1 is looking for "Azure PowerShell 2.5.1 or later", but the latest available version is 1.0.4?

In DeploymentLib.ps1, I have an error at this line:
throw "Unable to find Azure.psd1 modules. Please install Azure Powershell 2.5.1 or later"

The most recent version of Azure PowerShell I could find was 1.0.4 and I confirmed it is installed. I also have the most recent version of the Azure SDK (2.8.2.1), but I can't find the file Azure.psd1 at the path where the script expects:

$modulePath = "$programFiles\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Azure.psd1"

I can however make it work by replacing the code with the following line:
$modulePath = "C:\Program Files\WindowsPowerShell\Modules\Azure\1.0.4\Azure.psd1"

This is more a workaround than a solution, since it is hard coded to version 1.0.4.

The message should be fixed to indicate the right product, so that we can easily look for and install the missing dependency. I'm guessing it's looking for version 2.5.1 of something other than Azure Powershell or Azure SDK.

build.cmd issue october intergration (new clone)

I have just cloned the repository and I am trying to deploy the octoberintergration branch, however I receive the following error:

Add-Type : Cannot bind parameter 'Path' to the target. Exception setting
"Path": "Cannot find path 'C:\Users\Robin\Source\Repos\azure-iot-remote-monitor
ing\packages\WindowsAzure.ServiceBus.3.0.1\lib\net45-full\Microsoft.ServiceBus.
dll' because it does not exist."
At C:\Users\Robin\Source\Repos\azure-iot-remote-monitoring\Common\Deployment\De
ploymentLib.ps1:705 char:16
+ ... -type -path ("{0}\..\..\packages\WindowsAzure.ServiceBus.3.0.1\lib\ne ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (:) [Add-Type], ParameterBindingExce
   ption
    + FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.PowerShell.Comm
   ands.AddTypeCommand

I believe this is because nuget has restored package WindowsAzure.ServiceBus.3.0.4 and would either involve changing DeploymentLib.ps1:705 to

add-type -path ("{0}\..\..\packages\WindowsAzure.ServiceBus.3.0.4\lib\net45-full\Microsoft.ServiceBus.dll" -f $global:azurePath)

or setting nuget to specifically restore version 3.0.1

Custom Device Provisioning

I have created a device using netmf and I am trying to provision the device (i.e. change the status from pending in the devices list)

I am sending the following json string contained within the message body (copied and pasted from device explorer which is monitoring the event hub) although 'Event Id' is actually contained within message.ApplicationProperties["EventId"] not Json

Data:[
    {
        "ObjectType":"DeviceInfo",
        "IsSimulatedDevice":false,
        "Commands":[{"Name":"PingDevice","Parameters":null}],
        "DeviceProperties":
        {
            "Manufacturer":"135",
            "ModelNumber":"9",
            "DeviceID":"362188148",
            "DeviceState":"normal",
            "FirmwareVersion":"4.3.7.10"
        },
        "Version":"1.0.0.27394"
    }
]
Properties:
    'EventId': '601282515'

however the device status stays as pending.

Am I missing anything?

It would also help if there was some documentation about the provisioning parameters including sample message bodies and which parameters are mandatory...

Use Test-AzureName instead of HostEntryExists

In DeploymentLib.ps1 on line 824 you use your own function HostEntryExists. In our network configuration with caching proxies will this result in unexpected caching of this non-existing record for one hour.

Is it an option to use the Test-AzureName cmdlet for this?
I use Test-AzureName -Website $environmentName on this line and this doen't result in the not existing a-record of azurewebsites.net being cached as not existing.

Resource Microsoft.Eventhub/namespaces 'LocalRM' failed

VERBOSE: 15:27:55 - Template is valid.
VERBOSE: 15:28:00 - Create template deployment 'LocalMonitoring'.
VERBOSE: 15:28:09 - Resource Microsoft.Storage/storageAccounts 'localrm06619' provisioning status is succeeded
VERBOSE: 15:28:09 - Resource Microsoft.Storage/storageAccounts 'localrm06619' provisioning status is succeeded
New-AzureResourceGroupDeployment : 15:28:13 - Resource Microsoft.Eventhub/namespaces 'LocalRM' failed with message 'The
specified service namespace is not available.'
At C:\temp\azure-iot-remote-monitoring\Common\Deployment\PrepareIoTSample.ps1:139 char:11

  • $result = New-AzureResourceGroupDeployment -ResourceGroupName $resour ...
  •       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [New-AzureResourceGroupDeployment], Exception
    • FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.NewAzureResourceGroupDeploymentCommand

VERBOSE: 15:28:17 - Resource Microsoft.DocumentDb/databaseAccounts 'localrmc851c' provisioning status is running
VERBOSE: 15:28:17 - Resource Microsoft.Devices/Iothubs 'LocalRM97d3f' provisioning status is running
VERBOSE: 15:30:40 - Resource Microsoft.Devices/Iothubs 'LocalRM97d3f' provisioning status is succeeded
VERBOSE: 15:30:48 - Resource Microsoft.Devices/Iothubs/eventhubEndpoints/ConsumerGroups 'LocalRM97d3f/events/rulescg'
provisioning status is succeeded
VERBOSE: 15:30:48 - Resource Microsoft.Devices/Iothubs/eventhubEndpoints/ConsumerGroups
'LocalRM97d3f/events/telemetrycg' provisioning status is succeeded
VERBOSE: 15:30:48 - Resource Microsoft.Devices/Iothubs/Iothubkeys 'LocalRM97d3f/iothubowner' provisioning status is
succeeded
VERBOSE: 15:30:48 - Resource Microsoft.Devices/Iothubs/eventhubEndpoints/ConsumerGroups
'LocalRM97d3f/events/deviceinfocg' provisioning status is succeeded
VERBOSE: 15:30:56 - Resource Microsoft.StreamAnalytics/streamingjobs 'LocalRM-Telemetry' provisioning status is running
VERBOSE: 15:31:12 - Resource Microsoft.DocumentDb/databaseAccounts 'localrmc851c' provisioning status is succeeded
VERBOSE: 15:31:15 - Resource Microsoft.DocumentDb/databaseAccounts 'localrmc851c' provisioning status is succeeded
VERBOSE: 15:32:58 - Resource Microsoft.StreamAnalytics/streamingjobs 'LocalRM-Telemetry' provisioning status is
succeeded
WARNING: The output object of this cmdlet will be modified in a future release.
WARNING: The output object of this cmdlet will be modified in a future release.
Provisioing failed
At C:\temp\azure-iot-remote-monitoring\Common\Deployment\PrepareIoTSample.ps1:144 char:5

  • throw "Provisioing failed"
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (Provisioing failed:String) [], RuntimeException
    • FullyQualifiedErrorId : Provisioing failed

Creating a connection string for IoT Hub's Event Hub

So I created an IoT Hub today and I got pretty far with running the deployment script in my company's Azure subscription, but I ran into this issue.

The deployment script requires me to provide the IoT Hub’s Event Hub connection string. I’m able to see the name and endpoint for the IoT Hub’s Event Hub in the new Azure Portal, but I don’t see how I could create a connection string for it. Here’s the info I see:
Event Hub-compatible name: iotprod-hub
Event Hub-compatible endpoint: sb://iothub-ns-iotprod-hu-273-c880fcda84.servicebus.windows.net/

Here’s what the string looked like in our private subscription:
Endpoint=sb://dhubprpsbnamespace4.servicebus.windows.net/;SharedAccessKeyName=listen;SharedAccessKey=blahblahblah

I also don’t see an entry for iothub-ns-iotprod-hu-273-c880fcda84 in the old Azure Portal Service Bus page, but I’m assuming that’s how I could do it if it showed up there. I also tried using the Get-AzureSBNamespace command in Azure Powershell but it doesn’t show up there either.

Any ideas how I could create this string?

Deployment problem using build.cmd

Hi,

I am trying to deploy this project using the "build.cmd cloud" command but in the end I get an error message about the "ServiceConfiguration.Cloud.cscfg" file. I can not find this file anywhere in the repository. Any idea why?

2015-10-08T11:04:19.1032114+02:00 - Executing New-AzureDeployment -Slot Staging -Package C:\Users\hakan\Source\Repos\azure-iot-remote-monitoring\Build_Output\debug\Services\Simulator\pub\Simulator.cspkg -Configuration C:\Users\hakan\Source\Repos\azure-iot-remote-monitoring\Build_Output\debug\Services\Simulator\pub\ServiceConfiguration.Cloud.cscfg -label "AutoDeploy 2015-10-08T11:03:20.3712325+02:00" -ServiceName remotemon1Simulator

Could not find a part of the path 'C:\Users\hakan\Source\Repos\azure-iot-remote-monitoring\Build_Output\debug\Services\Simulator\pub\Simulator.cspkg'.
+ CategoryInfo : OperationStopped: (:) [], DirectoryNotFoundException
+ FullyQualifiedErrorId : Could not find a part of the path 'C:\Users\hakan\Source\Repos\azure-iot-remote-monitoring\Build_Output\debug\Services\Simulator\pub\Simulator.cspkg'.
+ PSComputerName : localhost

Rules and Actions

When a measure activate a rule, the execution flow should reach "ExecuteLogicAppAsync" methond in "ActionRepository" class. Going down over the code, the flows seems to be:

ProcessEventAsync (ActionProcessor)
ProcessAction (ActionProcessor)
ExecuteLogicAppAsync (ActionLogic)
ExecuteLogicAppAsync (ActionRepository)

What I see is that ProcessEventAsync receives a JSON message like this: [{""deviceid"":""Ufficio_001_445"",""readingtype"":""Temperature"",""reading"":27.92,""threshold"":10.0,""ruleoutput"":""AlarmTemp"",""time"":""2015-11-25T12:00:04.0360000Z""}]

ProcessAction reads the JSON and check for the value contained in "temperatureruleoutput" attribute or "humidityruleoutput" one, but these are empty so the execution exits without doing anything.

The stream analyics jobs must occasionally be restarted

The stream analytics jobs occasionally stop processing events on the IoTHub. The manifestation of this is that the telemetry graph stops updating or the alerts grid stops updating -- or never starts. Restarting the jobs picks up events and starts. The following commit adds a StartExistingStreamAnalyticsJobs () function to complement the StopExistingStreamAnalyticsJobs() function:

bmillerbma@a981731

December intergration - GPS not updated

After upgrading from October integration, GPS for physical devices is not being updated. I am attempting to diagnose the issue but the devices program remains the same so I believe it is a change within this solution.

Dates not regionalised

For example:

CreatedTime (UTC) and UpdatedTime (UTC) within device properties are always show in American format (01/12/2016 11:49:47) where as if I was based in the UK I would expect to see the appropriate format (12/01/2016 11:49:47) as otherwise the user can be confused, especially if the day is less than 13!

Occasional HTTP 401 errors updating document db

The signature and header time stamps are not coordinated, and calls to the document db service occasionally fail with 401 errors. The problem is compounded when you run the Debugger, depending upon where you put your break points.

Please see the following fix:

bmillerbma@5c2eabd

Cloud deployment why S2

Is it possible to do a cloud deployment with an S1 IoT hub? Will it be sufficient to change the default value from S2 to S1 in RemoteMonitoring.json ?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.