Coder Social home page Coder Social logo

homebridge-bomgovau's People

Contributors

mitch7391 avatar pcoombe avatar stevecohen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

pcoombe

homebridge-bomgovau's Issues

Error on install

sudo npm install -g homebridge-bomgovau
npm ERR! code 128
npm ERR! Command failed: /usr/bin/git submodule update -q --init --recursive
npm ERR! fatal: Could not change back to '/root/.npm/_cacache/tmp/git-clone-e7bfccc2': Permission denied
npm ERR!

invalid json response body

HomeBridge v1.3.4
homebridge-bomgovau v0.1.3

When using the JSON data linked from here http://www.bom.gov.au/products/IDN60901/IDN60901.94763.shtml

http://www.bom.gov.au/fwo/IDN60901/IDN60901.94763.json

[7/21/2021, 8:32:35 PM] [BOM] Current Time is 1626863555065, BOM data expires at 0
[7/21/2021, 8:32:35 PM] [BOM] Updating observations from BOM.
(node:21723) UnhandledPromiseRejectionWarning: FetchError: invalid json response body at http://www.bom.gov.au/fwo/IDN60901/IDN60901.94763.json reason: Unexpected token < in JSON at position 0
    at /homebridge/node_modules/homebridge-bomgovau/node_modules/node-fetch/lib/index.js:272:32
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:21723) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
(node:21723) UnhandledPromiseRejectionWarning: FetchError: invalid json response body at http://www.bom.gov.au/fwo/IDN60901/IDN60901.94763.json reason: Unexpected token < in JSON at position 0
    at /homebridge/node_modules/homebridge-bomgovau/node_modules/node-fetch/lib/index.js:272:32
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:21723) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)

about the only thing i can see different is theres no press values at that station. but the JSON seems valid.

Station URL Incorrect

Hi Steve
The sample configuration in the readme has the station URL quoted as "stationurl". This results in the Canberra default being used. It should read "stationURL”.
Cheers
Richard

ERROR LOADING PLUGIN homebridge-bomgovau

Hi.
Recently installed this plugin but it's not loading causing the line No plugin was found for the accessory "BOMgovau" in your config.json. Please make sure the corresponding plugin is installed correctly. to show up in the log. Digging a bit deeper the following also appears in the log...

[15/10/2021, 9:39:44 pm] ====================
[15/10/2021, 9:39:44 pm] ERROR LOADING PLUGIN homebridge-bomgovau:
[15/10/2021, 9:39:44 pm] Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /usr/lib/node_modules/homebridge-bomgovau/node_modules/node-fetch/src/index.js
require() of ES modules is not supported.
require() of /usr/lib/node_modules/homebridge-bomgovau/node_modules/node-fetch/src/index.js from /usr/lib/node_modules/homebridge-bomgovau/index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename /usr/lib/node_modules/homebridge-bomgovau/node_modules/node-fetch/src/index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /usr/lib/node_modules/homebridge-bomgovau/node_modules/node-fetch/package.json.

    at new NodeError (internal/errors.js:322:7)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1102:13)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:93:18)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-bomgovau/index.js:9:13)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
[15/10/2021, 9:39:44 pm] ====================

Installed versions
Homebridge v1.3.5
Node.js v14.18.0
Npm 6.14.15

Thanks,
Shannon

Homebridge v2.0 Breaking Updates

Hey @SteveCohen I am not sure if you are aware but the next version of Homebridge (v2.0) comes with breaking changes for a lot of Homebridge plug-ins and it has been put on the developers to update their plug-ins.

For Plug-In Developers

I have tested this plug-in on the beta version and it will crash Homebridge.

Describe the solution you'd like:
Please have a read of the link above and see what changes are required for this plug-in.

Describe alternatives you've considered:
All users of this plug-in will have to remain on Homebridge v1.8.4.

Additional context:
image

Logs:

[27/07/2024, 3:50:29 pm] [Location] Initializing BOMgovau accessory...
[27/07/2024, 3:50:29 pm] [Location] [BOM gov au] Enabling sensors
[27/07/2024, 3:50:29 pm] [Location] [BOM gov au] Sensor temperature = true
[27/07/2024, 3:50:29 pm] [Location] [BOM gov au] Sensor humidity = true
[27/07/2024, 3:50:29 pm] [Location] [BOM gov au] Sensor apparentTemp = true
[27/07/2024, 3:50:29 pm] [Location] [BOM gov au] Station Name is Location
[27/07/2024, 3:50:29 pm] [Location] [BOM gov au] Station URL is http://www.bom.gov.au/fwo/IDWXXXXX/IDWXXXXX.XXXXX.json
[27/07/2024, 3:50:29 pm] TypeError: Class constructor Characteristic cannot be invoked without 'new'
    at new CommunityTypes.AtmosphericPressureLevel (/usr/local/lib/node_modules/homebridge-bomgovau/node_modules/hap-nodejs-community-types/types.js:445:20)
    at TemperatureSensor.addCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:528:57)
    at new BOMgovau (/usr/local/lib/node_modules/homebridge-bomgovau/index.js:87:33)
    at /usr/local/lib/node_modules/homebridge/src/server.ts:362:50
    at Array.forEach (<anonymous>)
    at Server.loadAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:282:29)
    at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:167:12)
[27/07/2024, 3:50:29 pm] Got SIGTERM, shutting down Homebridge...
[27/07/2024, 3:50:29 pm] AssertionError [ERR_ASSERTION]: Cannot generate setupURI on an accessory that isn't published yet!
    at Bridge.setupURI (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:897:11)
    at Server.setServerStatus (/usr/local/lib/node_modules/homebridge/src/server.ts:143:45)
    at Server.teardown (/usr/local/lib/node_modules/homebridge/src/server.ts:187:10)
    at signalHandler (/usr/local/lib/node_modules/homebridge/src/cli.ts:90:12)
    at process.emit (node:events:519:28)
    at process.emit (/usr/local/lib/node_modules/homebridge/node_modules/source-map-support/source-map-support.js:516:21)
[27/07/2024, 3:50:34 pm] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[27/07/2024, 3:50:39 pm] [HB Supervisor] Restarting Homebridge...

Incorrect Plug-in Identifier

Hi @SteveCohen since the new release of Homebridge I get the following warning in my Homebridge logs upon startup. It says I should contact you to let you know, hopefully you know what needs changing?

B1B09FFB-1308-45F8-A517-70C2C42665D0

Thanks :)

Use Fakegato

Hey Steve,

Plug-in works great, thanks.

Just one to add to your future enhancement list, adding fakegato support.

Thanks again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.