Nautilus wrote:Hmm, strange. The following has happened now a couple of times. If the phone is off (or unreachable) the dummy text sensor gets deleted. Cannot see any traces about this in the log either. How can this be - and has it happened to anyone else?
A family member is travelling again and thus the above (text sensor disappeared) happened again as well. This time I did some more investigating and found out that the disappeared idx's are still in the db, just not visible on the devices screen (nor sensors tab) in web interface. But when looking at the event system's "show current states" popup window they are still listed (with correct values from latest update).
I then went ahead and deleted the "disappeared" text sensors with json ( http://url/json.htm?type=setused&idx=ID ... used=false
) and after this created a new text sensor but the same happened again right away on the first update. "Show current states" shows also the newest still nicely and I'm able to print the "position_text" to log without problems. But the sensor disappears from "sensors", "dashboard", "devices" etc. What could be the issue?
So issue is not that phone would be off or unreachable as it is showing the location just fine. But for some reason when the location is abroad (= outside Finland in this case) this weird thing happens...
edit: after some more testing it is the iframe part that makes the magic happen. After removing that, also the abroad address works. This is the original code I was using to determine the position text:
Code: Select all
position_text = string.gsub(address, ', Finland', '') .. '<br>(' .. drivedistance .. ' / ' .. drivetime ..')<br><iframe width="300" height="260" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?key=APIKEY&q=' .. lat .. ',' .. lon .. '" allowfullscreen></iframe>'
Cannot see any reason why domestic addresses are shown nicely on the iframe, foreign addresses make the sensor disappear. Now that I know I can get it visible again by updating the sensor with some "valid" value, I can still see all the iframe's nicely in the sensor's log, even those that made is disappear from UI...