Giter Club home page Giter Club logo

bindingopenhab's Introduction

souliss

Souliss is a networking framework for interconnected Things, smart homes and automated appliances. It includes a network layer that gives virtualization over the communication media, an event based protocol and datastructure and user interfaces based on Android and openHAB.

This repository contains the code that runs over Arduino AVR and ESP8266 and the examples to getting started.

Getting Started

If you are new to Souliss and Arduino, the getting started guide gives the basic to compile and run Souliss on your nodes.

Supported Hardware

You can run Souliss on consumer products or compatible boards, generally speaking any device based on the supported microcontrollers and transceivers can run Souliss.

Download

Stable code is released periodically, details are available in the download page.

Support and Community

The main source for documentation is the Wiki, notify bugs in the issues and get in touch with the Community.

bindingopenhab's People

Contributors

fazioa avatar fulviospelta avatar plinioseniore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

bindingopenhab's Issues

T18 <-> OpenHab interaction problem or explanation needed

I Open this issue, reporting a post from Maciej Łomozik in english ML. I have same behaviour on my system.

This is my first "problem/question" post so once again Hi to everyone and I hope my problem description is good and understandable :)

I'm using T18 with openhab in this configuration

souliss:
[...]
DigIn2State(AC_IN, Souliss_T1n_OffFeedback, Souliss_T1n_OnFeedback, REM_PULSE); // AC_IN is input pin for sensing state of the relay which can be operated externally (for souliss)
Logic_T18(REM_PULSE);
LowDigOut(RELAY_PULSE,Souliss_T1n_OnCoil,REM_PULSE);
[...]

FAST_x10ms(10) {
Timer_StepRelay(REM_PULSE);
}

openHAB:
sitemap:
[...]
Switch item=cykus_garaz mappings=[ON="ON", OFF="OFF"]
[...]

item:
[...]
Switch cykus_garaz "W garazu" {souliss="T18:0:2", autoupdate="false"}
[...]

That works like charm with SoulissApp (android).
In OpenHAB T18 doesn't work with 1.7.1 binding from stable release.
I've switch to souliss_1.7.0.20151027212 and it recognized T18 but the ON/OFF state was not updated.
So I've changed this mapping in propertis/states_SOULISStoOH.properties file to:

Typical 18 : N/OFF Digital Output with pulse output with Timer Option

SwitchItem_0x18_0x24=OFF
SwitchItem_0x18_0xA1=ON
SwitchItem_0x18_0x23=ON
and now it works like SoulissApp: state is updated and relay is pulsing on command. So far so good. But I've noticed in OH log:

Received HTTP POST request at 'items/cykus_garaz' with value 'ON'.
18:22:56.834 [INFO ] [.o.b.s.internal.SoulissBinding:142 ] - receiveCommand - cykus_garaz = ON - Typical: 0x18
18:22:56.834 [DEBUG] [.s.i.n.typicals.StateTraslator:68 ] - translate commands: ON -> 0x02
18:22:56.835 [DEBUG] [.o.b.s.i.n.udp.SoulissCommGate:90 ] - sendFORCEFrame - HEX: [33 00 00 00 03 00 00 02 ], soulissNodeIPAddressOnLAN: 192.168.1.151
18:22:56.836 [DEBUG] [s.i.network.udp.SendDispatcher:64 ] - Push
18:22:56.838 [DEBUG] [s.i.network.udp.SendDispatcher:143 ] - Add frame: HEX: [0F 0E 17 97 00 01 01 33 00 00 00 03 00 00 02 ]
18:22:56.881 [DEBUG] [s.i.network.udp.SendDispatcher:217 ] - POP: 1 packets in memory
18:22:56.881 [DEBUG] [s.i.network.udp.SendDispatcher:228 ] - POP: 1 force frame sent
18:22:56.882 [DEBUG] [s.i.network.udp.SendDispatcher:232 ] - Pop frame HEX: [0F 0E 17 97 00 01 01 33 00 00 00 03 00 00 02 ] - Delay for 'SendDispatcherThread' setted to 100 mills.
18:22:56.883 [DEBUG] [s.i.network.udp.SendDispatcher:257 ] - SendDispatcherThread - Functional Code 0x33 - Packet: HEX: [0F 0E 17 97 00 01 01 33 00 00 00 03 00 00 02 ] - Elementi rimanenti in lis
ta: 1
18:22:56.884 [DEBUG] [s.i.network.udp.SendDispatcher:327 ] - Compare. Node: 0 Slot: 2 Typical: 18 Command: 0x02 EXPECTED: 0x01 - IN MEMORY: 0x36

[repeated many times]
Packet Execution timeout - Requeued

so I looked at the file properties/commands_to_states.properties
and there was no entry for T18 so I added

Typical 18

0x18_0x02=0x23
0x18_0x04=0x24

and now this works the same (OK) but the only change in log is :
Compare. Node: 0 Slot: 2 Typical: 18 Command: 0x02 EXPECTED: 0x23 - IN MEMORY: 0x35

So can someone explain,please what this "compare" mechanism is and what EXPECTED value is ??

maciek

T19 doesn't read actual value

Don't know if fixed in last release, but if you put T19 to 85% for example, or other value, it works but slider come back to 0

openHAB 2 Support

Are there any plans about upgrading the Binding to support the new autoconfiguration features present in the new openHAB version?

T51 can't using.

i try to use T51 with float variable. Binding only see T52 item. Here is debug OH:

2015-10-29 16:46:46.332 [DEBUG] [.o.b.s.i.n.udp.UDPServerThread:62 ]- HEX: [24 23 17 86 47 66 00 31 00 00 00 18 E0 4D 8A 50 CA 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
2015-10-29 16:46:46.334 [DEBUG] [.b.s.i.n.udp.UDPSoulissDecoder:65 ]- decodeMacaco: Received functional code: 0x31
2015-10-29 16:46:46.335 [DEBUG] [.b.s.i.n.udp.UDPSoulissDecoder:75 ]- Souliss_UDP_function_subscribe_resp / Souliss_UDP_function_poll_resp
2015-10-29 16:46:46.337 [DEBUG] [.b.s.i.n.udp.UDPSoulissDecoder:71 ]- request to updateTIMESTAMP. Node: 0
2015-10-29 16:46:46.339 [DEBUG] [.b.s.i.n.udp.UDPSoulissDecoder:80 ]- updateTIMESTAMP: MeteostationUpdate ( 153) = 2015-10-29T16:46:46.339TMT
2015-10-29 16:46:46.340 [DEBUG] [.s.i.n.t.SoulissGenericTypical:100 ]- Update State. Name: TempOut, Typ: 0x52, Node: 0, Slot: 0. New State: 23.5
2015-10-29 16:46:46.342 [DEBUG] [.b.s.i.n.udp.UDPSoulissDecoder:318 ]- decodeStateRequest: TempOut (0x52) = 23.5
2015-10-29 16:46:46.344 [DEBUG] [.s.i.n.t.SoulissGenericTypical:100 ]- Update State. Name: Pressure, Typ: 0x52, Node: 0, Slot: 4. New State: 741.0
2015-10-29 16:46:46.345 [DEBUG] [.b.s.i.n.udp.UDPSoulissDecoder:318 ]- decodeStateRequest: Pressure (0x52) = 741.0
2015-10-29 16:46:46.642 [DEBUG] [b.s.i.network.typicals.Monitor:105 ]- Put on Bus Events - TempOut = 23.5
2015-10-29 16:46:46.644 [DEBUG] [.s.i.n.typicals.StateTraslator:97 ]- translate states: NumberItem_0x52_0x17 -> null
2015-10-29 16:46:46.652 [DEBUG] [b.s.i.network.typicals.Monitor:75 ]- Put on Bus Events - MeteostationUpdate = 2015-10-29T16:46:46.339TMT
2015-10-29 16:46:46.657 [DEBUG] [b.s.i.network.typicals.Monitor:105 ]- Put on Bus Events - Pressure = 741.0
2015-10-29 16:46:46.658 [DEBUG] [.s.i.n.typicals.StateTraslator:97 ]- translate states: NumberItem_0x52_0x2E5 -> null
2015-10-29 16:46:47.611 [DEBUG] [s.i.network.udp.SendDispatcher:217 ]- POP: 0 packets in memory
2015-10-29 16:46:47.612 [DEBUG] [s.i.network.udp.SendDispatcher:228 ]- POP: 0 force frame sent
2015-10-29 16:46:47.614 [DEBUG] [s.i.network.udp.SendDispatcher:232 ]- Pop frame HEX: [0C 0B 17 66 00 86 47 25 00 00 00 01 ] - Delay for 'SendDispatcherThread' setted to 100 mills.
2015-10-29 16:46:47.615 [DEBUG] [s.i.network.udp.SendDispatcher:257 ]- SendDispatcherThread - Functional Code 0x25 - Packet: HEX: [0C 0B 17 66 00 86 47 25 00 00 00 01 ] - Elementi rimanenti in lista: 0
2015-10-29 16:46:47.822 [DEBUG] [.o.b.s.i.n.udp.UDPServerThread:61 ]- Packet received
2015-10-29 16:46:47.831 [DEBUG] [.o.b.s.i.n.udp.UDPServerThread:62 ]- HEX: [0D 0C 17 86 47 66 00 35 00 00 00 01 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]

Here is Arduino config:
float temperatureFloat;
float humidityFloat;

define TEMPERATURE 0

define HUMIDITY 2

Set_T52(TEMPERATURE);
Set_T51(HUMIDITY);

Logic_Temperature(TEMPERATURE);
Logic_Temperature(HUMIDITY);

Souliss_ImportAnalog(memory_map, HUMIDITY, &humidityFloat);
Souliss_ImportAnalog(memory_map, PRESSURE, &pressureFloat);

Here is Item:
Number TempOut "Температура [%.1f °C]" (gClimate) {souliss="T52:0:0", autoupdate=false}
Number HumidityOut "Влажность [%.1f %%]" (gClimate)// {souliss="T51:0:2", autoupdate=false}

New virtual node/typical to publish biding "last error" message

Un piccolo spunto: si potrebbe creare un nodo+tipico fittizio di tipo stringa nel quale pubblicare gli "errori" del binding quali ad esempio il mancato recupero del corretto stato a fronte di un comando dopo i 10 tentativi di ritrasmissione.
in questo modo si potrebbe avere memoria dell'ultimo errore (ovviamente corredato di timestamp e info sul tipico/comando ecc)
e storicizzandolo con persistenza logger addirittura un log mirato facilmente accessibile


A small hint: you could create a node + dummy typical (string type) in which to publish the "errors" of the binding such as the failure to get the correct state in front of a command after 10 retries.
This way you could have the info about the last error (obviously equipped with timestamp and info on the typical / command etc.)
and storing it using logger persistence even an easily accessible log.

Automatic Item Discovery

Hi, I saw before you are working on a way to add items from nodes to OH automatically, is this function still possible?

Ty for your work on this binding :P Its awesome

Regards

T12 bug

FROM:
https://groups.google.com/forum/#!topic/souliss/Aj9DHnGvuug

Item declared
Switch KidsRoomMainlight "Kids Room Main Light" (gKidsRoom, TechnicView_Node0 {souliss="T12:4:11", autoupdate="false"}

Check sintax
{souliss="T12:x:x:automode", autoupdate="false"}
AND
{souliss="T12:x:x:switch", autoupdate="false"}

LOG:
2016-01-12 15:29:09.642 [INFO ] [.o.b.s.internal.SoulissBinding] - receiveCommand - KidsRoomMainlight = ON - Typical: 0x12
2016-01-12 15:29:13.888 [DEBUG] [.s.i.n.t.SoulissGenericTypical] - Update State. Name: KidsRoomMainlight, Typ: 0x12, Node: 4, Slot: 11. New State$
2016-01-12 15:29:13.889 [DEBUG] [.b.s.i.n.udp.UDPSoulissDecoder] - decodeStateRequest: KidsRoomMainlight (0x12) = 1.0
2016-01-12 15:29:13.955 [DEBUG] [.s.i.n.typicals.StateTraslator] - translate states: null_automode_0x12_0x00 -> null
2016-01-12 15:29:13.956 [DEBUG] [.s.i.n.typicals.StateTraslator] - translate states: null_0x12_0x00 -> null
2016-01-12 15:29:13.956 [DEBUG] [b.s.i.network.typicals.Monitor] - Put on Bus Events - KidsRoomMainlight = 1.0

Item declared:
{souliss="T12:x:x:automode", autoupdate="false"}
Check expected state:
2016-01-13 13:37:14.225 [INFO ] [.o.b.s.internal.SoulissBinding] - receiveCommand - KidsRoomMainlight = ON - Typical: 0x12
2016-01-13 13:37:14.226 [DEBUG] [.s.i.n.typicals.StateTraslator] - translate commands: automode_ON -> 0x08
2016-01-13 13:37:14.311 [DEBUG] [s.i.network.udp.SendDispatcher] - Compare. Node: 4 Slot: 11 Typical: 12 Command: 0x08 EXPECTED: null - IN MEMORY: 0x240
2016-01-13 13:37:14.312 [DEBUG] [s.i.network.udp.SendDispatcher] - T12 Node: 4 Slot: 11 - OK Expected State

Add support to T31 - Temperature control

https://github.com/souliss/souliss/blob/master/Souliss/base/T3n.cpp

This typical use five (5) memory slot, arranged as follow
Temperature Control User Commands (IN / OUT) SLOT +0
Temperature Measured Value (IN / OUT) SLOT +1, SLOT +2
Temperature Setpoint Value (IN / OUT) SLOT +3, SLOT +4

Hardware and/or Software Command:
...software command from user interface, to increase or decrease the setpoint.
#define Souliss_T3n_InSetPoint 0x01
#define Souliss_T3n_OutSetPoint 0x02
#define Souliss_T3n_AsMeasured 0x03
#define Souliss_T3n_Cooling ----- 0x04
#define Souliss_T3n_Heating ----- 0x05
#define Souliss_T3n_FanOff ----- 0x06
#define Souliss_T3n_FanLow ----- 0x07
#define Souliss_T3n_FanMed ----- 0x08
#define Souliss_T3n_FanHigh ----- 0x09
#define Souliss_T3n_FanAuto ----- 0x0A
#define Souliss_T3n_FanManual 0x0B
#define Souliss_T3n_SetTemp ----- 0x0C
#define Souliss_T3n_ShutDown 0x0D

...following state defines let control heating, cooling and fans.
#define Souliss_T3n_HeatingOn 0x02
#define Souliss_T3n_CoolingOn 0x03
#define Souliss_T3n_FanOn1 0x08
#define Souliss_T3n_FanOn2 0x10
#define Souliss_T3n_FanOn3 0x20

Support for T12 Auto mode

Actually there is no support for AUTO/MANUAL mode in T12, I suggest to add it in order to have same functionality as in SoulissApp

Support T14 Pulse Output

I would have T14 Pulse Output in Openhab.

Use as T11 vs T14 but not refresh button state on Openhab.

I have a house automated with Automata Siemens S7-200.

And I have all entries pushbutton.

I need to turn those entries with T14 Output.

Thank you.

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.