Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xAAL
Code
Python
Commits
93e3f25d
Commit
93e3f25d
authored
1 month ago
by
KERDREUX Jerome
Browse files
Options
Downloads
Patches
Plain Diff
We can now dumps the devices values ;)
parent
d3454c8d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
devices/protocols/ZwaveJS/xaal/zwavejs/gw.py
+16
-3
16 additions, 3 deletions
devices/protocols/ZwaveJS/xaal/zwavejs/gw.py
with
16 additions
and
3 deletions
devices/protocols/ZwaveJS/xaal/zwavejs/gw.py
+
16
−
3
View file @
93e3f25d
...
...
@@ -3,15 +3,22 @@
import
asyncio
import
pdb
import
logging
from
pprint
import
pprint
from
zwave_js_server.client
import
Client
as
ZwaveClient
from
aiohttp.client
import
ClientSession
from
xaal.lib
import
AsyncEngine
,
Device
from
xaal.lib
import
AsyncEngine
from
xaal.schemas
import
devices
PACKAGE_NAME
=
'
xaal.zwavejs
'
logger
=
logging
.
getLogger
(
__name__
)
# Disable zwave-js-server logs
logging
.
getLogger
(
"
zwave_js_server
"
).
setLevel
(
logging
.
WARNING
)
URL
=
"
ws://10.77.3.143:3000
"
...
...
@@ -37,11 +44,17 @@ class GW:
async
def
run
(
self
):
await
self
.
ready
.
wait
()
assert
self
.
client
.
driver
# logger.warning(self.client.controller.nodes)
logger
.
warning
(
"
ZwaveJS ready
"
)
nodes
=
self
.
client
.
driver
.
controller
.
nodes
for
node
in
nodes
:
logger
.
warning
(
node
)
for
node
in
nodes
.
values
():
if
node
.
ready
:
logger
.
warning
(
f
"
{
node
.
node_id
}
{
node
.
device_config
.
manufacturer
}
/
{
node
.
device_config
.
label
}
"
)
for
k
in
node
.
values
:
value
=
node
.
values
.
get
(
k
)
print
(
f
"
{
k
}
{
value
.
property_name
}
=>
{
value
.
value
}
"
)
# pprint(node.data)
def
setup
(
eng
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment