OilFox mit Node Red
Moderator: Co-Administratoren
-
- Beiträge: 96
- Registriert: 01.10.2018, 12:39
- Hat sich bedankt: 1 Mal
- Danksagung erhalten: 3 Mal
OilFox mit Node Red
Hallo Leute ich habe mir vor paar Monaten was mit Node Red gebaut um den Füllstand meiner Öltanks in mein Homematic einzubinden
(Anbei der ganze Ablauf)
Jetzt hat sich aber die Abruf URL geändert von
https://api.oilfox.io/v2/backoffice/session
auf :
https://api.oilfox.io/v3/login
kann mir da jemand helfen?
(Anbei der ganze Ablauf)
Jetzt hat sich aber die Abruf URL geändert von
https://api.oilfox.io/v2/backoffice/session
auf :
https://api.oilfox.io/v3/login
kann mir da jemand helfen?
- Dateianhänge
-
- Oilfox_Ablauf.txt
- (4.73 KiB) 115-mal heruntergeladen
-
- Beiträge: 168
- Registriert: 10.12.2014, 16:40
- Wohnort: Daun
- Hat sich bedankt: 10 Mal
- Danksagung erhalten: 6 Mal
- Kontaktdaten:
Re: OilFox mit Node Red
Hi,
kennst Du diese Seite schon?
https://community.home-assistant.io/t/d ... ata/106300
Versuche das gerade zum Laufen zu bringen...
kennst Du diese Seite schon?
https://community.home-assistant.io/t/d ... ata/106300
Versuche das gerade zum Laufen zu bringen...
-
- Beiträge: 96
- Registriert: 01.10.2018, 12:39
- Hat sich bedankt: 1 Mal
- Danksagung erhalten: 3 Mal
Re: OilFox mit Node Red
Danke für den Tipp
aber der Befehl liefert bei mir keine Ausgabe und bei dir?
token=`curl -d '{"email":"david@gmail.de","password":"XXXXXXXX"}' -H "Content-Type: application/json" -H "Connection: Keep-Alive" -H "User-Agent: HomeAssistant" -X POST https://api.oilfox.io/v3/login | tail -2 | head -1 | tail -c +40 | head -c 346';curl -H "Authorization: Bearer $token" -H "Connection: Keep-Alive" -H "User-Agent: HomeAssistant" -H "Content-Type: application/json" https://api.oilfox.io/v3/user/summary
aber der Befehl liefert bei mir keine Ausgabe und bei dir?
token=`curl -d '{"email":"david@gmail.de","password":"XXXXXXXX"}' -H "Content-Type: application/json" -H "Connection: Keep-Alive" -H "User-Agent: HomeAssistant" -X POST https://api.oilfox.io/v3/login | tail -2 | head -1 | tail -c +40 | head -c 346';curl -H "Authorization: Bearer $token" -H "Connection: Keep-Alive" -H "User-Agent: HomeAssistant" -H "Content-Type: application/json" https://api.oilfox.io/v3/user/summary
-
- Beiträge: 168
- Registriert: 10.12.2014, 16:40
- Wohnort: Daun
- Hat sich bedankt: 10 Mal
- Danksagung erhalten: 6 Mal
- Kontaktdaten:
Re: OilFox mit Node Red
Leider auch nicht.
Hab gestern noch etwa 2h rum gespielt. Aber irgendwie hat das nicht funktioniert.
Ich werde das noch weiter treiben
Hab gestern noch etwa 2h rum gespielt. Aber irgendwie hat das nicht funktioniert.
Ich werde das noch weiter treiben
-
- Beiträge: 31
- Registriert: 05.08.2015, 12:30
- Hat sich bedankt: 3 Mal
-
- Beiträge: 168
- Registriert: 10.12.2014, 16:40
- Wohnort: Daun
- Hat sich bedankt: 10 Mal
- Danksagung erhalten: 6 Mal
- Kontaktdaten:
Re: OilFox mit Node Red
Nein leider noch nicht... Sitze gerade mal wieder an der Recherche... Hätte das Thema gerne endlich erledigt.
-
- Beiträge: 6688
- Registriert: 22.05.2012, 08:40
- System: CCU
- Hat sich bedankt: 25 Mal
- Danksagung erhalten: 478 Mal
Re: OilFox mit Node Red
Hier findest Du funktionierenden Code für den OilFox Füllstandsmesser, den kannst Du entweder mit IP-Symcon nutzten oder entsprechend so umschreiben auf eine Sprache bzw. System Deiner Wahl.
-
- Beiträge: 168
- Registriert: 10.12.2014, 16:40
- Wohnort: Daun
- Hat sich bedankt: 10 Mal
- Danksagung erhalten: 6 Mal
- Kontaktdaten:
Re: OilFox mit Node Red
HA!!!
Ich hab die erste Abfrage geschafft... Muss nur noch n bisl trimmen...
Folgender Part ist der Fehler:
| tail -2 | head -1 | tail -c +40 | head -c 346
Wenn man den weg lässt kommt folgendes als return
{"token_type":"Bearer","access_token":"eyJ0eXAiOiJxxxQiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyZGVmYjE2MS01MDY1LTQ2OGEtYmNiNS1kM2JlODk1ZmYyYTkiLCJhdWQiOiJVU0VSIiwiaXNzIjoib2lsZm94LmlvIiwiZXhwIjoxNTg0NzE5MDA2LCJqdGkiOiI2N2IzMjU5NS0zMTFjLTQ4MGItOGIzYy02NzA2ZTlkMTNjY2YiLCJlbWFpbCI6Im9pbGZveEBtaWxsZW5jaGkuZGUifQ.DqUDMpzjzzJ6VY2ksA9DFnbPb-pEPphRw5eTezzKon2ay6euvjVdLa3vcKHNJE_WK37s4449dbOFTd3jtisFCw","refresh_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzY29wZSI6Ik1PQklMRSIsImlzcyI6Im9pbGZveC5pbyIsImV4cCI6MTU4NjY1ODUxMiwianRpIjoiOTBhNzE2MjItYzQ2ZC00ODU1LTllMGItMzk5NTBjODI2NDI1In0.BOSoVpgTfbbrI93yeb6ZQY7R4E75JwOxxx5D0aNL4Zue7i6bZ9Tj7Tf3FQO1GZrFU5tXrObnd4aUpVJUu-VTsgA"}
Das sollte natürlich korrekt zu einem gültigen Token geschnitten werden....
Macht man das manuell, dann kommt die Antwort:
{"id":"2defb161-5065-468a-bcb5-d3be895ff2a9","title":"Herr","firstName":"David","lastName":"xxx","email":"xxx","country":"DE","locale":"de_DE","passwordSet":true,"devices":[{"id":"f22abf29-xxx-4b69-a20e-45b1bfc9bec9","hwid":"Oxxx339387285","name":"Öl Tank","tankShape":"SQUARED","tankHeight":160,"tankVolume":4500,"tankOffset":5,"tankIsUsableVolume":false,"tankUsableVolume":4275,"productId":"2ed5ac23-fa4c-41af-9f34-fbee0c67bc29","notificationInfoEnabled":true,"notificationInfoPercentage":25,"notificationAlertEnabled":true,"notificationAlertPercentage":15,"address":{"city":"","country":"DE","addressLine1":"","zipCode":"xxx"},"partner":{"id":"9b9a7b40-f811-42c9-a92f-76529a50f30b","name":"BayWa","displayName":"BayWa","supportName":"BayWa Service","supportPhone":"0800/5600600","supportEmail":"support.oilfox@baywa.de","accentColor":"#ffffff","backgroundColor":"#089753","logoUrl":"https://s3.eu-central-1.amazonaws.com/o ... 0,"country"...
Ich hab die erste Abfrage geschafft... Muss nur noch n bisl trimmen...
Folgender Part ist der Fehler:
| tail -2 | head -1 | tail -c +40 | head -c 346
Wenn man den weg lässt kommt folgendes als return
{"token_type":"Bearer","access_token":"eyJ0eXAiOiJxxxQiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyZGVmYjE2MS01MDY1LTQ2OGEtYmNiNS1kM2JlODk1ZmYyYTkiLCJhdWQiOiJVU0VSIiwiaXNzIjoib2lsZm94LmlvIiwiZXhwIjoxNTg0NzE5MDA2LCJqdGkiOiI2N2IzMjU5NS0zMTFjLTQ4MGItOGIzYy02NzA2ZTlkMTNjY2YiLCJlbWFpbCI6Im9pbGZveEBtaWxsZW5jaGkuZGUifQ.DqUDMpzjzzJ6VY2ksA9DFnbPb-pEPphRw5eTezzKon2ay6euvjVdLa3vcKHNJE_WK37s4449dbOFTd3jtisFCw","refresh_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzY29wZSI6Ik1PQklMRSIsImlzcyI6Im9pbGZveC5pbyIsImV4cCI6MTU4NjY1ODUxMiwianRpIjoiOTBhNzE2MjItYzQ2ZC00ODU1LTllMGItMzk5NTBjODI2NDI1In0.BOSoVpgTfbbrI93yeb6ZQY7R4E75JwOxxx5D0aNL4Zue7i6bZ9Tj7Tf3FQO1GZrFU5tXrObnd4aUpVJUu-VTsgA"}
Das sollte natürlich korrekt zu einem gültigen Token geschnitten werden....
Macht man das manuell, dann kommt die Antwort:
{"id":"2defb161-5065-468a-bcb5-d3be895ff2a9","title":"Herr","firstName":"David","lastName":"xxx","email":"xxx","country":"DE","locale":"de_DE","passwordSet":true,"devices":[{"id":"f22abf29-xxx-4b69-a20e-45b1bfc9bec9","hwid":"Oxxx339387285","name":"Öl Tank","tankShape":"SQUARED","tankHeight":160,"tankVolume":4500,"tankOffset":5,"tankIsUsableVolume":false,"tankUsableVolume":4275,"productId":"2ed5ac23-fa4c-41af-9f34-fbee0c67bc29","notificationInfoEnabled":true,"notificationInfoPercentage":25,"notificationAlertEnabled":true,"notificationAlertPercentage":15,"address":{"city":"","country":"DE","addressLine1":"","zipCode":"xxx"},"partner":{"id":"9b9a7b40-f811-42c9-a92f-76529a50f30b","name":"BayWa","displayName":"BayWa","supportName":"BayWa Service","supportPhone":"0800/5600600","supportEmail":"support.oilfox@baywa.de","accentColor":"#ffffff","backgroundColor":"#089753","logoUrl":"https://s3.eu-central-1.amazonaws.com/o ... 0,"country"...