maxill1 / ialarm-mqtt

ialarm to mqtt bridge
MIT License
8 stars 3 forks source link

"GetNet" throws an error #35

Closed Eckart0 closed 2 years ago

Eckart0 commented 2 years ago

Hello, I wanted to install this AddOn (on a HA machine without Docker), but I get the following error message in the log: (Protokoll)

[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[01:41:32] INFO: Passing /data/options.json to ialarm-mqtt@ 0.10.1 with node-ialarm@ 0.5.1
Found arg --hassos with value /data/options.json
info: Trying to merge HASSOS options file (/data/options.json) with default config.json
warning: Config.json value not specified on /data/options.json using default '' on ["name"]
info: Starting up...
info: MQTT connecting to broker 192.168.10.89:1883 with cliendId ialarm-mqtt
info: MQTT connected to broker 192.168.10.89:1883 with cliendId ialarm-mqtt
info: subscribing to ["ialarm/alarm/discovery","ialarm/alarm/resetCache","ialarm/alarm/area/+/set","ialarm/alarm/zone/+/bypass"]
info: Setting up first TCP connection to retrieve mac address...
"GetNet": concurrent commands, delaying 200ms

error: 7056-["GetNet"]: throw an error:  Text data outside of root node.
Line: 0
Column: 81
Char: { {"stack":"Error:  Text data outside of root node.\nLine: 0\nColumn: 81\nChar: {\n    at Socket.<anonymous> (/app/ialarm-mqtt/node_modules/ialarm/src/meian-socket.js:324:20)\n    at Socket.emit (events.js:198:13)\n    at addChunk (_stream_readable.js:288:12)\n    at readableAddChunk (_stream_readable.js:269:11)\n    at Socket.Readable.push (_stream_readable.js:224:10)\n    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)"}
error: Error starting up:  Text data outside of root node.

Line: 0
Column: 81
Char: {
info: Stopping...
[cmd] /run.sh exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Any idea about that?

Regards, Eckart

maxill1 commented 2 years ago

It seems to not respond to the initial fetch of data (panel name, mac address, etc). What panel model do you have?

Eckart0 commented 2 years ago

Hello, and thank you for the quick reply.

I use a "Focus 7688 Plus", compatible with Antifurto365 and other Chinese models. But I have found the error: I had used the old port 80. Now everything works.

But I still have a question about the created zone sensors. I find 4 entities per zone whose attributes hardly differ: "binarysensor.zone#", "binary_sensor.alarmzone#", "binary_sensor.batteryzone#" and "binary_sensor.connectivityzone#". Is this intentional or a bug in my configuration? If not: Wouldn't it be a bit clearer to either create one sensor with several attributes per zone or several with only one attribute?

Many thanks for the useful AddOn and greetings, Eckart

Salve, e grazie per la rapida risposta.

Io uso un "Focus 7688 Plus", compatibile con Antifurto365 e altri modelli cinesi. Ma ho trovato l'errore: Avevo utilizzato la vecchia porta 80. Ora tutto funziona.

Ma ho ancora una domanda sui sensori di zona creati. Trovo 4 entità per zona i cui attributi differiscono appena: "binarysensor.zone#", "binary_sensor.alarmzone#", "binary_sensor.batteryzone#" e "binary_sensor.connectivityzone#". Si tratta di un problema intenzionale o di un bug nella mia configurazione? In caso contrario, non sarebbe più chiaro creare un sensore con diversi attributi per zona o diversi con un solo attributo?

Grazie per l'utile AddOn e cordiali saluti, Eckart

maxill1 commented 2 years ago

ciao, scusa il ritardo. I sensori sono separati su home assistant perché hanno funzioni diverse (batteria, apertura, allarme, connessione, etc) e quindi device_classi diversi. A livello pratico è meglio che siano separati perché cosi su home assistant puoi gestire meglio le automazioni senza andare a cercare attributi come un cane da tartufi :smile: