├── .flake8
├── .gitattributes
├── .gitignore
├── .vscode
    └── settings.json
├── CHANGELOG.md
├── LICENSE
├── README.md
├── dbus-mqtt-temperature
    ├── config.sample.ini
    ├── dbus-mqtt-temperature.py
    ├── ext
    │   ├── paho
    │   │   ├── __init__.py
    │   │   └── mqtt
    │   │   │   ├── __init__.py
    │   │   │   ├── client.py
    │   │   │   ├── enums.py
    │   │   │   ├── matcher.py
    │   │   │   ├── packettypes.py
    │   │   │   ├── properties.py
    │   │   │   ├── publish.py
    │   │   │   ├── py.typed
    │   │   │   ├── reasoncodes.py
    │   │   │   ├── subscribe.py
    │   │   │   └── subscribeoptions.py
    │   └── velib_python
    │   │   ├── LICENSE
    │   │   ├── README.md
    │   │   ├── ve_utils.py
    │   │   └── vedbus.py
    ├── install.sh
    ├── restart.sh
    ├── service
    │   ├── log
    │   │   └── run
    │   └── run
    └── uninstall.sh
├── download.sh
├── pyproject.toml
└── screenshots
    ├── temperature_device-list.png
    ├── temperature_device-list_mqtt-temperature-1.png
    ├── temperature_device-list_mqtt-temperature-2.png
    └── temperature_pages_guimods.png
/.flake8:
--------------------------------------------------------------------------------
 1 | [flake8]
 2 | max-line-length = 216
 3 | exclude =
 4 |     ./dbus-mqtt-temperature/ext
 5 | extend-ignore:
 6 |     # E203 whitespace before ':' conflicts with black code formatting. Will be ignored in flake8
 7 |     E203
 8 |     # E402 module level import not at top of file
 9 |     E402
10 | 
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
 1 | # Set default behaviour, in case users don't have core.autocrlf set.
 2 | text eol=lf
 3 | 
 4 | # Explicitly declare text files you want to always be normalized and converted
 5 | # to native line endings on checkout.
 6 | *.ini   text
 7 | *.md    text
 8 | *.py    text
 9 | *.sh    text
10 | run     text
11 | 
12 | # Denote all files that are truly binary and should not be modified.
13 | *.gif   binary
14 | *.jpg   binary
15 | *.png   binary
16 | *.zip   binary
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /*/config.ini
2 | /data
3 | /logs
4 | 
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 |     "python.analysis.extraPaths": [
3 |         "./dbus-mqtt-temperature/ext/velib_python"
4 |     ],
5 |     "[python]": { "editor.formatOnSave": true }
6 | }
7 | 
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
 1 | # Changelog
 2 | 
 3 | ## 0.0.8-dev
 4 | * Changed: Fix restart issue
 5 | 
 6 | ## 0.0.7
 7 | ⚠️ This version is required for Venus OS v3.60~27 or later, but it is also compatible with older versions.
 8 | * Added: paho-mqtt module to driver
 9 | 
10 | ## v0.0.6
11 | * Changed: Allow to use customized JSON property names by @hoone123
12 | 
13 | ## v0.0.5
14 | * Added: MQTT message can now also be only a float number
15 | * Added: New temperature types room, outdoor, waterheater and freezer
16 | * Changed: Broker port missing on reconnect
17 | * Changed: Fixed service not starting sometimes
18 | 
19 | ## v0.0.4
20 | * Changed: Add VRM ID to MQTT client name
21 | * Changed: Fix registration to dbus https://github.com/victronenergy/velib_python/commit/494f9aef38f46d6cfcddd8b1242336a0a3a79563
22 | 
23 | ## v0.0.3
24 | * Changed: Fixed problems when timeout was set to `0`.
25 | 
26 | ## v0.0.2
27 | * Added: Timeout on driver startup. Prevents problems, if the MQTT broker is not reachable on driver startup
28 | 
29 | ## v0.0.1
30 | Initial release
31 | 
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
 1 | MIT License
 2 | 
 3 | Copyright (c) 2022 Manuel
 4 | 
 5 | Permission is hereby granted, free of charge, to any person obtaining a copy
 6 | of this software and associated documentation files (the "Software"), to deal
 7 | in the Software without restriction, including without limitation the rights
 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 | 
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 | 
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 | 
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
  1 | # dbus-mqtt-temperature - Emulates a temperature sensor from MQTT data
  2 | 
  3 | GitHub repository: [mr-manuel/venus-os_dbus-mqtt-temperature](https://github.com/mr-manuel/venus-os_dbus-mqtt-temperature)
  4 | 
  5 | ## Index
  6 | 
  7 | 1. [Disclaimer](#disclaimer)
  8 | 1. [Supporting/Sponsoring this project](#supportingsponsoring-this-project)
  9 | 1. [Purpose](#purpose)
 10 | 1. [Config](#config)
 11 | 1. [JSON structure](#json-structure)
 12 | 1. [Install / Update](#install--update)
 13 | 1. [Uninstall](#uninstall)
 14 | 1. [Restart](#restart)
 15 | 1. [Debugging](#debugging)
 16 | 1. [Compatibility](#compatibility)
 17 | 1. [Screenshots](#screenshots)
 18 | 
 19 | 
 20 | ## Disclaimer
 21 | 
 22 | I wrote this script for myself. I'm not responsible, if you damage something using my script.
 23 | 
 24 | 
 25 | ## Supporting/Sponsoring this project
 26 | 
 27 | You like the project and you want to support me?
 28 | 
 29 | [ ](https://www.paypal.com/donate/?hosted_button_id=3NEVZBDM5KABW)
 30 | 
 31 | 
 32 | ## Purpose
 33 | 
 34 | The script emulates a temperature sensor in Venus OS. It gets the MQTT data from a subscribed topic and publishes the information on the dbus as the service `com.victronenergy.temperature.mqtt_temperature` with the VRM instance `100`.
 35 | 
 36 | 
 37 | ## Config
 38 | 
 39 | Copy or rename the `config.sample.ini` to `config.ini` in the `dbus-mqtt-temperature` folder and change it as you need it.
 40 | 
 41 | 
 42 | ## JSON structure
 43 | 
 44 |
](https://www.paypal.com/donate/?hosted_button_id=3NEVZBDM5KABW)
 30 | 
 31 | 
 32 | ## Purpose
 33 | 
 34 | The script emulates a temperature sensor in Venus OS. It gets the MQTT data from a subscribed topic and publishes the information on the dbus as the service `com.victronenergy.temperature.mqtt_temperature` with the VRM instance `100`.
 35 | 
 36 | 
 37 | ## Config
 38 | 
 39 | Copy or rename the `config.sample.ini` to `config.ini` in the `dbus-mqtt-temperature` folder and change it as you need it.
 40 | 
 41 | 
 42 | ## JSON structure
 43 | 
 44 | Minimum required
 45 | 
 46 | ```json
 47 | {
 48 |     "temperature": 22.0
 49 | }
 50 | ```
 51 | 
 52 | OR
 53 | 
 54 | ```json
 55 | 22.0
 56 | ```
 57 | 
 58 | 
 59 | Full
 62 | 
 63 | ```json
 64 | {
 65 |     "temperature": 22.0,
 66 |     "humidity": 62.927,
 67 |     "pressure": 102.104
 68 | }
 69 | ```
 70 | MQTT Temperature
180 | 
181 | 
182 | 
183 | 
184 | 
185 | ## GuiMods
186 | 
187 | 
188 | 
189 |