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

Schema changes #516

Open
mStirner opened this issue Dec 20, 2024 · 0 comments
Open

Schema changes #516

mStirner opened this issue Dec 20, 2024 · 0 comments

Comments

@mStirner
Copy link
Member

mStirner commented Dec 20, 2024

MQTT

  • add timestamp published
  • add value field?

Webhooks

  • add triggered/called timestamps

SSDP

  • remove "descirption"?

Devices

Store

  • remove uuid property

Vault

  • remove identifier property

Endpoints


¹) If not setted, no default values for "manufacturer" & "model" are set, the meta object does not exists on the item data. ChatGTP says:

static schema() {
    return Joi.object({
        _id: Joi.string().pattern(/^[0-9a-fA-F]{24}$/).default(() => {
            return String(new mongodb.ObjectId());
        }),
        name: Joi.string().required(),
        room: Joi.string().pattern(/^[0-9a-fA-F]{24}$/).allow(null).default(null),
        enabled: Joi.boolean().default(true),
        interfaces: Joi.array().items(Interface.schema()).default([]),
        meta: Joi.object({
            manufacturer: Joi.string().allow(null).default(null),
            model: Joi.string().allow(null).default(null),
            revision: Joi.number().allow(null).default(null),
            serial: Joi.string().allow(null).default(null)
        }).default({
            manufacturer: null,
            model: null,
            revision: null,
            serial: null
        }),
        icon: Joi.string().allow(null).default(null)
    });
}
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

No branches or pull requests

1 participant