iot

why does my web api client call not work in Raspberry Pi2 Iot

China☆狼群 提交于 2019-12-24 13:52:38
问题 I have this code: private const string route = "/api/Print"; public bool Update(string header, string tc) { bool success = false; using (var client = new HttpClient()) { client.BaseAddress = new Uri("my uri"); client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); var print = new Print { CompanyRef = new Guid(), Header = header, TC = tc }; var response = client.PutAsJsonAsync(route, print); } success =

Azure IOT Apache Avro format

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 10:09:22
问题 Using Azure IOT, I have my device endpoint pointing to Azure Blob storage. Data is sent to the Blob, but i get non-ascii characters and am told that the file extension is incorrect. Sample Blob data is Objavro.codecnullavro.schemaÐ{"type":"record","name":"Message","namespace":"Microsoft.Azure.Devices","fields":[{"name":"EnqueuedTimeUtc","type":"string"},{"name":"Properties","type":{"type":"map","values":"string"}},{"name":"SystemProperties","type":{"type":"map","values":"string"}},{"name":

Azure IOT Apache Avro format

為{幸葍}努か 提交于 2019-12-24 10:06:02
问题 Using Azure IOT, I have my device endpoint pointing to Azure Blob storage. Data is sent to the Blob, but i get non-ascii characters and am told that the file extension is incorrect. Sample Blob data is Objavro.codecnullavro.schemaÐ{"type":"record","name":"Message","namespace":"Microsoft.Azure.Devices","fields":[{"name":"EnqueuedTimeUtc","type":"string"},{"name":"Properties","type":{"type":"map","values":"string"}},{"name":"SystemProperties","type":{"type":"map","values":"string"}},{"name":

How can I work with the received DATA from Azure IoT Hub

混江龙づ霸主 提交于 2019-12-24 07:35:46
问题 I receive the Data: public void accept(PartitionReceiver receiver) { System.out.println("** Created receiver on partition " + partitionId); try { while (true) { Iterable<EventData> receivedEvents = receiver.receive(10).get(); int batchSize = 0; if (receivedEvents != null) { for(EventData receivedEvent: receivedEvents) { System.out.println(String.format("| Time: %s", receivedEvent.getSystemProperties().getEnqueuedTime())); System.out.println(String.format("| Device ID: %s", receivedEvent

Trying to connect with IoT device by bluetooth connectivity(Gatt)

荒凉一梦 提交于 2019-12-24 07:26:42
问题 I am trying to communicate with an IoT device by BlueTooth connectivity. first, I have paired the device using BlueTooth. Then prepared the Hexadecimal value using AES encryption Send a request to the device using characteristic write I tried to read the response from the device using characteristic Read but I got the status as 1 and data is null. These are the steps which I have done and the code I mentioned below. BluetoothGatt gatt; BluetoothGattCallback gattCallback = new

Sending message to Azure IoT hub partition

久未见 提交于 2019-12-24 06:58:22
问题 Does anyone know if there is a library that allows you to send a message to a specific partition on an IoT hub with Azure. I was previously able to achieve this with azuresblite library, unfortunatelly which I Cannot use. https://github.com/ppatierno/azuresblite 回答1: There is no way to send a message to a specific partition. Period. Partitions are used internally to allow scaling of the IoT (Event Hub) and allow for scaling out the consumer app (the one that reads the events out of the Hub).

InfluxDB: How to backfill measurement tags that were previously not measured (if possible at all)?

大憨熊 提交于 2019-12-24 06:41:21
问题 I'm started logging data from my Smart Meter using Node-RED about a month ago, it looked like this json data (the payload is the important bit): { "topic":"stat/smartmeter/all", "payload":"{ \"kwh_low_tarrif\":866.696, \"kwh_high_tarrif\":902.156, \"current_tarrif\":1, \"current_watt_draw\":485, \"gas_timestamp\":1554675307000, \"gas_total\":326.509, \"kwh_combined\":1768.852 }", "qos":0, "retain":false, "_topic":"stat/smartmeter/all", "_msgid":"db4ebc0.72b9a48" } The problem with this data

Deploying NodeJs Express Rest API to Windows 10 IoT

爷,独闯天下 提交于 2019-12-24 00:34:09
问题 Node noob, Windows 10 IoT noob, senior .net dev here. I've been able to get a few of the samples to work, even got an led on a breadboard to be controllable through a nodejs server. I am using the latest chakra core files and have all of the packages installed on my dev machine, which is pretty clean. I am guessing its not able to install the packages that are specified in the packages.json file, here is the excerpt: "express": "~4.0.0", "morgan": "~1.0.0", "mongoose": "~3.6.13", "body-parser

AWS lambda capture IoT registry event

≯℡__Kan透↙ 提交于 2019-12-23 19:52:02
问题 I'm plan to generate new thing in AWS IoT Registry and once the thing is generated successfully, write the thing arn, thing name, cert information into AWS RDS database. Is this possible to use lambda capture IoT registry event and trigger lambda to write into database? Any suggestion? 回答1: AWS IoT publishes a lot of its events through it's own MQTT broker. In your case you're interested in the $aws/events/thing/<thingName>/created topic (https://docs.aws.amazon.com/iot/latest/developerguide

GSM/GPRS Module native integration on Raspberry 3 with Android Things

旧巷老猫 提交于 2019-12-23 18:17:53
问题 I would like to know if there is any way to make a GPRS / GSM module (SIM800L) as a "default" connection in android things that allows browsing the internet and making requests using the Android libraries. 回答1: Seems no, because as in this answer of Blundell described: the source code is not available for Developer Preview. But You can use UART and AT commands. 回答2: This is possible. I have been able to integrate SIM800L TO RPI3 running Android Things via UART and AT commands. I am however