nice
-
Script: Show how long it'll take you to get to work
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
@obi said:
{“authenticationResultCode”:“NoCredentials”,“brandLogoUri”:“http://dev.virtualearth.net/Branding/logo_powered_by.png",“copyright”:"Copyright © 2015 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.”,“errorDetails”:[“Access was denied. You may have entered your credentials incorrectly, or you might not have access to the requested resource or operation.”],“resourceSets”:[],“statusCode”:401,“statusDescription”:“Unauthorized”,“traceId”:“b1ed91aabd0b40048e9989fa4ad73c5d|CO30276244|02.00.130.200|”}
Well, that’s strange. My key consists of 65 character, if that’s of any help for you.
When I applied for the key, I chose “private website” as the application type and “basic” as the key type. Also check that you didn’t run the script too often; access to the API is restricted to a certain number of calls per minute (I don’t have the exact number) so if you run your script more then 3 (or so) times per minute, you might run into some trouble. In this case, just wait for a while and check again. -
@ituri Thanks for you answer. my key seems to be 64 characters.
I tried both dev/test and public site (both basic). But it still doesn’t work. If I succeed I will post it over here.
Cheers,
Robert -
Problem solved. It seems you can’t add space in the start and end variable (seems obvious as it is used as a query string…).
Adding a %20 at the place of the ‘spaces’ solved the problem.
start='Examplestreet%20nr,Hometown’
end=‘Examplestreet%20nr,Destination’Cheers Obi…
-
Very cool script
-
@ituri Is there a way how i could select which route bing should choose and display?
pimatic-google-calendar | pimatic-wmi | pimatic-snmp | pimatic-wakeonlan |
Like my work? Then consider a donation
Follow me: www.thorstenreichelt.de -
All i’m getting from this script is
0 Minuten via ()
Any suggestions? -
@fregger
I had the same issue. In my case it helps to eliminate all “space” with %20
So the start and end point in the script have to see like this:start='xxxstraße,%20Stadt' end='xyzstraße,%20stadt%20vorstadt'
But I have also two issues. The answer used E37 instead of A1 how showed in your example.
In the JSON stream I found:"names":["E37","A1"],"roadShieldRequestParameters":{"bucket":1114753,"shields":[{"labels":["E37"],"roadShieldType":1}]},"roadType":"LimitedAccessHighway","startPathIndices":[36]
And the second issue is I have to drive on three highways but always the first two where shown (in the JSON stream are also three Highways).
-
@V1per I would swear on it that i tried that the other day but it failed. However, it’s working now, thanks for your help! Can i use multiple destinations with this? I don’t always travel the same route.
-
@fregger said in Script: Show how long it'll take you to get to work:
Can i use multiple destinations with this? I don’t always travel the same route.
I think this may be no problem, make more scripts and Change there the Name of the script to traffic1.sh or so.
In this script Change the Destination, and then make a new device:{ "id": "traffic1", "name": "Verkehr zu xxx", "class": "ShellSensor", "attributeName": "traffic", "attributeType": "string", "attributeUnit": "", "command": "/usr/local/bin/traffic1.sh", "interval": 600000 },
-
This script worked fine for the last three or four month, but now i’m getting the following error every day:
Error: Error getting attribute value for Fahrzeit: parse error: Invalid numeric literal at line 1, column 10 parse error: Invalid numeric literal at line 1, column 10 parse error: Invalid numeric literal at line 1, column 10
Line 1 contains
#!/bin/sh
Was something changed on bing?
pimatic-google-calendar | pimatic-wmi | pimatic-snmp | pimatic-wakeonlan |
Like my work? Then consider a donation
Follow me: www.thorstenreichelt.de -
Did you edit the script somehow? Could it be that there is some credit or another character that is not shown? Maybe try to correct the script with dos2unix
What did you do before the error occurred? Remember on any update procedure or similar?pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
@leader21 Nothing to the script was changed. There are no invisible characters or anything else. As i already told, i think it`s maybe an issue with the bing service … due to it was running fine for some month.
pimatic-google-calendar | pimatic-wmi | pimatic-snmp | pimatic-wakeonlan |
Like my work? Then consider a donation
Follow me: www.thorstenreichelt.de