Hi,
I'm currently experiencing the problem that the history node of Node RED is not working. While going through the code, I found out that even a plain HTTP request from Node RED does not work as expected:
I make a GET request to http://hassio/homeassistant/api/history/period/2018-11-07T00:00:00.000Z?filter_entity_id=sun.sun with valid credentials.
Actually I get a response of all entities.
Expected would be only the states of sun.sun.
Setting the end_time GET parameter also results in it being ignored.
However, when making a request to HA directly via REST (http://myip:8123/api/history...), I get the expected response. So my guess would be that the problem is somewhere in hassio and its proxy.
I hope someone has an idea what might go wrong here.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This actually still hapens and is still a problem with my Node RED setup.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Prevents me using history from Hass through API.
This issue is alive and kicking.
An easy way to reproduce it is to use the Node Red add-on with Hass.io and run the following flow:
[{"id":"d1e0f97d.ef9e28","type":"api-get-history","z":"4c71f9ee.cbd868","name":"","server":"cb38d2a3.10198","startdate":"","enddate":"","entityid":"sun.sun","entityidtype":"is","useRelativeTime":false,"relativeTime":"","flatten":false,"output_type":"array","output_location_type":"msg","output_location":"payload","x":510,"y":500,"wires":[["ea1b67f2.fb9038"]]},{"id":"bc7f2ff2.1aab3","type":"inject","z":"4c71f9ee.cbd868","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":500,"wires":[["7a1f037.3d1cbfc"]]},{"id":"ea1b67f2.fb9038","type":"debug","z":"4c71f9ee.cbd868","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":690,"y":500,"wires":[]},{"id":"7a1f037.3d1cbfc","type":"function","z":"4c71f9ee.cbd868","name":"Last five minutes","func":"let fiveMinsAgo = new Date(new Date() - 300000).toISOString();\nmsg.startdate = fiveMinsAgo; \nnode.status({text: fiveMinsAgo});\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":500,"wires":[["d1e0f97d.ef9e28"]]},{"id":"cb38d2a3.10198","type":"server","z":"","name":"Home Assistant"}]
This returns a large array with all entities of your installation instead of only the sun.sun entity.
Yes, we don't forward url params currently on proxy
Is there any plan to get this fixed?
It's opensource, so everyone can fix that