De Geplande MQTT-besturing is bedoeld voor geplande berichten van tevoren. Voor live besturing, zie Live MQTT Control instead.
Deze handleiding helpt u MQTT te configureren op uw SmartgridOne Controller om batterij- en zonnepaneelinstallaties op afstand te bedienen en te monitoren.
Deze handleiding helpt u MQTT te configureren op uw SmartgridOne Controller om batterij- en zonnepaneelinstallaties op afstand te bedienen en te monitoren.
Ik heb een SmartgridOne Controller die ik wil instellen voor MQTT Remote Control.
Zorg ervoor dat uw netwerk en apparaten gereed zijn door de MQTT SetupScheduler-interval
Vraag de vereiste Eniris MQTT-gebruikersnaam en het wachtwoord aan via deEniris-webshop voordat u met de configuratie begint.
Selecteer alle apparaten die u in de MQTT Remote Control wilt opnemen.
De interface voor MQTT Remote Control is nu geactiveerd op de SmartgridOne Controller.
We zijn nu klaar om met een eenvoudig voorbeeld enkele basisopdrachten te verzenden. De kolom Status geeft aan of er een opdracht actief is.
Een goed begin is om uw nieuw geconfigureerde integratie met een eenvoudig voorbeeld te testen.
Batterij: Laden met 5 kW gedurende 15 minuten over 10 minuten
De SmartgridOne ControllerWe halen daarna het volgende schema op voor beide apparaattype, om te bevestigen dat het commando succesvol was.
Download het onderstaande bestand in je favoriete Python IDE. Vul je serienummer en MQTT-gegevens in en voer het script uit:
Download het onderstaande bestand in uw favoriete Python-IDE. Vul uw serienummer en de MQTT-inloggegevens in die u via de Eniris-webshop, en voer vervolgens het script uit:
MQTT-documentatie voor het verzenden van commando's
op te zetten.SmartgridOne Controller's netwerk.
standard1/rp_one_s/remoteScheduleMetrics/<controller SN>standard1/outbound/remoteScheduleMetrics/feedback/<controller SN>Where <controller SN> die je wilt besturen.SmartgridOne Controller die u wilt bedienen.
set_schedule)Antwoord (Succes):
{
"extraTags": {
"nodeId": "<Controller SN>_site_0"
},
"time": <Unix Timestamp>,
"message_type": "set_schedule",
"fields": {
"device_type": "<Device Type>",
"node_id": "<Node ID>" (Optional),
"start_time": <Unix Timestamp>,
"end_time": <Unix Timestamp>,
"policy": "<Policy>",
"power_setpoint_w": <Setpoint in watts>,
"site_import": <Site Import in Watts>,
"site_export": <Site Export in Watts>,
"remove_overlap": <True/False> (Optional) (default=False),
"tag": <Tag String> (Optional) (default=None),
}
}
{
"requestTime": <Unix Timestamp>,
"time": <Unix Timestamp>,
"siteNodeId": "<Controller SN>_site_0",
"data": {
"message_type": "set_schedule_ack",
"state": {
"schedule_id": <Schedule ID>,
"deleted_ids": <Schedulde IDs deleted if remove_overlap=True>
"tag": <Tag String> (default=None),
},
"responseCode": 0
}
}
set_schedules)Antwoord (Succes):
{
"extraTags": {
"nodeId": "<Controller SN>_site_0"
},
"time": <Unix Timestamp>,
"message_type": "set_schedules",
"fields":
"0": "{
"device_type": "<Device Type>",
"node_id": "<Node ID>" (Optional),
"start_time": <Unix Timestamp>,
"end_time": <Unix Timestamp>,
"policy": "<Policy>",
"power_setpoint_w": <Setpoint in watts>,
"site_import": <Site Import in Watts>,
"site_export": <Site Export in Watts>,
"remove_overlap": <True/False> (Optional) (default=False),
}",
"1": "{
"device_type": "<Device Type>",
"node_id": "<Node ID>" (Optional),
"start_time": <Unix Timestamp>,
"end_time": <Unix Timestamp>,
"policy": "<Policy>",
"power_setpoint_w": <Setpoint in watts>,
"site_import": <Site Import in Watts>,
"site_export": <Site Export in Watts>,
"remove_overlap": <True/False> (Optional) (default=False),
}",
...
}
{
"requestTime": <Unix Timestamp>,
"time": <Unix Timestamp>,
"siteNodeId": "<Controller SN>_site_0",
"data": {
"message_type": "set_schedules_ack",
"state": {
"schedule_ids": <Schedule IDs>,
"deleted_ids": <Schedulde IDs deleted if remove_overlap=True>
},
"responseCode": 0
}
}
get_schedule)Antwoord:
{
"extraTags": {
"nodeId": "<Controller SN>_site_0"
},
"time": <Unix Timestamp>,
"message_type": "get_schedule",
"fields": {
"id": <Schedule ID>
}
}
{
"requestTime": <Unix Timestamp>,
"time": <Unix Timestamp>,
"siteNodeId": "<Controller SN>_site_0",
"data": {
"message_type": "get_schedule_ack",
"state": <Schedule>,
"responseCode": 0
}
}
get_active_schedule)Antwoord (Succes):
{
"extraTags": {
"nodeId": "<Controller SN>_site_0"
},
"time": <Unix Timestamp>,
"message_type": "get_active_schedule",
"fields": {
"device_type": "<Device Type>",
"node_id": "<Node ID>" (Optional),
}
}
{
"requestTime": <Unix Timestamp>,
"time": <Unix Timestamp>,
"siteNodeId": "<Controller SN>_site_0",
"data": {
"message_type": "get_active_schedule_ack",
"state": <Schedule>,
"responseCode": 0
}
}
get_next_schedule)Antwoord (Succes):
{
"extraTags": {
"nodeId": "<Controller SN>_site_0"
},
"time": <Unix Timestamp>,
"message_type": "get_next_schedule",
"fields": {
"device_type": "<Device Type>",
"node_id": "<Node ID>" (Optional),
}
}
{
"requestTime": <Unix Timestamp>,
"time": <Unix Timestamp>,
"siteNodeId": "<Controller SN>_site_0",
"data": {
"message_type": "get_next_schedule_ack",
"state": <Schedule>,
"responseCode": 0
}
}
get_schedules)Antwoord (Succes):
{
"extraTags": {
"nodeId": "<Controller SN>_site_0"
},
"time": <Unix Timestamp>,
"message_type": "get_schedules",
"fields": {
"date": "<Date String of Format dd/mm/yyyy>"
}
}
{
"requestTime": <Unix Timestamp>,
"time": <Unix Timestamp>,
"siteNodeId": "<Controller SN>_site_0",
"data": {
"message_type": "get_schedules_ack",
"state": {
"schedules": [<Schedule>, ...]
},
"responseCode": 0
}
}
get_future_schedules)Antwoord (Succes):
{
"extraTags": {
"nodeId": "<Controller SN>_site_0"
},
"time": <Unix Timestamp>,
"message_type": "get_future_schedules",
"fields": {}
}
{
"requestTime": <Unix Timestamp>,
"time": <Unix Timestamp>,
"siteNodeId": "<Controller SN>_site_0",
"data": {
"message_type": "get_future_schedules_ack",
"state": {
"schedules": [<Schedule>, ...]
},
"responseCode": 0
}
}
remove_schedule)Antwoord (Succes):
{
"extraTags": {
"nodeId": "<Controller SN>_site_0"
},
"time": <Unix Timestamp>,
"message_type": "remove_schedule",
"fields": {
"id": <Schedule ID>
}
}
{
"requestTime": <Unix Timestamp>,
"time": <Unix Timestamp>,
"siteNodeId": "<Controller SN>_site_0",
"data": {
"message_type": "remove_schedule_ack",
"state": "Schedule <Schedule ID> removed successfully",
"responseCode": 0
}
}
get_feedback)Antwoord (Succes):
{
"extraTags": {
"nodeId": "<Controller SN>_site_0"
},
"time": <Unix Timestamp>,
"message_type": "get_feedback",
"fields": {
"device": <Device (node) level>
}
}
get_toplogy)Antwoord (Succes):
{
"extraTags": {
"nodeId": "<Controller SN>_site_0"
},
"time": <Unix Timestamp>,
"message_type": "get_topology",
"fields": {}
}
{
"requestTime": <Unix Timestamp>,
"time": <Unix Timestamp>,
"siteNodeId": "<Controller SN>_site_0",
"data": {
"message_type": "get_topology_ack",
"state": {
"nodeId": <nodeId>,
"isControllable": <boolean>,
"nodeType": <nodeType>,
"nomCurrent": <nominalCurrent>
"children": [{<ChildObject>}]
},
"responseCode": 0
}
}
{
"id": <Schedule ID>,
"device_type": "<Device Type>",
"node_id": "<Node ID>" (Optional),
"start_time": <Unix Timestamp>,
"end_time": <Unix Timestamp>,
"policy": "<Schedule Policy>",
"power_setpoint_w": <Setpoint in watts>,
"created_at": <Unix Timestamp>
}
MQTT Components and Policies in de Live MQTT Control documentatie.Apparaatspecifieke schema's kunnen worden verzonden met het optionele veld
, verwijzend naar de node-ID van het te besturen apparaat.node_idFoutafhandeling
wanneer een fout optreedt:responseCode: 1Wanneer een niet-gerelateerde fout optreedt, is het berichttype (
{
"requestTime": <Unix Timestamp>,
"time": <Unix Timestamp>,
"siteNodeId": "<Controller SN>_site_0",
"data": {
"message_type": "<Message Type>_ack",
"error": <Error Body>,
"responseCode": 1
}
}
Veelvoorkomende fouten zijn:general_error).
Schema-overlap met bestaande schema's
remove_overlap bij het aanmaken van een nieuw schema.TrueElk schema moet bevatten: