-
Notifications
You must be signed in to change notification settings - Fork 6
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
187 refactor notification module #193
base: development
Are you sure you want to change the base?
Conversation
BREAKING CHANGE: subscriptions model has been modified. Subscriptions are now synchronized with orion
Functions that still cant work:
|
@sbanoeon I saw that the templates of the subscriptions module are using a lot of HTMX. I personally don't have much experience with that and the other modules are not using it. What is your opinion? Should we keep it here? |
@djs0109 I think HTMX was a good way of implementing some dynamic functionalities in the subscriptions module. I would suggest to keep it. We can further use it in new features in future too. |
The entity_set gives an error of missing managementForm, which makes the validation fail.
I would rewrite a parser that gets the data of entity_id/parttern/type from the request data. |
@sbanoeon could you also have a look at the issue of the attributes? |
reminder: we need to pull from development |
…otification-module # Conflicts: # app/Entirety/entirety/settings.py
@djs0109 Could you please have a look at the changes? |
@sbanoeon, you can test with the following cases: Normal HTTP{
"notification": {
"http": {
"url": "http://localhost:1234"
},
"attrs": ["temperature", "humidity"],
"onlyChangedAttrs": true
}
} Normal MQTT{
"notification": {
"mqtt": {
"url": "mqtt://mosquitto:1883",
"topic": "a/test/topic"
},
"attrs": []
}
} Custom MQTT with Plain Text Payload{
"notification": {
"mqttCustom": {
"url": "mqtt://mosquitto:1883",
"topic": "a/test/topic",
"payload":
"The value of the %22temperature%22 attribute %28of the device ${id}, ${type}%29 is ${temperature}. Humidity is ${humidity} and CO2 is ${co2}."
},
"attrs": ["temperature", "humidity", "co2"],
"onlyChangedAttrs": false
}
} Custom MQTT with JSON Payload{
"notification": {
"mqttCustom": {
"url": "mqtt://mosquitto:1883",
"topic": "a/test/topic",
"json": {
"t": "${temperature}",
"h": "${humidity}",
"c": "${co2}"
}
},
"attrs": ["temperature", "humidity", "co2"],
"onlyChangedAttrs": false
}
} Custom MQTT with NGSI Payload{
"notification": {
"mqttCustom": {
"url": "mqtt://mosquitto:1883",
"topic": "a/test/topic",
"ngsi": {
"id": "prefix:${id}",
"type": "newType",
"temperature": {"value": 123, "type": "Number"},
"co2_new": {"value": "${co2}", "type": "Number"}
}
},
"onlyChangedAttrs": false
}
} |
@djs0109 review reminder |
closes #187