Geo Home Smart Meter integration

If this is of any use (because the above website seems to have stopped working):

command_line:
- sensor:
    command: >-
      curl "https://data.nationalgas.com/api/find-gas-data-download?applicableFor=Y&dateFrom={{now().strftime('%Y-%m-%dT00:00:00')}}&dateTo={{now().strftime('%Y-%m-%dT23:59:59')}}&ids=PUBOB4515&latestFlag=Y&type=CSV&dateType=GASDAY" -s
      | python3 /config/my_python_scripts/csv2json.py
    name: Gas Calorific Value
    unique_id: calorific_value_SO
    unit_of_measurement: "MJ/m³"
    scan_interval: 86400
    value_template: '{{ value_json["Value"]}}'
    json_attributes:
      - Generated Time
      - Data Item

need to have an additional python script (in my example, named csv2json.py)

# convert csv to json
# https://blog.backslasher.net/python-csv-to-json.html

import csv
import sys
import json

csv.field_size_limit(sys.maxsize)

for row in csv.DictReader(sys.stdin):
    sys.stdout.write(json.dumps(row)+"\n")

Same challenges of couse, of determining your local area.

1 Like

I have older GEO Solo III Wireless PV Monitor and Meter Set
I have tried these URLs:

BASE_URL = "https://api.geotogether.com/"
LOGIN_URL = "usersservice/v2/login"
DEVICE_DETAILS_URL = "api/userapi/v2/user/detail-systems?systemDetails=true"
LIVE_DATA_URL = "api/userapi/system/smets2-live-data/"
PERIODIC_DATA_URL = "api/userapi/system/smets2-periodic-data/"
DAILY_DATA_URL = "api/userapi/system/smets2-daily-data/"

And I can login and get auth Token.
I can also get System details including systemId.
But when I use the Token and systemId to query any of the other URLs, I do get response, but there is no values, only 0s or nulls for each field.

Is there a different API for older Geo devices?

Sorry, I don’t know about all of the different devices. Perhaps someone else has the info

Found this:
solo3.energynote.eu/geosuite/app/assets/scripts/script.js

    angular
        .module('app')
        .constant("ENV_VALUES", {
            local: 'local',
            dev: 'dev',
            trial: 'trial',
            prod: 'prod'
        })
        .constant("DATA_API_CONFIG", {
            endpoint: 'https://dev-ds-rest.geosmartdata.eu/api',
            //endpoint: 'http://trial-ds-rest.geosmartdata.eu/api',
            //endpoint: 'http://solo3.energynote.eu/api',
           storedTokenKey: 'auth.userToken',
            local: {
                originHostname: ['localhost', '127.0.0.1'],
                newEndpoint: 'https://dev-api.geotogether.com'
            },
            dev: {
                originHostname: ['dev-ds-rest.geosmartdata.eu', 'dev-cosy.geosmartdata.eu'],
                newEndpoint: 'https://dev-api.geotogether.com'
            },
            trial: {
                originHostname: ['trial-ds-rest.geosmartdata.eu', 'trial-cosy.geosmartdata.eu'],
                newEndpoint: 'https://trial-api.geotogether.com'
            },
            prod: {
                originHostname: ['solo3.energynote.eu', 'cosy.geotogether.com'],
                newEndpoint: 'https://api.geotogether.com' 
            }
        })

I don’t have high hopes, but this URL: http://solo3.energynote.eu is the one I use to login and see my data, so maybe there are some other endpoints mentioned there in that js.

Found it:

https://api.geotogether.com/api/userapi/system/live-data/systemId
{"id":"xxxxxxxxxxxxxxxxxxxxx,"power":
[{"type":"CONSUMPTION","watts":627,"valueAvailable":true},
{"type":"IMPORT","watts":627,"valueAvailable":true},
{"type":"GENERATION","watts":0,"valueAvailable":true},
{"type":"EXPORT","watts":0,"valueAvailable":true}],"deviceStatus":
[{"nodeAddress":70,"batteryIndicator":0,"signalStrength":-128,"flags":0,"batteryLow":false,"lastPacketReceivedTimestamp":1705428452},
{"nodeAddress":71,"batteryIndicator":3,"signalStrength":0,"flags":0,"batteryLow":false,"lastPacketReceivedTimestamp":1705428452}],
"energies":[
{"energyType":"GENERATION","tierType":"GENERATION","energyKWh":0.346,"cost":0},
{"energyType":"IMPORT","tierType":"IMPORT_STANDING_CHARGE","energyKWh":0,"cost":0},
{"energyType":"EXPORT","tierType":"EXPORT","energyKWh":0,"cost":0},
{"energyType":"IMPORT","tierType":"IMPORT_T2","energyKWh":3.168,"cost":133.988},
{"energyType":"CONSUMPTION","tierType":"IMPORT_T2","energyKWh":3.514,"cost":14.627},
{"energyType":"IMPORT","tierType":"IMPORT_T3","energyKWh":13.098,"cost":160.447},
{"energyType":"IMPORT","tierType":"IMPORT_T1","energyKWh":8.53,"cost":178.923},
{"energyType":"CONSUMPTION","tierType":"IMPORT_T1","energyKWh":8.53,"cost":0},
{"energyType":"CONSUMPTION","tierType":"IMPORT_T3","energyKWh":13.098,"cost":0}]}
https://api.geotogether.com/userapi/system/summaries/systemId
{"values":[{"id":"xxxxxxxxxxxxxxxxxxxxxxx","year":2024,"month":1,"day":16,
"energyCostTotals":
{"CONSUMPTION:IMPORT_T1":0,
"IMPORT:IMPORT_T3":160.447,
"CONSUMPTION:IMPORT_T2":14.627,
"CONSUMPTION:IMPORT_T3":0,
"GENERATION:GENERATION":0,
"IMPORT:IMPORT_T2":137.372,
"IMPORT:IMPORT_T1":178.923,
"EXPORT:EXPORT":0},
"energyKwhTotals":{
"CONSUMPTION:IMPORT_T1":8.53,
"IMPORT:IMPORT_T3":13.098,
"CONSUMPTION:IMPORT_T2":3.594,
"CONSUMPTION:IMPORT_T3":13.098,
"GENERATION:GENERATION":0.346,
"IMPORT:IMPORT_T2":3.248,
"IMPORT:IMPORT_T1":8.53,
"EXPORT:EXPORT":0}}]}

Great integration!
It worked straight away for me with the same username and password as for the app and a quick HA restart.

Where can we change this setting? I found this hard-coded in sensor.py:

# Polling interval. Will only be polled if there are subscribers.
update_interval=timedelta(seconds=120),

The IHD and app updates every 10 seconds which I get might be overwhelming for their servers, but I don’t think it is very useful at only 2 minutes. 30 or 60 seconds would sound more reasonable to me for live checking the energy usage.
It would be nice to bring this setting into a user-editable interface.

Just been told by Geo support that they don’t provide API access? I’ve just had a new S2 meter including a Geo IHD.
It is a Trio II

I have also been told this service is not available from GEO support ?

They definitely do - for example Schneider sell the GeoTogether Trio in order to use their Wiser Insights+ service. That would not work without an API.

And this integration works for me using the API.

However, the hardware and firmware seems to be rubbish. GeoTogether’s app often shows the device as offline when it can still be pinged. The device itself often shows it is offline, and needs a power cycle to reconnect to the WiFi and then communicate back to Geo’s servers.