API auth groups and adding new actuators


I was studying the bot and API to see how I could add a new actuator to the system and ended up finding the \gro-api\gro_api\control\fixtures\initial_controls.json file. It contains the following models for API auth groups: GraphicDesigners, LayoutEditors, Electricians, Gardeners and Firmware.

From what I have seen in the UI, the plantos user that we use is in the Gardeners group, and all of the actions permitted are the ones related to adding plants, recipes, etc.

But it would be really useful if the Electricians group were also implemented, because it contains the permissions to add and change the models related to sensors, actuators and control profiles.

Do any of you know if there is a way for me to log into the UI with an Electrician account, or to create a new user in this auth group? Or even if these actions have already been implemented in the API and UI, or if they still have to be developed?

I don’t know if the people that were modding the system have already added new sensors, actuators, but if yes, could you please tell me how you did it?


UPDATE: I got the authentication token for the plantos user and checked the /user/ url. This is a superuser, and should be able to perform all the available actions. I think the other ones, related to sensors/actuators, layout, etc, haven’t been implemented yet.
The way I think is possible to add new hardware is by changing the fixtures files from the API, that load initial conditions on the database.
I’ll let you know if it works.


Did anything come of this? I’m looking to add a new actuator for CO2 much like how the humidifier works, when the CO2 drops below the set point it will turn on the spare relay #3. I’ve got the relay set in the Arduino as AACO 1, which can be controlled via the serial console. I just don’t know how to add the definition into the API.