Interface RikaFirenetService
- All Known Implementing Classes:
RikaFirenetServiceImpl
public interface RikaFirenetService
- Author:
- Sebastien Vermeille
-
Method Summary
Modifier and TypeMethodDescriptionGet status of a stoveGet stoves ids associated to the rika account defined inRikaFirenetConfigurationbooleanIndicate if the auth with rika-firenet is done or not.booleanisValidCredentials(String email, String password) Attempt to perform a login to rika-firenet using given credentials.voidupdateControls(@NonNull StoveId stoveId, Map<String, String> fields) Update stove controls (such as target temperature, on/off, heating mode, multiair, etc.)
-
Method Details
-
getStoves
Get stoves ids associated to the rika account defined inRikaFirenetConfiguration- Returns:
- list of stove ids
-
getStatus
StoveStatus getStatus(@NonNull @NonNull StoveId stoveId) throws InvalidStoveIdException, CouldNotAuthenticateToRikaFirenetException, UnableToRetrieveRikaFirenetDataException Get status of a stove- Parameters:
stoveId- the id of the stove- Returns:
- the complete status of a stove
- Throws:
InvalidStoveIdException- when the given stoveId is not validCouldNotAuthenticateToRikaFirenetException- when could not auth to rika firenetUnableToRetrieveRikaFirenetDataException
-
isAuthenticated
boolean isAuthenticated()Indicate if the auth with rika-firenet is done or not.- Returns:
- true when authenticated successfully to rika.
-
isValidCredentials
Attempt to perform a login to rika-firenet using given credentials.- Parameters:
email- rika account email (username)password- rika account password- Returns:
- true when the given credentials are valid.
-
updateControls
void updateControls(@NonNull @NonNull StoveId stoveId, Map<String, String> fields) throws UnableToControlRikaFirenetException, InvalidStoveIdException, OutdatedRevisionExceptionUpdate stove controls (such as target temperature, on/off, heating mode, multiair, etc.)- Parameters:
stoveId- Id of the stove to perform update onfields- You can provide any of theseUpdatableControls.Fieldsand rika2mqtt will manage to do the rest.- Throws:
UnableToControlRikaFirenetExceptionInvalidStoveIdExceptionOutdatedRevisionException
-