Released v1.3.0 - For DWC 3.5.1
Change log :
V1.3.0 - For DWC 3.5.1
-Updated to support the new Team Gloomy release approach
-Updated UI
Released v1.3.0 - For DWC 3.5.1
Change log :
V1.3.0 - For DWC 3.5.1
-Updated to support the new Team Gloomy release approach
-Updated UI
BtnCmd 01.03.0 for DWC 3.5 has been published on github here
Changes Since 0.10.15 (DWC 3.4.6)
Custom Charts:
Example Custom Icons:
Nozzle Alignment :
Released V1.1.20 - For DWC 3.5.1
Change log :
V1.2.0 - For DWC 3.5.1
-Updated to support DWC 3.5.1 and the updated Duet release numbering approach
@Exerqtor It looks like it's not there. I'll see if I can add it in the next release....There may be a reason I did not add it in the begining, but that was too long ago to remember, or I just missed it the first place. Who knows!
@DIY-O-Sphere said in NodeDSF : Interface nodes for Node-Red (V1.1.11 - 06-10-23).:
And it's a bit strange that the latest image contains such old versions of node.js....
Yep - a user of my nodes for klipper (moonnode) hit the same problem (v18 nodes on v16 docker image), he raised the issue with the docker image maintainers and there response was something like "we wont update the node version until the next major release" - which is not ideal
@DIY-O-Sphere NodeDSF is built against the recommended NodeJS version (18) as stated by node-red here https://nodered.org/docs/faq/node-versions
Unfortunately if the docker image maintainers have not updated thier "latest" image to NodeJS18 there is not much I can do about it.
@fcwilt said in BtnCmd-DWC Plugin - Customise DWC - v01.02.07 17-09-23:
Anyway I gather that those of us running RRF 3.4.x are stuck with an older version of BtnCmd - 0.10.15 - which I guess is not getting any updates?
Correct - 3.5 introduced some major differences and as this is just a spare time project for me, I do not have the time to maintain 2 code bases.
When you say 'persist selected settings' do you mean changing the values of global variables via an input panel, or something else?
V1.1.11 Update - Nodes updated to RRF 3.5 comptability. Update through Node-Red Palette manager.
Released 01.02.07 for DWC 3.5.0-rc.1
Added custom icons to Input and Text Panels
@awitc not specifically. A custom panel can display almost anything from the object model, so if it exists in there then you should be able to show it. You can use the object model plugin to browse the object model.
Released v 01.02.06 for DWC 3.5.0-rc.1 Only
Released V1.1.20 - For DWC 3.5.0-rc.1 Only
Change log :
-Updated to support DWC 3.5.0-rc.1
@Rodrigue-Richalland This is not currently possible
@awitc Please read the release notes. The latest release is for 3.5.x. 3.4.x requires an earlier version
@awitc You can export layouts and import them on different browsers. However your pi screen is likely to have a different resolution and aspect ratio to your desktop, so it might be necessary to re-edit anything you export to meet the new resolution.
If you use the developer options of your desktop browser, and set the device resolution to match your pi screen, you may find it easier to design something which transfer better.
@awitc If you declare global variables at boot eg:
global minTempNum = 25
global maxTempNum = 200
And assign these variables in your macros as appropriate, you can use the BtnCmd plugin and create Input Panels which allow you to set the values of the two global variables in the UI eg:
These can be sliders or basic input and they will update the global variable value when changed.
Hope this Helps
@oliof (& more) I Agree - I like the idea - I have a hunch it could get quite computationally expensive though, especially if you factor in conditionality like delta's or if a value is only considered "changed" if it over a threshold for a set amount of time (to account for noise etc)... Lot's of variables to keep track of, and the OM is quite large to be parsing/extracting values every cycle. I expect it would have be limited to a fixed number of available triggers to keep it lightweight.
Released V1.1.19 - For DWC 3.5.0-beta.4 Only
Change log :
-Updated to support new Object Model Keys for SBC in beta 4
@stuartofmt Looked at your code on github - I don't think you have to switch to typescript, you just need to change the way you use the inbuilt DWC functions (which is all I did with BtnCmd). Have a look at this:
<style scoped>
.iframe-container {
position: relative;
background-color: transparent;
}
.iframe-container iframe {
position: absolute;
top: 0;
left: 0;
}
</style>
<template>
<div class="iframe_container">
<iframe :src= "myurl" width="100%" :height="tmpHeight" frameborder="0">
<span>Your browser does not support iFrames</span>
</iframe>
</div>
</template>
<script>
//import {mapState, mapActions} from 'vuex';
import Path from '@/utils/path';
import store from "@/store";
import { DisconnectedError, OperationCancelledError } from "@/utils/errors";
const version = '0.0.1';
const configFile = './DuetLapse3/DuetLapse3.config';
export default {
data() {
return{
version: version,
myurl: '',
tmpHeight: "400px",
fileContent: ""
};
},
methods: {
//...mapActions('machine', {machineDownload: 'download'}),
//file load from @ mintyTrebor modified with return
async loadSettingsFromFile() {
//Load the DuetLapse3.config file
try {
const setFileName = Path.combine(this.systemDirectory, configFile);
const response = await store.dispatch("machine/download", { filename: setFileName, type: 'text', showSuccess: false, showError: false});
this.fileContent = await response;
//get the ip address
let pattern = /-duet.*(?:$|\n)/i;
let match = this.fileContent.match(pattern).toString();
this.myurl = "http://"+ match.replace('-duet', '').trim();
// get the port
pattern = /-port.*(?:$|\n)/i;
match = this.fileContent.match(pattern).toString();
this.myurl = this.myurl + ":" + match.replace('-port', '').trim();
console.log('DuetLapse url is ' + this.myurl);
} catch (e) {
if (!(e instanceof DisconnectedError) && !(e instanceof OperationCancelledError)) {
console.warn(e);
console.warn("File Does Not Exist");
}
}
},
getAvailScreenHeight(){
let tmpHeight = window.innerHeight - 90;
if(window.document.getElementById("global-container")){
tmpHeight = tmpHeight - window.document.getElementById("global-container").offsetHeight;
}
if(this.showBottomNavigation) {
tmpHeight = tmpHeight - 56;
}
return tmpHeight;
}
},
// use computed instead of methods cuz we only want it to run once
computed:{
systemDirectory() {
return store.state.machine.model.directories.system;
},
showBottomNavigation() {
return this.$vuetify.breakpoint.mobile && !this.$vuetify.breakpoint.xsOnly && this.$store.state.settings.bottomNavigation;
},
theurl() {
return this.myurl;
},
theheight() {
return this.tmpHeight;
}
},
mounted() {
this.loadSettingsFromFile();
this.getAvailScreenHeight();
},
}
</script>
I updated your code to use the new DWC functions/methods. It compiles fine on my dev environment, and loaded in the browser, but I do not have an SBC setup to fully test.
@stuartofmt A few things that may help you..
In VS code make sure you have the typescript extensions/plugins installed and enabled, this will highlight the issues in your code for you and help you research/find fixes.
Compare your vuex includes and import statements to some of the standard DWC 3.5 component pages, you should notice the difference between 3.4 and 3.5 (most notably the lack of .js extensions etc), and also changes to how mapactions etc are now used.
Do a little research on typescript vs javascript. When I first tried to convert ReleaseMgr to typescript many of the issues I experienced were be down to things like declaring types for variables/objects etc. eg
isConnected(): boolean { return store.getters["isConnected"]; }
in simple terms the : boolean
is the typescript method of stating that isConnected() will return a boolean value.
Typescript can take a bit of getting used to, but it really pays dividends in the long run, as it provides a much stricter way of using javascript which ultimately reduces bugs. It also helps in your development environment - for example with the typescript extensions VSCode knows when you try and assign a string value to a boolean object/variable and will highlight the issue before you compile.
There is significantly more detail to it all but this should at least get you started.
I hope this helps.
Additionally try this developer bias AI tool, I've found it quite useful : https://www.phind.com/
try entering "how do I declare a variable type in typescript" it can explain things much better than I can - in a lot less time too