Class RikaFirenetServiceImpl
java.lang.Object
dev.cookiecode.rika2mqtt.rika.firenet.RikaFirenetServiceImpl
- All Implemented Interfaces:
RikaFirenetService
- Author:
- Sebastien Vermeille
-
Field Summary
Fields -
Constructor Summary
Constructors -
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.)
-
Field Details
-
KEEP_ALIVE_NOTIFICATION
- See Also:
-
-
Constructor Details
-
RikaFirenetServiceImpl
public RikaFirenetServiceImpl()
-
-
Method Details
-
isAuthenticated
public boolean isAuthenticated()Description copied from interface:RikaFirenetServiceIndicate if the auth with rika-firenet is done or not.- Specified by:
isAuthenticatedin interfaceRikaFirenetService- Returns:
- true when authenticated successfully to rika.
-
isValidCredentials
Description copied from interface:RikaFirenetServiceAttempt to perform a login to rika-firenet using given credentials.- Specified by:
isValidCredentialsin interfaceRikaFirenetService- Parameters:
email- rika account email (username)password- rika account password- Returns:
- true when the given credentials are valid.
-
updateControls
public void updateControls(@NonNull @NonNull StoveId stoveId, Map<String, String> fields) throws UnableToControlRikaFirenetException, InvalidStoveIdException, OutdatedRevisionExceptionDescription copied from interface:RikaFirenetServiceUpdate stove controls (such as target temperature, on/off, heating mode, multiair, etc.)- Specified by:
updateControlsin interfaceRikaFirenetService- 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
-
getStoves
Description copied from interface:RikaFirenetServiceGet stoves ids associated to the rika account defined inRikaFirenetConfiguration- Specified by:
getStovesin interfaceRikaFirenetService- Returns:
- list of stove ids
-
getStatus
public StoveStatus getStatus(@NonNull @NonNull StoveId stoveId) throws InvalidStoveIdException, CouldNotAuthenticateToRikaFirenetException, UnableToRetrieveRikaFirenetDataException Description copied from interface:RikaFirenetServiceGet status of a stove- Specified by:
getStatusin interfaceRikaFirenetService- 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
-