cycl0ne / TibberLox

Creative Commons Zero v1.0 Universal
2 stars 1 forks source link

Synology NAS - Sctipt completely broken #2

Open cycl0ne opened 1 year ago

cycl0ne commented 1 year ago

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.

cycl0ne commented 1 year ago

I reverted back to 1.0. I will check later on the issues of the new version.

JacknJo commented 1 year ago

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.

cycl0ne commented 1 year ago

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.

cycl0ne commented 1 year ago

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

cycl0ne commented 1 year ago

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.

JacknJo commented 1 year ago

I did some major updates to my fork: