thomasprior / ethermineinfo Goto Github PK
View Code? Open in Web Editor NEWProvides data from Ethermine.org on a specified miner.
License: GNU General Public License v3.0
Provides data from Ethermine.org on a specified miner.
License: GNU General Public License v3.0
Hey, it's me from the home assistant forum. I collected the following logs:
Logger: homeassistant.helpers.entity
Source: custom_components/ethermineinfo/sensor.py:124
Integration: ethermineinfo (documentation, issues)
First occurred: 23:16:10 (1 occurrences)
Last logged: 23:16:10
Update for sensor.ethermineinfo_83984_____________________________________________113 fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 316, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 524, in async_device_update
raise exc
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/util/init.py", line 280, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/ethermineinfo/sensor.py", line 124, in _update
self._state = r.json()['data']['currentStatistics']['activeWorkers']
KeyError: 'data'
I hope this will help solving the problem.
Greetings,
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:549
First occurred: 09:46:41 (1 occurrences)
Last logged: 09:46:41
Entity sensor.ethermineinfo_eth (<class 'custom_components.ethermineinfo.sensor.EthermineInfoSensor'>) implements device_state_attributes. Please report it to the custom component author.
System Health
version: core-2021.12.6
installation_type: Home Assistant OS
dev: false
hassio: true
docker: true
user: root
virtualenv: false
python_version: 3.9.7
os_name: Linux
os_version: 5.10.83
arch: x86_64
timezone: Asia/Shanghai
GitHub API: ok
Github API Calls Remaining: 4885
Installed Version: 1.18.0
Stage: running
Available Repositories: 932
Installed Repositories: 15
logged_in: false
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok
host_os: Home Assistant OS 7.0
update_channel: stable
supervisor_version: supervisor-2021.12.2
docker_version: 20.10.9
disk_total: 30.8 GB
disk_used: 18.1 GB
healthy: true
supported: true
board: ova
supervisor_api: ok
version_api: ok
installed_addons: File editor (5.3.3), Mosquitto broker (6.0.1), Terminal & SSH (9.2.2), RPC Shutdown (2.2), Node-RED (9.2.1), Samba share (9.5.1), ESPHome (1.20.3), Duck DNS (1.14.0), InfluxDB (4.3.0), Nginx Proxy Manager (0.11.0)
dashboards: 1
resources: 6
views: 3
mode: storage
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 487, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 691, in async_device_update
raise exc
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 195, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/ethermineinfo/sensor.py", line 190, in _update
self._state = r.json()['data']['currentStatistics']['activeWorkers']
KeyError: 'activeWorkers'```
Describe the issue
The sensor fails to update if the currency_name
parameter is specified
To Reproduce
Steps to reproduce the behavior:
2021-05-21 18:53:48 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.ethermineinfo_metamask fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 316, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 524, in async_device_update
raise exc
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 280, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/ethermineinfo/sensor.py", line 212, in _update
self._single_coin_in_local_currency = r4.json()['ethereum'][self.local_currency]
KeyError: 'USD'
Expected behaviour
Sensor updates correctly, no exceptions in the log
Configuration
- platform: ethermineinfo
miner_address: "0x..."
currency_name: USD
name_override: "Metamask"
Environment (please complete the following information):
version | core-2021.5.5 |
---|---|
installation_type | Home Assistant Container |
dev | false |
hassio | false |
docker | true |
virtualenv | false |
python_version | 3.8.9 |
os_name | Linux |
os_version | 5.4.0-62-generic |
arch | x86_64 |
timezone | Europe/Moscow |
GitHub API | ok |
---|---|
Github API Calls Remaining | 4642 |
Installed Version | 1.12.3 |
Stage | running |
Available Repositories | 825 |
Installed Repositories | 26 |
logged_in | false |
---|---|
can_reach_cert_server | ok |
can_reach_cloud_auth | ok |
can_reach_cloud | ok |
dashboards | 1 |
---|---|
resources | 10 |
views | 6 |
mode | storage |
Additional context
Add any other context about the problem here.
Describe the issue
A clear and concise description of what the issue is.
To Reproduce
Steps to reproduce the behavior:
Expected behaviour
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Configuration
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the issue
All sensor of the integration are in "unknown" state
This is what the log says:
`Este error se originó a partir de una integración personalizada.
Logger: homeassistant.helpers.entity
Source: custom_components/ethermineinfo/sensor.py:190
Integration: ethermineinfo (documentation, issues)
First occurred: 23:38:00 (7 occurrences)
Last logged: 23:41:26
Update for sensor.ethermineinfo_ethermine_alsaje fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 487, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 691, in async_device_update
raise exc
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/util/init.py", line 195, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/ethermineinfo/sensor.py", line 190, in _update
self._state = r.json()['data']['currentStatistics']['activeWorkers']
KeyError: 'activeWorkers'`
This is in my sensors.yaml
- platform: ethermineinfo miner_address: "0xa2fF046A6346f686Ba8Cf77C28706F4319600613" currency_name: EUR name_override: "Ethermine Alsaje"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.