Red Sea LED Aquarium Lights

If you know a little python you can try this script?
I suspect a special caracter in your password. If so I can try to correct.

import httpx
import json

uname="YOUR_USERNAME"
passwd="YOUR_PASSWORD"

header={
    "Authorization": "Basic Z0ZqSHRKcGE6Qzlmb2d3cmpEV09SVDJHWQ==",
    "Content-Type": "application/x-www-form-urlencoded"
}
payload="grant_type=password&username=" + uname + "&password=" + passwd

r= httpx.post("https://cloud.reef-beat.com/oauth/token",data=payload,headers=header,verify=False)
token=r.json()["access_token"]

#header={'X-Authentication':token}
header={"Authorization": "Bearer %s"%token}
print("token: %s"%token)



And after try that this one

import httpx
import json
from urllib.parse import quote_plus

uname="YOUR_USERNAME"
passwd=u"YOUR_PASSWORD"

header={
    "Authorization": "Basic Z0ZqSHRKcGE6Qzlmb2d3cmpEV09SVDJHWQ==",
    "Content-Type": "application/x-www-form-urlencoded"
}
payload="grant_type=password&username=" + uname + "&password=" + quote_plus(passwd.encode('UTF-8'))

r= httpx.post("https://cloud.reef-beat.com/oauth/token",data=payload,headers=header,verify=False)
token=r.json()["access_token"]

#header={'X-Authentication':token}
header={"Authorization": "Bearer %s"%token}
print("token: %s"%token)

I have put this into a simple html page since I have not a working python tester over here.

and console; Screenshot by Lightshot

Could it be a setting inside ReefBeat?

Sorry the image do not display.
I made the change for password encoding for next version which will probably be available next week.

The error, which is coming back in the html page is: “Error: Failed to fetch”, inside the console is says the same.

I tried to login into the ReefBeat app again to make sure the username (mailadres) and password are correct. So I have no idea why it is not working

Try to chane your password with only alphanumeric characters ( without any special characters ).

Not sure what was wrong, I send Red Sea Support an email and theirafter I was able to connect.

@Elwinmage I was wondering if there is a possibility to translate the variables as well, like the state of the ReefRun pumps are English. I am starting to translate this in 3 languages Dutch/Belgium and Ukraine and I cannot find these records in the json file.

Once I am done I will upload them to your project.

Hi @permudious, I’m not alerted on new post here. Please post your questions or requests on github: GitHub - Elwinmage/ha-reefbeat-component: Manage ReefLed, ReefMate, ReefDose,ReefRun, ReefWave and ReefATO+ from Red Sea.

When started to code this integration it was not possible to translate select values, so for rswave and only for it i made a special translation function.

Now that it 's possible I’v made the changes. You can clone the repos, use the branch: 2.0.0RC1,crete the new files and post you pull request with your translation files.

Thank’s for your help.

For those interested, I've created:

Also for those interested, I've done similar work on Kamoer devices.

It relies on a MITM attack to redirect the device to your own MQTT server, allowing full local control in HA.

It's possible to turn this work into a formal HA integration, but that will require a bit of work - maybe a project for another day!