In order to contribute to this project, you need the following to be setup before you can start working:
- Godot 4.1.3 installed
## Fundamentals
Communication with the Smart Home Environment is done using the `HomeAdapters` global. Each environment is made up of devices and entities.
A device is a collection of different entities and entities can represent many different things in a smart home.
For example, the entity of name `lights.smart_lamp_1` would control the kitchen lamps while `state.smart_lamp_1_temp` would show the current temperature of the lamp.
The `HomeAdapters` global allows to communicate with different backends and offers a set of fundamental functions allowing communication with the Smart Home.
```python
Device {
"id": String,
"name": String,
"entities": Array[Entity]
}
Entity {
"state": String
"attributes": Dictionary
}
# Get a list of all devices
func get_devices() -> Signal[Array[Device]]
# Get a single device by id
func get_device(id: String) -> Signal[Device]
# Returns the current state of an entity.
func get_state(entity: String) -> Signal[Entity]
# Updates the state of the entity and returns the resulting state
4. Follow the following guide to setup exporting for android. [link](https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_android.html)
5. Make sure to reuse any existing `debug.keystore` when updating an app
6. Don't forget to set the JAVA_HOME variable and restart Godot to take effect
7. Install the `Godot XR Android OpenXR Loaders` plugin in Godot
7. Configure the following in the android build template:
- XRMode set to OpenXR
- Check `Use Grandle Build`
- Check `Godot OpenXR Meta`
- In XRFeatures, select at least optional for passthrough