New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wireless tags platform #13495

Merged
merged 10 commits into from Jun 7, 2018

Conversation

@sergeymaysak
Contributor

sergeymaysak commented Mar 27, 2018

Description:

This PR introduces support of Wireless Sensor Tag sensors in HASS.
Each tag depending on its type provides a set of metrics including temperature, humidity, light, moisture and motion.

Each metric type supplements with switch which allows to arm/disarm monitoring of specific sensor type changes. In general, all metrics are updated automatically, but motion needs explicit arming procedure using switch.

Each metric type provides extensive set of events represented by this implementation as binary sensor states. It includes heat or cold temperature conditions, too wet and too dry humidity conditions, motion detection and door open/close states, light presence as well as water leak presence. Supplementary each tag provides low battery and in range/out of range states.

All binary sensor states are received by defining local push notification from tag manager controlling all tags in question. Additionally, there is installed local push notification for each tag for update each metric value event - so temperature or light or humidity values are updated immediately using local traffic. In addition to this, as supplementary measure, cloud polling is used to receive initial states of each tag as well as to have ability to get data on demand any time needed. Regardless of frequency of polling attempts, the actual requests to cloud server are performed not earlier as update interval set by end user at tag manager settings in wirelesstags account.

The implementation is tested on 3 different types of actual wirelesstag hardware including:

  • 13-bit tag - (temperature/humidity/motion) sensor tag type
  • water/moisture tag - leak, water/soil moisture level sensor type (includes temperature as well)
  • ALS Pro 8-bit memory tag - ambient light sensor type with internal memory for storing data while out of range - includes motion, light, temperature and humidity metrics sensors.
    Current implementation is based on wirelesstagpy (written by me) which uses sync/blocking http networking (based on requests library).

So far it looks like current implementation depends on presence of binary sensors config, otherwise local push is not installed. I'm not sure how to resolve it as I don't know (at the moment) how to determine if specific part of platform (sensors or binary_sensors) were initialized being at main entry to platform setup.

Thank you )

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5035

Example entry for configuration.yaml (if applicable):

wirelesstag:
  username: you@example.com
  password: secret

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@sergeymaysak sergeymaysak requested a review from andrey-git as a code owner Mar 27, 2018

@homeassistant

This comment has been minimized.

homeassistant commented Mar 27, 2018

Hi @sergeymaysak,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@tube0013

This comment has been minimized.

tube0013 commented Apr 2, 2018

I'd like to test this out. How do you define local push notifications from the tag manager?

@sergeymaysak

This comment has been minimized.

Contributor

sergeymaysak commented Apr 2, 2018

@tube0013 - I've used tag's manager API which allows to install custom URL call for specific events in tag. So I defined local push notifications as POST request to hass instance with defined by me payload as json with parameters filled by tag manager. I specified 'nat' parameter as true for tag manager that made them local (so I can use local ip address of hass). To receive these notifications, I defined two custom events (and corresponding event handlers) in hass (see homeassistant/components/wirelesstag.py lines 197, 198).
example of URLs I use look as following:

where: http://192.168.1.50:8123 is ip:port of hass.

Please note - to make it working you need to whitelist the IP of your tag manager in HASS http configuration. Also you need to add at least one binary sensor in config.

Does it help? ;)

@tube0013

This comment has been minimized.

tube0013 commented Apr 4, 2018

@sergeymaysak thank you, this makes perfect sense. I was not able to get the component to load in my hassio install. I'll keep trying as time allows, I don't think this PR is the place for this continues discussion though. - if you have another place that works better let me know-

I have all sensor/binary_sensor/switch wirelesstag.py files in the corresponding directories under custom_components, and I have the componet wirelesstag.py in the root of custom_components.

2018-04-03 15:55:37 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.binary_sensor.wirelesstag. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/loader.py", line 142, in get_component
    module = importlib.import_module(path)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/binary_sensor/wirelesstag.py", line 13, in <module>
    from homeassistant.components.wirelesstag import (
ModuleNotFoundError: No module named 'homeassistant.components.wirelesstag'
2018-04-03 15:55:37 ERROR (MainThread) [homeassistant.loader] Unable to find component binary_sensor.wirelesstag
2018-04-03 15:55:38 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.switch.wirelesstag. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/loader.py", line 142, in get_component
    module = importlib.import_module(path)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/switch/wirelesstag.py", line 12, in <module>
    from homeassistant.components.wirelesstag import (
ModuleNotFoundError: No module named 'homeassistant.components.wirelesstag'
2018-04-03 15:55:38 ERROR (MainThread) [homeassistant.loader] Unable to find component switch.wirelesstag
2018-04-03 15:55:39 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.sensor.wirelesstag. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/loader.py", line 142, in get_component
    module = importlib.import_module(path)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/sensor/wirelesstag.py", line 14, in <module>
    from homeassistant.components.wirelesstag import (
ModuleNotFoundError: No module named 'homeassistant.components.wirelesstag'
2018-04-03 15:55:39 ERROR (MainThread) [homeassistant.loader] Unable to find component sensor.wirelesstag
@sergeymaysak

This comment has been minimized.

Contributor

sergeymaysak commented Apr 4, 2018

@tube0013 actually, the intent of this PR is to avoid need of custom_component setup :) (from hass 0.67 i hope), but meanwhile to allow your custom setup you need to adjust import directives in all sub-components (binary_sensor, sensor and switch). I've tried it myself and can confirm it works:

  • you need to change in custom_components/binary_sensor, custom_components/sensor, custom_components/switch the line from homeassistant.components.wirelesstag import to
    from custom_components.wirelesstag import to allow custom component to be loaded.

enjoy and any comments/concerns are welcome ;)

@tube0013

This comment has been minimized.

tube0013 commented Apr 4, 2018

@sergeymaysak okay thank you, that got it running. I do get this error on my frontend:
Error: failed to install local push notifications

the tag manager didn't let me use https for my call back url. so I'm am I right to assume this won't work locally if my HA instance is using https?

@sergeymaysak

This comment has been minimized.

Contributor

sergeymaysak commented Apr 4, 2018

@tube0013 superb observation! need to check it. My hass is in http (I use homebridge to access remotely to it's parts ;) ). What would make it 's'? presence of tls certificate in http component? any info on your config could help )

@sergeymaysak

This comment has been minimized.

Contributor

sergeymaysak commented Apr 4, 2018

@tube0013 my tests with my Postmap setup shows that Wireless tag returns "Tag Manager only supports http://... URL" for attempt to install https:// based scheme url. So it sounds as, yes http only is allowed.

@tube0013

This comment has been minimized.

tube0013 commented Apr 5, 2018

@sergeymaysak yes once you add the certificates to the http component HASS is now over https. I reconfigured my set up to put caddy in front of hass and handling the ssl, so hass can be accessed over http from inside my lan now. - how can I be sure local updates from the tag manager are working?

Also wirelesstag is reporting temperature values in Celsius only, HA can do the conversion to F if set to imperial units. The rest api sends the temps in C as well, and HA displays them in F for me. Your code looks to be assuming they are coming in F.

screen shot 2018-04-04 at 11 40 55 pm

screen shot 2018-04-04 at 11 42 12 pm

so the temp is showing as 20.1 F but is really 20.1 C, and should read ~68.05 F

@tube0013

This comment has been minimized.

tube0013 commented Apr 5, 2018

@sergeymaysak one other observation now that I mostly got this running, HA doesn't seem to like it if there is white space in the Tag names it gets from wirelesstag. I was getting errors about invalid entity names. I replaced all the space with underscores in my tag names, and now I'm not seeing the errors. Here is an example of the error I was getting:

Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 245, in _async_add_entity 'Invalid entity id: {}'.format(entity.entity_id)) homeassistant.exceptions.HomeAssistantError: Invalid entity id: sensor.wirelesstag_Laundry Room_light

@sergeymaysak

This comment has been minimized.

Contributor

sergeymaysak commented Apr 5, 2018

@tube0013 Thanks for observations! I've updated my code to proper handling of unit_system: imperial. Additionally I've updated name of binary_event to be tag_binary_event to make sure it's name does not clash with any other platforms. So please take all 4 files again from this PR and re-iterate changes for import for your custom_components.
how can I be sure local updates from the tag manager are working - you can observe in console the message Push notification for update arrived:...
As for tags names - very strange as most of my tags are containing whitespaces - Kids room Water for example and I have dedicated code which replaces all whitespaces with underscore for sensors. So not sure how you get sensor.wirelesstag_Laundry Room_light as entity id (.
Really, I've played a bit in code and can reproduce Invalid entity id... message only if i remove my code which does whitespace to underscore replacement in name of sensors...

@tube0013

This comment has been minimized.

tube0013 commented Apr 12, 2018

@sergeymaysak thank you, I finally had some time to update the component files and re-test, and everything seems to be working well!

@sergeymaysak

This comment has been minimized.

Contributor

sergeymaysak commented Apr 13, 2018

@tube0013 I've identified critical defects in handing of binary events and fixed them. Please get update if you are interested in ). Additionally I've found and fixed defect which prevented integration of light sensor with Homebridge.

@sergeymaysak

This comment has been minimized.

Contributor

sergeymaysak commented Apr 28, 2018

@andrey-git @balloob @frenck Guys, is there any chance to be reviewed and merged? ;)

@balloob

This comment has been minimized.

Member

balloob commented Apr 28, 2018

Please do not tag people asking for reviews. There are a lot of open reviews. We'll get to it when we get to it.

@sergeymaysak

This comment has been minimized.

Contributor

sergeymaysak commented Apr 28, 2018

@balloob got you. sorry for being inpatient and hope if it does not look rude from my side. i really appreciate your amazing work here.

homeassistant/components/switch/wirelesstag.py Outdated
}
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_ENTITY_NAMESPACE, default=DEFAULT_ENTITY_NAMESPACE):

This comment has been minimized.

@balloob

balloob Apr 29, 2018

Member

This is already part of PLATFORM_SCHEMA.

This comment has been minimized.

@sergeymaysak

sergeymaysak Apr 29, 2018

Contributor

@balloob got it. removing...

homeassistant/components/switch/wirelesstag.py Outdated
return False
@property
def state(self):

This comment has been minimized.

@balloob

balloob Apr 29, 2018

Member

Do not override state, just implement is_on property

This comment has been minimized.

@sergeymaysak

sergeymaysak Apr 29, 2018

Contributor

got it. reworking...

config = self.make_push_notitication(name, binary_url, content)
configs.append(config)
content = ("{\"name\":\"{0}\",\"id\":{1},\"temp\":{2}," +

This comment has been minimized.

@balloob

balloob Apr 29, 2018

Member

This is all way too protocol specific. This needs to be in the lib.

This comment has been minimized.

@sergeymaysak

sergeymaysak Apr 29, 2018

Contributor

@balloob Well, content is very customizable (i.e can be any json), so putting specifically what I've defined as reasonable payload for hass into library, might not be appropriate for any other clients of library. So to the moment, I've not found better balance between hiding complexity and keeping it not dedicated or limited to specific client (i.e keep it general purpose) as what you've seen in my code. What is really protocol specific here is binding values as {0} or {1}, but I'm sure how to solve it - i.e how to hide them inside library but allow to customize content at the same time...

This comment has been minimized.

@balloob

balloob May 2, 2018

Member

I don't really follow. Aren't name, id and temp things that the wireless tag API understands?

This comment has been minimized.

@sergeymaysak

sergeymaysak May 2, 2018

Contributor

name, id and temp are defined by me specifically for hass. tag API does not care how I name keys for values and which keys-value pairs used. it specifies placeholders that i could use in my payload template. {0} is a placeholder for name of tag, {2} for current temperature in C etc. I can define any json payload i want using these placeholders - for example as array {values: [{0}, {2}]} or as I defined for hass as normal JS object.

This comment has been minimized.

@balloob

balloob May 5, 2018

Member

Okay, then this is fine.

homeassistant/components/wirelesstag.py Outdated
return False
# listen to custom event
hass.bus.listen('update_tags', hass.data[DOMAIN].handle_update_tags_event)

This comment has been minimized.

@balloob

balloob Apr 29, 2018

Member

Do not use events to communicate internally between component and platforms. Use the dispatcher instead (see helpers/dispatcher.py). Also, when using signals, make the name contain your component name.

This comment has been minimized.

@sergeymaysak

sergeymaysak May 1, 2018

Contributor

I do not use events to communicate internally between component and platforms. I use them to receive local push rest call.

This comment has been minimized.

@sergeymaysak

sergeymaysak May 1, 2018

Contributor

updating to contain component name...

This comment has been minimized.

@sergeymaysak

sergeymaysak May 2, 2018

Contributor

done.

This comment has been minimized.

@sergeymaysak

sergeymaysak May 11, 2018

Contributor

Signals are used now to communicate from platform to components.

homeassistant/components/wirelesstag.py Outdated
# listen to custom event
hass.bus.listen('update_tags', hass.data[DOMAIN].handle_update_tags_event)
hass.bus.listen('tag_binary_event', hass.data[DOMAIN].handle_binary_event)

This comment has been minimized.

@balloob

balloob Apr 29, 2018

Member

Same.

This comment has been minimized.

@sergeymaysak

sergeymaysak May 1, 2018

Contributor

updating to contain component name... (i listen to custom events to define rest call from wirelesstag hw to endpoint of event)

This comment has been minimized.

@sergeymaysak

sergeymaysak May 2, 2018

Contributor

done.

homeassistant/components/wirelesstag.py Outdated
return self._name
@property
def state(self):

This comment has been minimized.

@balloob

balloob Apr 29, 2018

Member

Do not override state. Only for sensor should you do this.

This comment has been minimized.

@sergeymaysak

sergeymaysak Apr 30, 2018

Contributor

got it. reworking...

This comment has been minimized.

@sergeymaysak

sergeymaysak May 2, 2018

Contributor

done.

homeassistant/components/wirelesstag.py Outdated
"""Return the state of the sensor."""
return self._state
def define_name(self, new_name):

This comment has been minimized.

@balloob

balloob Apr 29, 2018

Member

Let's drop this method … just assign it to name.

This comment has been minimized.

@sergeymaysak

sergeymaysak Apr 30, 2018

Contributor

ok. dropping...

This comment has been minimized.

@sergeymaysak

sergeymaysak May 2, 2018

Contributor

done.

homeassistant/components/wirelesstag.py Outdated
self._tag.signal_straight),
ATTR_TAG_BEEP_DURATION: self._tag.beep_option,
ATTR_TAG_OUT_OF_RANGE: not self._tag.is_in_range,
ATTR_TAG_HW_REVISION: self._tag.hw_revision,

This comment has been minimized.

@balloob

balloob Apr 29, 2018

Member

Do not store static info in device attributes.

This comment has been minimized.

@sergeymaysak

sergeymaysak May 1, 2018

Contributor

got you. the only static attributes there are ATTR_TAG_HW_REVISION, ATTR_TAG_FW_VERSION and ATTR_TAG_TYPE. Please note - ATTR_TAG_FW_VERSION can be potentially upgraded as well. Any other attributes are very dynamic.

This comment has been minimized.

@sergeymaysak

sergeymaysak May 2, 2018

Contributor

removed static attributes.

homeassistant/components/wirelesstag.py Outdated
ATTR_VOLTAGE: '{:.2f}V'.format(self._tag.battery_volts),
ATTR_TAG_TYPE: self._tag.tag_type,
ATTR_TAG_COMMENT: self._tag.comment,
ATTR_TAG_IS_ALIVE: self._tag.is_alive,

This comment has been minimized.

@balloob

balloob Apr 29, 2018

Member

If not alive, you should have the available property return false.

This comment has been minimized.

@sergeymaysak

sergeymaysak Apr 30, 2018

Contributor

thanks! defining available...

This comment has been minimized.

@sergeymaysak

sergeymaysak May 2, 2018

Contributor

done.

@property
def device_state_attributes(self):
"""Return the state attributes."""
return {

This comment has been minimized.

@balloob

balloob Apr 29, 2018

Member

Except for battery level, remove all of these attributes.

This comment has been minimized.

@sergeymaysak

sergeymaysak May 1, 2018

Contributor

@balloob Would you agree if I will remove only static attributes? i.e ATTR_TAG_HW_REVISION, ATTR_TAG_FW_VERSION and ATTR_TAG_TYPE are static.

Others are very dynamic:

  • ATTR_VOLTAGE - actual battery voltage - dynamically changing and can be helpful for end user to identify is battery (which is replaceable) needs to be replaced. (automated as well)
  • ATTR_TAG_COMMENT - a user defined description of specific tag. can be changed by end user...
  • ATTR_TAG_SIGNAL_STRAIGHT - obviously very helpful for end user -allows to diagnose many of issues (no signal etc) - end user is able to change frequency used and other hw settings using this parameter - again it is a subject for automation or say be a trigger for automation
  • ATTR_TAG_BEEP_DURATION - user is able to change it - there are about 15 options how tag should beep. I think possibly to add service to beep from hass and to allow control beep duration from hass - in future versions...
  • ATTR_TAG_OUT_OF_RANGE - again - by nature - it is very dynamic and very helpful for end user to see if tag is out of range - tag can be in vehicle or in bag of your kids playing in yard... you can setup notifications on in range, out of range....
  • ATTR_TAG_POWER_CONSUMPTION - this attributes changes depending on location of device (it's ATTR_TAG_SIGNAL_STRAIGHT) and allow to determine what would be battery life... very recommended to be shown to end user - i use it myself to make sure specific tag is located in right way

This comment has been minimized.

@balloob

balloob May 2, 2018

Member

Just because it's user configurable doesn't mean that it's not mainly static. So comment should go. Out of range should be used to control the available property. Beep duration is a configuration option, we shouldn't expose.

Home Assistant goal is not to be become a full replacement UI for controlling and configuring wireless tags (or any other IoT device for that matter).

This comment has been minimized.

@sergeymaysak

sergeymaysak May 2, 2018

Contributor

ok ) comment and beep duration will be removed. as out of range - i use is alive to control available as pointed in previous review round. Do you propose to drop is alive in favor of out of range or combine them?
IMO is alive closer to available...

This comment has been minimized.

@sergeymaysak

sergeymaysak May 2, 2018

Contributor

comment and beep duration are removed.

This comment has been minimized.

@balloob

balloob May 5, 2018

Member

If the tag is out of range, how would you know if it's alive? I think that available should be a combination of both ?

This comment has been minimized.

@sergeymaysak

sergeymaysak May 5, 2018

Contributor

Good question ). Info is provided not by tag, but by tag manager (a device connected by ethernet to local network) which communicates to actual tags that could be quite distant (up to about 300+ meters). I'm not sure how tag manager provides alive different from out of range. It is not really difficult technically to combine them. However, I think that guys from wirelesstags defined these two properties as different states for a reason - for example - it could be in range but so low battery that make it not alive... So I think is alive is an umbrella state for availability ie - it seems to me reasonable to:

  • provide property availability mapped to is alive
  • keep out of range reported as attribute of entity

Would you agree?

This comment has been minimized.

@sergeymaysak

sergeymaysak May 5, 2018

Contributor

as side note - tags can be used to record what environmental conditions where during parcels transportation (by putting tag into track). tags are battery operated and some of them have internal memory which is used to record temperature/humidity/light etc so tag can be alive but out of range of tag manager. data could be read and analyzed when tag became in range of specific tag manager. Also the memory could save was it alive or not during trip.

return False
# listen to custom event
hass.bus.listen('wirelesstag_update_tags',

This comment has been minimized.

@balloob

balloob May 8, 2018

Member

We should use the helpers.dispatcher helper to communicate data between components and platforms.

This comment has been minimized.

@sergeymaysak

sergeymaysak May 11, 2018

Contributor

Done.

if event_type == self.device_class:
# state should be 'on' or 'off'
self._state = event.data.get('state')
self.async_schedule_update_ha_state()

This comment has been minimized.

@balloob

balloob May 8, 2018

Member

This is not called from within an async context. Should be self.schedule_update_ha_state()

This comment has been minimized.

@sergeymaysak

sergeymaysak May 8, 2018

Contributor

oh! just realized meaning of async_ prefix here. thanks! reworking...

This comment has been minimized.

@sergeymaysak

sergeymaysak May 11, 2018

Contributor

I've reworked it along with switch to signals for communication from platform to components.

binary_url = self.binary_event_callback_url
for event in self.binary_sensors:
for state, name in event.binary_spec.items():
content = ('{"type": "' + event.device_class +

This comment has been minimized.

@balloob

balloob May 8, 2018

Member

If this is supposed to be JSON, just use the json package to generate it.

This comment has been minimized.

@sergeymaysak

sergeymaysak May 11, 2018

Contributor

this passed to api as template string, api creates from it json when sends actual event back.

@balloob

balloob approved these changes Jun 7, 2018

@balloob balloob merged commit 1a7e8c8 into home-assistant:dev Jun 7, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.4%) to 93.975%
Details

@balloob balloob referenced this pull request Jun 22, 2018

Merged

0.72 #15088

@tube0013

This comment has been minimized.

tube0013 commented Jul 5, 2018

@sergeymaysak question RE local tag URL calling.

I se the url calling on the wireless tag site to use my local ip address. for sensors:

http://192.168.1.xxx:8123/api/events/update_tags

and binary sensors:

http://192.168.1.xxx:8123/api/events/binary_event

this works for a few hours, then I go back and check and the urls have been re-written to my outside domain name which will not work over http...

All sensors get changed to:

http://DOMAIN:8123/api/events/wirelesstag_update_tags

Some Binary Sensors get changed to:

http://DOMAIN:8123/api/events/wirelesstag_binary_event

I'm not sure why this is happening, and know it makes the local url calling not work.

@MartinHjelmare

This comment has been minimized.

Member

MartinHjelmare commented Jul 5, 2018

Please take support questions in our forum or chat. If you suspect a bug, please open an issue. We don't want support or discussion in closed PRs.

@home-assistant home-assistant locked and limited conversation to collaborators Jul 5, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.