Import Data via WebAPI manipulating HA's SQLite-DB #54
Replies: 7 comments 18 replies
-
I will take a look later this day. Sorry for my late response. |
Beta Was this translation helpful? Give feedback.
-
You provided "$first" and "$last" with hours. But as we're trying to replace whole days with data from api, this should be just dates like "01.08.2021" and "01.11.2023". PS: You may wait a couple of days, as I'm working on a version which pulls hourly data from api and not just whole days. |
Beta Was this translation helpful? Give feedback.
-
Tested the new script, here the output: (FYI the unix timestamp is translated Wed Nov 01 2023 23:00:00 GMT+0100 (Mitteleuropäische Normalzeit) |
Beta Was this translation helpful? Give feedback.
-
Okay, okay, so now its working, the output is an sql that shows a lot of inserts. Am I assuming correct that I have to trigger this url into the database myself? |
Beta Was this translation helpful? Give feedback.
-
So I deleted most of the entries for debugging and better output and tried to read the query into the database. This is what I am getting: the sql: |
Beta Was this translation helpful? Give feedback.
-
So it seems, that your double quotes "" are causing the problem. I changed them with single quotes and now I get this: |
Beta Was this translation helpful? Give feedback.
-
Thank you for your feedback. Just updated the script and fixed the quotes for the login part. All other quotes (or not quotes) were fine. I tried to clarify the intended procedure in the latest version of the script. Let me know if it's working for you now. PS: Please check the script link in your initial post. You linked to a raw file of a specific revision and not to the full gist. |
Beta Was this translation helpful? Give feedback.
-
Discussed in #17
Originally posted by loeffelpan September 10, 2023
Second is a powershell script to create sql statements with api data from senec for adding that data to your energy dashboard.
You can get the
script here. new Script here.So I get from the script the following output, which makes no sense for me, can you assist? To me it seems, that it finds everything (mode ADD), but in the end it says the state or sum is not in db? @loeffelplan
Beta Was this translation helpful? Give feedback.
All reactions