IBM IoT Real-Time Insights and multiple map events - real-time

I am using IBM IoT Real-Time insights and sending in an event which contains:
{
"d": {
"speed": 105,
"lat": 34.147543,
"lng": -99.300058
}
}
When I send in an event, the map correctly updates with the correct marker as expected:
However, when I send in a second event without changing any of its content, the map changes and shows the following marker position:
My gut is telling me that the second event is providing coordinates of 0, 0 ... but it is exactly the same event as the first. If I select a new dashboard and go back to the first with the map, this pattern repeats. The next event shows fine and the one after that shows me West Africa. I am able to trivially recreate.

The resetting of latitude and longitude coordinates with the maps widget is a limitation that is currently being addressed by the IoT Real-Time Insights team. Keep an eye on the What's new in Bluemix section for news about new features as they are released.

Related

Flutter App Counting Google Analytics Events TWICE

I am logging some predefined event and custom events on my flutter app using Google Analytics through the below way:
FirebaseAnalytics.instance.logEvent(
name: "select_content",
parameters: {
"content_type": "BusinessProfile",
"item_id": selectedbusinessprofileid,
"user_id": globaluserid,
"Access_Method": "Ad",
"Ad_Method": "CategoriesBoard",
"Gender": globalusergender,
"City": globaluserdefaultcity,
},
);
FirebaseAnalytics.instance.logEvent(
name: "New_Business_Profile",
parameters: {
"category": bpaddselectedcategory,
"Gender": globalusergender,
"City": globaluserdefaultcity,
},
);
the problem is that each event is logged TWICE in google analytics dashboard, in both debug view and production view. the behavior is for both predefined events like "select_content" and any other customer event I create like "New_Business_Profile".
I did some search, some mentioned I need to remove the events I've created from Google Analytics Admin. I did and delete it, the events are still counting twice like this.
any idea what is the reason of this problem or how can I solve it?
Edit: Solved in Debug mode, Removing the events from Google Analytics Admin solved the issue in Debug mode but it took around two hours to be corrected.
will check the production mode in 24 hours and report if solved too.
Edit: Worked fine on live too.
I suggest you to use Dart Debugger and breakpoints. Most likely your code is invoked more than once.

Google Home report state request is working but not showing expected result?

I'm integrating google assistant with my application. The problem is when I send a report state request to assistant while inside a device screen in google home application, I get a 200 OK response with the requestId I'm sending, but the device screen doesn't update with the device state. (It gets updated after I go back and go to device screen again but that is done through query intent)
Sample Request Body
{
"payload" : {
"devices" : {
"states" : {
"12364" : {
"on" : true
}
}
}
},
"requestId" : "A7TNpoXlnG0OQWzpTvJAa4sjolAAt46q",
"agentUserId" : "14556"
}
Sample Response Body
{ "requestId" : "A7TNpoXlnG0OQWzpTvJAa4sjolAAt46q" }
This is their documentation regarding the report state.
I even deployed the report state dashboard locally to monitor the state changes but it doesn't update as well.
Can anyone point me in right direction? Thanks!
The behavior of different Assistant surfaces with respect to Home Graph changes can vary, so it's best not to rely on looking for real-time UI changes in the Google Home app.
The Report State Dashboard noted in the documentation that you linked is a good way to validate the state you publish to Home Graph graphically. We also recently published an AoG ProTips episode on this topic that shows you how to do the same from the command line.
Neither of these methods will update automatically in real-time either, but you can refresh them after publishing a state change to verify the right data is in Home Graph.

Unable to recieve data from device in ibmiotin

I'm using my mobile phone as an IoT device and it does appears in the "Browse Devices" section in IBM Watson IoT platform. The events of this device are also getting recorded like below,
{
"d": {
"id": "iotdemodev",
"ts": 1572278167346,
"lat": 12.921498,
"lng": 80.1854588,
"ax": -0.01,
"ay": -0.03,
"az": 0,
"oa": 0,
"ob": 0,
"og": 0
}
}
Now in Node-RED I have used like below , the deployment has been successful however there is no message display in the debug.
It looks like there is some mixed information on what you are saying.
Try the following:
1) Use this to simulate and IoT Device
https://quickstart.internetofthings.ibmcloud.com/iotsensor/
2) After that, grab your device id from top right (e.g. fde7a936a947)
3) Go to https://quickstart.internetofthings.ibmcloud.com and add device id and press Go button: fde7a936a947
4) You now should see data coming into quickstart
5) Now in NodeRed (as per above screens) use the device id from 2) as fde7a936a947 into Device Id field
6) Data should show up now.
Based on your post "
I'm using my mobile phone as an IoT device and it does appears in the "Browse Devices" section in IBM Watson IoT platform...." I would say that you are actually using a registered device and in such case using quickstart you won't receive the events. You need to use registered device way. As such, for the Authentication drop-down, select "API Key". This would make visible the "API Key" drop-down. Select the "Add new ibmiot..." from the drop down and add the API Key and api-token that you can generate from the Watson IoT Platform.

Turning on facebook messenger camera through Dialogflow chatbot

I created a chatbot on Dialogflow which informs the user about the names of the members of my (extended) family and about where they are the living. I have created a small database with MySQL which has these data stored and I fetch them with a PHP script whenever this is appropriate depending on the interaction of the user with the chatbot.
I have integrated this chatbot to Facebook Messenger. My question is the following:
Can I directly trigger the Facebook messenger camera to be turned on through Dialogflow (and without using any other front-end camera)?
The reason I want to turn on the camera is to allow the user to take a photo of himself/herself and then I will process the photo with some computer vision libraries to infer if this person at the photo is a family member of mine. Obviously, I can simply create another basic front-end where I will turn on a camera whenever e.g. an intent called 'Camera' is triggered but I was wondering if can do this directly on facebook messenger.
The json response that I am receiving at my back-end from Dialogflow contains only the following UI capabilities:
"surface": {
"capabilities": [
{
"name": "actions.capability.MEDIA_RESPONSE_AUDIO"
},
{
"name": "actions.capability.SCREEN_OUTPUT"
},
{
"name": "actions.capability.AUDIO_OUTPUT"
},
{
"name": "actions.capability.WEB_BROWSER"
}
]
}
therefore my first impression is that turning on a camera directly through Dialoglfow (and Facebook Messenger) is not possible.
Am I right?
Well, you're right... but probably not for the reasons you think.
First, you're not going to be able to turn on the Facebook Messenger camera because you're not using Facebook Messenger. You're using the Google Assistant. Right now, the Google Assistant doesn't define a way to send an image to the Action you're interacting with. (It does work with Google Lens, but at this point, there is no way to get that to you.)
Second, you wouldn't actually "turn on" the camera. If the user sends you an image through the Messenger camera, you can process this by looking at the originalRequest field in the JSON you get on your fulfillment which should contain the message from Facebook which contains the image.

how to respond to user using google assistant after the conversation is ended?

I am making a google action.I have one scenario where calculation requires some time in cloud fulfillment but i don't want to keep user waiting for answer.
I want to respond to user whenever my answer is ready even when conversation with user is ended i want to send my answer in notification or something like that.
I just found this on google actions documents.
https://developers.google.com/actions/assistant/updates
Is this possible in google actions and how?
What you mean here is notifications. You can use it but please pay attention to the warning at the top of the link you provided: "Updates and notifications are currently in Developer Preview. You can build apps using the features described in this article, but you can't currently publish them".
As for the steps to crated a daily notification:
Navigate to your actions.intent.CONFIGURE_UPDATES intent.
Under Responses, go to the Google Assistant tab, click Add Message Content, and select Custom Payload.
In the "Custom Payload" box, add the following code to call the AskToRegisterDailyUpdate helper. Swap INTENT_NAME to the intent that you want to be invoked when the user interacts with your notification.
{
"google": {
"system_intent": {
"intent": "actions.intent.REGISTER_UPDATE",
"data": {"#type": "type.googleapis.com/google.actions.v2.RegisterUpdateValueSpec",
"intent": "INTENT_NAME",
"triggerContext": {
"timeContext": { "frequency": "DAILY" }
}
}
}
}
}
If using a webhook, you can call this API directly via the client library:
appMap.set('setup_update', function(app) {
app.askToRegisterDailyUpdate('INTENT_NAME');
})
})
Add one more intent called "finish_update_setup" and enter actions_intent_REGISTER_UPDATE as its Event.
Set the intent's Action to "finish_update_setup" as well.
In your webhook, open index.js and add the following. Replace Ok, I'll start giving you daily updates and Ok, I won't give you daily updates. with whatever response you want to give the user:
appMap.set('finish_update_setup', function(app)) {
if (app.isUpdateRegistered()) {
app.tell("Ok, I'll start giving you daily updates.");
} else {
app.tell("Ok, I won't give you daily updates.");
}
}
Deploy the webhook to Firebase Functions and enable webhook fulfillment in Dialogflow.
If you want to see how to create a simple notification (not daily one) - please check this doc on push notifications.
If you don't have an immediate reply to send but expect one soon-ish what you do is return a "promise". When you are in a position to reply, "fulfilling" the promise causes your reply to be delivered. I don't know what the actual timeout is but in my case I'm pretty sure at least a few second delay is allowed.
As for the updates or notifications, the API is there but the docs say you can't deploy an Action to production using them. There is a slightly cryptic comment to "contact support" if you need them.
One of these days I might try.