joyja / tentacle-plc

A modern software programmable logic controller
https://www.tentacleplc.com
GNU Affero General Public License v3.0
8 stars 2 forks source link

Feature Request: Add BACnet / REST API Source #2

Closed bbartling closed 1 year ago

bbartling commented 2 years ago

Could BACnet protocol ever be implemented with this project so the HVAC controls contracting industry could use this too? Problem with BACnet the JavaScript library's may not be evolved/maintained very well. Its a big problem in the Node Red community. This project below I think could be promising but a little over head on how it could be implemented:

BACnet Stack

If there was ever an opportunity to test BACnet with tentacle I'd love to be involved.

joyja commented 2 years ago

@bbartling this seems to be a very relevant topic. Others have expressed interest in this too, as well as integration with Normal Framework. I'll definitely take a look as time permits, but will happily accept pull requests from contributors as well. Something written natively in javascript would be preferrable. Maybe https://github.com/BiancoRoyal/node-bacstack?

bbartling commented 2 years ago

@joyja thanks for the response! So at least in the Node Red community that Node Bacstack didn't support BACnet over Rs-485 (BACnet MSTP) and I found it so hard to use that I ended up just creating a rest API app to run along side of Node Red.

I'm not a JavaScript guru so it was easier for me to just use Python BACnet stacks what I was used too.

bbartling commented 2 years ago

I also have a rest API BACnet gateway git repo, is that something that could be used with tentacle? Curious on your thoughts, I need to build in a simple rest authentication feature but the app has been tested. Would you have any recommendations for rest API authentication that I can build into my app?

A BACnet MQTT gateway would be interesting too.

bbartling commented 2 years ago

Well I couldnt help myself I added http basic authentication to the BACnet rest API app. Curious to maybe play around with tentacles.

Is the rest API features ready yet for tenticles?

I would be using it for research work related to continuous electrical load management in buildings. Its non profit research funded work, simple stuff adjusting HVAC setponts in a building to control electrical usage by the cooling systems/chiller

joyja commented 2 years ago

Hi @bbartling sorry I'm only replying now to this! Distracted by other work. Yeah I wasn't taking into account RS485 devices, trying to handle the TCP/IP case first. Do you use RS485 often in the building industry? I think it's a great idea to use what you've built via the REST API. I don't have a REST API source in Tentacle PLC yet, but this gives me some motivation.

Your use case sounds like a great application for this.

bbartling commented 2 years ago

@joyja, hi yes to the RS-485 devices. There is a lot out there for sure even though the industry seems to slowly slowly be converting TCP/IP type devices. I have one of these on my test bench: https://www.ccontrols.com/lp/routers.htm

So the rest API app definitely handles RS-485 but needs to be through a BACnet router which is the gateway between TCP/IP/RS-485. These devices are super common in the building automation world and built into supervisory level controllers and some field level devices handle BACnet routing too to RS-485 networks...

I have never seen for IoT in smart building industry an IoT device that is hard wired into an RS-485 network. Just need tools that can route data to RS-485 which we can do.

bbartling commented 2 years ago

Well Ill check in with you for when rest API can be tested : )