akvo / akvo-flow

A data collection and monitoring tool that works anywhere.
http://akvo.org/products/akvoflow/
GNU Affero General Public License v3.0
65 stars 31 forks source link

Add 2 new Caddisfly sensors to Flow #1863

Closed janagombitova closed 7 years ago

janagombitova commented 7 years ago

Akvo has developed two new soil sensors that need to be added to Flow: new soil EC (SOM) sensor and soil moisture (SOM) sensor.

The details on both sensors will be defined by Nischal @nhternup and shared with us to add to Flow implementation. We need to make sure two new test types for the Akvo Caddisfly question type are created:

(Later in the future we can look at the UX of selecting test types to group them based on type if needed and ensure the UX also fits well with the pricing of Akvo Caddisfly). Furthermore, we need to make sure the questions are shown properly in the app, and answers are well stored and displayed (in Inspect data tab, Monitoring tab, private map, public map, Carto Map) and exported as well.

nhternup commented 7 years ago

Soil sensors config to be added to: https://github.com/akvo/akvo-flow/blob/develop/GAE/src/resources/caddisfly/caddisfly-tests.json

    {
        "subtype": "sensor",
        "uuid": "80697cd1-acc9-4a15-8358-f32b4257dfaf",
        "tags": ["soil quality"],
        "name": "Soil Electrical Conductivity",
        "brand": "Akvo Caddisfly",
        "description": "Electrical conductivity of soil",
        "numResults": 2,
        "hasImage": false,
        "results": [{
                "name": "Soil Electrical Conductivity",
                "id": 1,
                "unit": "μS/cm"
            },
            {
                "name": "Temperature",
                "id": 2,
                "unit": "°Celsius"
            }
        ]
    }, {
        "subtype": "sensor",
        "uuid": "0b4a0aaa-f556-4c11-a539-c4626582cca6",
        "tags": ["soil quality"],
        "name": "Soil Moisture",
        "brand": "Akvo Caddisfly",
        "description": "Moisture content of soil",
        "numResults": 1,
        "hasImage": false,
        "results": [{
            "name": "Soil Moisture",
            "id": 1,
            "unit": "% VWC"
        }]
    }
valllllll2000 commented 7 years ago

Test plan:

Go to dashboard to one of your surveys and try adding a question with Akvo Caddisfly type. Choose Soil Moisture or Soil Electrical Conductivity and create the questions. Assign the survey to your device. You should see these questions correctly and be able to launch the appropriate action in the caddisfly app.

janagombitova commented 7 years ago

@nhternup Here are the toast messages I got when plugging in the sensors:

nhternup commented 7 years ago

Thanks @janagombitova

Could you please confirm if the spaces in the ids are correct

WaterEC406 or WaterEC 406

Soil Moisture 0 or SoilMoisture 0

Soil EC 361 or SoilEC 361

janagombitova commented 7 years ago

Of course @nhternup

Will you keep these ID toasts in place? or do these serve just for now, for this particular test and you will remove them and only the validation toasts will stay?

nhternup commented 7 years ago

Thanks @janagombitova ID toasts are temporary, only validation toasts will stay

janagombitova commented 7 years ago

👍 all works as expected, I will create separate issues for minor improvements in the repositories. This can go out