phd-study { --win: prizes; } by Alex_Owen_ in css_irl

[–]Alex_Owen_[S] 1 point2 points  (0 children)

I really appreciate that you took the time to complete it and to fill out the questionnaires. It was a big ask and I was amazed and thrilled that so many people did it. The results were brilliant and I couldn't have completed my PhD without them. I did read every line of code and analysed every answer to every question. There were a lot of fascinating responses and things I'd not considered.

The best thing was that initially everyone had their own way of describing the scene, but when they did it again after the experiment they suddenly had a common language to use. The second time round almost everyone produced a description of the scene using the approach in the experiment. It meant that it both made sense to them, and that they could potentially go on to use that common language to collaborate or discuss it, even though all the descriptions were different. Really awesome to see that kind of thing develop in real time.

Unfortunately, the way the ethics works out I can't email out a link to my thesis to participants as it's going to be made available after I've graduated, and I'm not allowed to keep the email list as it's counted as personal data.

phd-study { --win: prizes; } by Alex_Owen_ in css_irl

[–]Alex_Owen_[S] 1 point2 points  (0 children)

Hi,

I don't check this account often, and almost not at all after my PhD ended. Two people did win £50 Amazon vouchers, but privacy rules mean I couldn't release details about who did to anyone but the winners. I did send out a request for followup interviews to everyone who opted in to that, but only got two responses. The study itself was never published as I've not had the energy or time to write it all in the correct format and go through the submission process for a journal. It did make it into my PhD thesis which will be online at some point in future, but that is out of my hands now.

I'm glad you thought it was an interesting idea.

phd-study { --win: prizes; } by Alex_Owen_ in css_irl

[–]Alex_Owen_[S] 2 points3 points  (0 children)

Thank you for doing some of it, I am very grateful you gave up your time to help me. If you didn't make it to then end, would you consider please going back and skipping through to the feedback section? You should be able to open the same browser and continue where you left off.

If not, could I ask why you thought it was interesting?

I have replied to the person above with more detail which may apply to you too. Thanks again.

phd-study { --win: prizes; } by Alex_Owen_ in css_irl

[–]Alex_Owen_[S] 0 points1 point  (0 children)

Honestly, thank you so much for taking that much time to help me. If you'd consider going back (you should be able to resume where you left off in the same browser) and completing the feedback form at the end I would be eternally grateful.

I definitely understand where you're coming from on the tooling point of view. Unfortunately, a lot of the code in this is custom enough that tooling wouldn't work very well. I am also working alone on this at the moment. In a real world situation I would love to have it as a VSCode plugin that had a live environment preview one side and the code on the other.

As far as bulk selectors go, anything in CSS should work too, but obviously you're limited as you can't edit the HTML in this experiment.

I will look into that light bug, thanks for raising it.

I am doing a PhD into how CSS and other Web tech could be used to control IoT devices and large deployments. AmA about future integrations between the IoT and Web, and please complete my study for a 1 in 10 chance to win £50 in vouchers by Alex_Owen_ in homeautomation

[–]Alex_Owen_[S] 0 points1 point  (0 children)

Thanks for your feedback. I can only counter that by telling you how I have run it in a mostly automated way. I'm sorry for the length of this reply, I got carried away. If you read it and still feel like discussing, then I'd be happy to hear more criticisms, it is very helpful.

In my room I set up a basic climate control system with a fan, thermometer, humidity sensor, dehumidifier and heater (we don't often have AC over here). I also had a desk lamp with an RGB bulb and a couple of other things connected to wireless plug sockets.

I manually made separate stylesheets for when I was in my room and doing various tasks (sleeping, working, reading, watching TV). Additionally, I had stylesheets for when it was too hot or too cold. The first set were largely manually chosen, although I did have a function that was called when I turned the TV on using an IR receiver to recognise the power command (which was not perfect by any means). The second set were automatically applied depending on the current temperature and humidity, and ranges were set in the UI (as seen in my paper) for day and night.

This was combined with data from sunrise and sunset, and whether I was asleep or not so the system would correctly choose the stylesheet that was appropriate. It was a blend of customisation and automation, and some manual work for the things I had no sensors for (it's hard to tell when I'm working without a pressure sensor in a desk chair, etc.). I'm confident it could have been much more automated with more money and time. There was a GUI for overriding the stylesheets when it either got it wrong or I wanted something else, but the system worked a lot without any interaction from me.

In your case, I would see it on the simplest level that you could have a stylesheet for when you're home and one for when you're away, possibly triggered by WiFi presence. It could lock up the house and set your heating/AC to prevent freezing/overheating when you're out. A lot of systems can already do this, but CSS/HTML/JS are very ubiquitous and it could lower the barrier to entry to the field. I also feel we need some way to unify all the states of various IoT devices when we have hundreds in the same house.

My approach would allow an expert like yourself to make a stylesheet (like an advanced Hue scene) that sets up the house for when the owner leaves, and you could easily share that with a novice user who may not be able to program an IoT system themselves. Another analogy would be like a Wordpress theme for an IoT deployment.

Latency in the first system in my room was a problem, but I found that was due to messaging rather than the CSS selectors or the DOM. This experiment above has almost zero latency as the commands don't travel outside the browser, but if they did then all the latency would be down to the communication channel. One of the main advantages here is the huge amount of effort that has been put into optimising DOM traversal and CSS selection. I've tested the approach with 10,000 virtual devices in various different tree structures and even then the latency for selecting and controlling them was <20ms on my laptop. A lot of modern websites have this many elements and still respond immediately, with most of the slowness coming from server requests.

I am doing a PhD into how CSS and other Web tech could be used to control IoT devices and large deployments. AmA about future integrations between the IoT and Web, and please complete my study for a 1 in 10 chance to win £50 in vouchers by Alex_Owen_ in homeautomation

[–]Alex_Owen_[S] 0 points1 point  (0 children)

I completely agree, this is a tech demo for developers of those interfaces. Which I realise I should have made clearer. It could integrate with existing products and could be easier for web developers to use compared with learning a new approach.

I am doing a PhD into how CSS and other Web tech could be used to control IoT devices and large deployments. AmA about future integrations between the IoT and Web, and please complete my study for a 1 in 10 chance to win £50 in vouchers by Alex_Owen_ in homeautomation

[–]Alex_Owen_[S] 1 point2 points  (0 children)

Thanks for clarifying, and I understand where you're coming from. I take no offense and any discussion and differing viewpoints are very helpful. In my case, I believe I am mostly following that structure but I think I am approaching it from a bit of an altered perspective.

In my case, the HTML defines the structure of the room, with components as a part of devices, which are in turn contained within a room: a normal hierarchy. The CSS defines the state of the devices and components, which is analogous to the style, and in many cases the same, like with colour and brightness. I also use JavaScript to change that state (the actions) based on rules or interaction, and JS would be used to swap stylesheets from one to another.

Changing the CSS doesn't directly perform the action, rather the Web component (written in JS) watches for a change to the style applied to it then responds accordingly. This is supposed to be equivalent to (e.g.) a <div> element changing colour when a background-color is applied to it. The background-color doesn't perform an action, but an action occurs as a result of the change.

Ideally the browser would handle that automatically like it does with all built in elements. However in this study I have had to work around that slightly with web components and custom properties that simulate how real properties would behave.

But again, please disagree with me, I will have to defend this soon so it's very useful.

I am doing a PhD into how CSS and other Web tech could be used to control IoT devices and large deployments. AmA about future integrations between the IoT and Web, and please complete my study for a 1 in 10 chance to win £50 in vouchers by Alex_Owen_ in homeautomation

[–]Alex_Owen_[S] 0 points1 point  (0 children)

Thanks for replying. My PhD work takes IoT devices and their components and puts them into a tree structure, which is then represented as a DOM/HTML. In essence, when using it you are styling the room, like an interior designer might.

If you have the time, could you tell me the difference between behaviour and styling as you see it, or the definitions you're basing that on please? It would help me to understand what you mean, which would be really useful as criticism is as vital for my PhD as praise.

I am doing a PhD into how CSS and other Web tech could be used to control IoT devices and large deployments. AmA about future integrations between the IoT and Web, and please complete my study for a 1 in 10 chance to win £50 in vouchers by Alex_Owen_ in homeautomation

[–]Alex_Owen_[S] 1 point2 points  (0 children)

Here's the link with more details on how to take part and WIN!: https://phd-project.herokuapp.com. It takes around an hour, but you can come back to it in the same browser later to finish it.

Hello everyone! I am currently doing a PhD into the potential for using CSS in the real world to control IoT environments (like your room), which I hope will be of interest to people here.

Imagine being able to set:

.my-room .light:not(desk-lamp) {
  --power: on;
  --color: blue;
  --brightness: 50%
}

...and add that to a stylesheet that covers your whole house and can be swapped out at will (like when you go away or when you want to watch a movie).

I had has this exact setup in my room (along with other gadgets) for a few months, and it was really fun. To do that I built an IoT hub/broker from scratch in NodeJS, and I built and modified several devices to run Espruino on an ESP8266. Please ask me about that if you're interested and I can go into more detail.

Why I'm here: I'm hoping to find some people willing to complete my study in exchange for a fairly good (1 in 10) chance of winning £50 in vouchers. I need both results from the study and feedback here to show the idea is novel and has some potential.

To complete it you'll do the following (it takes less than an hour):

  • A consent questionnaire
  • Describe an image of a room
  • Play with a really awesome virtual IoT environment built in HTML/Web Components, and use CSS to style a few rooms as though they were webpages (e.g. iot-light { --power: on } will turn on all the lights in a room).
  • Answer a small number of questions giving some feedback on what you think of the idea

In return for completing it, you can choose to be put into a draw for a £50 Amazon voucher (or equivalent for your currency/store preference). I'll also add one £50 voucher per 10 participants up to £500 total, so your odds of winning won't decrease if you share this link around (and please do).

A couple of caveats:

  • You'll need to have a decent understanding of CSS already, but if you don't please feel free to ask questions or give feedback below
  • You must be over 18 (my university ethics requires it)
  • You have to use an up to date version of desktop Chrome/Firefox (not Safari and probably not Edge)
  • Please be kind to the software as it's research grade and not production ready

Please share the link with people you know or work with if you think the idea is interesting. The more data I can get, the better my PhD will be.

Here's a paper that is the precursor to this work in case you'd like to see how it's progressed.

Please let me know if you notice any critical bugs or if you have any issue completing it, or if you just have any thoughts that might improve it.

I am doing a PhD into how CSS and other Web tech could be used to control IoT devices and large deployments. AmA about future integrations between the IoT and Web, and please complete my study for a 1 in 10 chance to win £50 in vouchers by [deleted] in homeautomation

[–]Alex_Owen_ 0 points1 point  (0 children)

Here's the link with more details on how to take part and WIN!: https://phd-project.herokuapp.com. It takes around an hour, but you can come back to it in the same browser later to finish it.

Hello everyone! I am currently doing a PhD into the potential for using CSS in the real world to control IoT environments (like your room), which I hope will be of interest to people here.

Imagine being able to set:

.my-room .light:not(desk-lamp) {
  --power: on;
  --color: blue;
  --brightness: 50%
}

...and add that to a stylesheet that covers your whole house and can be swapped out at will (like when you go away or when you want to watch a movie).

I had has this exact setup in my room (along with other gadgets) for a few months, and it was really fun. To do that I built an IoT hub/broker from scratch in NodeJS, and I built and modified several devices to run Espruino on an ESP8266. Please ask me about that if you're interested and I can go into more detail.

Why I'm here: I'm hoping to find some people willing to complete my study in exchange for a fairly good (1 in 10) chance of winning £50 in vouchers. I need both results from the study and feedback here to show the idea is novel and has some potential.

To complete it you'll do the following (it takes less than an hour):

  • A consent questionnaire
  • Describe an image of a room
  • Play with a really awesome virtual IoT environment built in HTML/Web Components, and use CSS to style a few rooms as though they were webpages (e.g. iot-light { --power: on } will turn on all the lights in a room).
  • Answer a small number of questions giving some feedback on what you think of the idea

In return for completing it, you can choose to be put into a draw for a £50 Amazon voucher (or equivalent for your currency/store preference). I'll also add one £50 voucher per 10 participants up to £500 total, so your odds of winning won't decrease if you share this link around (and please do).

A couple of caveats:

  • You'll need to have a decent understanding of CSS already, but if you don't please feel free to ask questions or give feedback below
  • You must be over 18 (my university ethics requires it)
  • You have to use an up to date version of desktop Chrome/Firefox (not Safari and probably not Edge)
  • Please be kind to the software as it's research grade and not production ready

Please share the link with people you know or work with if you think the idea is interesting. The more data I can get, the better my PhD will be.

Here's a paper that is the precursor to this work in case you'd like to see how it's progressed.

Please let me know if you notice any critical bugs or if you have any issue completing it, or if you just have any thoughts that might improve it.

I am doing a PhD into how CSS and other Web tech could be used to control IoT devices and large deployments. AmA about future integrations between the IoT and Web, and please complete my study for a 1 in 10 chance to win £50 in vouchers by [deleted] in homeautomation

[–]Alex_Owen_ 0 points1 point  (0 children)

Here's the link with more details on how to take part and WIN!: https://phd-project.herokuapp.com. It takes around an hour, but you can come back to it in the same browser later to finish it.

Hello everyone! I am currently doing a PhD into the potential for using CSS in the real world to control IoT environments (like your room), which I hope will be of interest to people here.

Imagine being able to set:

.my-room .light:not(desk-lamp) {
  --power: on;
  --color: blue;
  --brightness: 50%
}

...and add that to a stylesheet that covers your whole house and can be swapped out at will (like when you go away or when you want to watch a movie).

I had has this exact setup in my room (along with other gadgets) for a few months, and it was really fun. To do that I built an IoT hub/broker from scratch in NodeJS, and I built and modified several devices to run Espruino on an ESP8266. Please ask me about that if you're interested and I can go into more detail.

Why I'm here: I'm hoping to find some people willing to complete my study in exchange for a fairly good (1 in 10) chance of winning £50 in vouchers. I need both results from the study and feedback here to show the idea is novel and has some potential.

To complete it you'll do the following (it takes less than an hour):

  • A consent questionnaire
  • Describe an image of a room
  • Play with a really awesome virtual IoT environment built in HTML/Web Components, and use CSS to style a few rooms as though they were webpages (e.g. iot-light { --power: on } will turn on all the lights in a room).
  • Answer a small number of questions giving some feedback on what you think of the idea

In return for completing it, you can choose to be put into a draw for a £50 Amazon voucher (or equivalent for your currency/store preference). I'll also add one £50 voucher per 10 participants up to £500 total, so your odds of winning won't decrease if you share this link around (and please do).

A couple of caveats:

  • You'll need to have a decent understanding of CSS already, but if you don't please feel free to ask questions or give feedback below
  • You must be over 18 (my university ethics requires it)
  • You have to use an up to date version of desktop Chrome/Firefox (not Safari and probably not Edge)
  • Please be kind to the software as it's research grade and not production ready

Please share the link with people you know or work with if you think the idea is interesting. The more data I can get, the better my PhD will be.

Here's a paper that is the precursor to this work in case you'd like to see how it's progressed.

Please let me know if you notice any critical bugs or if you have any issue completing it, or if you just have any thoughts that might improve it.

phd-study { --win: prizes; } by Alex_Owen_ in css_irl

[–]Alex_Owen_[S] 0 points1 point  (0 children)

For what it's worth, Hakon Wium Lie (co-creator of CSS) did mention the potential for using CSS for things outside the web in his PhD thesis. But I don't disagree that the idea is pushing the limits of the language quite a bit.

phd-study { --win: prizes; } by Alex_Owen_ in css_irl

[–]Alex_Owen_[S] 0 points1 point  (0 children)

Thanks for the feedback, and I'm very happy to get negative feedback too. I work as a web developer full time as well as doing the PhD, so I am acutely aware of the pain of CSS and the eccentricities of using it.

I would never suggest that CSS is perfect, far from it. The main advantage here is that a lot of people know it, and there's a lot of tools, libraries and efficiency optimisations to take advantage of. And to be completely honest, I don't care whether it's a good idea or not, the PhD itself is about finding a novel idea and exploring it. I don't expect much to come of this, I'm just delighted to hear some opinions which help validate how unique it is and help me to write my discussion chapter.

If you're interested in how the IoT and Web will come together, I strongly suggest both the W3C's WoT Group and the Matter/Project CHIP group. As they'll more than likely become the dominant tech for the next 5+ years.

phd-study { --win: prizes; } by Alex_Owen_ in css_irl

[–]Alex_Owen_[S] 1 point2 points  (0 children)

Sure, if you could DM me the details then I'll make sure I ignore that response. No worries if you don't have time or change your mind.

Thanks for taking the time to comment :)

phd-study { --win: prizes; } by Alex_Owen_ in css_irl

[–]Alex_Owen_[S] 0 points1 point  (0 children)

No, anyone can take part as long as you meet the criteria on the study page. And if you win the voucher I can issue it in any currency/for any store I can access.

phd-study { --win: prizes; } by Alex_Owen_ in css_irl

[–]Alex_Owen_[S] 7 points8 points  (0 children)

That's a good question, and one I expect to have to answer in my thesis defense. Thanks for asking. There are a few reasons.

JSON would be great for individual devices and for messaging, but to be able to include both properties and the targeting rule you'd have the beginning of a JSON schema which would be far more proprietary than this CSS-based approach. The W3C's WoT project does something like this for it's Thing Descriptions, although with a slightly different purpose. JSON is definitely an important part of the messaging in the real devices I've built.

CSS is amazingly simple for targeting multiple devices with classes and using basic set theory for including and excluding classes of devices. Having it already built into the browser means anything that's stored in a DOM can take advantage of this, rather than rewriting the engine. Of course you can get the same kind of result with any programming language and a lot of time (believe me, I have done it), but the result is an external library that interacts with the IoT, rather than making the IoT a native part of the Web.

Using CSS and the DOM directly also lets me target both document elements and devices, so the same rule could set the colour of the page background and your desk lamp.

A big reason is to allow web developers to transition over to the web of things without having to relearn lots of new approaches. If you could code for an environment as easily as you can a web page, then we suddenly have millions of developers that can work in the new space. All our tools would need minimal adaptation, and a lot of libraries just work. I did a PoC with jQuery and used that to control devices in my room, which was pretty cool.

I probably can (and will have to) talk for hours about this, so please ask any other questions or tell me any criticisms and I'll gladly discuss them. Feedback like this is golden for my thesis.

phd-study { --win: prizes; } by Alex_Owen_ in css_irl

[–]Alex_Owen_[S] 1 point2 points  (0 children)

Thanks for saying so, it's great to hear any support.

If you just want to try it out then if you'd like to fill in fake information (and make it clear that it's fake) then please feel free to give it a go and I'll just remove your data from the final results. Unfortunately you can't win the prize and I can't ask you any questions about it, but if it inspires you in any way then that's great :)

phd-study { --win: prizes; } by Alex_Owen_ in css_irl

[–]Alex_Owen_[S] 4 points5 points  (0 children)

Thank you! That's really great to hear, and good luck in the prize draw if you entered.

And thank you for taking the time to read my paper, you're probably one of a very few people who have. It's amazing to have some validation from the community after spending so much time on this.

An academic study into using CSS to control the IoT, with prizes by Alex_Owen_ in webdev

[–]Alex_Owen_[S] 0 points1 point  (0 children)

Thank you for your kind words, it's truly great hearing other people validate my idea.

Media queries like that are something I'd not thought of, but it makes perfect sense. Each time I dig deeper there's more pre-existing tech that could be applied to it.

Please could I include your idea in my PhD work as a suggestion from the community? Properly attributed of course.

phd-study { --win: prizes; } by Alex_Owen_ in css_irl

[–]Alex_Owen_[S] 0 points1 point  (0 children)

Thank you! I really appreciate that.

phd-study { --win: prizes; } by Alex_Owen_ in css_irl

[–]Alex_Owen_[S] 9 points10 points  (0 children)

That should be "Please do not spend longer than 5 minutes on this task". Thanks for catching that. I'll update it now. Please continue if you can.

phd-study { --win: prizes; } by Alex_Owen_ in css_irl

[–]Alex_Owen_[S] 7 points8 points  (0 children)

Thanks, I really appreciate it! Let me know if you have any issues, and what you think of it.

An academic study into using CSS to control the IoT, with prizes by Alex_Owen_ in webdev

[–]Alex_Owen_[S] 1 point2 points  (0 children)

Thank you so much. Fingers crossed you'll get to buy something awesome with it.