bonjour @nebz ,
j’ai un switch 24 POE gen2
Je viens de créer un utilisateur en Site Administrator sur mon portail unifi (sur mon NAS en DOCKER)
(j’avais essayé avec un user en Administror mais ça ne fonctionnait pas : plantage du demon directement)
je viens d’installer le plugin.
un scan & créé un équipement mais je n’ai que 5 commandes et valeurs non reçue (équipement peut-être désactivé).
J’ai lu la doc mais la je pèche
Et lorsque je refais un scan le DEMON saute.
voici qqs logs :
UNIFI_daemon
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: [TLSSocket],
_header: 'GET /api/s/https://192.168.1.98:8443/manage/default/dashboard/stat/sta/ HTTP/1.1
' +
'Accept: application/json, text/plain, */*
' +
'User-Agent: axios/0.27.2
' +
'Host: 192.168.1.98:8443
' +
'Cookie: unifises=QJpvucQriSEkCPca3TO66ZHa5mQ9owrU; csrf_token=tiJ2eG1k3nTw4oqCr6zsQJZUF959b13Q
' +
'Connection: close
' +
'
',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [CookieAgent],
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/api/s/https://192.168.1.98:8443/manage/default/dashboard/stat/sta/',
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: '192.168.1.98',
protocol: 'https:',
_redirectable: [Writable],
emit: [Function (anonymous)],
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kEndCalled)]: true,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(kUniqueHeaders)]: null
},
data: { meta: [Object], data: [] }
}
}
/var/www/html/plugins/unifi/resources/unifiDaemon.js:136
Logger.log('ERROR CMD: ' + req.query.cmd + ':' + JSON.stringify(error),LogType.ERROR);
^
TypeError: Converting circular structure to JSON
--> starting at object with constructor 'TLSSocket'
| property '_httpMessage' -> object with constructor 'ClientRequest'
--- property 'socket' closes the circle
at JSON.stringify ()
at /var/www/html/plugins/unifi/resources/unifiDaemon.js:136:58
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[06-04-2023 17:42:19]INFO : Démarrage démon Unifi...
[06-04-2023 17:42:19]DEBUG : urlJeedom = http://192.168.1.41/core/api/jeeApi.php
[06-04-2023 17:42:19]DEBUG : apiKey = 1xxxxxxxxxxxxxxxxxxxxxxxxxxx
[06-04-2023 17:42:19]DEBUG : serverPort = 35758
[06-04-2023 17:42:19]DEBUG : logLevel = debug
[06-04-2023 17:42:19]DEBUG : unifiHost = 192.168.1.98
[06-04-2023 17:42:19]DEBUG : unifiPort = 443
[06-04-2023 17:42:19]DEBUG : unifiSite = https://192.168.1.98:8443/manage/default/dashboard
[06-04-2023 17:42:19]DEBUG : unifiUser = philippe456jeedom
[06-04-2023 17:42:19]DEBUG : unifiPass = xxxxxxxxxxx
[06-04-2023 17:42:19]DEBUG : ignoreLast_seen = false
[06-04-2023 17:42:19]DEBUG : ignoreSatisfaction = false
[06-04-2023 17:42:19]DEBUG : ignoreUptime = false
[06-04-2023 17:42:19]DEBUG : ignoreUpDown = true
[06-04-2023 17:42:19]DEBUG : regularPollingTime = 60000
[06-04-2023 17:42:20]INFO : Démon prêt et à l'écoute sur 35758 !
[06-04-2023 17:42:20]INFO : Connexion au controleur Unifi...
ERROR startListening: [AxiosError: Request failed with status code 405] {
code: 'ERR_BAD_REQUEST',
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [Function: httpAdapter],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: { FormData: [Function] },
validateStatus: [Function: validateStatus],
headers: {
Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/json',
'User-Agent': 'axios/0.27.2',
'Content-Length': 61
},
httpAgent: CookieAgent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 80,
protocol: 'http:',
options: [Object: null prototype],
requests: [Object: null prototype] {},
sockets: [Object: null prototype] {},
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 0,
jar: [CookieJar],
[Symbol(kCapture)]: false
},
httpsAgent: CookieAgent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object: null prototype],
requests: [Object: null prototype] {},
sockets: [Object: null prototype],
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 1,
maxCachedSessions: 100,
_sessionCache: [Object],
jar: [CookieJar],
[Symbol(kCapture)]: false
},
method: 'post',
url: 'https://192.168.1.98/api/login',
data: '{"username":"philippe456jeedom","password":"xxxxxxx"}'
},
request: ClientRequest {
_events: [Object: null prototype] {
abort: [Function (anonymous)],
aborted: [Function (anonymous)],
connect: [Function (anonymous)],
error: [Function (anonymous)],
socket: [Function (anonymous)],
timeout: [Function (anonymous)],
finish: [Function: requestOnFinish]
},
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: 61,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: null,
_closeAfterHandlingError: false,
_readableState: [ReadableState],
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [Circular *1],
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 26,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kSetNoDelay)]: false,
[Symbol(kSetKeepAlive)]: true,
[Symbol(kSetKeepAliveInitialDelay)]: 60,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object],
[Symbol(RequestTimeout)]: undefined
},
_header: 'POST /api/login HTTP/1.1
' +
'Accept: application/json, text/plain, */*
' +
'Content-Type: application/json
' +
'User-Agent: axios/0.27.2
' +
'Content-Length: 61
' +
'Host: 192.168.1.98
' +
'Connection: close
' +
'
',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: CookieAgent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object: null prototype],
requests: [Object: null prototype] {},
sockets: [Object: null prototype],
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 1,
maxCachedSessions: 100,
_sessionCache: [Object],
jar: [CookieJar],
[Symbol(kCapture)]: false
},
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/api/login',
_ended: true,
res: IncomingMessage {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 4,
_maxListeners: undefined,
socket: [TLSSocket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
rawHeaders: [Array],
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 405,
statusMessage: 'Not Allowed',
client: [TLSSocket],
_consuming: false,
_dumped: false,
req: [Circular *1],
responseUrl: 'https://192.168.1.98/api/login',
redirects: [],
[Symbol(kCapture)]: false,
[Symbol(kHeaders)]: [Object],
[Symbol(kHeadersCount)]: 8,
[Symbol(kTrailers)]: null,
[Symbol(kTrailersCount)]: 0,
[Symbol(RequestTimeout)]: undefined
},
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: '192.168.1.98',
protocol: 'https:',
_redirectable: Writable {
_writableState: [WritableState],
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
_options: [Object],
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 61,
_requestBodyBuffers: [],
_onNativeResponse: [Function (anonymous)],
_currentRequest: [Circular *1],
_currentUrl: 'https://192.168.1.98/api/login',
[Symbol(kCapture)]: false
},
emit: [Function (anonymous)],
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kEndCalled)]: true,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
accept: [Array],
'content-type': [Array],
'user-agent': [Array],
'content-length': [Array],
host: [Array]
},
[Symbol(kUniqueHeaders)]: null
},
response: {
status: 405,
statusText: 'Not Allowed',
headers: {
date: 'Thu, 06 Apr 2023 15:42:20 GMT',
'content-type': 'text/html',
'content-length': '150',
connection: 'close'
},
config: {
transitional: [Object],
adapter: [Function: httpAdapter],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: [Object],
validateStatus: [Function: validateStatus],
headers: [Object],
httpAgent: [CookieAgent],
httpsAgent: [CookieAgent],
method: 'post',
url: 'https://192.168.1.98/api/login',
data: '{"username":"philippe456jeedom","password":"Ui2philouvretoi"}'
},
request: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: 61,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: [TLSSocket],
_header: 'POST /api/login HTTP/1.1
' +
'Accept: application/json, text/plain, */*
' +
'Content-Type: application/json
' +
'User-Agent: axios/0.27.2
' +
'Content-Length: 61
' +
'Host: 192.168.1.98
' +
'Connection: close
' +
'
',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [CookieAgent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/api/login',
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: '192.168.1.98',
protocol: 'https:',
_redirectable: [Writable],
emit: [Function (anonymous)],
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kEndCalled)]: true,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(kUniqueHeaders)]: null
},
data: '
' +
'
' +
'
' +
'
405 Not Allowed
' +
'
nginx
' +
'
' +
'
'
}
}
[06-04-2023 17:42:20]INFO : Exit
[06-04-2023 17:43:31]INFO : Démarrage démon Unifi...
[06-04-2023 17:43:31]DEBUG : urlJeedom = http://192.168.1.41/core/api/jeeApi.php
[06-04-2023 17:43:31]DEBUG : apiKey = xxxxxxx
xxxxxxxxxx[06-04-2023 17:43:31]DEBUG : serverPort = 30113
[06-04-2023 17:43:31]DEBUG : logLevel = debug
[06-04-2023 17:43:31]DEBUG : unifiHost = 192.168.1.98
[06-04-2023 17:43:31]DEBUG : unifiPort = 8443
[06-04-2023 17:43:31]DEBUG : unifiSite = https://192.168.1.98:8443/manage/default/dashboard
[06-04-2023 17:43:31]DEBUG : unifiUser = philippe456jeedom
[06-04-2023 17:43:31]DEBUG : unifiPass = Ui2philouvretoi
[06-04-2023 17:43:31]DEBUG : ignoreLast_seen = false
[06-04-2023 17:43:31]DEBUG : ignoreSatisfaction = false
[06-04-2023 17:43:31]DEBUG : ignoreUptime = false
[06-04-2023 17:43:31]DEBUG : ignoreUpDown = true
[06-04-2023 17:43:31]DEBUG : regularPollingTime = 60000
[06-04-2023 17:43:31]INFO : Démon prêt et à l'écoute sur 30113 !
[06-04-2023 17:43:31]INFO : Connexion au controleur Unifi...
[06-04-2023 17:43:32]INFO : Login au controleur : OK
[06-04-2023 17:43:32]INFO : Ecoute des évènements du controleur : OK
[06-04-2023 17:43:32]ERROR : Error : {}
Other Event ctrl.error
[06-04-2023 17:43:32]WARNING : ctrl.close - Le controleur a envoyé un évènement de fermeture, essai de reconnexion...
[06-04-2023 17:43:32]WARNING : Reconnexion déjà en cours...
UNIFI_dep
0000|== Jeedom 4.3.17 sur Debian GNU/Linux 10 (buster)/arm64/aarch64/64bits aka 'diy' avec nodeJS v16.19.1 et jsonrpc:enable et unifi (stable) 2023-04-03 09:18:52 (avant:inconnu)
0001|======================================================================
0002|== 06/04/2023 17:12:33 == Installation des dépendances de unifi
0003|======================================================================
0004|[ 0% ] : Vérification des droits...
0005|[ 4% ] : Vérification des droits : [ OK ]
0006|[ 5% ] : Mise à jour APT et installation des packages nécessaires...
0007|[ 9% ] : Mise à jour APT et installation des packages nécessaires : [ OK ]
0008|[ 10% ] : Prérequis...
0009|[ 14% ] : Prérequis : [ OK ]
0010|[ 15% ] : Installation des packages nécessaires...
0011|[ 19% ] : Installation des packages nécessaires : [ OK ]
0012|[ 20% ] : Vérification du système...
0013|[ 24% ] : Vérification du système : [ OK ]
0014|[ 25% ] : Vérification de la version de NodeJS installée...
0015|[Check Version NodeJS actuelle : v16.19.1 : [ OK ]
0016|[Check Version NPM : 8.19.3 : [ OK ]
0017|[Check Prefixe : /usr et sudo prefixe : /usr et www-data prefixe : /usr : [ OK ]
0018|[ 49% ] : Vérification de la version de NodeJS installée : [ OK ]
0019|[ 50% ] : Nettoyage...
0020|[ 59% ] : Nettoyage : [ OK ]
0021|[ 60% ] : Nettoyage anciens modules...
0022|[ 69% ] : Nettoyage anciens modules : [ OK ]
0023|[ 70% ] : Installation des librairies, veuillez patienter svp...
0024|[ 79% ] : Installation des librairies, veuillez patienter svp : [ OK ]
0025|[ 80% ] : Nettoyage des images...
0026|[ 99% ] : Nettoyage des images : [ OK ]
0027|[100% ] : Terminé !
0028|======================================================================
0029|== OK == Installation Réussie
0030|======================================================================
et enfin UNIFI :
alexaapi (56.1 Ko)
alexaapi_mqtt (33.4 Ko)
alexaapi_node (3 Mo)
alexaapi_widget (31.2 Ko)
blea (120.1 Ko)
blea_BLEA
camera_record
cmd (210.8 Ko)
cron (278 o)
cron_execution (471.4 Ko)
event (2.5 Mo)
http.error (34.3 Ko)
listener_execution
MerosSync (68.2 Ko)
migoThermostat (964.7 Ko)
mqtt2d
scenario_execution
unifi (685 o)
unifi_deamon (1.4 Ko)
unifi_dep (1.7 Ko)
update (7.5 Ko)
zwavejsd
0000|[2023-04-06 17:15:06]INFO : Arrêt du démon Unifi
0001|[2023-04-06 17:15:11]INFO : Lancement du démon Unifi
0002|[2023-04-06 17:15:12]DEBUG : Lancement du démon Unifi : nice -n 19 node --trace-warnings /var/www/html/plugins/unifi/resources/unifiDaemon.js http://192.168.1.41/core/api/jeeApi.php 1xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 57500 debug 192.168.1.98 8443 https://192.168.1.98:8443/manage/default/dashboard philippe456jeedom VWkycGhpbG91dnJldG9p 0 0 0 1 60
0003|[2023-04-06 17:15:12]INFO : Démon Unifi lancé
0004|[2023-04-06 17:15:15]INFO : Évènement ctrl.error : Aucune action
0005|[2023-04-06 17:15:15]DEBUG : Évènement ctrl.error : Aucune action : []
Merci