@MaBe, I'll get it up once I have a chance to test it and see if it fits with the new build. If it doesn't I'll PM the changes to you so you can give it a shot yourself.
@the1laz, thanks, CSS(D) is a WIP for sure, but hopefully it's useful. I've looked at Node-RED a while ago, but it seems to have come on a lot since then. Thanks for the suggestion, I'll take another look.
If you end up using ub then please let me know, and also if you decide not to for any reason (even if it's one I can't fix. Any feedback will help immensely with my PhD (which is what this is largely in aid of at the moment).
@DrAzzy, it's like @the1laz said, it's designed to hopefully make things a bit simpler after the initial deployment while still retaining the ability to script everything to the minutest detail if you want to. It's also looking forward to when there are potentially hundreds of connected devices in an environment, in which case controlling them from a webpage becomes cumbersome. Instead you can control sets of devices which you can define using CSS selectors, which are already pretty standard.
It's also about integrating with the Web, so in your example you've created a resource (launch.cmd) behind a URI, which works for direct control, but with CSS(D) and ub you don't need to know that the resource exists. You can send a command to an environment and anything that understands it will respond and react. It's a loose vs strong coupling thing.
You can also easily to M2M so you never need to interact with the system at all.
An example of where it's good is one I have working in my room as we speak. I have a Web page where I can set a temperature range, then when the temperature drops below the lower limit, anything that has the 'heater' class turns on and warms the room up until it reaches the upper limit, then turns off. Because the devices are stored as DOM objects it's easy to add a CSS(D) property to say, for example, how powerful each heater is (e.g. power: 3000w). Then if I want to keep my energy usage below a certain level I can only turn on anything that has a 'heater' class and has a power level below 2 kilowatts.
However this also highlights one of the things that needs to be worked out with CSS(D), which is when I use the 'power' attribute do I mean on/off or a power rating, and can some objects be half on. As I said it's a WIP and any contributions to the code or design choices are greatly appreciated.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@MaBe, I'll get it up once I have a chance to test it and see if it fits with the new build. If it doesn't I'll PM the changes to you so you can give it a shot yourself.
@the1laz, thanks, CSS(D) is a WIP for sure, but hopefully it's useful. I've looked at Node-RED a while ago, but it seems to have come on a lot since then. Thanks for the suggestion, I'll take another look.
If you end up using ub then please let me know, and also if you decide not to for any reason (even if it's one I can't fix. Any feedback will help immensely with my PhD (which is what this is largely in aid of at the moment).
@DrAzzy, it's like @the1laz said, it's designed to hopefully make things a bit simpler after the initial deployment while still retaining the ability to script everything to the minutest detail if you want to. It's also looking forward to when there are potentially hundreds of connected devices in an environment, in which case controlling them from a webpage becomes cumbersome. Instead you can control sets of devices which you can define using CSS selectors, which are already pretty standard.
It's also about integrating with the Web, so in your example you've created a resource (launch.cmd) behind a URI, which works for direct control, but with CSS(D) and ub you don't need to know that the resource exists. You can send a command to an environment and anything that understands it will respond and react. It's a loose vs strong coupling thing.
You can also easily to M2M so you never need to interact with the system at all.
An example of where it's good is one I have working in my room as we speak. I have a Web page where I can set a temperature range, then when the temperature drops below the lower limit, anything that has the 'heater' class turns on and warms the room up until it reaches the upper limit, then turns off. Because the devices are stored as DOM objects it's easy to add a CSS(D) property to say, for example, how powerful each heater is (e.g. power: 3000w). Then if I want to keep my energy usage below a certain level I can only turn on anything that has a 'heater' class and has a power level below 2 kilowatts.
However this also highlights one of the things that needs to be worked out with CSS(D), which is when I use the 'power' attribute do I mean on/off or a power rating, and can some objects be half on. As I said it's a WIP and any contributions to the code or design choices are greatly appreciated.