Convert sensor data from C to F

Is there an advantage to your method vs mine? I guess yours is local? For temp, humidity, lux the API should be good. Binary sensor may be too slow.

I’ll give your method another try. That’s the piece I was missing I’ll bet. Is trusted_network an HA thing? Must be right?

I am pretty against having to call something on the internet to get information on a device which lives on my local network. The developers of the wireless tags don’t give any real option otherwise so it’s what works for me.

Everything is pretty instantaneous. As soon as I see the light flash on my PIR motion detector HA is turning my lights on. For things like my temperature updates they don’t immediately show - only when the actual tag contacts the manager to send an update…but I rather that. I don’t see a point in querying a website every 2 minutes when my tags only update every 10 minutes.

Yes, trusted_networks is a HA thing:

 http:
   api_password: yourpassword
   trusted_networks:
     - 192.168.1.65
     - 192.168.1.80

Another handy trick I use is to set my phone to a DHCP reservation (in the router) so that it always receives say 192.168.1.80. Using that config your phone will not prompt for a password when on your wifi.

Another roadblock. I have things setup with SSL. URL calling doesn’t support https. Hmm.

Does ha now have SSL built in? I thought people were putting nginx in front?

yes,ssl support

Yes. I’ve had in place with letsencrypt since I started with HA. Thought it good practice if exposed over internet.

Might look at Tor instead.

Why not leave it running HTTP and just put a nginx proxy in front for internet facing purposes? I only use a VPN for remote access, so I hadn’t bothered setting up SSL

I assumed based on this walkthrough you still need SSL. Not so?

https://home-assistant.io/ecosystem/nginx/

No, ha still listens on HTTP port 8123, nginx listens on 443 and forwards to ha

This works! Great job, you saved me a lot of hassle.

1 Like

@fcisler,
Can you provide more details of how you were able to make this work?

I followed all as you described, but still not getting updates.

Thanks

Which portion? You need to give me a little detail as to what your trying to do

For now, just get the tags to show up in HASS.

I think I have got it working with your previous instruction.

Testing now.

Thanks

Got it working.

Is there anyway to limit the number of digits displayed? (see below)

“freezer
2 minutes ago
1.82101669311524 °F
humidity
46.9544448852539”

Also I tried customizing the name and picture, but for some reason it doesn’t apply, no errors in log. (see below)

sensor.freezer:
entity_picture: /local/10.jpg
friendly_name: FREEZER

Something like this in the tagmanager

Rnd{{3},2) or Round({3},2)

Will round it to two digits

Sorry for my ignorance, but where does this go in your code?

{“state”: “<%{2}*9/5+32%>”, “attributes”: {“humidity”:"{3}",“unit_of_measurement”:“°F”}}

Rnd{{3},2) or Round({3},2)

Thanks

{“state”: “<%Round({2}*9/5+32,2)%>”, “attributes”: {“humidity”:"<%Round({3}, 2)%>",“unit_of_measurement”:“°F”}}

If Round isnt correct then it’s Rnd

Thanks, I test and let you know.

I’m getting the following error from the Wireless Tag Manager when I add the code you provided.

“Tag Manager cannot handle URL + verb + content longer than 148 characters”

Any idea how I can stop the following errors, I get separate error for each of my 5 tags?

2017-06-11 17:15:17 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.master_bedroom_temperature fails
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity.py”, line 222, in async_update_ha_state
yield from self.async_update()
File “/usr/lib/python3.4/asyncio/coroutines.py”, line 141, in coro
res = func(*args, **kw)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/sensor/template.py”, line 146, in async_update
self._state = self._template.async_render()
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/template.py”, line 99, in async_render
return self._compiled.render(kwargs).strip()
File “/usr/lib/python3/dist-packages/jinja2/environment.py”, line 969, in render
return self.environment.handle_exception(exc_info, True)
File “/usr/lib/python3/dist-packages/jinja2/environment.py”, line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File “/usr/lib/python3/dist-packages/jinja2/_compat.py”, line 36, in reraise
raise value.with_traceback(tb)
File “”, line 1, in
TypeError: can’t multiply sequence by non-int of type ‘float’