Reading value from HTML using google assistant












1















I have watched and done this tutorial which was very helpful:
https://greenido.wordpress.com/2017/09/29/create-a-google-assistant-that-use-your-server/?fbclid=IwAR1QZ4ZEMW831kdaJDOZcoMqg1WltbfTCMiCNFDw6myydPrPlRw2mtjvwqI
But i have a question if somebody helps me i would appreciate it,
here is my code :






<body >
<h1> Factory 2</h1>
<div class="koko">
<div id="gg1" class="oee"></div>

<div id="gg2" class="gauge" data-value="59"></div><br>
<div id="gg3" class="gauge"></div><br>
<div id="gg4" class="gauge"></div>
</div>


<script src="raphael-2.1.4.min.js"></script>
<script src="justgage.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function(event) {

var dflt = {
min: 0,
max: 100,
// donut: true,
gaugeWidthScale: 1.1,
counter: true,
hideInnerShadow: true
}

var gg1 = new JustGage({
id: 'gg1',
value: 75,
title: 'OEE ',
defaults: dflt
});

var gg2 = new JustGage({
id: 'gg2',
title: 'Availability',
defaults: dflt
});

var gg3 = new JustGage({
id: 'gg3',
value: 85,
title: 'Performance',
defaults: dflt
});

var gg4 = new JustGage({
id: 'gg4',
value: 95,
title: 'Quality',
defaults: dflt
});

});

</script>
</body>





i want to ask google assistant "tell me Performance of factory 2" then it should check from my code and read it as "performance of factory 2 is 85", i would appreciate any help, if needed nodejs, could give example ? I have read and studied from anywhere but not a clue.










share|improve this question

























  • Could you further explain the structure of your project? Where are you struggling? Is it in creating a google assistant app? Is it in requesting data from the website?

    – Alex P.
    Nov 25 '18 at 11:50













  • @Alex P. I am doing little project for myself and im new to google assistant, i have that code in my website, i'm having problem on how to make google assistant read 'performance' and say it loudly back, like u said requesting data from website, if u invite me to chat i will explain more

    – waleedd32
    Nov 25 '18 at 12:09













  • could somebody help here ?

    – waleedd32
    Nov 25 '18 at 16:47
















1















I have watched and done this tutorial which was very helpful:
https://greenido.wordpress.com/2017/09/29/create-a-google-assistant-that-use-your-server/?fbclid=IwAR1QZ4ZEMW831kdaJDOZcoMqg1WltbfTCMiCNFDw6myydPrPlRw2mtjvwqI
But i have a question if somebody helps me i would appreciate it,
here is my code :






<body >
<h1> Factory 2</h1>
<div class="koko">
<div id="gg1" class="oee"></div>

<div id="gg2" class="gauge" data-value="59"></div><br>
<div id="gg3" class="gauge"></div><br>
<div id="gg4" class="gauge"></div>
</div>


<script src="raphael-2.1.4.min.js"></script>
<script src="justgage.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function(event) {

var dflt = {
min: 0,
max: 100,
// donut: true,
gaugeWidthScale: 1.1,
counter: true,
hideInnerShadow: true
}

var gg1 = new JustGage({
id: 'gg1',
value: 75,
title: 'OEE ',
defaults: dflt
});

var gg2 = new JustGage({
id: 'gg2',
title: 'Availability',
defaults: dflt
});

var gg3 = new JustGage({
id: 'gg3',
value: 85,
title: 'Performance',
defaults: dflt
});

var gg4 = new JustGage({
id: 'gg4',
value: 95,
title: 'Quality',
defaults: dflt
});

});

</script>
</body>





i want to ask google assistant "tell me Performance of factory 2" then it should check from my code and read it as "performance of factory 2 is 85", i would appreciate any help, if needed nodejs, could give example ? I have read and studied from anywhere but not a clue.










share|improve this question

























  • Could you further explain the structure of your project? Where are you struggling? Is it in creating a google assistant app? Is it in requesting data from the website?

    – Alex P.
    Nov 25 '18 at 11:50













  • @Alex P. I am doing little project for myself and im new to google assistant, i have that code in my website, i'm having problem on how to make google assistant read 'performance' and say it loudly back, like u said requesting data from website, if u invite me to chat i will explain more

    – waleedd32
    Nov 25 '18 at 12:09













  • could somebody help here ?

    – waleedd32
    Nov 25 '18 at 16:47














1












1








1








I have watched and done this tutorial which was very helpful:
https://greenido.wordpress.com/2017/09/29/create-a-google-assistant-that-use-your-server/?fbclid=IwAR1QZ4ZEMW831kdaJDOZcoMqg1WltbfTCMiCNFDw6myydPrPlRw2mtjvwqI
But i have a question if somebody helps me i would appreciate it,
here is my code :






<body >
<h1> Factory 2</h1>
<div class="koko">
<div id="gg1" class="oee"></div>

<div id="gg2" class="gauge" data-value="59"></div><br>
<div id="gg3" class="gauge"></div><br>
<div id="gg4" class="gauge"></div>
</div>


<script src="raphael-2.1.4.min.js"></script>
<script src="justgage.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function(event) {

var dflt = {
min: 0,
max: 100,
// donut: true,
gaugeWidthScale: 1.1,
counter: true,
hideInnerShadow: true
}

var gg1 = new JustGage({
id: 'gg1',
value: 75,
title: 'OEE ',
defaults: dflt
});

var gg2 = new JustGage({
id: 'gg2',
title: 'Availability',
defaults: dflt
});

var gg3 = new JustGage({
id: 'gg3',
value: 85,
title: 'Performance',
defaults: dflt
});

var gg4 = new JustGage({
id: 'gg4',
value: 95,
title: 'Quality',
defaults: dflt
});

});

</script>
</body>





i want to ask google assistant "tell me Performance of factory 2" then it should check from my code and read it as "performance of factory 2 is 85", i would appreciate any help, if needed nodejs, could give example ? I have read and studied from anywhere but not a clue.










share|improve this question
















I have watched and done this tutorial which was very helpful:
https://greenido.wordpress.com/2017/09/29/create-a-google-assistant-that-use-your-server/?fbclid=IwAR1QZ4ZEMW831kdaJDOZcoMqg1WltbfTCMiCNFDw6myydPrPlRw2mtjvwqI
But i have a question if somebody helps me i would appreciate it,
here is my code :






<body >
<h1> Factory 2</h1>
<div class="koko">
<div id="gg1" class="oee"></div>

<div id="gg2" class="gauge" data-value="59"></div><br>
<div id="gg3" class="gauge"></div><br>
<div id="gg4" class="gauge"></div>
</div>


<script src="raphael-2.1.4.min.js"></script>
<script src="justgage.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function(event) {

var dflt = {
min: 0,
max: 100,
// donut: true,
gaugeWidthScale: 1.1,
counter: true,
hideInnerShadow: true
}

var gg1 = new JustGage({
id: 'gg1',
value: 75,
title: 'OEE ',
defaults: dflt
});

var gg2 = new JustGage({
id: 'gg2',
title: 'Availability',
defaults: dflt
});

var gg3 = new JustGage({
id: 'gg3',
value: 85,
title: 'Performance',
defaults: dflt
});

var gg4 = new JustGage({
id: 'gg4',
value: 95,
title: 'Quality',
defaults: dflt
});

});

</script>
</body>





i want to ask google assistant "tell me Performance of factory 2" then it should check from my code and read it as "performance of factory 2 is 85", i would appreciate any help, if needed nodejs, could give example ? I have read and studied from anywhere but not a clue.






<body >
<h1> Factory 2</h1>
<div class="koko">
<div id="gg1" class="oee"></div>

<div id="gg2" class="gauge" data-value="59"></div><br>
<div id="gg3" class="gauge"></div><br>
<div id="gg4" class="gauge"></div>
</div>


<script src="raphael-2.1.4.min.js"></script>
<script src="justgage.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function(event) {

var dflt = {
min: 0,
max: 100,
// donut: true,
gaugeWidthScale: 1.1,
counter: true,
hideInnerShadow: true
}

var gg1 = new JustGage({
id: 'gg1',
value: 75,
title: 'OEE ',
defaults: dflt
});

var gg2 = new JustGage({
id: 'gg2',
title: 'Availability',
defaults: dflt
});

var gg3 = new JustGage({
id: 'gg3',
value: 85,
title: 'Performance',
defaults: dflt
});

var gg4 = new JustGage({
id: 'gg4',
value: 95,
title: 'Quality',
defaults: dflt
});

});

</script>
</body>





<body >
<h1> Factory 2</h1>
<div class="koko">
<div id="gg1" class="oee"></div>

<div id="gg2" class="gauge" data-value="59"></div><br>
<div id="gg3" class="gauge"></div><br>
<div id="gg4" class="gauge"></div>
</div>


<script src="raphael-2.1.4.min.js"></script>
<script src="justgage.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function(event) {

var dflt = {
min: 0,
max: 100,
// donut: true,
gaugeWidthScale: 1.1,
counter: true,
hideInnerShadow: true
}

var gg1 = new JustGage({
id: 'gg1',
value: 75,
title: 'OEE ',
defaults: dflt
});

var gg2 = new JustGage({
id: 'gg2',
title: 'Availability',
defaults: dflt
});

var gg3 = new JustGage({
id: 'gg3',
value: 85,
title: 'Performance',
defaults: dflt
});

var gg4 = new JustGage({
id: 'gg4',
value: 95,
title: 'Quality',
defaults: dflt
});

});

</script>
</body>






javascript node.js html5 google-assistant-sdk google-assist-api






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 25 '18 at 14:15







waleedd32

















asked Nov 25 '18 at 11:44









waleedd32waleedd32

11419




11419













  • Could you further explain the structure of your project? Where are you struggling? Is it in creating a google assistant app? Is it in requesting data from the website?

    – Alex P.
    Nov 25 '18 at 11:50













  • @Alex P. I am doing little project for myself and im new to google assistant, i have that code in my website, i'm having problem on how to make google assistant read 'performance' and say it loudly back, like u said requesting data from website, if u invite me to chat i will explain more

    – waleedd32
    Nov 25 '18 at 12:09













  • could somebody help here ?

    – waleedd32
    Nov 25 '18 at 16:47



















  • Could you further explain the structure of your project? Where are you struggling? Is it in creating a google assistant app? Is it in requesting data from the website?

    – Alex P.
    Nov 25 '18 at 11:50













  • @Alex P. I am doing little project for myself and im new to google assistant, i have that code in my website, i'm having problem on how to make google assistant read 'performance' and say it loudly back, like u said requesting data from website, if u invite me to chat i will explain more

    – waleedd32
    Nov 25 '18 at 12:09













  • could somebody help here ?

    – waleedd32
    Nov 25 '18 at 16:47

















Could you further explain the structure of your project? Where are you struggling? Is it in creating a google assistant app? Is it in requesting data from the website?

– Alex P.
Nov 25 '18 at 11:50







Could you further explain the structure of your project? Where are you struggling? Is it in creating a google assistant app? Is it in requesting data from the website?

– Alex P.
Nov 25 '18 at 11:50















@Alex P. I am doing little project for myself and im new to google assistant, i have that code in my website, i'm having problem on how to make google assistant read 'performance' and say it loudly back, like u said requesting data from website, if u invite me to chat i will explain more

– waleedd32
Nov 25 '18 at 12:09







@Alex P. I am doing little project for myself and im new to google assistant, i have that code in my website, i'm having problem on how to make google assistant read 'performance' and say it loudly back, like u said requesting data from website, if u invite me to chat i will explain more

– waleedd32
Nov 25 '18 at 12:09















could somebody help here ?

– waleedd32
Nov 25 '18 at 16:47





could somebody help here ?

– waleedd32
Nov 25 '18 at 16:47












1 Answer
1






active

oldest

votes


















0














The Medium article you referenced is over a year old, and a lot has changed in that time. API.AI is now known as Dialogflow, although many of the concepts still apply. The fulfillment webhook he describes uses an older version of the library, and there are significant differences with the current version.



There are several codelabs which will guide you through learning how to create an Action.



Furthermore, the Medium article assumes that you will be getting the data from a web-based API that returns the response as JSON. Your code looks like it is using JavaScript that runs in the browser to return the values. Since there is no browser involved with Actions, this won't do what you think it will do.



However you are generating these values for the HTML, you may want to just use the same method to generate a JSON response that the Action can call, or just cut to the chase and have the webhook on your server generate the replies for each query based on wherever the data comes from.






share|improve this answer
























  • Could you possibly write some code which does this?, i would learn from it, as medium article is old now.

    – waleedd32
    Nov 26 '18 at 5:00













  • As I said, check out the codelabs.

    – Prisoner
    Nov 26 '18 at 9:50











  • There are Three levels for building : Build Actions for the Assistant (Level 1-3) which one is good for this purpose ?

    – waleedd32
    Nov 26 '18 at 13:03











  • Each one builds on the previous one and helps you understand how to build an Action.

    – Prisoner
    Nov 26 '18 at 13:04











  • You said in previous comment ”However you are generating these values for the HTML, you may want to just use the same method to generate a JSON response that the Action can call”, how to do this one ?

    – waleedd32
    Nov 26 '18 at 13:35











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53467093%2freading-value-from-html-using-google-assistant%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














The Medium article you referenced is over a year old, and a lot has changed in that time. API.AI is now known as Dialogflow, although many of the concepts still apply. The fulfillment webhook he describes uses an older version of the library, and there are significant differences with the current version.



There are several codelabs which will guide you through learning how to create an Action.



Furthermore, the Medium article assumes that you will be getting the data from a web-based API that returns the response as JSON. Your code looks like it is using JavaScript that runs in the browser to return the values. Since there is no browser involved with Actions, this won't do what you think it will do.



However you are generating these values for the HTML, you may want to just use the same method to generate a JSON response that the Action can call, or just cut to the chase and have the webhook on your server generate the replies for each query based on wherever the data comes from.






share|improve this answer
























  • Could you possibly write some code which does this?, i would learn from it, as medium article is old now.

    – waleedd32
    Nov 26 '18 at 5:00













  • As I said, check out the codelabs.

    – Prisoner
    Nov 26 '18 at 9:50











  • There are Three levels for building : Build Actions for the Assistant (Level 1-3) which one is good for this purpose ?

    – waleedd32
    Nov 26 '18 at 13:03











  • Each one builds on the previous one and helps you understand how to build an Action.

    – Prisoner
    Nov 26 '18 at 13:04











  • You said in previous comment ”However you are generating these values for the HTML, you may want to just use the same method to generate a JSON response that the Action can call”, how to do this one ?

    – waleedd32
    Nov 26 '18 at 13:35
















0














The Medium article you referenced is over a year old, and a lot has changed in that time. API.AI is now known as Dialogflow, although many of the concepts still apply. The fulfillment webhook he describes uses an older version of the library, and there are significant differences with the current version.



There are several codelabs which will guide you through learning how to create an Action.



Furthermore, the Medium article assumes that you will be getting the data from a web-based API that returns the response as JSON. Your code looks like it is using JavaScript that runs in the browser to return the values. Since there is no browser involved with Actions, this won't do what you think it will do.



However you are generating these values for the HTML, you may want to just use the same method to generate a JSON response that the Action can call, or just cut to the chase and have the webhook on your server generate the replies for each query based on wherever the data comes from.






share|improve this answer
























  • Could you possibly write some code which does this?, i would learn from it, as medium article is old now.

    – waleedd32
    Nov 26 '18 at 5:00













  • As I said, check out the codelabs.

    – Prisoner
    Nov 26 '18 at 9:50











  • There are Three levels for building : Build Actions for the Assistant (Level 1-3) which one is good for this purpose ?

    – waleedd32
    Nov 26 '18 at 13:03











  • Each one builds on the previous one and helps you understand how to build an Action.

    – Prisoner
    Nov 26 '18 at 13:04











  • You said in previous comment ”However you are generating these values for the HTML, you may want to just use the same method to generate a JSON response that the Action can call”, how to do this one ?

    – waleedd32
    Nov 26 '18 at 13:35














0












0








0







The Medium article you referenced is over a year old, and a lot has changed in that time. API.AI is now known as Dialogflow, although many of the concepts still apply. The fulfillment webhook he describes uses an older version of the library, and there are significant differences with the current version.



There are several codelabs which will guide you through learning how to create an Action.



Furthermore, the Medium article assumes that you will be getting the data from a web-based API that returns the response as JSON. Your code looks like it is using JavaScript that runs in the browser to return the values. Since there is no browser involved with Actions, this won't do what you think it will do.



However you are generating these values for the HTML, you may want to just use the same method to generate a JSON response that the Action can call, or just cut to the chase and have the webhook on your server generate the replies for each query based on wherever the data comes from.






share|improve this answer













The Medium article you referenced is over a year old, and a lot has changed in that time. API.AI is now known as Dialogflow, although many of the concepts still apply. The fulfillment webhook he describes uses an older version of the library, and there are significant differences with the current version.



There are several codelabs which will guide you through learning how to create an Action.



Furthermore, the Medium article assumes that you will be getting the data from a web-based API that returns the response as JSON. Your code looks like it is using JavaScript that runs in the browser to return the values. Since there is no browser involved with Actions, this won't do what you think it will do.



However you are generating these values for the HTML, you may want to just use the same method to generate a JSON response that the Action can call, or just cut to the chase and have the webhook on your server generate the replies for each query based on wherever the data comes from.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 26 '18 at 2:00









PrisonerPrisoner

35.6k33361




35.6k33361













  • Could you possibly write some code which does this?, i would learn from it, as medium article is old now.

    – waleedd32
    Nov 26 '18 at 5:00













  • As I said, check out the codelabs.

    – Prisoner
    Nov 26 '18 at 9:50











  • There are Three levels for building : Build Actions for the Assistant (Level 1-3) which one is good for this purpose ?

    – waleedd32
    Nov 26 '18 at 13:03











  • Each one builds on the previous one and helps you understand how to build an Action.

    – Prisoner
    Nov 26 '18 at 13:04











  • You said in previous comment ”However you are generating these values for the HTML, you may want to just use the same method to generate a JSON response that the Action can call”, how to do this one ?

    – waleedd32
    Nov 26 '18 at 13:35



















  • Could you possibly write some code which does this?, i would learn from it, as medium article is old now.

    – waleedd32
    Nov 26 '18 at 5:00













  • As I said, check out the codelabs.

    – Prisoner
    Nov 26 '18 at 9:50











  • There are Three levels for building : Build Actions for the Assistant (Level 1-3) which one is good for this purpose ?

    – waleedd32
    Nov 26 '18 at 13:03











  • Each one builds on the previous one and helps you understand how to build an Action.

    – Prisoner
    Nov 26 '18 at 13:04











  • You said in previous comment ”However you are generating these values for the HTML, you may want to just use the same method to generate a JSON response that the Action can call”, how to do this one ?

    – waleedd32
    Nov 26 '18 at 13:35

















Could you possibly write some code which does this?, i would learn from it, as medium article is old now.

– waleedd32
Nov 26 '18 at 5:00







Could you possibly write some code which does this?, i would learn from it, as medium article is old now.

– waleedd32
Nov 26 '18 at 5:00















As I said, check out the codelabs.

– Prisoner
Nov 26 '18 at 9:50





As I said, check out the codelabs.

– Prisoner
Nov 26 '18 at 9:50













There are Three levels for building : Build Actions for the Assistant (Level 1-3) which one is good for this purpose ?

– waleedd32
Nov 26 '18 at 13:03





There are Three levels for building : Build Actions for the Assistant (Level 1-3) which one is good for this purpose ?

– waleedd32
Nov 26 '18 at 13:03













Each one builds on the previous one and helps you understand how to build an Action.

– Prisoner
Nov 26 '18 at 13:04





Each one builds on the previous one and helps you understand how to build an Action.

– Prisoner
Nov 26 '18 at 13:04













You said in previous comment ”However you are generating these values for the HTML, you may want to just use the same method to generate a JSON response that the Action can call”, how to do this one ?

– waleedd32
Nov 26 '18 at 13:35





You said in previous comment ”However you are generating these values for the HTML, you may want to just use the same method to generate a JSON response that the Action can call”, how to do this one ?

– waleedd32
Nov 26 '18 at 13:35




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53467093%2freading-value-from-html-using-google-assistant%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Ottavio Pratesi

Tricia Helfer

15 giugno