ChristianTremblay / BAC0

BAC0 - Library depending on BACpypes3 (Python 3) to build automation script for BACnet applications
GNU Lesser General Public License v3.0
174 stars 99 forks source link

Error when using bacnet.write function #267

Closed Obaq-web closed 3 years ago

Obaq-web commented 3 years ago

Hello there,

I am trying to change the present value of another device (raspi) that runs a python script with bac0 to create an analog value. I posted the script I used to change the present value of the analog value below. When i run it I get the following error:

Traceback (most recent call last): File "C:\Users\localadmin\OneDrive\Dokumente\Python Projekte\MQTT\Bacnet und MQTT.py", line 24, in hvac.write('192.168.178.63:47808 analogValue 1 presentValue 10 8') File "C:\Users\localadmin\AppData\Local\Programs\Python\Python39\lib\site-packages\BAC0\core\io\Write.py", line 113, in write raise NoResponseFromController("APDU Abort Reason : {}".format(reason)) BAC0.core.io.IOExceptions.NoResponseFromController: APDU Abort Reason : propertyIsNotAnArray

The code I used is the following:

import BAC0
from BAC0.core.devices.create_objects import (
    create_AV,
    create_MV,
    create_BV,
    create_AI,
    create_BI,
    create_AO,
    create_BO,
    create_CharStrValue,
    create_DateTimeValue,
    EngineeringUnits,
    )
import time

hvac= BAC0.lite(ip='192.168.178.58/24:47808')
hvac.write('192.168.178.63:47808 analogValue 1 presentValue 10 8')

Maybe I did not insert the correct syntax in the brackets of hvac.write? What is wrong here and how can I fix it?

ChristianTremblay commented 3 years ago

hvac.write('192.168.178.63:47808 analogValue 1 presentValue 10 - 8') https://bac0.readthedocs.io/en/latest/write.html?highlight=write#write-to-a-simple-property

github-actions[bot] commented 3 years ago

This issue had no activity for a long period of time. If this issue is still required, please update the status or else, it will be closed. Please note that an issue can be reopened if required.