Comments (11)
@grantclem I do not have a Fibaro KeyFob to test this with, but if you are willing to get some data for me, I could attempt a fix.
I'd need you to visit these 2 urls on your vera and send the result:
http://your_vera_url:3480/data_request?id=sdata
http://your_vera_url:3480/data_request?id=status
Thanks
from pyvera.
from pyvera.
It looks like the files didn't attach.
from pyvera.
from pyvera.
from pyvera.
Not seeing it. Please email them to [email protected]
from pyvera.
Ok, getting closer. If you could email me http://your_vera_url:3480/data_request?id=status with you pressing 1 button on one of the remotes, and then press a different button on the same remote and send http://your_vera_url:3480/data_request?id=status again I might be able to figure it out.
from pyvera.
Ok, I have an experimental branch that may support remotes. Are you comfortable with git & python enough to run some commands I could give you to test it?
from pyvera.
from pyvera.
Fix merged in
from pyvera.
Hi all,
Alan was working on this issue mid last year and the fix provided was working fine up until the "Great Migration" of Home Assistant. It was never merged in the end as Alan was busy with other things and as a workround I simply used the modified sensor.py file as a Custom Component. I am not quite sure why it has stopped working as was wondering if it could actually be merged if resolved and not use it as CC anymore. Code attached
"""
Support for Vera sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.vera/
"""
import logging
from datetime import timedelta
from homeassistant.const import (
TEMP_CELSIUS, TEMP_FAHRENHEIT)
from homeassistant.helpers.entity import Entity
from homeassistant.components.sensor import ENTITY_ID_FORMAT
from homeassistant.const import ATTR_ENTITY_ID
from homeassistant.util import convert
from homeassistant.components.vera import (
VERA_CONTROLLER, VERA_DEVICES, VeraDevice)
DEPENDENCIES = ['vera']
_LOGGER = logging.getLogger(__name__)
SCAN_INTERVAL = timedelta(seconds=5)
EVENT_VERA_REMOTE = "vera_remote"
ATTR_BUTTON = "button"
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Vera controller devices."""
add_entities(
[VeraSensor(device, hass.data[VERA_CONTROLLER])
for device in hass.data[VERA_DEVICES]['sensor']], True)
class VeraSensor(VeraDevice, Entity):
"""Representation of a Vera Sensor."""
def __init__(self, vera_device, controller):
"""Initialize the sensor."""
self.current_value = None
self._temperature_units = None
self.last_changed_time = None
VeraDevice.__init__(self, vera_device, controller)
self.entity_id = ENTITY_ID_FORMAT.format(self.vera_id)
@property
def state(self):
"""Return the name of the sensor."""
return self.current_value
@property
def unit_of_measurement(self):
"""Return the unit of measurement of this entity, if any."""
import pyvera as veraApi
if self.vera_device.category == veraApi.CATEGORY_TEMPERATURE_SENSOR:
return self._temperature_units
if self.vera_device.category == veraApi.CATEGORY_LIGHT_SENSOR:
return 'lx'
if self.vera_device.category == veraApi.CATEGORY_UV_SENSOR:
return 'level'
if self.vera_device.category == veraApi.CATEGORY_HUMIDITY_SENSOR:
return '%'
if self.vera_device.category == veraApi.CATEGORY_POWER_METER:
return 'watts'
def update(self):
"""Update the state."""
import pyvera as veraApi
if self.vera_device.category == veraApi.CATEGORY_TEMPERATURE_SENSOR:
self.current_value = self.vera_device.temperature
vera_temp_units = (
self.vera_device.vera_controller.temperature_units)
if vera_temp_units == 'F':
self._temperature_units = TEMP_FAHRENHEIT
else:
self._temperature_units = TEMP_CELSIUS
elif self.vera_device.category == veraApi.CATEGORY_LIGHT_SENSOR:
self.current_value = self.vera_device.light
elif self.vera_device.category == veraApi.CATEGORY_UV_SENSOR:
self.current_value = self.vera_device.light
elif self.vera_device.category == veraApi.CATEGORY_HUMIDITY_SENSOR:
self.current_value = self.vera_device.humidity
elif (self.vera_device.category == veraApi.CATEGORY_SCENE_CONTROLLER or
self.vera_device.category == veraApi.CATEGORY_REMOTE):
value = self.vera_device.get_last_scene_id(True)
time = self.vera_device.get_last_scene_time(True)
if time is not None and time == self.last_changed_time:
self.current_value = None
else:
self.current_value = value
self.hass.bus.fire(EVENT_VERA_REMOTE, {
ATTR_ENTITY_ID: self.entity_id,
ATTR_BUTTON: self.current_value
})
self.last_changed_time = time
elif self.vera_device.category == veraApi.CATEGORY_POWER_METER:
power = convert(self.vera_device.power, float, 0)
self.current_value = int(round(power, 0))
elif self.vera_device.is_trippable:
tripped = self.vera_device.is_tripped
self.current_value = 'Tripped' if tripped else 'Not Tripped'
else:
self.current_value = 'Unknown'
from pyvera.
Related Issues (20)
- VeraDimmer.turn_on() overwrites previous brightness HOT 1
- More metadata about battery and communication status HOT 1
- The "complex" variable functions do not consider service Id HOT 8
- call_service() function does not accept action arguments HOT 4
- variableset request--set the value of a state variable HOT 1
- Use of Fibaro Zwave Key Fob Remote HOT 2
- pyvera not updating HA; device_list is always empty HOT 21
- Vera 7.3 firmware Beta & pyvera HOT 2
- Support for Power meter (pulse counter)
- Frequently fails on Home Assistant restart with "Entity already exists" HOT 6
- Vera 7.31 breaks thermostat? HOT 5
- Possible async issues in pyvera exposed by home assistant HOT 10
- Support for control of RGBWW devices such as Aeontec ZW098. HOT 7
- Unhandled exceptions in pyvera (HA AssertionError) HOT 3
- Sole owner on pypi? HOT 1
- pyvera install HOT 23
- comm_failure method incorrectly returns True when CommFailure variable not present in Vera response HOT 4
- Do a better job at handling Comms Failure (esp in Home Assistant) HOT 21
- Problem parsing pin code string HOT 1
- Update to Python 3.9, upgrade pylint mypi etc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyvera.