EinEinfach
Well-known member
Hallo zusammen,
ich habe eine Möglichkeit eingebaut über MQTT Befehle an CaSSAndRA zu schicken. Aktuell ist die Anzahl der Möglichkeiten relativ überschaubar, ist aber bei Bedarf erweiterbar. Da ich nicht weiß, wer was alles damit so vor hat, habe ich erstmal nur ein paar Sachen eingebaut, was ich so denke notwendig wäre. In der Theorie könnte man ntürlich die API so aufbohren, dass jeder Befehl möglich wäre, so dass man jedes beliebiges Frontend draufsetzen könnte, wenn der Dash nicht mehr einem gefällt.
Wechselt in Settings und geht zu API, dort klickt MQTT und gibt eure Daten ein, danach speichern und lässt den Backendserver neustarten
Wenn alles richtig eingegeben wurde, müsstet Ihr folgende Nachrichten sehen:
- status
- robot
- maps
- tasks
- mow parameters
- map
Die Befehle werden auf den api_cmd Topic gesendet. Erwartet wird ein JSON-String:
1. Karte wechseln:
2. Task auswählen:
jeweils Verfügbare Namen seht ihr in dem maps bzw. tasks topic.
3. Mähen (alles):
Mähen (task):
Mähen (selection):
4. Stopp:
5. Dock:
6. Ändern der Mähparametern:
auch einzeln möglich
7. Selection setzen:
Viel Spaß beim Testen, Wünsche gerne hier oder auf GitHub posten
---------------------------------------------------------------------------------------------------------
Hello everyone,
I've added a feature to send commands to CaSSAndRA via MQTT. Currently, the number of available options is relatively limited, but it can be expanded if needed. Since I don't know what everyone plans to do with it, I've initially incorporated a few things that I believe are necessary. In theory, the API could be expanded to support any command, allowing you to use any frontend you prefer if you no longer like the Dash.
To set it up, go to Settings, then select API, click on MQTT, enter your data, save, and restart the backend server.
If everything is entered correctly, you should see the following messages:
You can find available names in the "maps" and "tasks" topics.
1. Switch map:
2. Select task:
3. Mow (all):
Mow (task):
Mow (selection):
4. Stop:
5. Dock:
6. Change mow parameters:
auch einzeln möglich
7. Set selection:
Enjoy testing, and feel free to share your feedback and wishes here or on GitHub.
ich habe eine Möglichkeit eingebaut über MQTT Befehle an CaSSAndRA zu schicken. Aktuell ist die Anzahl der Möglichkeiten relativ überschaubar, ist aber bei Bedarf erweiterbar. Da ich nicht weiß, wer was alles damit so vor hat, habe ich erstmal nur ein paar Sachen eingebaut, was ich so denke notwendig wäre. In der Theorie könnte man ntürlich die API so aufbohren, dass jeder Befehl möglich wäre, so dass man jedes beliebiges Frontend draufsetzen könnte, wenn der Dash nicht mehr einem gefällt.
Wechselt in Settings und geht zu API, dort klickt MQTT und gibt eure Daten ein, danach speichern und lässt den Backendserver neustarten
Wenn alles richtig eingegeben wurde, müsstet Ihr folgende Nachrichten sehen:
- status
- robot
- maps
- tasks
- mow parameters
- map
Die Befehle werden auf den api_cmd Topic gesendet. Erwartet wird ein JSON-String:
1. Karte wechseln:
Code:
{"maps": {"command": "load", "value": ["map name"]}}
Code:
{"tasks": {"command": "select", "value": ["task name"]}}
3. Mähen (alles):
Code:
{"robot":{"command": "mow", "value": ["all"]}}
Code:
{"robot":{"command": "mow", "value": ["task"]}}
Code:
{"robot":{"command": "mow", "value": ["selection"]}}
Code:
{"robot":{"command": "stop"}}
Code:
{"robot":{"command": "dock"}}
Code:
{"mow parameters":{"pattern": "squares", "width": "0.20", "angle": 160, "distancetoborder": 5, "mowarea": true, "mowborder": 3, "mowexclusion": false, "mowborderccw": true}}
7. Selection setzen:
Code:
{"map":{"command":"set selection", "value":{"x": [0, 1, 1], "y": [0, 1, 0]}}}
Viel Spaß beim Testen, Wünsche gerne hier oder auf GitHub posten
---------------------------------------------------------------------------------------------------------
Hello everyone,
I've added a feature to send commands to CaSSAndRA via MQTT. Currently, the number of available options is relatively limited, but it can be expanded if needed. Since I don't know what everyone plans to do with it, I've initially incorporated a few things that I believe are necessary. In theory, the API could be expanded to support any command, allowing you to use any frontend you prefer if you no longer like the Dash.
To set it up, go to Settings, then select API, click on MQTT, enter your data, save, and restart the backend server.
If everything is entered correctly, you should see the following messages:
- status
- robot
- maps
- tasks
- mow parameters
- map
You can find available names in the "maps" and "tasks" topics.
1. Switch map:
Code:
{"maps": {"command": "load", "value": ["map name"]}}
Code:
{"tasks": {"command": "select", "value": ["task name"]}}
Code:
{"robot":{"command": "mow", "value": ["all"]}}
Code:
{"robot":{"command": "mow", "value": ["task"9}}
Code:
{"robot":{"command": "mow", "value": ["selection"]}}
Code:
{"robot":{"command": "stop"}}
Code:
{"robot":{"command": "dock"}}
Code:
{"mow parameters":{"pattern": "squares", "width": "0.20", "angle": 160, "distancetoborder": 5, "mowarea": true, "mowborder": 3, "mowexclusion": false, "mowborderccw": true}}
7. Set selection:
Code:
{"map":{"command":"set selection", "value":{"x": [0, 1, 1], "y": [0, 1, 0]}}}
Enjoy testing, and feel free to share your feedback and wishes here or on GitHub.
Zuletzt bearbeitet: