I got this working as well. However I am hoping to find this in an actual integration and not something spiffy we come with.
I found a Rituals API and that seems to be able to connect to the API and retrieve all the information in JSON format. The problem is I am running into my Python limitations.
from rituals import RitualsAPI
rituals = RitualsAPI(<EMAIL>, <PASSWORD>)
hub=rituals.availableHubs()
for key in hub:
print(rituals.hubs[key]['attributes']['fanc'])
print(rituals.hubs[key]['sensors']['fillc']['title'])
print(rituals.hubs[key]['sensors']['rfidc']['title'])
print(rituals.hubs[key]['sensors']['wific']['title'])
This will output the same as the rest API (fan status, fill capacity, type of scent and wifi connection strenght).
I also found the PNGs and ICONs that are referred in the JSON response. They are part of the application, in order to get them simply download the APK and unpack it.
I will see if I can create an integration but from the looks of it, it is too complex for me.
I was having some issues since the last few days since the /api/accounts/hubs endpoint doesn’t return all the information anymore. It seems to have reduced attributes to roomnamec (which is an array now?), and the sensors to wific and rfidc.
It is possible to get the other parameters back using a hub specific call /api/accounts/hub/{hub_hash}.
I reverse engineered the app a bit and found out that all the data can now be fetched from a slightly different url. hubs becomes hub and you need the short code instead of the long code: https://rituals.sense-company.com/api/account/hub/THE SHORT CODE
Also in the value templates you need to remove the 0 because the data is not in a list anymore since we fetch the data of only one hub: value_template: '{{ value_json.0.hub.attributes.fanc == "1" }}'
becomes: value_template: '{{ value_json.hub.attributes.fanc == "1" }}'
The rest command to turn the genie on and off still works as before.
Did you install the package using pip?
The package name is rituals-api why do you use import rituals instead of import rituals-api?
I can’t import rituals-api because it has a hyphen in the package name. It works using:
I made an integration which is installable using HACS (add it as a custom repository). It is found on:
A warning though, this is my first HomeAssistant integration . You provide the username and password (which are not stored), and then it allows to select the Genie you want to add. After that it should pop-up in your entities / devices. It should work with multiple Genies, but I only have one, so I haven’t tested that.
I’ve downloaded your integration using HACS and after rebooting Home Assistant it works perfectly. My Rituals Genie have stopped working with Home Assistant after some update but now it’s working again effortless. Thank you!