Small full stack application with a single purpose: to open entrance door hooked up to the internet-connected relay. The app intends to design cartoon-like interface of the door without sacrificing usability. It is a drawing of a door, that user can swipe and open the real door. Live example (actual door is somewhere in Berlin) can be found here: https://133.conformity.io.
One of the challenges was to prevent user confusion by clear communication of the door states without use of words. The door have loading
, open
or offline
states represented graphically:
The project consist of two main parts, connected through MQTT brocker
The project is designed to run on a $5 Sonoff Basic module, that should be modified and reflashed with the provided firmware.
- Install MQTT-brocker or register on a public one
- Setup hardware (Sonoff or any other ESP-based board would work)
- Add ESP support to Arduino IDE and PubSubClient library
- Copy
configuration-example.h
toconfiguration.h
and fill information about wifi and mqtt server - Open up firmware in the Arduino IDE
- Connect module to your serial adapter, build and upload
- Test the mqtt connection by listening on defined
outTopic
and sending lettero
to theinTopic
- If you using Sonoff Basic module, be carefull with the main power! You will need to modify it's PCB and disconnect the relay from the mains, in order to drive low-power door switch
- Connect NORMALLY OPEN relay to the ESP and to the switch contacts that opens up the door
- Setup dev server
- Download the code to your local environment
- Copy
configuration-example.json
toconfiguration.json
and edit it - Run
npm i && npm run dev
in terminal inside root of the project (install modern verion ofnode.js
if you don't have it) - Open
localhost:7001
in your browser
- Make a new door component
- Draw your door using a vector graphics editor (Illustrator would be ok), try to keep door in the middle
- Separate door and it's frame into different layers/groups
- Export drawing to SVG
- Copy any existing door component and replace SVG code inside. Optionally, embedded css code can be moved into a separate file
- Find door group inside CSS and apply
doorTransformStyle
anddoorAnimationClass
just like in the examples - Add newly created component to the list in
DoorSelector.js
- Edit
componentName
property insideconfiguration.json
to replace it with a newly created component name - Debug problems
localhost:7001
using browser console
- Deploy the project.
src/pm2.config.js
can be used to start keep server-side code running