Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rand256_valetudo_re.json #678

Merged
merged 2 commits into from
Nov 7, 2023
Merged

Conversation

sca075
Copy link

@sca075 sca075 commented Nov 6, 2023

added "id_type": "number" to avoid failure of the segment cleaning command send via MQTT

sca075 and others added 2 commits November 6, 2023 18:06
added "id_type": "number" to avoid failure of the segment cleaning command send via MQTT
@PiotrMachowski
Copy link
Owner

I have checked and IDs can also be strings (room numbers)
https://github.com/rand256/valetudo/wiki/MQTT-API
Have you checked if this approach will work?

@sca075
Copy link
Author

sca075 commented Nov 7, 2023

Piotr the docs in Rand256 for segmented_cleanup are integers when sending room number. We need the segments ID (room number only in integer) I can try with the string "room name" as segment ID I didn't try this approach yet as per con the format send to the card is:

ID : room number "16" okay for Hyper but for rand256 works only 16.
Name: "room name"
Outline: [coordinates]

I can try to change the code of the camera course of course but in any case the service call of the card wouldn't work if someone else do try with ID as room number ;)

This is why this PR.

@PiotrMachowski
Copy link
Owner

PiotrMachowski commented Nov 7, 2023

Yeah, room ids have to be provided as numbers, but according to the documentation it should also be possible to send room name as string instead room id:

{
"command": "segmented_cleanup",
"segment_ids": [
    16,
    "Room Name 1",
    18
],
"repeats": 2,
"afterCleaning": "Base"
}

I'll adjust the code to fallback to string if it's not possible to convert it to a number, it should handle both cases after that

@PiotrMachowski PiotrMachowski merged commit 77681d3 into PiotrMachowski:dev Nov 7, 2023
1 of 2 checks passed
@PiotrMachowski
Copy link
Owner

I'll adjust the code to fallback to string if it's not possible to convert it to a number, it should handle both cases after that

Done, if you want to you can test it using version from this build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants