Trying to ingest iot data into blockchain with sample app refrigerated Transportation. the logicapp successfully sends data to blockchain workbench Servicebus , but the smart contract not seeing the transaction
Trying to ingest iot data into blockchain with sample app refrigerated Transportation. the logicapp successfully sends data to blockchain workbench Servicebus , but the smart contract app not seeing the transaction
Community Center | Not monitored
-
AshokPeddakotla-MSFT • 35,971 Reputation points • Moderator
2021-01-04T15:32:14.947+00:00 @Raghavan Sampathkumar Welcome to Q&A forum!
Are you following any doc for the steps? If yes, could you please share with us?
When you say, "logicapp successfully sends data to blockchain workbench Servicebus , but the smart contract not seeing the transaction" Did you receive any error? -
Raghavan Sampathkumar • 1 Reputation point
2021-01-04T16:06:30.317+00:00 created the refrigerated transport app sample given by Microsoft and using the IOT integration sample i created a logic app to post telemetry information into blockhain workbench service-bus queue.
I see its successfully posted and the message is disappeared from service bus queue as well and i see a event reported on the event grid ( which is a post task for Azure block chain service).
but i don't see the telemetry information on Smart contract , since the data is posted on queue and the transaction is handled by Microsoft automatically , not sure how to troubleshoot.
IOT integration doc
App code refrigerated-transportation
-
AshokPeddakotla-MSFT • 35,971 Reputation points • Moderator
2021-01-06T16:57:33.483+00:00 Thanks for sharing the links. We will check and get back as earliest. Appreciate your time and patience.
-
SanaCMSFT-8922 • 301 Reputation points • Moderator
2021-01-08T12:28:38.09+00:00 @Raghavan Sampathkumar
Could you try running the troubleshooting script with the appropriate lookback hours and let us know any relevant info you find by checking the exceptions and service logs files you obtain?
Moreover, could you please use Azure portal to test the following to ensure messages have been delivered to IoT Hub, then Service Bus and Logic App in case you haven't already done so? Any steps failed in the middle may cause ABW to not receive message.- Testing delivery of messages from device to IoT Hub
- Testing delivery of messages from IoT Hub to Service Bus
- Testing receipt and usage of messages by the Logic App
-
Raghavan Sampathkumar • 1 Reputation point
2021-01-08T16:28:18.633+00:00 thanks for the troubleshooting script , i ran through logs and see the below errors on the exception log,
From IOT Device to LogicAPP the message passes through successfully. but after the message is posted on the ingress queue of the workbench service bus , ., also have attached the Logic APP final Post step , could you confim if its right syntax
Error","RequestId":"00000000-0000-0000-0000-000000000000","MessageTemplate":"Error in deserialization {error}","ServiceName":"appbuilder.messaging","error":"Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: {. Path 'Parameters[1]', line 15, position 8.\n at Newtonsoft.Json.JsonTextReader.ParsePostValue(Boolean ignoreComments)\n at Newtonsoft.Json.JsonTextReader.Read()\n at Newtonsoft.Json.JsonReader.Skip()\n at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject,
-
Raghavan Sampathkumar • 1 Reputation point
2021-01-08T16:29:51.317+00:00 -
SanaCMSFT-8922 • 301 Reputation points • Moderator
2021-01-09T06:29:11.007+00:00 @Raghavan Sampathkumar
It seems like you may be missing a comma at line 14. Right after the closing brace of your second parameter. Could you add it there and see if it fixes your issue? -
AshokPeddakotla-MSFT • 35,971 Reputation points • Moderator
2021-01-11T16:16:31.367+00:00 @Raghavan Sampathkumar Does that help resolve your issue? Do let us know if you need further help.
-
Raghavan Sampathkumar • 1 Reputation point
2021-01-11T21:46:21.493+00:00 thanks that helped , but it could not fix the actual issue . after the comma , i had to change the operation name to message name in it . but now the error i am getting is the temperature data is not a integer so its not accepting the data .
I tried to convert float to integer using several methods ( int() * div() ) on logicapp, but its not working .its still resulting on float data which is not accepted by the sample refrigerated transportation smart contract app
-
SanaCMSFT-8922 • 301 Reputation points • Moderator
2021-01-12T11:21:01.67+00:00 @Raghavan Sampathkumar
Could you provide us a screenshot of the error as well as what you are trying while trying to set the temperature as an integer along with what you had set the value as originally pls? -
Raghavan Sampathkumar • 1 Reputation point
2021-01-12T13:24:42.74+00:00 Attached the error from Appinsight , the error i get from workbench troubleshooting was same as well "Error Constructing transaction"
its the temperature data i am getting from IOT simulator is a float and the app is expecting a Integer
-
Raghavan Sampathkumar • 1 Reputation point
2021-01-12T13:29:42.343+00:00 below are the methods i tried to convert the data into integer , which is still resulting into float data and the error details
-
SanaCMSFT-8922 • 301 Reputation points • Moderator
2021-01-13T06:14:04.483+00:00 @Raghavan Sampathkumar
This issue seems more to do with Logic apps rather than Azure Blockchain workbench. So, we would suggest you to raise this issue with the logic apps team.
But just to confirm, is it that you personally want the temperature value to be an integer? Or is this mentioned in the docs somewhere? If so, could you please direct us to it. -
Raghavan Sampathkumar • 1 Reputation point
2021-01-13T11:23:44.957+00:00 Actually its an dependency of the sample app "refrigerated transportation" it doesnt take float as telemetry input. i figured it out . since there is no round off function available on logicapp , i had to multiply them with 1000000000 , convert to integer , then divided by 1000000000 to get the actual value
after this the telemetry started ingesting into the smart contract.
thanks so much for the help for helping identifying the cause of failure , the troubleshooting script helped a lot.
-
AshokPeddakotla-MSFT • 35,971 Reputation points • Moderator
2021-01-13T16:53:45.11+00:00 @Raghavan Sampathkumar Glad to hear that your issue is resolved and troubleshooting script helped in identifying the problem.
If an answer is helpful, please "Accept answer" or "Up-Vote" for the same which might be beneficial to other community members reading this thread. -
Raghavan Sampathkumar • 1 Reputation point
2021-01-15T06:27:44.32+00:00 thanks i upvoted , one last question , is there a way we can read the data from the blockchain service once its stored in there. just to compare what we have is the right data .
-
SanaCMSFT-8922 • 301 Reputation points • Moderator
2021-01-15T06:44:54.68+00:00 You should be able to see much of the data that is stored by querying the database that was created in your Workbench resource group during Azure blockchain workbench deployment and some of the data would be visible on your web application itself.
Could you check and see if that's the data that you are looking for? Let us know if you have anymore queries
Sign in to comment