NodOn NIU button

Hello @Mips

commande introuvable

Votre Jeedom est dispo sur http://jeedomatlas.local ou sur :
Last login: Fri Feb 23 17:04:24 2024 from
jeedom@JeedomAtlas:~$ sudo /root/.local/pipx/venvs/theengsgateway/bin/python -m                                    pip freeze
[sudo] Mot de passe de jeedom :
sudo: /root/.local/pipx/venvs/theengsgateway/bin/python : commande introuvable

is theengs gateway installed locally on the atlas?

yes locally installed
Bluetooth is with an external dongle on Jeedom Atlas USB external slot (not using the integrated Atlas Bluetooth capability)

Could you execute

sudo pipx list
jeedom@JeedomAtlas:~$ sudo pipx list
[sudo] Mot de passe de jeedom :
venvs are in /root/.local/share/pipx/venvs
apps are exposed on your $PATH at /root/.local/bin
manual pages are exposed at /root/.local/share/man
   package theengsgateway 1.4.0, installed using Python 3.9.2
    - TheengsGateway

ok then that’s the command to get versions number:

sudo /root/.local/share/pipx/venvs/theengsgateway/bin/python -m pip freeze

meanwhile i reproduce the situation (gateway 1.4 with decoder 1.7) to check what are the best options i could implement in the plugin

but not sure it worth over-designing something as this kind of situation sounds exceptional to me but maybe i’m wrong;
to unblock you immediatly you can already uninstall (the red button) and install it again immediately (do not create a new equipment), that will install last version of the gateway and all dependencies, decoder included.

@DigiH could you estimate if it happens often than the decoder is updated but not the gateway or if most of the time you create a new version of the gateway if need be?
depending the answer I would manage both packages more independently while today the decode is “just” a dependency of the gateway (like few others)

Well, honestly, normally not that often, but especially now with several Jeedom users switching from the BLEA Plug-in to the TGW Plug-in, and still some devices missing in Theengs gateway which were present in BLEA, like the NodOn NIU buttons, it would be good for an easy way for jeedom users to be able to update Theengs Decoder separately.

Like with @Domsrx06, we do not even know yet if the new decoder does work fine with his NIU buttons yet in real circumstances - they should, but a proper confirmation would be best.
Plus the fact that he could then use the new decoder as well before a new Theengs Gateway version is being released.

I just assume the same happening with other devices from BLEA when we try to integrate them into TGW when Jeedom users request it.

I suppose a complete de-installation of TGW and then reinstalling it anew - which would then get the new Theengs Decoder version as its dependency, like now any fresh installation of TGW does - will have the same effect, but might be even more complex or possibly causing other issues?!?

Désinstaller l’antenne
Installer l’antenne
(Re)Démarrer le service



[2024-02-23 17:37:35] *************************************
[2024-02-23 17:37:35] *   Launch install of dependencies  *
[2024-02-23 17:37:35] *************************************
[2024-02-23 17:37:36] Reading package lists...
[2024-02-23 17:37:37] Building dependency tree...
[2024-02-23 17:37:37] Reading state information...
[2024-02-23 17:37:38] curl is already the newest version (7.74.0-1.3+deb11u11).
[2024-02-23 17:37:38] 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100     2  100     2    0     0     28      0 --:--:-- --:--:-- --:--:--    28
[2024-02-23 17:37:39] Get:1 bullseye-security InRelease [48.4 kB]
[2024-02-23 17:37:39] Hit:2 bullseye InRelease
[2024-02-23 17:37:39] Get:3 bullseye-updates InRelease [44.1 kB]
[2024-02-23 17:37:39] Get:4 bullseye-backports InRelease [49.0 kB]
[2024-02-23 17:37:39] Hit:5 nodistro InRelease
[2024-02-23 17:37:40] Hit:6 buster InRelease
[2024-02-23 17:37:40] Hit:7 bullseye InRelease
[2024-02-23 17:37:41] Fetched 141 kB in 3s (53.5 kB/s)
[2024-02-23 17:37:45] Reading package lists...
[2024-02-23 17:37:45] ***************************************
[2024-02-23 17:37:45] *  Install dependencies, venv & pipx  *
[2024-02-23 17:37:45] ***************************************
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100     2  100     2    0     0     62      0 --:--:-- --:--:-- --:--:--    64
[2024-02-23 17:37:45] Reading package lists...
[2024-02-23 17:37:46] Building dependency tree...
[2024-02-23 17:37:46] Reading state information...
[2024-02-23 17:37:47] logrotate is already the newest version (3.18.0-2+deb11u2).
[2024-02-23 17:37:47] python3-pip is already the newest version (20.3.4-4+deb11u1).
[2024-02-23 17:37:47] python3 is already the newest version (3.9.2-3).
[2024-02-23 17:37:47] python3-venv is already the newest version (3.9.2-3).
[2024-02-23 17:37:47] 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 1037 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 bullseye/main arm64 bluez arm64 5.55-3.1+deb11u1 [1037 kB]
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin: 
Fetched 1037 kB in 0s (8060 kB/s)
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 67991 files and directories currently installed.)
Preparing to unpack .../bluez_5.55-3.1+deb11u1_arm64.deb ...
Unpacking bluez (5.55-3.1+deb11u1) over (5.55-3.1+deb11u1) ...
Setting up bluez (5.55-3.1+deb11u1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for dbus (1.12.28-0+deb11u1) ...
[2024-02-23 17:38:11] Version debian:11
[2024-02-23 17:38:11] Install pipx via pip
[2024-02-23 17:38:13] Requirement already satisfied: pipx in /usr/local/lib/python3.9/dist-packages (1.4.3)
[2024-02-23 17:38:13] Requirement already satisfied: argcomplete>=1.9.4 in /usr/local/lib/python3.9/dist-packages (from pipx) (3.2.2)
[2024-02-23 17:38:13] Requirement already satisfied: packaging>=20 in /usr/local/lib/python3.9/dist-packages (from pipx) (23.2)
[2024-02-23 17:38:13] Requirement already satisfied: platformdirs>=2.1 in /usr/local/lib/python3.9/dist-packages (from pipx) (4.2.0)
[2024-02-23 17:38:13] Requirement already satisfied: tomli in /usr/local/lib/python3.9/dist-packages (from pipx) (2.0.1)
[2024-02-23 17:38:13] Requirement already satisfied: userpath!=1.9.0,>=1.6 in /usr/local/lib/python3.9/dist-packages (from pipx) (1.9.1)
[2024-02-23 17:38:13] Requirement already satisfied: click in /usr/local/lib/python3.9/dist-packages (from userpath!=1.9.0,>=1.6->pipx) (8.1.7)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead:
[2024-02-23 17:38:16] /root/.local/bin has been been added to PATH, but you need to open a new
[2024-02-23 17:38:16] terminal or re-login for this PATH change to take effect.
[2024-02-23 17:38:16] 
[2024-02-23 17:38:16] You will need to open a new terminal or re-login for the PATH changes to take
[2024-02-23 17:38:16] effect.
[2024-02-23 17:38:16] 
[2024-02-23 17:38:16] Otherwise pipx is ready to go! ✨ 🌟 ✨
[2024-02-23 17:38:16] ****************************
[2024-02-23 17:38:16] *  Install TheengsGateway  *
[2024-02-23 17:38:16] ****************************
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100     2  100     2    0     0     55      0 --:--:-- --:--:-- --:--:--    57
creating virtual environment...
installing theengsgateway...
⚠️  Note: '/root/.local/bin' is not on your PATH environment variable. These
    apps will not be globally accessible until your PATH is updated. Run `pipx
    ensurepath` to automatically add it, or manually modify your PATH in your
    shell's config file (i.e. ~/.bashrc).
done! ✨ 🌟 ✨
[2024-02-23 17:39:12] installed package theengsgateway 1.4.0, installed using Python 3.9.2
[2024-02-23 17:39:12] These apps are now globally available
[2024-02-23 17:39:12] - TheengsGateway
[2024-02-23 17:39:12] ***************************
[2024-02-23 17:39:12] *      Install ended      *
[2024-02-23 17:39:12] ***************************
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100     2  100     2    0     0      2      0  0:00:01 --:--:--  0:00:01     2
100     2  100     2    0     0      2      0  0:00:01 --:--:--  0:00:01     2

Restart Jeedom, same : FAIL

I could remove Theengs Antenna and Theengs Gateway (tgw) plugin and restart from crash : this is acceptable on a test environment : NOT in PROD

@Mips Please develop a depedencies “Relance” at Antenna level

exactly and that won’t cause any issue;
and it is easy: 2 buttons to click in the plugin.

the only drawback is that on small machine like pi0 it takes +/-1h to install

so the 2 options i’ve:

  • do nothing, tell people to uninstall/install (2 clicks) but wait 1h if on pi0
  • review the way I install the venv, to manage decoder & gateway separately; nothing really complicated, i see exactly what to do, i just need time.

thanks for your feedback

what does it means? be more specific please
and please provide detailed versions number (before and after the operation) with the command i gave above.

:joy: this is totally an acceptable solution as this has zero functional impact, only time needed depending the harware
but i think you completely misread my request, I never ask to uninstall the plugin:


at your service my lord… :wink:
and useless to capture that part as it won’t be the place to be
we are not talking about the plugin but about one instance of theengs gateway, what i call an “antenna”; an “equipment” within jeedom

Thanks for your responses and looking into this. For me the main thing was to properly understand how TGW is installed and functioning with Jeedom. To then know how to be able to implement new devices into Decoder for any Jeedom user requests and how they might be able to verify them.

Time is fine if you’re looking into any way to make a separate management possible :slight_smile: Thanks a lot.

Start from crash
Re install plugin and antenna

Jeedom MQTT broker topic is formatted

{"name": "NIU", "id": "ED:DE:05:8B:AE:2A", "rssi": -59, "servicedatauuid": "0000", "servicedata": "02599c37d90287a52152000651f5fd04", "brand": "NodOn", "model": "NIU smart button", "model_id": "NODONNIU", "type": "BTN", "acts": true, "cont": true, "track": true, "button": 10, "color": "Lagoon", "batt": 81}

Jeedom Equipement is created

{"device_tracker":{"F12D38EEA729-tracker":{"stat_t":"+/+/BTtoMQTT/F12D38EEA729","name":"NODONNIU-tracker","uniq_id":"F12D38EEA729-tracker","val_tpl":"{% if value_json.get('rssi') -%}home{%- else -%}not_home{%- endif %}","source_type":"bluetooth_le","device":{"ids":["F12D38EEA729"],"cns":[["mac","F12D38EEA729"]],"mf":"NodOn","mdl":"NODONNIU","name":"NIU smart button-EEA729","via_device":"Antenne Bluetooth"}}},"sensor":{"F12D38EEA729-button":{"stat_t":"+/+/BTtoMQTT/F12D38EEA729","name":"NODONNIU-button","uniq_id":"F12D38EEA729-button","val_tpl":" value_json.button | is_defined ","device":{"ids":["F12D38EEA729"],"cns":[["mac","F12D38EEA729"]],"mf":"NodOn","mdl":"NODONNIU","name":"NIU smart button-EEA729","via_device":"Antenne Bluetooth"}},"F12D38EEA729-color":{"stat_t":"+/+/BTtoMQTT/F12D38EEA729","name":"NODONNIU-color","uniq_id":"F12D38EEA729-color","val_tpl":" value_json.color | is_defined ","device":{"ids":["F12D38EEA729"],"cns":[["mac","F12D38EEA729"]],"mf":"NodOn","mdl":"NODONNIU","name":"NIU smart button-EEA729","via_device":"Antenne Bluetooth"}},"F12D38EEA729-batt":{"stat_t":"+/+/BTtoMQTT/F12D38EEA729","dev_cla":"battery","unit_of_meas":"%","state_class":"measurement","name":"NODONNIU-batt","uniq_id":"F12D38EEA729-batt","val_tpl":" value_json.batt | is_defined ","device":{"ids":["F12D38EEA729"],"cns":[["mac","F12D38EEA729"]],"mf":"NodOn","mdl":"NODONNIU","name":"NIU smart button-EEA729","via_device":"Antenne Bluetooth"}}}}

We progress
but Jeedom is not refreshed while MQTT is updated…
MQTT Button value 3 while it stay 1 in Jeedom


wrong NodOn button (i have several of them)
Displaying the lagoon one : jeedom is updated

I think we are good
Thank folks !

@Mips - it didn’t take that long for @Domsrx06, and even if the maximum could be 1h to install maybe that could be enough, as this situation should not happen too often, but will be helpful for any new device testing for Jeedom users, now that we know how to properly uninstall and re-install TGW.

If you do eventually think it is better to implement a separate installation for Theengs Decoder, great, but do take your time, as we see that this option also does work if and when required.


1 Like

except to loose all your existing equipements meaning 10 for me

PS i have the possibility to have only one picture/color as a Jeedom internal image
as these equipements share the same model

May be the “model_id”: “NODONNIU”, should include the color.
sorry to be nitpick…

I did it and it didn’t work : “Statut du service : Inconnu”

Maybe not :wink: the model_id is unique to a device type decoder and should not change in any way becuase of colour or other device properties, unless a different device model does really need a separate decoder due to its advertising data.

The fact that the equipment entries do have individual names, with the devices’ ending part of their MAC addresses, is it not possible in Jeedom to manually assign separate images to the different entries?
I assume the same would apply to the Nut trackers, which also come in different colours, and the Mi Bands with their straps :wink:

a new challege for @Mips
(he is going to hate me)

Absolutely not. No jeedom equipment will be deleted nor replaced with the 2 clicks i mentionned earlier.
And we talk about theengs gateway installation here, not the discovered devices

That’s not truer neither, please check documentation :wink:

You are free to adapt it in mqttdiscovery.
It is possible to have different image for each jeeodom equipment

But these 3 points arr off topic.