Unreadable string from http request node

I'm using the "http request" node and this URL: https://api.v2.sondehub.org/amateur/telemetry?duration=3d&payload_callsign=k5wh-117

If I put this in my browser, I get what I expected which is a json structure. But what comes out of the http request node is this:
�h �d�՝m�\�qF�ʀj���/@r۱, &aaa#�c�V&) �����w7��]r�ְ]E�4;6{�>�����G��?��#������G��>J�T�����}J�O�������/^_~��ū��ʣ�W�<���w������?��7Ow��x{���������|����7���Oߧ�G^��ݷ/�.�_���닗/߼���[�(���w�O��x���g���7_���~�����޾xu���˯/�����a�v�{(�J�O�~X��;��?���y���~Ԙ��$����x��ż��'/?:�#�>1H�ϋ��;kkm_��� �O��z���姏Zi� ��Ow��9���Ϟ-��}��O~��ݧ�/�~�f��>��v�+������ݿ_��x���-o��Җ��������ߖ�����=�8n a&أ|�qJ-��/��C�x��'��� ��aw���7_��Z��e��ؖ�]=��������^�yq��=3=f�6Ao�;���w�����������>������H�� l�e��7�|k�s�S��k)��e��9:���v6�I� vmW��=U�cp��ORDm���b�f��� 8�6j��i���-�-&؇�������&�s�M^醘چ��K��m#��\۬�&k�݂S�p�6v?�d;��E��\m�W�1����.̚��nt����'k;�;���횅J��m�v��޷�G�n���~�� ���a�j��P�a#�3$D+�73�ꪂ�*��-�1#�:MEJրM�#H�q=9�4�`nj 4����+٤� z]�6pZ�a}7���k���I�:�v�9f��^DD0[}��kUٱ2L��b3��a�l�����u�b}b�
�����dߛCL��v� 2�� �5��� ��8�� Bn���ƾn�(l�Z�e[Ws���f�h�4�h�-!+ڮ��+6�\c�S�ۓ���0���dN���[3�kU�������/�%&֣�޿�V��a��#{r)~�n1�><:&a���:�T�s�Hu�5� "0ְ[iM�X�� ��86�eD�_�c�z�����d+...

I've set the http node with UTF-8 and JSON object with the same result. Anyone have an idea why I'm not getting the same json string in msg.payload from the node?

1 Like

Looks like the payload is compressed, if you look at header it probably say content encoding: gzip This node should uncompress

More info if you search forum

1 Like

Along with the gzip node, you will need a json node and need to set the http-in node to return a binary buffer

[{"id":"f4cdc36052e3c33d","type":"tab","label":"Flow 6","disabled":false,"info":"","env":[]},{"id":"56ea0cc5f99b3989","type":"http request","z":"f4cdc36052e3c33d","name":"","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://api.v2.sondehub.org/amateur/telemetry?duration=3d&payload_callsign=k5wh-117","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":290,"y":140,"wires":[["4164501163f59261"]]},{"id":"56a3352cf019c558","type":"inject","z":"f4cdc36052e3c33d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":140,"wires":[["56ea0cc5f99b3989"]]},{"id":"a4b22404e00c8b26","type":"debug","z":"f4cdc36052e3c33d","name":"debug 15","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":760,"y":140,"wires":[]},{"id":"4164501163f59261","type":"gzip","z":"f4cdc36052e3c33d","name":"","x":450,"y":140,"wires":[["fd5bf2d76994e9c1"]]},{"id":"fd5bf2d76994e9c1","type":"json","z":"f4cdc36052e3c33d","name":"","property":"payload","action":"","pretty":false,"x":610,"y":140,"wires":[["a4b22404e00c8b26"]]}]

Ok so I changed the http node to output binary; I added the gzip node as well as the json so here is my flow:

The result now is the output from the http node in payload looks like an array but the output from the gzip node is payload = {}. Did I miss something in the setup?

Did you import and test the flow I provided?

Can you provide your flow?

Yes that seems to be correct, the call sign is returning nothing . If i change it to York-test it returns

{"York-test": {"2023-07-09T13:51:25.000Z": {"software_name": "LoRa Gateway", "software_version": "V1.10.0", "uploader_callsign": "2E0CRV", "time_received": "2023-07-09T13:51:27Z", "payload_callsign": "York-test", "datetime": "2023-07-09T13:51:25Z", "lat": 54.00165, "lon": -1.06156, "alt": 21, "frequency": 434.2765, "modulation": "LoRa Mode 1", "snr": 6, "rssi": -57, "raw": "$$York-test,114,13:51:25,54.00165,-1.06156,00021,12,43.3,0.0,0*9892", "uploader_position": "54.0,-1.06",...........

Interesting, yesterday my example flow worked and today it returns nothing. But the link in the original post also returns nothing so my guess is that call sign (k5wh-117) is not currently active.

@zenofmud ... Paul what is also confusing is call K5WH-117 has been active off/on over the past 2 weeks. The URL is requesting all location data for the past 3 days. If you go to the SondeHub API website and use their site to execute the same URL, it will return several data points.

I used the York-test call and received data so the flow is definitely working. At this point, I believe the issue is with the SondeHub API website. Much thanks to both of you for your assistance.

Ok the problem is definitely the SondeHub website... two days ago, I could get sample data using the API website. Today the same request is return no data.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.