In this assignment, your SPA will use a hard-coded ECI to attach to a pico. In a real application, the pico engine would have to use OAuth to provide an access token that can be used to communicate with the pico.
Your web application can be run locally or hosted somewhere. GitHub pages or AWS S3 are good options, but if you have a server you'd like to use, that's fine too.
You'll be modifying rulesets that you created for earlier lessons. Be sure that the ruleset URLs for this lesson are unique from the URLs you provided in earlier lessons since the earlier rulesets may not have been graded yet. You could do this by providing links to specific versions.
If you're using a trial account at Twilio, they won't let you send messages to numbers other than the one in your Twilio profile. This lab asks that you set the number from the profile. You can avoid this problem (and have more fun) if you just pay for your Twilio account. It won't cost much. If you don't want to do that, just ensure you can prove that the SPA you're building changes the phone number in the profile in the pico.
The pico engine does not support pre-flighting HTTP requests using OPTION. If your framework does that by default, you should disable that.
Log of threshold violations. You could do this in the temperature listing with a highlight or as a separate listing.
Hook the web application up to your pico so that it is showing live data from your pico making the appropriate queries.
Add a new ruleset to your pico called sensor_profile that contains a rule that responds to the sensor:profile_updated event. The event should include attributes for the sensor location and name. The profile should also allow the the threshold for a high temperature to be changed and the SMS number to notify. The ruleset should also include a queryable function for retrieving this data. The ruleset should store the profile attribute values in entity variables.
Modify the web application you created above to include a link to a page that shows the current name, location, contact number, and threshold. The user should have to ability to change the values of these fields and save them, in which case the application should raise the sensor:profile_updated event with the appropriate values for attributes.
Change your code rule so that the threshold it uses comes from the profile. Update your application appropriately.
Ensure that appropriate default values are used for threshold value if the profile has not been created before temperature events are seen.
Turn in the following:
URL of your SPA (or source code)
URLs for your rulesets.
Short screencast (< 3 minutes with sound) showing
Interaction with your web application, specifically,updating threshold and SMS number and displaying the current temperature, most recent temperaturesand threshold violations.
Editing the sensor profile
Answers to the following questions:
What design decisions did you make in your rulesets that made this assignment easier or harder? Why?
Explain how thesensor_profile ruleset isolates state and processes regarding the sensor profile from other rulesets.
How do other rulesets use thesensor_profile to get data?
Could they use it to store new values? How?
Can't change a rubric once you've started using it.