Home Creators Posts Import Register Favorites Logout

Content

Hello lovely Patreons! You can access the resources to accompany the "Smart Dice" project at the following top secret Patreons-only Google Drive link: https://drive.google.com/drive/folders/1BlNGt6ySzxmLvpcv0gJ-VlrC0t4i3R3E?usp=sharing

The folder contains the following:

/Dice/dice.ino   - the code file to run on the ESP8266/ESP32/Arduino

/static/Default.svg, /static/Back.svg, /static/Top.svg, etc.   - the image files displayed in the Node-RED display

Dice_bb.jpg  - an illustration of the wiring for a Wemos D1 Mini, or an Arduino Nano

Dice.fzz  - the Fritzing project from which the above illustration was made

Node-RED flow.json  - the Node-RED flow. Import into Node-RED by going to the menu at the top-right, selecting Import, and then clicking this file.

index.html/index.js/index.css - the files to create the webpage served by the Node-RED uibuilder node

Please let me know if you have any issues, and I hope you enjoy!

Comments

Vagos Barlas

Hi...Resources are missing the html,js, etc webpage code....

Vagos Barlas

Great....Thank for the quick reply!

Vagos Barlas

Had some problems with the image links....but when i add the folder in the img link got it fixed(had to copy static folder to src ../.node-red/uibuilder/uibuilder/src/ folder and change all the img links from "/Default.svg" to "/uibuilder/static/Default.svg" to node-red flow and html alike to do the trick ....now it works pefectly!!...I don't know how you get it worked like that in the tutorial....(although i am curious to find out)....i am posting this if someone else had the same problem!

David Swoboda

Hello Vagos Barlas and Alastair. I am also having an issue with UIBuilder and the image file paths. I will check to see if what Vagos did fixes it for me, but there is definately a disconnect in the procedures in the video and the current builds of Node-Red (using v2 here) and UIBuilder. The whole "static" directory thing seems broken. I created a new directory called "static" and put the files in there, but the web page always shows three broken image file links. I am assuming that since I had to add this "static" folder manually, that the UIBuilder system has no clue where this path is. My nodes are spitting out the proper msg.payload ("/Top" "/Right", etc) but looking at the JS and HTML I see no way that the code knows about "static" path location. This is a great project. Hopefully, I will get the web dashboard to display the dice status with the correct pathing. I really LIKE these Node-Red connected network projects. Please keep exploring Node-Red. It's powerful but complex for beginners like me. I'd like to see more videos that explore the world of MQTT and Node-Red to control a series of puzzles. Thank you.

David Swoboda

I have hit a brick wall of knowledge (lack of it). I can't get the images to display on the web page. The file name is being changed correctly, but when UIBuilder node runs, it only shows 3 broken image file links. I don't think the JS, HTML and or CCS is working correctly. I am on the NEWLY released Node-RED v2, so things may have broken in that or maybe in the UIBuilder node. I am not familair enough with UIBuilder Node to fix the issues. I am looking for some help...

David Swoboda

Continueing... There appears to be changes in default settings for uibuilder. Appearently it used to default to "UIbuilder + Vue.js + bootstrap-vue for Node-RED" under templates. Now it defaults to a BLANK template. I tired to change template to Vue and received an error about missing dependancies for vue, and bootstrap-vue. I have installed the new Vue template and the vue, bootstrap-vue files from npm repo. Now I have a default starting template for VueJS and Bootstrap and can look at the template page for this and see how to try and get Alastairs older code working. Looks like an update to this project may be in order. I'll continue my blind parade into an unknow world (for me) and hopefully I can figure this out before I am older and grey'er... :) Any help still appreciated...

David Swoboda

Hi Alastair, Thanks for checking this out. I'll post any progress that I make. At present I have the default Vue.JS Template displaying the msg.payload data and I can see the filename updating correctly. I just need to figure out how to get your older code to replace the img tags to display the image files. Also, please check your Patreon PM's I sent you a message about another project (Rotary Phone). Thanks for the cool projects. I hope all is well in the UK!