ISS sensor - not working?

Is anyone else using this and having it ‘on’ when the ISS appears to be exactly on the other side of the world?

I live in the UK but get this. (My config has the correct longitude and latitude).

I’m pretty sure the ISS sensor is not working properly. I live in London…

Which iss sensor? I am also curious to see the iss a the night sky, but i didn’t find a sensor for this.

Well there might be a problem with this sensor. I usually loked at https://www.heavens-above.com/PassSummary.aspx?satid=25544&lat=51.61&lng=7.3&loc=Datteln&alt=0&tz=CET this page to check when it is vissible. The time “next_rise” from the component doesn’t match any value von heavens above. So i think there is an error.

I use this api to with the rest component
https://www.n2yo.com/rest/v1/satellite/visualpasses/25544/51.65/7.3/50/5/60&apiKey=pri-vate-KEY-API

I’m glad it wasn’t just me!

I think you guys are on to something. Mine shows the position on the map correctly… but the binary sensor isn’t “on” when it should be. For example it just passed over my house, but the binary sensor said “off”, and a little while ago, it was over Europe, half way around the world, and the binary sensor said “on”.

Any ideas?

Snippet from my sensors.yaml:

#######################################
# ISS
#-|---|---|---|---|---|---|---|---|---|
- platform: template
  sensors:
    iss_next_rise:
      value_template: "{% set nextrise = as_timestamp(states.binary_sensor.iss.attributes.next_rise) | timestamp_custom('%a, %b %d at %I:%M %p') %} {{ nextrise }}"
      entity_id: binary_sensor.iss
    iss_crew_count:
      value_template: "{{ states.binary_sensor.iss.attributes.number_of_people_in_space }}"
      entity_id: binary_sensor.iss
    iss_latitude:
      value_template: "{{ states.binary_sensor.iss.attributes.lat }}"
      entity_id: binary_sensor.iss
    iss_longitude:
      value_template: "{{ states.binary_sensor.iss.attributes.long }}"
      entity_id: binary_sensor.iss

snippet from my cameras.yaml

- platform: generic
  name: iss
  still_image_url: https://maps.googleapis.com/maps/api/staticmap?center={{ states.binary_sensor.iss.attributes.lat }},{{ states.binary_sensor.iss.attributes.long }}&zoom=3&scale=2&size=865x512&maptype=hybrid&markers=color:red%7Clabel:I%7Csize:small%7C{{ states.binary_sensor.iss.attributes.lat }},{{ states.binary_sensor.iss.attributes.long }}&key=(put your own google key in here)
  limit_refetch_to_url_change: true

snippet from my ui-lovelace.yaml


      - type: vertical-stack
        cards:
          - type: entities
            title: International Space Station
            show_header_toggle: false
            entities:
              - type: entity
                name: Visible
                icon: mdi:calendar
                entity: sensor.iss_next_rise
              - type: entity
                name: Crew
                icon: mdi:account-multiple
                entity: sensor.iss_crew_count
          - type: picture-entity
            name: Current Location
            entity: camera.iss
            camera_image: camera.iss
            show_name: true
            show_state: false
            tap_action:
              action: more-info

snippet from my binary_sensors.yaml

- platform: iss

1 Like

Did you UK guys ever sort this?
I have the exact same issue. I watched the ISS go over this evening but the sensor did’t change state.
Then, about 4-5 hours later, it turned on and was still on 30mins later but the ISS was in the southern hemisphere by then

No I didn’t.

I’ve checked and double-checked but can’t see what’s wrong.
Those posters above are in the UK, I wonder if that is significant.
If I have the map visible on I can see my house shows in the correct location and the ISS also shows in the correct location and compares well with the NASA map - https://spotthestation.nasa.gov
On a clear night, I can even watch it come over, exactly as the map shows, but the binary_sensor doesn’t change.
I’ve tried it with the map visibility as true and false, no change.
Some hours later, I get the notification that it is overhead, even if it’s over Australia.
On the screen grab, it shows the “next rise” time in the past, so it’s maybe to do with time zones, but as you can see, the time is showing correctly as UTC (I’m in Wales)
So, does anyone in the UK have this working?
I know it works for “BeardedTinker” but he’s a few time zones away in Europe.


ISS_fail3 ISS_fail2

My ISS sensor just turned on!
I live in Wales and the ISS is over Africa, as you can see from the screengrab which shows that HA knows where I live and where the ISS is, both of which are correct.
I can’t understand this at all.
ISS_fail4

I created an account here just to say that the ISS sensor has not been working for me either for some time now and I’m in the northeastern United States, so it isn’t strictly a problem for the folks in the UK. Exact same problem though. ISS sensor turns on, and the ISS is in fact a hemisphere away. Such a shame, my boys really liked this automation.

Maybe the problem doesn’t come from the HA ISS sensor but the python API used to retrieve the ISS data:


However, this code seems not to be maintained at all. It looks like it could be a better solution to request data direct from the service http://open-notify.org/ instead of using the pyiss script, which, by the way, doesn’t do so much.

I think you could be right. Thanks for finding this.

I’ve given up for now as I get a trigger when the ISS is over Spain (I’m in the UK) but other times I can see it with my eye above my house and the map confirms this, but no trigger :frowning:

Just curious, were you able to make this work and if so, how?

I think so but I haven’t had time to really check it properly.
If you use this let me know how it goes for you.

#=================
#=== Sensors
#=================
sensor:

  - platform: rest
    name: iss_pass_times
    resource: !secret iss_pass_times
    value_template: >
      {{ value_json.message }}
    json_attributes:
      - response
    scan_interval:
      seconds: 300


  - platform: rest
    name: iss_current_location
    resource: http://api.open-notify.org/iss-now.json
    value_template: >
      {{ value_json.message }}
    json_attributes_path: "$.iss_position"
    json_attributes:
      - latitude
      - longitude
    scan_interval:
      seconds: 15

  - platform: template
    sensors:
      #================
      #=== ISS Details
      #================
      iss_next_rise:
        value_template: >
          {% set response = state_attr('sensor.iss_pass_times', 'response') %}
          {% if as_timestamp(now()) > response[0].risetime | int and
                as_timestamp(now()) < response[0].risetime | int + response[0].duration | int %}
            {% set nextrise = 'Visible Now!' %}
          {% elif as_timestamp(now()) < response[0].risetime | int and
                  response[0].risetime | timestamp_custom ('%Y-%m-%d') == states('sensor.date') %}
            {% set nextrise = 'Today at ' ~ response[0].risetime  | timestamp_custom ('%H:%M') %}
          {% else %}
            {% set nextrise = 'Tomorrow at ' ~ response[0].risetime  | timestamp_custom ('%H:%M') %}
          {% endif %}
          {{ nextrise }}

And in my secrets.yaml

#======
#= ISS
#======
iss_pass_times: http://api.open-notify.org/iss-pass.json?lat=MY_LATITUDE&lon=MY_LONGITUDE
1 Like

This has been very helpful, thanks for posting.
I have added a binary_sensor for use in my automation, as follows.
It might not be the best or easiest way to do it, but I’m learning:

- platform: template
  sensors:
    iss_in_range:
      friendly_name: "ISS Above Horizon"
      value_template: >-
        {{ states('sensor.iss_next_rise')=='Visible Now!' }}

Many thanks, will now await a pass and see what happens.

1 Like

hi, did this method work for you guys in the UK? I’m having the same issues with the ISS binary sensor. Very disappointed son at the moment.