You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "Nexa Bridge X" is a Smart Home bridge device. The internal name is "Bridge2".
There is now also the Bridge3, which seems like it's mostly the same as Bridge2 except it has a separate adapter for Z-Wave!
It can be attached to a home network and monitor / control devices via an App/Cloud or Local Web UI. Supports assigning devices to rooms and various automations via the provided firmware.
Since this devices comes with a (semi) open API and Websocket it's custom to create custom integrations.
The purpose of this gist is to collect and archive information because there's not much out there and not easily accessible/discoverable, and mostly written in Swedish. Most of this is just from personal notes after writing a Home Assistant Integration.
These documents contains links to the way back machine archives with fresh captures to keep the dates relevant to this gist.
See this gist for information about NEXA Z-Wave devices.
Confusingly, the Bridge2 can ship with 1.x firmware as noted in this article (archived). Probably some kind of transition period.
2.5.8
This version is undocumented.
This ships on the Bridge3 device, which is a newer version of Bridge2. Has a black casing instead of white.
2.4.1
This version is undocumented.
I personally have this firmware and it's either a bit broken or some features have been removed. Things like the nxt "ops" endpoints just gives 404 making pairing of certain devices impossible.
2.4.0
For some reason this is not on the changelog page, but on a news page (archived)
Soon we will start rolling out an update to Nexa Bridge X that will help you save a little more electricity at home. The update mainly consists of two new features, one of which has already been available for a while; electric spot prices and Sensibo.
Below we go through what this is.
Electricity spot prices
For those who are a little less familiar, electricity spot prices (or hourly prices) are the price that your electricity supplier buys your electricity for, excluding grid fees, taxes, VAT, etc. This price is thus the basis for your electricity price, one way or another.
Note that you must have an hourly price in your subscription.
When you select your region (SE1, SE2, SE3 or SE4) in the app, Nexa Bridge X will retrieve the price and compile it. When this is done, you can, among other things, receive notifications when the price is considered cheap or expensive, you can receive warnings about the current cost and start automating the various prices.
A good example of automation is that you can turn off one or more gadgets when the price goes over X number of cents. For example, washing machine, dryer or dishwasher.
Sensibo
This is a small product you can buy that allows you to control most of the models of air source heat pumps available. When you pair this to your Nexa Bridge X, your air source heat pump will appear just like any other device, where you can then turn it on and off and regulate the temperature.
Here you can then create smart automations. For example, you can reduce the temperature at night automatically or turn off the air heat pump when the door is opened, all to save on electricity.
Other improvements
This update also includes quite a few minor improvements and bug fixes, some of which are listed below (including the apps):
The battery level of devices is downloaded more continuously (Z-Wave)
The cost of electricity is now calculated hourly for the price set, instead of at the end of the day. Previously, it gave a distorted picture when it came to variable hourly rates.
It is possible to set associations (let a Z-Wave transmitter control a receiver directly)
Simplified configuration parameters appear under the device when changing it (Z-Wave)
PDF manual and product sheet can appear under the device if you change it (Z-Wave)
Fixed a problem that caused sunrise and sunset to sometimes be incorrectly calculated for several hours
Fixed a problem that meant that the scheduling sometimes in some cases did not run at the appointed time
Fixed an issue that made it impossible to set configuration parameters on some devices (Z-Wave)
Fixed a problem that caused old sensor data not to be deleted, which in turn meant that the space on the Bridge could run out after a very long time
2.3.9
Support for electricity spot prices
Support for Sensibo
Retrieves battery levels more continuously (Z-Wave)
It is possible to set associations (let a Z-Wave transmitter control a receiver directly) (Z-Wave)
Fixed an issue that made it impossible to set configuration parameters on some devices (Z-Wave)
PDF manual and product sheet can appear under the device if you change it (Z-Wave)
2.2.7
Support for HomeKit
Turn on lights when a fire alarm goes off
Time synchronization bug fixes
Possibility to change the brightness of the LEDs
2.0.12
This release has no official information.
However, the official API documentation seems to be generated from this release.
Kudos to Nexa for providing developer documentation for this device!
The API is open on the following ports:
80: Web server
8887: WebSocket for realtime updates
8888: Also a websocket, but always JSON instead of cap:{} ?!
Factory login is nexa / nexa
Runs on node with Express and currently unknown libraries.
Firmware 2.4.1 runs on node v12.14.1 spesifically.
Legacy Nexa Bridge
The legacy Nexa Bridge, aka "Bridge1" has a very similar API to the "Bridge2". A few differences:
The /nodes endpoint does not contain any values. These have to be looked up from the /nodes/:id endpoint.
The /energy endpoint responds with a different data model.
The "capability" properties is value models is always called "name" (which is also in Bridge2, but the "capability" was probably added to avoid confusion with node names vs capability names).
Calling a binary switch value update is {"cap": "switchBinary", "method": "turnOn"}, not {"cap": "switchBinary", "value": 1}
Hostname is nexabridge2.local and can be discovered via zeroconf/bonjour.
Legacy bridge is nexabridge.local
Discoveries
The server on the Nexa Bridge X includes workarounds for sensors that reports broken values (like the infamous 10 bit random flip in metering that causes huge negative numbers. Nexa actually has this defect in their own products)
This bridge does not fully respect the z-wave standards when it comes to API exposure, which means some data is missing and events, names etc. might actually diverge from their actual function. An example is the certain environmental sensors with humidity warnings or leak detection can be reported as a fire alarm.
The interview process when doing device inclusion can hang in certain cases
If the capability is not supported by the bridge, you won't get any control at all in HA
Battery levels reporting seems narrow (I get 50% on a device that reports ~60% on zwavejs)
Software
This device runs a backgroud Java service (nxt commms) and a Nodejs server with express that manages all features.
From inspecting the source code it seems like the z-wave provision is using zwave-js with some custom abstractions.
There does not seem to be any database services, etc. Everything is JSON on the filesystem and "cron" based jobs. Some statistics are stored in text file buckets and downsampled on a schedule.
There is a UART (JST XH) connector on the board that can be used for serial communication at 115200 baud rate and 8N1 configuration.
This gives access to a console, but the password is unknown, just like ssh. However, this also gives access to U-Boot,
making it possible to override the bootargs and gain direct shell access.
Boot log
Example booloader output:
U-Boot 2015.04 (Aug 01 2017 - 12:12:46)
CPU: Freescale i.MX6UL rev1.2 at 396 MHz
CPU: Temperature 41 C
Reset cause: POR
Board: MX6UL 14x14 EVK
I2C: ready
DRAM: 512 MiB
force_idle_bus: sda=0 scl=0 sda.gp=0x1d scl.gp=0x1c
MMC: FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment
Display: TFT43AB (480x272)
Video: 480x272x24
In: serial
Out: serial
Err: serial
switch to partitions #0, OK
mmc1(part 0) is current device
Net: Phy 1 not found
PHY reset timed out
FEC1
Error: FEC1 address not set.
Normal Boot
Hit any key to stop autoboot: 0
Example kernel and userspace output:
IR MCE Keyboard/mouse protocol handler initialized
IR XMP protocol handler initialized
pxp-v4l2 pxp_v4l2: initialized
imx2-wdt 20bc000.wdog: use WDOG_B to reboot.
imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
Bluetooth: HCI UART driver ver 2.3
Bluetooth: HCI UART protocol H4 registered
Bluetooth: HCI UART protocol BCSP registered
Bluetooth: HCI UART protocol ATH3K registered
usbcore: registered new interface driver bcm203x
usbcore: registered new interface driver btusb
usbcore: registered new interface driver ath3k
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
/soc/aips-bus@02100000/usdhc@02190000: voltage-ranges unspecified
sdhci-esdhc-imx 2190000.usdhc: No vqmmc regulator found
mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
/soc/aips-bus@02100000/usdhc@02194000: voltage-ranges unspecified
sdhci-esdhc-imx 2194000.usdhc: No vmmc regulator found
sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found
mmc0: new high speed SDIO card at address 0001
bFWReady == _FALSE call reset 8051...
mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
RTL871X: rtw_ndev_init(wlan0) if1 mac_addr=xx:xx:xx:xx:xx:xx
caam 2140000.caam: Entropy delay = 3200
caam 2140000.caam: Instantiated RNG4 SH0
caam 2140000.caam: Instantiated RNG4 SH1
caam 2140000.caam: device ID = 0x0a16030000000000 (Era -524)
caam 2140000.caam: job rings = 3, qi = 0
mmc1: MAN_BKOPS_EN bit is not set
mmc1: new DDR MMC card at address 0001
mmcblk1: mmc1:0001 SEM04G 3.68 GiB
mmcblk1boot0: mmc1:0001 SEM04G partition 1 2.00 MiB
mmcblk1boot1: mmc1:0001 SEM04G partition 2 2.00 MiB
mmcblk1rpmb: mmc1:0001 SEM04G partition 3 2.00 MiB
mmcblk1: p1 p2
caam algorithms registered in /proc/crypto
caam_jr 2141000.jr0: registering rng-caam
platform caam_sm: blkkey_ex: 8 keystore units available
snvs-secvio 20cc000.caam-snvs: can't get snvs clock
snvs-secvio 20cc000.caam-snvs: violation handlers armed - non-secure state
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ozwpan ozwpan: Ozmo Devices WPAN
ozwpan ozwpan: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 8 ports detected
fsl-asrc 2034000.asrc: driver registered
NET: Registered protocol family 26
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: BNEP socket layer initialized
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
Bluetooth: HIDP socket layer initialized
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 2016-04-01 00:59:12 UTC (1459472352)
gpio_dvfs: disabling
can-3v3: disabling
ALSA device list:
No soundcards found.
kjournald starting. Commit interval 5 seconds
EXT3-fs (mmcblk1p2): using internal journal
EXT3-fs (mmcblk1p2): recovery complete
EXT3-fs (mmcblk1p2): mounted filesystem with ordered data mode
VFS: Mounted root (ext3 filesystem) on device 179:2.
devtmpfs: mounted
Freeing unused kernel memory: 320K (80b00000 - 80b50000)
INIT: version 2.88 booting
Error opening /dev/fb0: No such file or directory
Adding 499996k swap on /swapfile. Priority:-1 extents:143 across:787820k SS
Starting udev
udevd[178]: starting version 182
bootlogd: cannot allocate pseudo tty: No such file or directory
random: dd urandom read with 38 bits of entropy available
udevadm settle - timeout of 3 seconds reached, the event queue contains:
/sys/devices/platform/soc/2100000.aips-bus/2194000.usdhc/mmc_host/mmc1/mmc1:0001/block/mmcblk1/mmcblk1boot0 (1250)
/sys/devices/platform/soc/2100000.aips-bus/2194000.usdhc/mmc_host/mmc1/mmc1:0001/block/mmcblk1/mmcblk1boot1 (1251)
/sys/devices/platform/soc/2100000.aips-bus/2194000.usdhc/mmc_host/mmc1/mmc1:0001/block/mmcblk1/mmcblk1p1 (1252)
/sys/devices/platform/soc/2100000.aips-bus/2194000.usdhc/mmc_host/mmc1/mmc1:0001/block/mmcblk1/mmcblk1p2 (1253)
/sys/devices/platform/soc/2100000.aips-bus/2194000.usdhc/mmc_host/mmc1/mmc1:0001/block/mmcblk1/mmcblk1rpmb (1254)
FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
ALSA: Restoring mixer settings...
/usr/sbin/alsactl: load_state:1735: No soundcards found...
INIT: Entering runlevel: 5
Configuring network interfaces... Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
==> rtl8188e_iol_efuse_patch
random: nonblocking pool is initialized
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
RTL871X: set bssid:00:00:00:00:00:00
ioctl[SIOCSIWAP]: Operation not pRTL871X: set ssid [g�isQ�J�)ͺ����F|�T���vZ.c3�ɚ�] fw_state=0x00000008
ermitted
fec 2188000.ethernet eth0: Freescale FEC PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=2188000.ethernet:02, irq=-1)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
done.
Starting Xserver
open /dev/fb0: No such file or directory
Starting system message bus: dbus.
Starting Connection Manager
Starting Dropbear SSH server: RTL871X: indicate disassoc
dropbear.
Starting rpcbind daemon...done.
starting statd: done
Starting advanced power management daemon: No APM support in kernel
(failed.)
exportfs: can't open /etc/exports for reading
NFS daemon support not enabled in kernel
Starting syslogd/klogd: done
* Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon
...done.
Starting Telephony daemon
Starting Linux NFC daemon
Running local boot scripts (/etc/rc.local)fec 2188000.ethernet eth0: Freescale FEC PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=2188000.ethernet:02, irq=-1)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc (v1.23.2) started
Sending discover...
Sending discover...
Sending discover...
No lease, failing
error
INIT: cannot execute "/home/root/startnexa.sh"
INIT: cannot execute "/home/root/startnexa.sh"
INIT: cannot execute "/home/root/startnexa.sh"
INIT: cannot execute "/home/root/startnexa.sh"
INIT: cannot execute "/home/root/startnexa.sh"
INIT: cannot execute "/home/root/startnexa.sh"
INIT: cannot execute "/home/root/startnexa.sh"
INIT: cannot execute "/home/root/startnexa.sh"
INIT: cannot execute "/home/root/startnexa.sh"
INIT: cannot execute "/home/root/startnexa.sh"
INIT: Id "2" respawning too fast: disabled for 5 minutes
Freescale i.MX Release Distro 4.1.15-1.1.0 nexa_bridge2 /dev/ttymxc0
nexa_bridge2 login:
Some background processes outputs to this tty with messages like:
2016-04-01T00:59:34.937Z startar
2016-04-01T00:59:35.185Z kollar efter uppdateringar var 333 minut
2016-04-01T00:59:35.275Z udp lyssnar på port 2222
Initializing HAP-NodeJS v0.9.4...
write() /sys/class/gpio/export: 31
write() /sys/class/gpio/gpio31/direction: out
write() /sys/class/gpio/gpio31/value: 0
write() /sys/class/gpio/export: 18
write() /sys/class/gpio/gpio18/direction: out
write() /sys/class/gpio/gpio18/value: 1
write() /sys/class/gpio/export: 31
write() /sys/class/gpio/gpio31/value: 1
write() /sys/class/gpio/export: 30
write() /sys/class/gpio/gpio30/direction: out
write() /sys/class/gpio/gpio30/value: 0
write() /sys/class/gpio/export: 30
write() /sys/class/gpio/gpio30/value: 1
write() /sys/class/gpio/export: 30
write() /sys/class/gpio/gpio30/value: 0
write() /sys/class/gpio/export: 30
write() /sys/class/gpio/gpio30/value: 1
2016-04-01T01:03:35.838Z kollar efter tillgängliga uppdateringar...