Hi, I’m a hardware guy by training and experience so I’m pretty much a newb when it comes to this.
I’m am using node-red on a BBB trying to service a http request and return a simple web page. Right now I’m trying to use an example flow from node-red and it doesn’t seem to be working.
I’m not sure how to format the Get request argument among other things. I also am not sure how to debug this other than visiting the URL with a chrome or firefox browser page.
Has anyone else done this? Does anyone have a flow that’s known to work on the BBB rev C?
Running:
Debian 9.5
BoneScript 0.7.0.
node-red v0.19.4
Here’s the JSON flow:
[{“id”:“4f655344.2681d4”,“type”:“http in”,“z”:“fb76d89e.04292”,“name”:"",“url”:“http://192.168.1.14/Home_Page”,“method”:“get”,“upload”:false,“swaggerDoc”:"",“x”:412,“y”:1077,“wires”:[[“c8f49eb2.d36408”]]},{“id”:“a4cff941.69703”,“type”:“http response”,“z”:“fb76d89e.04292”,“name”:"",“statusCode”:"",“headers”:{},“x”:1058,“y”:1087,“wires”:[]},{“id”:“c8f49eb2.d36408”,“type”:“template”,“z”:“fb76d89e.04292”,“name”:"",“field”:“payload”,“fieldType”:“msg”,“syntax”:“mustache”,“template”:" \n\n\n\tPage Title\n\t<meta name=“viewport” content=“width=device-width, initial-scale=1”>\n\t<link rel=“stylesheet” href=“http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.css” />\n<script src=“http://code.jquery.com/jquery-1.9.1.min.js”>\n<script src=“http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js”>\n\n\n\n\n<div data-role=“page” id=“one”>\n\n\t<div data-role=“header”>\n\t\t
Multi-page
\n\t\n\n\t<div role=“main” class=“ui-content” >\n\t\tOne
\n\n\t\tI have an id
of “one” on my page container. I’m first in the source order so I’m shown when the page loads.
This is a multi-page boilerplate template that you can copy to build your first jQuery Mobile page. This template contains multiple “page” containers inside, unlike a single page template that has just one page within it.
\n\t\tJust view the source and copy the code to get started. All the CSS and JS is linked to the jQuery CDN versions so this is super easy to set up. Remember to include a meta viewport tag in the head to set the zoom level.
\n\t\tYou link to internal pages by referring to the id
of the page you want to show. For example, to <a href="#two" >link to the page with an id
of “two”, my link would have a href="#two"
in the code.
Show internal pages:
\n\t\t<a href="#two" class=“ui-btn ui-shadow ui-corner-all”>Show page “two”
\n\t\t<a href="#popup" class=“ui-btn ui-shadow ui-corner-all” data-rel=“dialog” data-transition=“pop”>Show page “popup” (as a dialog)
\n\t\n\n\t<div data-role=“footer” data-theme=“a”>\n\t\tPage Footer
\n\t\n\n\n\n<div data-role=“page” id=“two” data-theme=“a”>\n\n\t<div data-role=“header”>\n\t\tTwo
\n\t\n\n\t<div role=“main” class=“ui-content”>\n\t\tTwo
\n\t\tI have an id of “two” on my page container. I’m the second page container in this multi-page template.
\n\t\tNotice that the theme is different for this page because we’ve added a few data-theme
swatch assigments here to show off how flexible it is. You can add any content or widget to these pages, but we’re keeping these simple.
<a href="#one" data-direction=“reverse” class=“ui-btn ui-shadow ui-corner-all ui-btn-b”>Back to page “one”
\n\n\t\n\n\t<div data-role=“footer”>\n\t\tPage Footer
\n\t\n\n\n\n<div data-role=“page” id=“popup”>\n\n\t<div data-role=“header” data-theme=“b”>\n\t\tDialog
\n\t\n\n\t<div role=“main” class=“ui-content”>\n\t\tPopup
\n\t\tI have an id of “popup” on my page container and only look like a dialog because the link to me had a data-rel=“dialog”
attribute which gives me this inset look and a data-transition=“pop”
attribute to change the transition to pop. Without this, I’d be styled as a normal page.
<a href="#one" data-rel=“back” class=“ui-btn ui-shadow ui-corner-all ui-btn-inline ui-icon-back ui-btn-icon-left”>Back to page “one”
\n\t\n\n\t<div data-role=“footer”>\n\t\tPage Footer
\n\t\n\n\n\n\n\n\n\n",“x”:816,“y”:1079,“wires”:[[“a4cff941.69703”,“63f4fa6b.896cbc”]]},{“id”:“63f4fa6b.896cbc”,“type”:“debug”,“z”:“fb76d89e.04292”,“name”:"",“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“false”,“x”:1037,“y”:998,“wires”:[]}]Thanks!