Code Monkey home page Code Monkey logo

Comments (20)

Agnes56fr avatar Agnes56fr commented on May 26, 2024

This is the result of Zbinfo command

10:39:48.387 RSL: SENSOR = {"ZbInfo":{"0x4067":{"Device":"0x4067","Name":"leak_spa","IEEEAddr":"0xA4C138A01BB7384C","ModelId":"TS0207","Manufacturer":"_TZ3000_ocjlo4ea","Endpoints":[1],"Config":["A01.4"],"ZoneType":42,"ZoneStatus":0,"Reachable":false,"BatteryPercentage":27,"LastSeen":6245,"LastSeenEpoch":1712735743,"LinkQuality":0}}}
10:39:48.398 RSL: SENSOR = {"ZbInfo":{"0x4DEA":{"Device":"0x4DEA","Name":"temp_etage","IEEEAddr":"0xA4C13853E0677A42","ModelId":"TS0201","Manufacturer":"_TZ3000_fllyghyj","Endpoints":[1],"Config":["T01"],"Temperature":21.63,"Humidity":47.1,"Reachable":true,"BatteryPercentage":100,"BatteryLastSeenEpoch":1712740344,"LastSeen":1644,"LastSeenEpoch":1712740344,"LinkQuality":58}}}
10:39:48.409 RSL: SENSOR = {"ZbInfo":{"0xD1A7":{"Device":"0xD1A7","Name":"Temp_Exterieure","IEEEAddr":"0xA4C13870440D3D7E","ModelId":"TS0201","Manufacturer":"_TZ3000_fllyghyj","Endpoints":[1],"Config":["T01"],"Temperature":13.92,"Humidity":80.4,"Reachable":true,"BatteryPercentage":57,"BatteryLastSeenEpoch":1712740254,"LastSeen":534,"LastSeenEpoch":1712741454,"LinkQuality":52}}}
10:39:48.419 RSL: SENSOR = {"ZbInfo":{"0x43B0":{"Device":"0x43B0","Name":"temp_ssol","IEEEAddr":"0xA4C138EB643973FB","ModelId":"TS0201","Manufacturer":"_TZ3000_fllyghyj","Endpoints":[1],"Config":["T01"],"Temperature":15.01,"Humidity":71.64,"Reachable":true,"BatteryPercentage":17,"BatteryLastSeenEpoch":1712740734,"LastSeen":18,"LastSeenEpoch":1712741970,"LinkQuality":97}}}
10:39:48.430 RSL: SENSOR = {"ZbInfo":{"0xD76C":{"Device":"0xD76C","Name":"Temp_SalleSport","IEEEAddr":"0xA4C138CE7343D647","ModelId":"TS0201","Manufacturer":"_TZ3000_xr3htd96","Endpoints":[1],"Config":["T01"],"Temperature":19.94,"Humidity":43.14,"Reachable":true,"BatteryPercentage":100,"BatteryLastSeenEpoch":1712740649,"LastSeen":1338,"LastSeenEpoch":1712740650,"LinkQuality":50}}}
10:39:48.443 RSL: SENSOR = {"ZbInfo":{"0x7493":{"Device":"0x7493","Name":"Leak_arriere_cuisine","IEEEAddr":"0xA4C138A2E5BE0A8F","ModelId":"TS0207","Manufacturer":"_TZ3000_kstbkt6a","Endpoints":[1],"Config":["A01.4"],"ZoneType":42,"ZoneStatus":0,"Reachable":false,"BatteryPercentage":9,"LastSeen":10672,"LastSeenEpoch":1712731316,"LinkQuality":71}}}
10:39:48.455 RSL: SENSOR = {"ZbInfo":{"0xF49F":{"Device":"0xF49F","Name":"Temp_Salon","IEEEAddr":"0xA4C138263243EF05","ModelId":"TS0201","Manufacturer":"_TZ3210_huzkzqyk","Endpoints":[1,2],"Config":["~01.1","I01","T02"],"Illuminance":0,"Temperature":20.3,"Humidity":50.1,"Reachable":true,"BatteryPercentage":100,"BatteryLastSeenEpoch":1712739920,"LastSeen":17,"LastSeenEpoch":1712741971,"LinkQuality":55}}}
10:39:48.466 RSL: SENSOR = {"ZbInfo":{"0x56D6":{"Device":"0x56D6","Name":"_Prise_1","IEEEAddr":"0x144405602BD5B370","ModelId":"TS011F","Manufacturer":"_TZ3000_okaz9tjs","Endpoints":[1],"Config":["O01","P01"],"Power":0,"RMSVoltage":229,"ActivePower":0,"Reachable":true,"LastSeen":12,"LastSeenEpoch":1712741976,"LinkQuality":50}}}
10:39:48.477 RSL: SENSOR = {"ZbInfo":{"0x2EAF":{"Device":"0x2EAF","Name":"_Prise_2","IEEEAddr":"0x164705602BD5B370","ModelId":"TS011F","Manufacturer":"_TZ3000_okaz9tjs","Endpoints":[1],"Config":["O01","P01"],"Power":0,"RMSVoltage":230,"ActivePower":0,"Reachable":true,"LastSeen":12,"LastSeenEpoch":1712741976,"LinkQuality":71}}}
10:39:48.488 RSL: SENSOR = {"ZbInfo":{"0x5A70":{"Device":"0x5A70","Name":"_Prise_3","IEEEAddr":"0xD04805602BD5B370","ModelId":"TS011F","Manufacturer":"_TZ3000_okaz9tjs","Endpoints":[1],"Config":["O01","P01"],"Power":0,"RMSVoltage":237,"ActivePower":0,"Reachable":true,"LastSeen":12,"LastSeenEpoch":1712741976,"LinkQuality":97}}}
10:39:48.499 RSL: SENSOR = {"ZbInfo":{"0x9332":{"Device":"0x9332","Name":"_Prise_4","IEEEAddr":"0xAE4B05602BD5B370","ModelId":"TS011F","Manufacturer":"_TZ3000_okaz9tjs","Endpoints":[1],"Config":["P01","O01"],"RMSVoltage":230,"ActivePower":0,"Power":0,"Reachable":true,"LastSeen":13,"LastSeenEpoch":1712741975,"LinkQuality":31}}}
10:39:48.506 RSL: RESULT = {"ZbInfo":"Done"}

the first device is not listed but appear with "zbinfo 1"
10:41:08.085 CMD: zbinfo 1
10:41:08.094 RSL: SENSOR = {"ZbInfo":{"0xE404":{"Device":"0xE404","Name":"leak_pompe_piscine","IEEEAddr":"0xA4C13889F8BBF6A5","ModelId":"TS0207","Manufacturer":"_TZ3000_t6jriawg","Endpoints":[1],"Config":["A01.4"],"ZoneType":42,"ZoneStatus":0,"Reachable":false,"BatteryPercentage":9,"LastSeen":8929,"LastSeenEpoch":1712733139,"LinkQuality":53}}}
10:41:08.101 RSL: RESULT = {"ZbInfo":"Done"}

from tasmota.

arendst avatar arendst commented on May 26, 2024

How/Where do you execute the command?

If on the web console it is most likely the cyclic log buffer is full while adding the twelvth entry deleting the first. Try the same using a syslog server.

from tasmota.

Agnes56fr avatar Agnes56fr commented on May 26, 2024

First, Thank you for answering

the command is executed via http
http://192.168.0.129/cm?cmnd=zbinfo

{"ZbInfo":{"0x4067":{"Device":"0x4067","Name":"leak_spa","IEEEAddr":"0xA4C138A01BB7384C","ModelId":"TS0207","Manufacturer":"_TZ3000_ocjlo4ea","Endpoints":[1],"Config":["A01.4"],"ZoneType":42,"ZoneStatus":0,"Reachable":true,"BatteryPercentage":75,"BatteryLastSeenEpoch":1712742948,"LastSeen":175,"LastSeenEpoch":1712742948,"LinkQuality":0}},"ZbInfo":{"0x4DEA":{"Device":"0x4DEA","Name":"temp_etage","IEEEAddr":"0xA4C13853E0677A42","ModelId":"TS0201","Manufacturer":"_TZ3000_fllyghyj","Endpoints":[1],"Config":["T01"],"Temperature":21.97,"Humidity":47.21,"Reachable":true,"BatteryPercentage":100,"BatteryLastSeenEpoch":1712740344,"LastSeen":979,"LastSeenEpoch":1712742144,"LinkQuality":58}},"ZbInfo":{"0xD1A7":{"Device":"0xD1A7","Name":"Temp_Exterieure","IEEEAddr":"0xA4C13870440D3D7E","ModelId":"TS0201","Manufacturer":"_TZ3000_fllyghyj","Endpoints":[1],"Config":["T01"],"Temperature":14.11,"Humidity":80.78,"Reachable":true,"BatteryPercentage":57,"BatteryLastSeenEpoch":1712740254,"LastSeen":1070,"LastSeenEpoch":1712742053,"LinkQuality":55}},"ZbInfo":{"0x43B0":{"Device":"0x43B0","Name":"temp_ssol","IEEEAddr":"0xA4C138EB643973FB","ModelId":"TS0201","Manufacturer":"_TZ3000_fllyghyj","Endpoints":[1],"Config":["T01"],"Temperature":15.01,"Humidity":71.64,"Reachable":true,"BatteryPercentage":17,"BatteryLastSeenEpoch":1712740734,"LastSeen":1153,"LastSeenEpoch":1712741970,"LinkQuality":97}},"ZbInfo":{"0xD76C":{"Device":"0xD76C","Name":"Temp_SalleSport","IEEEAddr":"0xA4C138CE7343D647","ModelId":"TS0201","Manufacturer":"_TZ3000_xr3htd96","Endpoints":[1],"Config":["T01"],"Temperature":20.03,"Humidity":43.25,"Reachable":true,"BatteryPercentage":100,"BatteryLastSeenEpoch":1712740649,"LastSeen":671,"LastSeenEpoch":1712742452,"LinkQuality":52}},"ZbInfo":{"0x7493":{"Device":"0x7493","Name":"Leak_arriere_cuisine","IEEEAddr":"0xA4C138A2E5BE0A8F","ModelId":"TS0207","Manufacturer":"_TZ3000_kstbkt6a","Endpoints":[1],"Config":["A01.4"],"ZoneType":42,"ZoneStatus":0,"Reachable":false,"BatteryPercentage":9,"LastSeen":11807,"LastSeenEpoch":1712731316,"LinkQuality":71}},"ZbInfo":{"0xF49F":{"Device":"0xF49F","Name":"Temp_Salon","IEEEAddr":"0xA4C138263243EF05","ModelId":"TS0201","Manufacturer":"_TZ3210_huzkzqyk","Endpoints":[1,2],"Config":["~01.1","I01","T02"],"Illuminance":0,"Temperature":20.4,"Humidity":52,"Reachable":true,"BatteryPercentage":100,"BatteryLastSeenEpoch":1712739920,"LastSeen":89,"LastSeenEpoch":1712743034,"LinkQuality":55}},"ZbInfo":{"0x56D6":{"Device":"0x56D6","Name":"_Prise_1","IEEEAddr":"0x144405602BD5B370","ModelId":"TS011F","Manufacturer":"_TZ3000_okaz9tjs","Endpoints":[1],"Config":["O01","P01"],"Power":0,"RMSVoltage":231,"ActivePower":0,"Reachable":true,"LastSeen":6,"LastSeenEpoch":1712743117,"LinkQuality":58}},"ZbInfo":{"0x2EAF":{"Device":"0x2EAF","Name":"_Prise_2","IEEEAddr":"0x164705602BD5B370","ModelId":"TS011F","Manufacturer":"_TZ3000_okaz9tjs","Endpoints":[1],"Config":["O01","P01"],"Power":0,"RMSVoltage":232,"ActivePower":0,"Reachable":true,"LastSeen":5,"LastSeenEpoch":1712743118,"LinkQuality":65}},"ZbInfo":{"0x5A70":{"Device":"0x5A70","Name":"_Prise_3","IEEEAddr":"0xD04805602BD5B370","ModelId":"TS011F","Manufacturer":"_TZ3000_okaz9tjs","Endpoints":[1],"Config":["O01","P01"],"Power":0,"RMSVoltage":239,"ActivePower":0,"Reachable":true,"LastSeen":6,"LastSeenEpoch":1712743117,"LinkQuality":97}},"ZbInfo":{"0x9332":{"Device":"0x9332","Name":"_Prise_4","IEEEAddr":"0xAE4B05602BD5B370","ModelId":"TS011F","Manufacturer":"_TZ3000_okaz9tjs","Endpoints":[1],"Config":["P01","O01"],"RMSVoltage":230,"ActivePower":0,"Power":0,"Reachable":true,"LastSeen":2,"LastSeenEpoch":1712743121,"LinkQuality":34}},"ZbInfo":"Done"}

I do not know what a syslog server is can you explain ?

from tasmota.

Agnes56fr avatar Agnes56fr commented on May 26, 2024

for more informations
zbstatus list all 12 devices

{"ZbStatus1":[{"Device":"0xE404","Name":"leak_pompe_piscine"},{"Device":"0x4067","Name":"leak_spa"},{"Device":"0x4DEA","Name":"temp_etage"},{"Device":"0xD1A7","Name":"Temp_Exterieure"},{"Device":"0x43B0","Name":"temp_ssol"},{"Device":"0xD76C","Name":"Temp_SalleSport"},{"Device":"0x7493","Name":"Leak_arriere_cuisine"},{"Device":"0xF49F","Name":"Temp_Salon"},{"Device":"0x56D6","Name":"_Prise_1"},{"Device":"0x2EAF","Name":"_Prise_2"},{"Device":"0x5A70","Name":"_Prise_3"},{"Device":"0x9332","Name":"_Prise_4"}]}

from tasmota.

arendst avatar arendst commented on May 26, 2024

Executing using HTTP or on the web GUI will result in the same experience; the report buffer is full and loses the first entry in favour of the last.

A syslog server is a device able to log messages from all kinds of resources like your Zigbee bridge.

You'll have to learn with the fact that executing the command will not report all devices. You already found the solution by reporting individual devices.

from tasmota.

barbudor avatar barbudor commented on May 26, 2024

Syslog is a standard protocol to send log messages over the network to a receiving log server
The web console as a limited buffer so @arendst is assuming that it is too short to get all results from the ZbInfo command
Syslog would not have that limitation as each log is immediately sent to the server

If you are running linux, syslog is most of the time already running and listenning on port 514 (see https://tasmota.github.io/docs/Troubleshooting/#syslog-logging)
You could configure tasmota to send the logs to that server using:
backlog loghost xxx.xxx.xxx.xx; logport 514; syslog 2

If you are running windows and have Python install, you can run a small syslog equivalent with this python code which use port 5140, so configure tasmota with:
backlog loghost xxx.xxx.xxx.xx; logport 5140; syslog 2

from tasmota.

Agnes56fr avatar Agnes56fr commented on May 26, 2024

ok,
can it be a buffer size problem if the result come from a http request ?

from tasmota.

arendst avatar arendst commented on May 26, 2024

can it be a buffer size problem if the result come from a http request

The buffer size is indeed the cause BUT ... The buffer size is bound to available RAM. Increasing the buffer wil decrease precious RAM. That's a trade-off I have to make. Increasing the buffer is not the solution as you can imagine; having fifty zigbee devices would need all available RAM. You have to change the way you retreive your data like you already found out by individual ZbInfo commands.

from tasmota.

sfromis avatar sfromis commented on May 26, 2024

Commands via http is the worst way if you want to see full results. You'll generally get better results in the Tasmota web UI console, as the JavaScript code in the browser can save data it got before it rolled out of the limited buffer space in Tasmota itself. More generally, make sure to already be in the web UI console when the command is issued.

However, for a command producing a lot of output at the same time, the lines may roll off the buffer before being picked up by the browser; the default refresh interval is 2.345 seconds.

If you use serial console instead, you'll generally get all lines as they are produced, without the limitations incurred when accessing results via the web UI.

I'd say that the best strategy is what Tasmota is designed for, using MQTT. The results will be published, without losing lines, and can be picked up that way.

from tasmota.

Jason2866 avatar Jason2866 commented on May 26, 2024

Closing since answered and it is not an issue.

from tasmota.

Agnes56fr avatar Agnes56fr commented on May 26, 2024

"You'll generally get better results in the Tasmota web UI console, as the JavaScript code in the browser can save data it got before it rolled out of the limited buffer space in Tasmota itself."

When in the web UI it does exactly the same

Using MQTT would probably better, however, it require to have something else when asking the Zigbeebrige with zbinfo would (should?) provide the same result.

I do not really understand this buffer problem.
you mean that when we execute a command in the console or through a http request, if the answer is to long they you might receive only a part of it ?

Then it should be truncated in the middle of something, wich is not what happen here. brackets are still properly open and closed

from tasmota.

s-hadinger avatar s-hadinger commented on May 26, 2024

I will eventually try eventsource which should eliminate this problem with the console

from tasmota.

Agnes56fr avatar Agnes56fr commented on May 26, 2024

hello, thank you for your answer,
what is eventsource ?

from tasmota.

Agnes56fr avatar Agnes56fr commented on May 26, 2024

?m=1 output is a lot longer than /cm/cmnd=zbinfo
and ?m=1 is not truncated

from tasmota.

arendst avatar arendst commented on May 26, 2024

Then it should be truncated in the middle of something, wich is not what happen here. brackets are still properly open and closed

Indeed! There has been a lot of work in providing the data as safe as possible. In fact what happens is that every device is a seperate line in the log buffer. If a new line comes in with a length longer than available space in the buffer the first line is removed. Hence you'll see a nicely constructed JSON message.

from tasmota.

sfromis avatar sfromis commented on May 26, 2024

When in the web UI it does exactly the same

I already told you why. But if the log spans over seconds, you can get a lot more by already being in the console.

The story is not about what you can receive, but about the method you use to retrieve it. The web UI console polls the Tasmota buffer at intervals, by default 2.345 seconds, meaning that commands (like ZbInfo) producing a lot of output will only have the last lines (not bytes) fitting into the buffer when polled.

Use serial, syslog or MQTT. Just not the web UI console.

EventSource is a protocol allowing devices like Tasmota to push data to a browser session, instead of the browser polling. Currently not implemented in Tasmota, except for the GPIO Viewer.

from tasmota.

Agnes56fr avatar Agnes56fr commented on May 26, 2024

Thank you all for trying to help me.

I use http://192.168.0.129/cm?cmnd=zbinfo in a php file and analyse the answer to display the status of all devices in a html page (which is static, it does not update as device's status change, it just update when you refresh the page, wich is more than enough considering it display temperatures mostly).

I understood why it could not cut the result anywhere since the size of the buffer is checked device/device
I though I understood that being in the console might create the buffer limit problem, then though it was finally preferable to be in the console (so I'm a bit lost on understanding the buffer problem really)

using eventsource to push devices' changes to a web page sound great, but since it is not implemented in Tasmota, I will not go this way.

instead, I'm about to rewrite my php in order to pull info devices/devices with zbinfo 1, 2, 3...
I thought it was better to make one global request but if you say I can only if it is short enough then I will go device/device.

from tasmota.

Agnes56fr avatar Agnes56fr commented on May 26, 2024

with zbinfo 1, 2, 3, 4... it does work

Thanks a lot for all your answers

from tasmota.

sfromis avatar sfromis commented on May 26, 2024

Tasmota has an internal buffer limited to a "moderate" number of bytes/lines, which is what you see when entering the console page. If you then leave it open, the JavaScript code in the browser console will poll the Tasmota buffer at intervals, default 2.345 seconds, and add any new lines to the browser buffer, which can grow very long over time.

The one-line response from http command ZbInfo is what it added to the buffer, but only collected when the command execution ended, and therefore cannot have more than the available buffer size. Hence my statement about using http commands being the worst way.

Therefore it is "preferable" to be in the console, unless you issue a command (like ZbInfo) able to overfill the Tasmota buffer much quicker than the polling interval. Still, the straightforward approach is to use serial, syslog or MQTT. Tasmota is not designed for http to provide a solid API, after all, the "M" in the name means "MQTT".

from tasmota.

Agnes56fr avatar Agnes56fr commented on May 26, 2024

Thanks again for all those informations.

So the ZBInfo command overfilled the internal tasmota buffer.
I also understood that MQTT should be the way.

For me having a MQTT server beside tasmota is kinda double sources of informations since tasmota already keep the informations and since I can easyly access it with the http request even if not designed for that and all that without having to contact the devices, well, for my application, I could not see any good reason to have another server with MQTT on it.

I thank you very much all for your work and for your answers

from tasmota.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.