Open cycl0ne opened 1 year ago
I reverted back to 1.0. I will check later on the issues of the new version.
Strange that the ping wouldn't work. The idea was to have a kind of verified status by checking availability after adding a new destination. I will add a command line option to opt-in or probably opt-out from this mechanism.
Its not only the ping. Seems the logging is also running amok on synology. and another thing i noticed, from raspi + synology no data was recieved. but i was too tired to check if all went well.
From my opinion we should offer 2 version. one with lots of shell args and one "quick" one maybe with a shared config file.
Another Issue: ERROR:root:Can't authenticate to tibber by using this token. Please check the validity of the token and ensure a connection to the internet is available. Please enter your Tibber API Token:
This check is also frustrating. Since it hides the real error.. , if i remove the try/error, you see sometimes this: NameError: name 'tibber' is not defined -> Here the import was missing from me
other Error can be -> User has not installed tibber.py
Ok i added now the main part for more nicier look. I will clean up also the sendudp things etc later, but now family yells for me.
i tried to go with a config file first and after some hassle, i dont think its worth it, this is a more "keep it simple" strategy and it works. the extensive code earlier had to many pitfalls on different systems.
I did some major updates to my fork:
--no-ping-check
to skip the ping invocation to test for a valid ip destination--no-invalid-values
to only send valid relative values and not update the ones that have no data (as no data is available)-c/--config
to change the name of the config file (this potentially allows for multiple instances/invocations with different tokens)--price-unit
to choose EUR or Cent
Ping -> Not allowed Executing with demo token: ./tibberlox.py INFO:root:Loading credentials from: /volume1/Python/git/TibberLox/.tibber_credentials INFO:gql.transport.aiohttp:>>> {"query": "query IntrospectionQuery {\n schema {\n queryType {\n name\n }\n mutationType {\n name\n }\n subscriptionType {\n name\n }\n types {\n ...FullType\n }\n directives {\n name\n description\n locations\n args {\n ...InputValue\n }\n }\n }\n}\n\nfragment FullType on Type {\n kind\n name\n description\n fields(includeDeprecated: true) {\n name\n description\n args {\n ...InputValue\n }\n...
Lot of Garbage.