stevecohen / homebridge-bomgovau Goto Github PK
View Code? Open in Web Editor NEWMakes BOM.gov.au data available in your Homebridge(Homekit) setup
Makes BOM.gov.au data available in your Homebridge(Homekit) setup
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!
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 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
[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.
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?
Thanks :)
Hey @SteveCohen, not a major one, but figured it could be worth applying for Homebridge Verified. I think all you have to do is submit an issue on this github page:
Hey Steve,
Plug-in works great, thanks.
Just one to add to your future enhancement list, adding fakegato support.
Thanks again.
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
I may have missed it, but how to install with NPM?
Hi Steve,
Great plugin, works without a hitch. Can a value be pulled from BOM re 'chance of rain'? Be handy as I want to link my sprinklers to it.
My local station doesn't have humidity data, so that sensor is sitting useless at 0%. Would love if you could add a "Disable Humidity" etc. flag to the config
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.