Git Product home page Git Product logo

eda-modbus-bridge's People

Contributors

dependabot[bot] avatar jalle19 avatar johanelmis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

eda-modbus-bridge's Issues

Reading-label errors

Hi, I'm curious to know what you get as reading for supply, waste and exhaust temperatures.
The names are correct according to the Modbus guide.
But it doesn't make sense that the exhaust air temp is higher than waste (my house is heated..)
Does other have the same issue.
Maybe my old firmware have this messed up.
I will double check on the EDA control panel - or if the temp-sensors have been mixed at some point.

readings: { freshAirTemperature: 4.7, supplyAirTemperatureAfterHeatRecovery: 19.7, supplyAirTemperature: 19.8, wasteAirTemperature: 8.1, exhaustAirTemperature: 22.7, exhaustAirTemperatureBeforeHeatRecovery: -40, exhaustAirHumidity: 29, heatRecoverySupplySide: 83, heatRecoveryExhaustSide: 81, heatRecoveryTemperatureDifferenceSupplySide: 15, heatRecoveryTemperatureDifferenceExhaustSide: 14.6, mean48HourExhaustHumidity: 28,

Add support for 3x0001, 3x0003 and 3x0004 holding registers

Could there be a possibility to add different modbus registers to be shown through addon?

Pingvin MDE eAir has holding register "1" (Room temperature sensor TE20) and "4" (Current exhaust fan speed) which I would be interested to get data from. Is there a way to make this possible while not breaking addon for others using different models.

eAir modbus register list can be found here: https://doc.enervent.com/out/out.ViewFolder.php?folderid=16&showtree=1

Expose device state

As @JohanElmis mentioned in #43 (comment), there's a register that holds a bit field describing what state the ventilation unit is in.

Ideally this state should be exposed as a boolean map, both via HTTP and as read-only binary sensors via MQTT.

Try to reconnect to MQTT broker if disconnected

Woke up and the MQTT part didn't work at all. Unfortunately I couldn't get at the logs since I have HTTP request spamming the log, and Home Assistant doesn't seem to store (or at least expose) logs that far back.

ventilationLevelTarget/set

As far as I see, the ventilation level can not be set via mqtt. Can it be implemented?

I run the air conditioning by changing the target temperature and ventilation levels. At the moment I am using manual boost to raise the ventilation level for cooling, but it can only be set to last for 120 minutes.

Illegal data address 72

I have a Pandion ECO-EDE with EDA automation and the Enervent Freeway wifi module that also makes modes TCP possible. When I try to start the add-on I get the following error and the add-on will not start.

2024-01-14T19:35:33.245Z [modbus] error: Failed to read coil address 72, length 1
2024-01-14T19:35:33.252Z [main] error: An exception occurred: Error: Modbus exception 2: Illegal data address (register not supported by device)

Add a "master alarm" entity

There are a ton of different alarms, so it can be difficult to see if any of them are active. We could add a master alarm that is on when any alarm is on, and off when all alarms are off.

@JohanElmis @tomrosenback what do you think about this?

Add Defrosting switch from coil address 1x0055?

Hello, and thank you for this awesome bridge for the Enervent.

I use a Waveshare RS485 to Ethernet serial server talking to my Enervent Pingvin eco EDE.Screenshot 2024-02-12 at 10 14 32
The serial number is zero probably because I had to replace the logic board some yers ago due to moisture damage.

I wonder if it is possible to add a HA switch to toggle the defrosting function on/off? Now I use HA:s modbus integration to switch defrosting on and off, and I think that is making the Eda-modbus-bridge communication erratic sometimes. I'm using defrosting function to avoid freezing failure of the heat exchanger, I have had some at sub -20. At the same time I must be able to switch defrosting off when I put fire in the fireplace, or my house fills with smoke when the defrosting turns on and under pressure is built up in the house.

As a side note I have tried to get the Overpressure to work by just writing 1 to coil register 1x0003 but it doesn't work. If you have any hints for getting this to work I would be happy :). I tried to look at your code but couldn't find anything useful with my lack of knowledge. I suspect the use of two separate instances that reads the Pingvins Modbus make the Eda-modbus-bridge unstable. I get errors in the log and a restart or two of the add-on resolves the issue for some time.

/Carl-Mikael Holm

missing sensor data with Pelican HP eAir?

It seems there are some sensors data missing (at least from mqtt side) with Pelican HP eAir modbus.

List of findings (source: eAirMD-modbus-register-list-public):

  • hreg 46 average temperature from room sensors and control panel (TE20 room temperature...)
  • hreg 17-28 Analog input voltage values & their calculated results

First row is kind of self explanatiory. :)
Second: Analog input values are extra sensors (Co2, Humidity and room temperatures)

Also fan speed (both supply and exhaust, hreg 3 & 4) seems to be missing. Although there are eda/readings/ventilationLevelActual and eda/readings/ventilationLevelTarget but they are not the same.

Alarm names and descriptions

Hi,
In the AVAILABLE_ALARMS definition we start using inlet and outlet - which is is terms that are not used elsewhere (and not that commonly used when talking about FTX) - but more with ventilation that doesn't have the the Heat recovery (just in/out).

In the English Modbus definitions - they have names that are more similar to the rest of the code:
Outside -> Supply Air and
Extract Air -> Exhaust Air, even if I personally like "Waste Air" better than Extract, that some other manufacturers use.
Would it cause issues somewhere for example HomeAssistant if we changed them to the Enervent (To match the names in the English Modbus list)?

I can live with either - so this is more a question than an issue.
I can change them - if you think it's good and will not create problems.

Bump version

Lets be brave and bump version to 1.0.1 so that we get it visible in Home Assistant also. Same needs to be done in addons repo, question is if this repo needs to have any version, thou?

Improve device identifier

1x0016: fan type
3x0171: heating unit installed
3x0154: cooling unit installed

serial number should be removed, since it's always 0 unless someone manually enters it.

Add support for controlling away/long away/overpressure settings

If someone wants to e.g. lower the ventilation level during night-time, the only way is to re-purpose one of the built-in ventilation modes to use the level you want. E.g. "long away" can be re-purposed to use 60% ventilation level and a 0 degree temperature reduction (instead of the default 3).

Is it possible to set Eco Mode on?

Hi,

I found this great integration few weeks ago and it works like a charm once I figured it out how the Freeway bus works.. I have automated the away / home -setting depending on my home alarm system state.

I'd prefer to use Pingvin's Eco Mode as it adjusts supply air temperature to maintain efficient at 100. However, once my automation returns from away mode to normal mode, it always returns normal without eco. I have not found any setting to set Pingvin to eco mode via modbus. Do you know is that even possible?

Discovery messages should be retained

The discovery messages sent to the home assistant topic should have the retain flag sent to true, otherwise the entities will remain unavailable until next set of discovery messages are published after a reboot of HA.

Repeated alerts after enabling this bridge

Hi, first of all thank you for this excellent bridge 👍

The bridge seems to be working well, but I have a strange issue that started at the same time as I installed it. I've been getting the following alert approximately every few days (sometimes twice a day, sometimes once per week):

TE20 Yläraja
Palovaara
Tuloilma on kuumaa.

This stops the machine which is quite inconvenient and I am quite certain it is not a "true" alert (in reality the air temp is normal). Machine is from 2009, Enervent Pingvin Eco EDE and I have not seen this error before since starting to use the bridge. Any ideas what could be causing it and how to mitigate it?

issue with nodejs 12.22.5

I have Raspberry Pi and latest Raspbian OS installed. Nodejs is installed from Raspbian package repository.

root@rasp02:~# cat /etc/debian_version
11.2
root@rasp02:~# nodejs --version
v12.22.5

eda-modbus-bridge (tested with latest and with 2.0.0 release) gives syntax error on start:

root@rasp02:~/eda-modbus-bridge# nodejs eda-modbus-bridge.mjs
file:///root/eda-modbus-bridge/app/modbus.mjs:314
        ][familyTypeInt] ?? 'unknown'
                          ^

SyntaxError: Unexpected token '?'
    at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)

I don't know shit about nodejs/javascript, but after removing "?? 'unknown'" from return statements, the program starts and seems to be working ok. And yes, I read that the program has only been tested with nodejs 14.x, but I thought compatibility with Raspbian might be useful for some users.

Thanks for the great software! :) My ventilation unit is Pandion (year 2012) and I can confirm that it works fine with eda-modbus-bridge.

Add support for alarms

There is a number of different adresses for different alarms. These should be exposed to the MQTT / HTTP API aswell. The alarms might need some special handling to make the visualization logical in HA. Preferrably it would be one binary sensor or switch for each alarmtype described

Hälytys numero, 1=TE5 Tulo LTOn jälkeen kylmä, 2=TE10 Tulo lämmityspatterin jälkeen kylmä, 3=TE10 Tulo lämmityspatterin jälkeen
kuuma, 4=TE20 Huone kuuma, 5=TE30 Poisto kylmä, 6=TE30 Poisto kuuma, 7=HP vika, 8=SLP vika, 9=Paluuvesi kylmää, 10=LTO
vika, 11=Jäähdytys vika, 12=Hätäseis, 13=Palovaara, 14=Huoltomuistutus, 15=SLP painevahti, 16=Tulosuodatin likainen,
17=Poistosuodatin likainen, 20=Tulopuhallin painepoikkeama, 21=Poistopuhallin painepoikkeama

Question is if one would need to reset the alarm through the API aswell, maybe not, then a binary sensor would be sufficient.

Modbus TCP/IP connection possible?

Thanks for great project! :)

I have Enervent Pelican HP eAir and its connected to my LAN with ethernet cable. Unit has software version 1.29 and in Modbus settings menu it has option Modbus TCP. After enabling this I can access registers and coils with Modbus client!

Is it possible to use Modbus TCP connection already with this app or is code changes needed?

Holding registers 3x0051 and 3x0052

These are fan speed controls for in and out air fans. They work with my 2014 Enervent Pingvin EDE but are not included in this project and according to documentation these are not supported. For some reason they work with my model which is just a basic EDE with heating coils.

Example commands with modbus-cli using cheap Waveshare TCP-RTU bridge:

  • Put air input to minimum speed: modbus 52=20 -s 1
  • Put air input to maximum speed: modbus 52=100 -s 1

Can you include these in your implementation? Thanks for your efforts for this!

Add a basic test suite

Mainly in order to get a README badge, but also now that people (two people at least) actually use this and there's version numbers and everything, it's more important that new changes don't break anything.

Compatibility with Pingvin 120 ECE

Hi,

I have a Enervent Pingvin 120 with ECE control, not EDA (example of ECE control panel: https://www.enervent.fi/wp-content/uploads/2015/07/Exvent_ECE_paneeli_2011-743x576.jpg).

Do you know whether it's possible to use your bridge for controlling it?

I have a USB adapter (https://www.waveshare.com/usb-to-rs485.htm) and did some quick tests with the bridge, but they didn't seem too promising (GET to /summary failed.).

Thanks in advance!

EDIT: I can try to provide you with the exact error / stacktrace when I tried GET to /summary ASAP, but became unsure if the whole EDE-control is compatible :)

Make HTTP service optional

In Home Assistant HTTP is not needed as everything is handled through MQTT. Make the parameter optional and disable HTTP endpoints if not provided.

Publish only changed settings or modes in MQTT callback

As the amount of values fetched and published when a value is changed, say Away mode, the response gets back with the state of the written value with a big delay as all the different registers needs to be read.

Suggestion
Only publish related setting(s) / flag(s) on MQTT callback as the rest of the values are anyway periodically published.

Installation fails with npm ERR! code 1

Device: Raspberry Pi with Raspberry Os Lite 64-bit

Logs:

npm ERR! code 1
npm ERR! path /opt/eda-modbus-bridge/node_modules/@serialport/bindings
npm ERR! command failed
npm ERR! command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! make: Entering directory '/opt/eda-modbus-bridge/node_modules/@serialport/bindings/build'
npm ERR! CXX(target) Release/obj.target/bindings/src/serialport.o
npm ERR! make: Leaving directory '/opt/eda-modbus-bridge/node_modules/@serialport/bindings/build'
npm ERR! node:internal/modules/cjs/loader:1080
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module './tracker-group.js'
npm ERR! Require stack:
npm ERR! - /opt/eda-modbus-bridge/node_modules/are-we-there-yet/index.js
npm ERR! - /opt/eda-modbus-bridge/node_modules/npmlog/log.js
npm ERR! - /opt/eda-modbus-bridge/node_modules/prebuild-install/log.js
npm ERR! - /opt/eda-modbus-bridge/node_modules/prebuild-install/bin.js
npm ERR! at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
npm ERR! at Module._load (node:internal/modules/cjs/loader:922:27)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1143:19)
npm ERR! at require (node:internal/modules/cjs/helpers:110:18)
npm ERR! at Object. (/opt/eda-modbus-bridge/node_modules/are-we-there-yet/index.js:2:24)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1256:14)
npm ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:1119:32)
npm ERR! at Module._load (node:internal/modules/cjs/loader:960:12)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1143:19) {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: [
npm ERR! '/opt/eda-modbus-bridge/node_modules/are-we-there-yet/index.js',
npm ERR! '/opt/eda-modbus-bridge/node_modules/npmlog/log.js',
npm ERR! '/opt/eda-modbus-bridge/node_modules/prebuild-install/log.js',
npm ERR! '/opt/eda-modbus-bridge/node_modules/prebuild-install/bin.js'
npm ERR! ]
npm ERR! }
npm ERR!
npm ERR! Node.js v18.17.0
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | arm64
npm ERR! gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/opt/eda-modbus-bridge/node_modules/@serialport/bindings/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.cache/node-gyp/18.17.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/18.17.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/18.17.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/opt/eda-modbus-bridge/node_modules/@serialport/bindings',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/serialport.cpp:1:
npm ERR! ../src/./serialport.h:6:10: fatal error: nan.h: No such file or directory
npm ERR! 6 | #include <nan.h>
npm ERR! | ^~~~~~~
npm ERR! compilation terminated.
npm ERR! make: *** [bindings.target.mk:114: Release/obj.target/bindings/src/serialport.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: make failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 6.1.21-v8+
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /opt/eda-modbus-bridge/node_modules/@serialport/bindings
npm ERR! gyp ERR! node -v v18.17.0
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok

Startup fails reading coil 51

Looks like on my Pandion eco EDE (MB v1.97, display v2.01) the program fails to start as it gets stuck reading coil 51.

helmi 01 07:59:31 ubuntu node[7095]: 2024-02-01T07:59:31.252Z [main] info: Connecting to MQTT broker at mqtt://192.168.52.68:1883
helmi 01 07:59:31 ubuntu node[7095]: 2024-02-01T07:59:31.252Z [main] info: Using MQTT broker authentication
helmi 01 07:59:31 ubuntu node[7095]: 2024-02-01T07:59:31.306Z [http] info: Listening on http://0.0.0.0:8080
helmi 01 07:59:31 ubuntu node[7095]: 2024-02-01T07:59:31.312Z [main] info: Successfully connected to MQTT broker at mqtt://192.168.52.68:1883
helmi 01 07:59:31 ubuntu node[7095]: 2024-02-01T07:59:31.312Z [modbus] debug: Retrieving device information...
helmi 01 07:59:31 ubuntu node[7095]: 2024-02-01T07:59:31.313Z [modbus] debug: Reading coil address 16, length 1
helmi 01 07:59:31 ubuntu node[7095]: 2024-02-01T07:59:31.334Z [modbus] debug: Reading coil address 51, length 1
helmi 01 07:59:36 ubuntu node[7095]: 2024-02-01T07:59:36.335Z [modbus] error: Failed to read coil address 51, length 1
helmi 01 07:59:36 ubuntu node[7095]: 2024-02-01T07:59:36.336Z [main] error: An exception occurred: TransactionTimedOutError: Timed out

The device is originally from 2009 but the EDA board was replaced in 2019. If I understand the older Enervent documentation, this coil 51 is not documented.

Cleanup Home Assistant specific remains

There are files not used by this repo anymore here due to the move to separate repo for the Home Assistant addons.

Following could be removed, might be others also

  • .dockerignore
  • Dockerfile
  • config.json
  • entrypoint.sh
  • logo.png

Remove "ventilation target level" setting

Enervent confirmed that the ventilation level in normal mode cannot be changed via Modbus - the register we've been trying to change only controls the value that is shown on the indoor control units. To avoid confusion, the whole thing should be removed.

Will it work with software v. 5.62?

I am new to linux and don't have any previous experience with it. I have Greenair Pandion eco EDX with integrated HP. This model is custom-made for Desingtalo and it is for heating only with HP and normal electric heating element.

I have raspberry pi zero with waveshare rs 485 can hat, but I can't get readings from pandion and it fails to the first reading.

Now the RJ10 is connected to freeway port green/red cables connects to AB ports on can hat. Modbus is 1 in the EDA panel.
So far I've tried the newest version and the 2.5.0. And everything should be working according to waveshare manuals.

I dont know what to try next so therefore I wanted to ask if it should work with this software version.

user@raspberrypiz:/opt/eda-modbus-bridge $ node eda-modbus-bridge.mjs --mqttBrokerUrl mqtt://192.168.1.xxx:1883 --mqttUsername xxx --mqttPassword xxxx --mqttDiscovery true -d /dev/ttyAMA0
2024-02-05T18:59:15.422Z [main] info: Opening serial connection to /dev/ttyAMA0, slave ID 1
2024-02-05T18:59:15.693Z [main] info: Connecting to MQTT broker at mqtt://192.168.1.xxx:1883
2024-02-05T18:59:15.698Z [main] info: Using MQTT broker authentication
2024-02-05T18:59:16.889Z [http] info: Listening on http://1:8080
2024-02-05T18:59:17.015Z [main] info: Successfully connected to MQTT broker at mqtt://192.168.1.xxx:1883
2024-02-05T18:59:22.128Z [modbus] error: Failed to read coil address 16, length 1
2024-02-05T18:59:22.138Z [main] error: An exception occurred: TransactionTimedOutError: Timed out

user@raspberrypiz:/opt/eda-modbus-bridge $ ifconfig
can0: flags=193<UP,RUNNING,NOARP> mtu 16
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 65536 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 5 dropped 5 overruns 0 carrier 5 collisions 0

user@raspberrypiz:/opt/eda-modbus-bridge $ ls -l /dev/serial*
lrwxrwxrwx 1 root root 5 5. 2. 20:24 /dev/serial0 -> ttyS0
lrwxrwxrwx 1 root root 7 5. 2. 20:24 /dev/serial1 -> ttyAMA0

user@raspberrypiz:/opt/eda-modbus-bridge $ dmesg | grep -i '(can|spi)'
[ 8.254364] can: controller area network core
[ 8.254536] NET: Registered PF_CAN protocol family
[ 8.297258] can: raw protocol
[ 39.899351] vc4-drm soc:gpu: [drm] Cannot find any crtc or sizes
[ 43.363701] CAN device driver interface
[ 44.625473] mcp251x spi0.0 can0: MCP2515 successfully initialized.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.