101 Commits

Author SHA1 Message Date
Christian W. Zuckschwerdt
fd5f714223 Change all uv fields to uvi, BREAKING change to UV sensors (#3131) 2025-07-30 11:18:17 +02:00
Brandon Clifford
8bfb77b5c3 Fix unit_of_measurement for windspeed to mph in rtl_433_mqtt_hass.py (#3337) 2025-07-28 10:01:20 +02:00
Greg Troxel
802895dd95 examples: Remove Python 2.7 support (#3320)
Fixes #3019
2025-07-07 20:52:49 +02:00
Christian W. Zuckschwerdt
cec57bc0cd examples: Fix HA script class for energy_kWh (closes #3255) 2025-04-15 12:51:53 +02:00
Myles Eftos
e215c2dcae examples: Add client cert option to HA script (#3160) 2025-01-25 11:30:05 +01:00
Dan Ohnesorg
cd9c40c31c examples: Improve HA script to round battery level display (#3100) 2024-11-25 11:31:16 +01:00
Mark Atwood
7ceeccb5ab Change rtl_433_mqtt_hass.py to add supercap_V key 2024-08-12 10:58:52 +02:00
Greg Troxel
aed3b6ff20 examples: Add dup filtering to mqtt_relay (#3018)
Keep information about the previous value sent.  If it's been 5
seconds, or new value is different (ignoring keys like snr and
frequency), then send it.  Otherwise, just don't.  This causes bursts
of e.g. 4 transmissions to result in one MQTT message, on the theory
that the 4 transmissions are not actually 4 messags, but a strategy to
transmit one message more reliably.

Define a new configuration option to enable duplicate filtering, and
default it to True.

Steal logging config from mqtt_filter.py, and add a configuration
option DEBUG that if True results in debug logging instead of info.
2024-08-09 19:03:35 -04:00
Christian W. Zuckschwerdt
5b893f3e10 Add open in browser script (#2158) 2024-08-01 19:59:11 +02:00
Greg Troxel
d3975a47c6 examples: Add ability for mqtt_relay to use a config file (#3013)
This commit adds the ability to read config values from
rtl_433_mqtt_relay.yaml (overriding defaults).  This read is skipped
if the yaml module can't be loaded or the config file can't be read,
so those without PyYAML or a config file see no change.

Those with a config file can set parameters for address/port to listen
for json-in-sylog, MQTT credentials, whether to post individual
values, a json dictionary, or both.

While rudimentary, this is a huge functional improvement, allowing
those using TLS and broker passwords (as arguably all should be) to
use the script without modifying it.
2024-07-30 19:26:58 -04:00
Christian W. Zuckschwerdt
1ab32ec511 Add MQTT dedup republish filter example (closes #2990) 2024-07-30 21:22:29 +02:00
Greg Troxel
ea7e7329b1 examples: Change mqtt_relay to always use id in topic (#3014) (#3014)
Previously, this example program appended /channel if present, and if
not present and id was present, appended /id.  Typically channel is
from an A/B/C switch on the device or fixed for kind of device, and id
is from a 16 bit or larger space, sometimes static, and sometimes
random on powerup.  Using only channel is bad if 1) one has more than
one device, or more than 3 if A/B/C or 2) one's neighbor gets such a
device.  Because it is essentially impossible to rule out point 2, id
should always be used.
2024-07-29 13:04:53 -04:00
Greg Troxel
367378fabe examples: Improve mqtt_relay to make individual and json topics optional (#2975)
Add variables to control publishing individual topics and the json
topic.  Default both to on, so that there is no behavior change.

This eases use now, as one's local diff is cleaner.  It is also on the
path to reading these variables from a config file.
2024-06-23 07:25:23 -04:00
Bruno OCTAU
c187c303fd Add support for ThermoPro TP829b and Improve rtl_433_mqtt_hass.py (#2964)
* Add support for ThermoPro TP829b and Improve rtl_433_mqtt_hass.py

* Improve DATA_COND with int values instead of float

* Fix Sensor ID, Add Display Unit and Flags and reduce preamble
2024-06-23 13:09:27 +02:00
Greg Troxel
a88bc3b9d4 examples: Remove obsolete sigrok example scripts (#2979)
Per a comment in #2976 these are no longer necessary.
2024-06-21 21:51:15 +02:00
Greg Troxel
432edcdd82 examples: Improve README by describing scripts (#2976)
Expand description of the directory, making it clearer that some
programs have production use.

Declare that python scripts are python3.  It's clear that nobody is
trying to use them with python 2.7, and if they did, we would tell
them not to.

List the scripts with a one-line description, sorting them into
production (none yet), generally usable, and true examples.  Leave
some uncategorized.
2024-06-21 15:35:01 -04:00
Christian W. Zuckschwerdt
7f60fff419 Fix rain_rate_in_h template in HA script (#2782) 2024-05-31 11:02:16 +02:00
Ben Winslow
8be3ef1507 Add HA script compat for paho-mqtt 2.0.0 via legacy callback API (#2916) 2024-05-02 20:24:58 +02:00
Christian W. Zuckschwerdt
376ca519ff Change HA script power to energy and UV index to float (#2913)
Closes #2909
2024-04-26 14:51:44 +02:00
Tucker Kern
9064ccd097 Change a HA script device trigger to avoid duplicate trigger (#2829)
In HA2024.2, device triggers are now identified as `f"{device_id}_{trigger_type}_{trigger_subtype}"`, so each trigger must have a unique type/subtype combination per device.
2024-04-09 12:04:52 +02:00
David M. Zendzian
693cf766b7 Added contact_open reed_open mappings to rtl_433_mqtt_hass.py (#2881) 2024-03-26 11:53:57 +01:00
Christian W. Zuckschwerdt
68d7b81dfe minor: Fix unexpected chars in scripts/docs 2024-02-10 14:18:19 +01:00
Christian W. Zuckschwerdt
2122cc2670 Add HTTP cmd API examples 2024-02-01 09:37:03 +01:00
Ian Evans
fe439627fe Fix rtl_433_mqtt_hass.py rain_in value template (#2801) 2024-01-22 22:40:42 +01:00
MDW
7813a6afa5 minor: Fix end of line and end of file whitespaces (#2778) 2024-01-04 11:53:24 +01:00
Chris Romp
e1699163e9 Add Ecowitt air quality sensors to rtl_433_mqtt_hass.py (#2772) 2024-01-02 17:30:31 +01:00
mailaenderli
8950dc4182 Change rtl_433_mqtt_hass.py to support storm_dist_km from WH31L (#2748) 2023-12-05 20:40:53 +01:00
MDW
62783813eb minor: Fix trailing whitespace as seen in #2738 (#2739) 2023-11-29 20:57:32 +01:00
Mark Atwood
ca2d9b7bf6 Change rtl_433_mqtt_hass.py to use moisture class (#2726)
Moisture should be "moisture" class, not "humidity" class.
2023-11-28 11:49:36 +01:00
Mark Atwood
6487f1cc06 Change rtl_433_mqtt_hass.py to add battery_mV (#2725)
In addition to battery_ok, many devices also surface the measured battery voltage.
2023-11-28 11:49:30 +01:00
benklop
8535ba24f6 Fix logging message in HA script (#2696) 2023-10-27 12:26:51 +02:00
Christian W. Zuckschwerdt
a46004984a minor: typos in php example 2023-10-24 11:20:42 +02:00
Christian W. Zuckschwerdt
abb0bc7bae Add php example stream script (closes #2687)
Co-authored-by: AutomGuy <AutomGuy@users.noreply.github.com>
2023-10-24 10:21:48 +02:00
kcpants
945bc658cb Add support for discovering Govee water sensors to rtl_433_mqtt_hass (#2605) 2023-10-15 08:03:13 -04:00
aquaticus
36f6418436 minor: Remove deprecated newmodel from HA script docs (#2628) 2023-09-19 21:31:40 +02:00
chpego
a6fb96c7bb Improve HA script with current class (#2626) 2023-09-19 12:19:16 +02:00
chpego
582af76957 Improve handling of units within HA UI (#2624)
Fix the unit of measurement of illuminance
2023-09-18 14:06:35 +02:00
Luke Milius
70d84d01e1 Improve HA script with detailed units (#2607) 2023-08-21 12:41:19 +02:00
Adam Jacques
4f152360b1 Fix HA script allow list id typo (#2602) 2023-08-16 09:20:03 +02:00
Kevin Read
9e0fb41e4c Fix HA script remove device name from entities (#2594)
* Fixes #2591: Remove device name from entity name, use more readable entity names
* Remove changes that slipped in from  https://github.com/merbanan/rtl_433/pull/2593
2023-08-11 14:33:32 +02:00
Kevin Read
ce794d7848 Fix HA script topics (#2593) 2023-08-11 13:50:52 +02:00
dforsi
21be644d2e Fix various spelling (#2579)
Fixed with:
codespell --ignore-words-list=als,ans,ba,bu,fo,hass,hist,hsa,nd,produkt,proove,te,temperatur,toke,tthe,ue --skip=AUTHORS,CHANGELOG.md,mongoose.* --summary --interactive 2 --write-changes
and manual edits.
2023-07-28 10:16:47 +02:00
noahwilliamsson
d20beca213 Add humidity_1, humidity_2 to rtl_433_mqtt_hass (#2567)
This adds support for publishing `humidity_1` and `humidity_2`, similar to how `temperature{,_1,_2}` are handled.  Useful for Acurite 00275RM and Telldus FT0385R.
2023-07-15 00:06:49 +02:00
noahwilliamsson
2cb87ce708 Add timestamp to logs in rtl_433_mqtt_hass (#2566)
Prefix log entries with a timestamp to make it easier to determine when an event happened.
2023-07-15 00:05:29 +02:00
DigiH
37b804c734 Fix HASS script rain_rate_mm_h typo (#2565) 2023-07-14 18:15:31 +02:00
Tucker Kern
cb8e89533a docs: Fix bad URL in rtl_433_mqtt_hass.py (#2553)
Fix duplicate "http://" in URL
2023-07-06 11:26:11 +02:00
Kevin Read
128755c688 Change rtl_433_mqtt_hass to enable passing custom topics (PR #2289) 2023-03-30 11:19:10 +02:00
stevieg2123
e37fc5dd38 Add ESIC/SCMplus fields to rtl_433_mqtt_hass (#2114)
Adding power meter energy/current/voltage values, as well as consumption from SCMplus meters (water/gas)
2023-01-21 20:43:55 +01:00
Andrew Berry
7ed902ece4 Add links to mqtt device automation docs 2022-10-26 08:53:04 -04:00
Andrew Berry
7323220bc7 Publish secret knocks as device automations 2022-10-26 08:53:04 -04:00