npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mqtt4frenchtools

v1.2.3

Published

Publish multiple french data to MQTT

Downloads

67

Readme

mqtt4frenchtools

npm License GitHub Workflow Status Coverage Status npm

Publish values from french open api to MQTT and other usefull data.

1.2.3 UPDATE

New EDF Tempo API

1.2.2 UPDATE

Update School holidays for 2024-2025

1.2.1 UPDATE

Correct bug in Weather alert

1.2.0 UPDATE

Weather alert is now in three periods of level alert with start and stop timestamp

Topic vigiInondation is replaced by vigiCrue

1.1.0 UPDATE

Weather alert is now unavailable without an API Subscription.

Manual to create one : API Manager Meteo France

mqtt4frenchtools use Acces by API key protocol

Data published

  • Year information (number of days in year, day number in year, week number, ...)
  • Saint of the day
  • EDF Tempo color of today and tomorrow

And for each city provided as parameter :

  • City information (INSEE code, School Zone, Latitude & Longitude, ...)
  • Sun information (sunset, sunrise, ...)
  • Moon Information (moonset, moonrise, ....)
  • Statutory holiday (with Alsace-Moselle)
  • School holidays (of the city School Zone)

API Used

Installing

Simply install the package over npm. This will install all the required dependencies.

npm install -g mqtt4frenchtools

Usage

Usage: mqtt4frenchtools [options]

Options:
  -a, --ville         ville                                              [array]
  -m, --apikey        apikey for weather alert
  -u, --mqttUrl       mqtt broker url              [default: "mqtt://127.0.0.1"]
  -t, --mqttTopic     mqtt topic prefix                 [default: "frenchtools"]
  -v, --logVerbosity  log verbosity
                   [choices: "error", "warn", "info", "debug"] [default: "info"]
  -s, --sslVerify     allow ssl connections with invalid certs
      --version       Show version number                              [boolean]
  -h, --help          Show help                                        [boolean]

Example

mqtt4apcaccess -u mqtt://192.168.5.1 -a Lyon

MQTT Frame Output

frenchtools/global/saints
{
  "saintj":"Jour de l'an",
  "saintj1":"Basile"
  "saintsj":"Sainte Agnès, Saint Almer, Saint Augustien, Saint Edme.",
  "saintsj1":"Saint Aciscle, Saint Alphée, Saint Denis d'Alexandrie."
}
frenchtools/global/annee
{
  "anNbjour":365,
  "anNumjour":326,
  "dstDate":"26/03/2023",
  "dstDiff":124,
  "anNumsem":47
}
frenchtools/global/edftempo
{
  "tempoBlancTotal": 43,
  "tempoBlancTires": 0,
  "tempoBlanc": 43,
  "tempoBlancDeb": '2024-09-01',
  "tempoBlancFin": '2025-08-31',
  "tempoBlancEtat": 'OUVERTE',
  "tempoBleuTotal": 300,
  "tempoBleuTires": 3,
  "tempoBleu": 297,
  "tempoDeb": '2024-09-01',
  "tempoFin": '2025-08-31',
  "tempoBleuEtat": 'OUVERTE',
  "tempoRougeTotal": 22,
  "tempoRougeTires": 0,
  "tempoRouge": 22,
  "tempoRougeDeb": '2024-11-01',
  "tempoRougeFin": '2025-03-31',
  "tempoRougeEtat": 'NON_COMMENCEE'
}
frenchtools/Lyon69/infos
{
  "nom":"Lyon",
  "insee":"69123",
  "deptnum":"69",
  "deptnom":"Rhône",
  "longitude":4.8351,
  "latitude":45.758,
  "zonevacances":"A"
}
frenchtools/Lyon69/ferie
{
  "ferCejour": 0,
  "ferNom": "",
  "ferProchaindate": "25/12",
  "ferProchainnom": "Jour de Noël",
  "ferProchainjour": 33
}
frenchtools/Lyon69/vacances
{
  "vacCejour": 0,
  "vacNom": "",
  "vacFin": "",
  "vacProchaindate": "17/12",
  "vacProchainom": "Vacances de Noël",
  "vacProchainjour": 24
}
frenchtools/Lyon69/soleil
{
  "soleilLever": "7:51",
  "soleilZenith": "12:28",
  "soleilCoucher": "17:05",
  "soleilElevation": "-24.94",
  "soleilElevzenith": "24.14",
  "soleilPosv": "-15.00",
  "soleilPosh": "230.00",
  "soleilDuree": "9:14",
  "soleilDiff": "-3m10s"
}
frenchtools/Lyon69/lune
{
  "luneLever": "05:49",
  "luneCoucher": "16:07",
  "luneElevation": "-33.55",
  "luneToujours": 0,
  "luneAbsente": 0,
  "lunePhase": "Dernier croissant"
}
frenchtools/Lyon69/vigilance
{
  "vigiAvalanche":"Vert",
  "vigiAvalancheD":1700110800,
  "vigiAvalancheF":1700262000,
  "vigiAvalanche1":"",
  "vigiAvalanche1D":"",
  "vigiAvalanche1F":"",
  "vigiAvalanche2":"",
  "vigiAvalanche2D":"",
  "vigiAvalanche2F":"",
  "vigiCrue":"Vert",
  "vigiCrueD":1700110800,
  "vigiCrueF":1700262000,
  "vigiCrue1":"",
  "vigiCrue1D":"",
  "vigiCrue1F":"",
  "vigiFroid":"Vert",
  "vigiFroidD":1700110800,
  "vigiFroidF":1700262000,
  "vigiFroid1":"",
  "vigiFroid1D":"",
  "vigiFroid1F":"",
  "vigiFroid2":"",
  "vigiFroid2D":"",
  "vigiFroid2F":"",
  "vigiNeige":"Vert",
  "vigiNeigeD":1700110800,
  "vigiNeigeF":1700262000,
  "vigiNeige1":"",
  "vigiNeige1D":"",
  "vigiNeige1F":"",
  "vigiNeige2":"",
  "vigiNeige2D":"",
  "vigiNeige2F":"",
  "vigiOrage":"Vert",
  "vigiOrageD":1700110800,
  "vigiOrageF":1700197200,
  "vigiOrage1":"Jaune",
  "vigiOrage1D":1700197200,
  "vigiOrage1F":1700244000,
  "vigiOrage2":"Vert",
  "vigiOrage2D":1700244000,
  "vigiOrage2F":1700262000,
  "vigiPluie":"Vert",
  "vigiPluieD":1700110800,
  "vigiPluieF":1700262000,
  "vigiPluie1":"",
  "vigiPluie1D":"",
  "vigiPluie1F":"",
  "vigiPluie2":"",
  "vigiPluie2D":"",
  "vigiPluie2F":"",
  "vigiVague":"Vert",
  "vigiVagueD":1700110800,
  "vigiVagueF":1700175600,
  "vigiVague1":"Jaune",
  "vigiVague1D":1700175600,
  "vigiVague1F":1700262000,
  "vigiVague2":"",
  "vigiVague2D":"",
  "vigiVague2F":"",
  "vigiVentD":1700110800,
  "vigiVentF":1700164800
  "vigiVent":"Vert",
  "vigiVent1":"Jaune",
  "vigiVent1D":1700164800,
  "vigiVent1F":1700233200,
  "vigiVent2":"Vert",
  "vigiVent2D":1700233200,
  "vigiVent2F":1700262000
}

Versioning

mqtt4apcaccess is maintained under the semantic versioning guidelines.

See the releases on this repository for changelog.

License

This project is licensed under MIT License - see the LICENSE file for details