Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
f7172c7
1.0.16 (#94)
bytespider Jan 13, 2025
49729b2
version changes
bytespider Nov 12, 2024
86add92
update node version requirement
bytespider Jan 13, 2025
4f7f404
Bump axios from 0.21.4 to 0.28.0
dependabot[bot] Jan 13, 2025
285d1c7
mosquitto example dockerfile
bytespider Jan 13, 2025
115dfe6
updated node version
bytespider Jan 13, 2025
b08ac23
updated dockerfile example
bytespider Jan 13, 2025
eab9342
information about CVE-2022-32214 resolution in node >21 that affects …
bytespider Jan 13, 2025
adf409e
update packages and engines
bytespider Jan 13, 2025
ac658ed
update to new versions
bytespider Jan 13, 2025
d3ce448
1.0.16
bytespider Jan 13, 2025
6b47c1c
rewrite as ESM
bytespider Oct 31, 2023
872ed8e
WIP
bytespider Nov 1, 2023
fe5d244
added missing files
bytespider Nov 1, 2023
dc6a381
componentise the library
bytespider Nov 2, 2023
ad9104f
format to standard
bytespider Nov 3, 2023
3720862
Remove unneeded imports
bytespider Nov 3, 2023
fabd810
Remove debuging
bytespider Nov 3, 2023
d62c703
Use `configure` rather then `set` to imply action over the network
bytespider Nov 3, 2023
af1d132
rename functions and document
bytespider Dec 27, 2023
17e6efc
Proof read options
bytespider Dec 27, 2023
45b404d
Update readme
bytespider Dec 27, 2023
71ecee4
Update readme
bytespider Dec 27, 2023
0b528cf
Update readme with requirements
bytespider Dec 27, 2023
e3ac46f
removed old api file
bytespider Dec 27, 2023
91a7be9
update versions
bytespider Dec 13, 2024
4aba3a2
update to use import attributes rather than import assertions
bytespider Dec 13, 2024
deff662
add docker test environment
bytespider Jan 22, 2025
361bc18
remove parameters from shebang
bytespider Jan 22, 2025
a710a23
clean up ignore files
bytespider Jan 22, 2025
45429ca
add license
bytespider Jan 25, 2025
441f104
complete typescript rewrite. Added encrypted communication for device…
bytespider Apr 5, 2025
c7c1997
removed dist
bytespider Apr 5, 2025
224e84f
added dist to ignore
bytespider Apr 5, 2025
4aa814c
allow strings to be passed to base64 encode
bytespider Apr 5, 2025
96a584d
decide the protocol and the port based on the input
bytespider Apr 5, 2025
0bc5a99
use strings not buffers
bytespider Apr 5, 2025
9c47452
remove commented reference code
bytespider Apr 5, 2025
aa46d74
added readme and license
bytespider Apr 6, 2025
4264518
ip flag is not required as we default it
bytespider Apr 6, 2025
0c5e6b6
fix license
bytespider Apr 6, 2025
ce71e55
for build and publishing
bytespider Apr 6, 2025
de93054
for build and publishing
bytespider Apr 6, 2025
138a33e
fix packages
bytespider Apr 6, 2025
e964134
make sure node std libraries are imported with node: prefix
bytespider Apr 12, 2025
31b4d01
WIP
bytespider Apr 23, 2025
f3eb320
update version
bytespider Apr 23, 2025
d129d6a
fixed spelling mistakes
bytespider Apr 23, 2025
c31dd97
fixed spelling mistakes
bytespider Apr 23, 2025
688417a
Merge branch 'feature/rewrite'
bytespider Apr 23, 2025
5722bf4
Bump axios from 0.21.1 to 0.21.2
dependabot[bot] Sep 9, 2021
1ab0d71
Bump follow-redirects from 1.14.3 to 1.14.7
dependabot[bot] Jan 15, 2022
0d6dd86
Bump follow-redirects from 1.14.7 to 1.14.8
dependabot[bot] Feb 14, 2022
fe04ca9
Update the workflow to publish the lib and cli seperately
bytespider Aug 21, 2025
f435db3
lint
bytespider Aug 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,45 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package
name: Publish Package to npmjs

on:
release:
types: [created]
types: [published]
workflow_dispatch:

jobs:
build:
build-cli:
name: Build and Publish CLI
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/cli
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: '20.x'
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm test
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-npm:
needs: build
build-lib:
name: Build and Publish Lib
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/lib
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
node-version: '20.x'
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm publish
- run: npm test
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
3 changes: 3 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- name: Close Stale Issues
uses: actions/stale@v9.0.0

9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
bin/src/node_modules
cmd/
dumps/
old_certs/
# directories
node_modules/
dist/

#files
6 changes: 2 additions & 4 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
certs/
cmd/
dumps/
mosquito/
old_certs/
teardown/

#Files
4 changes: 3 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
"useTabs": false,
"semi": true,
"arrowParens": "always",
"singleQuote": true
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.tabSize": 2,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM eclipse-mosquitto:1.6.15-openssl

COPY mosquitto/basic.conf ./mosquitto/config/mosquitto.conf
RUN apk add --update --no-cache openssl && \
mkdir /mosquitto/config/certs && \
cd /mosquitto/config/certs && \
openssl genrsa -out ca.key 2048 && \
openssl req -x509 -new -nodes -key ca.key -days 3650 -out ca.crt -subj '/CN=My Root' && \
openssl req -new -nodes -out server.csr -newkey rsa:2048 -keyout server.key -subj '/CN=Mosquitto' && \
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 3650 && \
c_rehash . && \
chown -R mosquitto:mosquitto /mosquitto && \
chmod 600 /mosquitto/config/certs/*

EXPOSE 1883
EXPOSE 8883
15 changes: 15 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ISC License

Copyright (c) 2025 Rob Griffiths

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@

[![Node.js Package](https://github.com/bytespider/Meross/actions/workflows/npm-ghr-publish.yml/badge.svg)](https://github.com/bytespider/Meross/actions/workflows/npm-ghr-publish.yml)

Tools to help configure the Meross devices for purpose of utilising our <a href="https://github.com/bytespider/Meross/wiki/MQTT">own MQTT servers</a>.
Tools to help configure the Meross devices to use private MQTT servers.

Before you can use the tool to setup your device you need to put it into paring mode and connect to it's Access Point. It's IP address is known as the `--gateway` parameter and is typically `10.10.10.1`.
## Requirements

Requires `node` v18+.
NodeJS: ^21.0.0, ^20.10.0, ^18.20.0
NPM: ^10.0.0

## Setup

Requires `node` >=18
For Node.js >=21 you need to prepend commands with `NODE_OPTIONS='--insecure-http-parser'`. This is because the responses from some (if not all) versions of the Meross firmware incorrectly terminate headers with LF instead of CRLF. [CVE-2022-32214](https://nvd.nist.gov/vuln/detail/CVE-2022-32214)

## Home Assistant

It's possible to get these devices to work with Home Assistant (HASSIO).
<a href="https://github.com/bytespider/Meross/wiki/Home-Assistant-(HASSIO)">Setup Home Assistant MQTT</a>

Once paired and linked to your broker, you can use the <a href="https://github.com/krahabb/meross_lan">Meross Lan</a> integration to control the devices.
[Devices with Bluetooth pairing]()

## Tools

Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

47 changes: 0 additions & 47 deletions bin/meross-info

This file was deleted.

115 changes: 0 additions & 115 deletions bin/meross-setup

This file was deleted.

23 changes: 0 additions & 23 deletions certs/ca.crt

This file was deleted.

21 changes: 0 additions & 21 deletions certs/server.crt

This file was deleted.

Loading