Code Monkey home page Code Monkey logo

omnithing's People

Contributors

danielogorchock avatar dlaporte avatar ogiewon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

omnithing's Issues

omnithing.net not responding

I may have missed this elsewhere. I am unable to connect to omnithing.net. Has that site been removed?
Thanks

readme.md update request

Hi @DanielOgorchock

Thanks for a great way to integrate a Raspi with ST. Being an ST newbie I found that a step missing when adding your repository is you need to tell ST to integrate with Github first and then link it to my own individual GitHub account before you can then add your repository. It probably sounds obvious but Settings under Device Handlers doesn't appear until you do. Then i found ST struggles to download all of the handlers from GitHub and after publishing many go back to unpublished - I don't know if this is an issue or not.

Please could you also include instructions in the readme.md on how you could integrate features of the Raspi such as disk space/cpu usage etc. and return them to ST and also to allow different icons.

It is not obvious how to ask OmniThing to re-read it's .json configuration so I send a kill -HUP.

Finally in ST I found the Configure icon doesn't do anything - is this intended?

All these points would be really useful if we can address them in readme.md.

Thanks a lot
Ian

Cannot GET /repository/rpi/

When running

sudo apt-get update && sudo apt-get install omnithing

I'm getting this:

Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Ign:3 http://omnithing.net/repository/rpi ./ InRelease
Err:4 http://omnithing.net/repository/rpi ./ Release
  404  Not Found [IP: 192.99.169.215 80]
Reading package lists... Done
E: The repository 'http://omnithing.net/repository/rpi ./ Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'testing' to 'stable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

Also visiting http://omnithing.net/repository/rpi gives me

Cannot GET /repository/rpi/

devices not working in new Smartthings app

I managed to get things mostly working, however it looks like there are some issues with the new smartthings app. I created a parent device and a couple temperature and humidity sensors. The parent device shows "Connected" but the temp/humidity sensors continuously show "Checking Status". Each device's history shows updated values and if I look in the Smartthings Classic app everything appears as expected, however I also can't create any new automations with these devices in the new app.

Speed of actioning an ST operation

I have 24 devices configured using commands. I have optimised my code so that they return in < 1second providing the status of the device being controlled. This means that the entire polling loop is taking up to 30 seconds. I have the polling interval at 180 seconds with a 5 second gap between each device.

But, the devices are being polled for their status continuously in a loop. So its can take up to 1 minute (2x30 seconds) for an on/off action to be actioned by omnithing and up to 2 minutes for the status to appear in the ST app. I also have everything set to multithread switched on.

  1. Is it possible to decouple the actioning of ST commands from the status updates?
  2. is it possible to return the result of the command back to ST immediately?
  3. why is my config running the polling loop continuously rather than every 3 minutes?

No new devices in ST

I cant figure out what I'm doing wrong here. Everything seems to be configured correctly but I get no new devices registered in ST except for the one I have manually put in.

Here is the config

{
    "NetworkReceiver": {
        "type": "NetworkReceiverHttpLib",
        "port": 3838
    },
    "NetworkSender": {
        "type": "NetworkSenderHttpLib",
        "ip": "192.168.20.112",
        "port": 39500
    },
    "CompositePeriphs": [],
    "Devices": [
        {
            "triggers": [],
            "subscriptions": [],
            "type": "Switch",
            "name": "Door 0",
            "output": {
                "type": "CommandExecuterSwitch",
                "commandOn": "/home/pi/tea.sh",
                "commandOff": "/home/pi/tea.sh",
                "multithread": true
            },
            "invert": false,
            "initial": false,
            "input": {
                "type": "CommandReturnCode",
                "command": "/home/pi/door.py 0 status"
            },
            "ignoreRedundant": false
        },
        {
            "triggers": [],
            "subscriptions": [],
            "type": "Switch",
            "name": "Door 1",
            "output": {
                "type": "CommandExecuterSwitch",
                "commandOn": "/home/pi/coffee.sh",
                "commandOff": "/home/pi/coffee.sh",
                "multithread": true
            },
            "invert": false,
            "initial": false,
            "input": {
                "type": "CommandReturnCode",
                "command": "/home/pi/door.py 1 status"
            },
            "ignoreRedundant": false
        },
        {
            "triggers": [],
            "subscriptions": [],
            "type": "Switch",
            "name": "Door 2",
            "output": {
                "type": "CommandExecuterSwitch",
                "commandOn": "/home/pi/olay.sh",
                "commandOff": "/home/pi/olay.sh",
                "multithread": true
            },
            "invert": false,
            "initial": false,
            "input": {
                "type": "CommandReturnCode",
                "command": "/home/pi/door.py 2 status"
            },
            "ignoreRedundant": false
        }
    ]
}

In ST I have

Name | Garage Doors
Label | Garage Doors
Type | omni_parent
Version | Self-Published
Device Network Id | 00E04C81B398
Status | ACTIVE
Hub | Home Hub
Last Activity At | 2019-07-03 2:13 PM AEST
Date Created | 2019-07-03 2:13 PM AEST
Last Updated | 2019-07-03 2:42 PM AEST
Data | No data found for device
Current States | No states found
Preferences                                                  (edit) | Name                                 Type                                 Value                                                                                                                                                                                          ip                                     text                                     192.168.20.100                                                                                                                                    mac                                     text                                     00e04c81b398                                                                                                                                    port                                     text                                     3838 
Execution Location | Cloud

I can see in live logging that the refresh signal gets received but nothing more happens than that.

Also when omnithings starts it seems to want to run the on/off commands, which since its controlling my garage doors seems a bit odd. Here is the latest log

Initialized pigpio
Attempting to open configuration file: config.json
Parsing Json Config:
{
    "NetworkReceiver": {
        "type": "NetworkReceiverHttpLib",
        "port": 3838
    },
    "NetworkSender": {
        "type": "NetworkSenderHttpLib",
        "ip": "192.168.20.112",
        "port": 39500
    },
    "CompositePeriphs": [],
    "Devices": [
        {
            "triggers": [],
            "subscriptions": [],
            "type": "Switch",
            "name": "Door 0",
            "output": {
                "type": "CommandExecuterSwitch",
                "commandOn": "/home/pi/tea.sh",
                "commandOff": "/home/pi/tea.sh",
                "multithread": true
            },
            "invert": false,
            "initial": false,
            "input": {
                "type": "CommandReturnCode",
                "command": "/home/pi/door.py 0 status"
            },
            "ignoreRedundant": false
        },
        {
            "triggers": [],
            "subscriptions": [],
            "type": "Switch",
            "name": "Door 1",
            "output": {
                "type": "CommandExecuterSwitch",
                "commandOn": "/home/pi/coffee.sh",
                "commandOff": "/home/pi/coffee.sh",
                "multithread": true
            },
            "invert": false,
            "initial": false,
            "input": {
                "type": "CommandReturnCode",
                "command": "/home/pi/door.py 1 status"
            },
            "ignoreRedundant": false
        },
        {
            "triggers": [],
            "subscriptions": [],
            "type": "Switch",
            "name": "Door 2",
            "output": {
                "type": "CommandExecuterSwitch",
                "commandOn": "/home/pi/olay.sh",
                "commandOff": "/home/pi/olay.sh",
                "multithread": true
            },
            "invert": false,
            "initial": false,
            "input": {
                "type": "CommandReturnCode",
                "command": "/home/pi/door.py 2 status"
            },
            "ignoreRedundant": false
        }
    ]
}

Found NetworkReceiver entry
Found configuration
port=3838
Successfully created new {
        "type": "NetworkReceiverHttpLib",
        "port": 3838
    }
Found NetworkSender entry
Found configuration
ip=192.168.20.112 port=39500
Successfully created new {
        "type": "NetworkSenderHttpLib",
        "ip": "192.168.20.112",
        "port": 39500
    }
Optional input provided
Switch: write() state=off
Naming device: Door 0
Successfully created new {
            "triggers": [],
            "subscriptions": [],
            "type": "Switch",
            "name": "Door 0",
            "output": {
                "type": "CommandExecuterSwitch",
                "commandOn": "/home/pi/tea.sh",
                "commandOff": "/home/pi/tea.sh",
                "multithread": true
            },
            "invert": false,
            "initial": false,
            "input": {
                "type": "CommandReturnCode",
                "command": "/home/pi/door.py 0 status"
            },
            "ignoreRedundant": false
        }
Executing command: /home/pi/tea.sh
Optional input provided
Switch: write() state=off
Naming device: Door 1
Successfully created new {
            "triggers": [],
            "subscriptions": [],
            "type": "Switch",
            "name": "Door 1",
            "output": {
                "type": "CommandExecuterSwitch",
                "commandOn": "/home/pi/coffee.sh",
                "commandOff": "/home/pi/coffee.sh",
                "multithread": true
            },
            "invert": false,
            "initial": false,
            "input": {
                "type": "CommandReturnCode",
                "command": "/home/pi/door.py 1 status"
            },
            "ignoreRedundant": false
        }
Executing command: /home/pi/coffee.sh
Optional input provided
Switch: write() state=off
Naming device: Door 2
Successfully created new {
            "triggers": [],
            "subscriptions": [],
            "type": "Switch",
       No status data could be sent: $NOTIFY_SOCKET was not set
No status data could be sent: $NOTIFY_SOCKET was not set
No status data could be sent: $NOTIFY_SOCKET was not set
No status data could be sent: $NOTIFY_SOCKET was not set
No status data could be sent: $NOTIFY_SOCKET was not set
No status data could be sent: $NOTIFY_SOCKET was not set
No status data could be sent: $NOTIFY_SOCKET was not set
No status data could be sent: $NOTIFY_SOCKET was not set
No status data could be sent: $NOTIFY_SOCKET was not set
     "name": "Door 2",
            "output": {
                "type": "CommandExecuterSwitch",
                "commandOn": "/home/pi/olay.sh",
                "commandOff": "/home/pi/olay.sh",
                "multithread": true
            },
            "invert": false,
            "initial": false,
            "input": {
                "type": "CommandReturnCode",
                "command": "/home/pi/door.py 2 status"
            },
            "ignoreRedundant": false
        }Executing command: /home/pi/olay.sh



############# CONFIGURATIONS ##############
Device Configurations:
	ContactSensor
	Momentary
	MotionSensor
	RelativeHumidityMeasurement
	Switch
	SwitchLevel
	TemperatureMeasurement
	VoltageMeasurement

Composite Peripheral Configurations:
	DhtReader

InputBool Configurations:
	InputBoolRef
	InputDebouncer
	CommandReturnCode
	DigitalInputPinRaspberryPi

InputFloat Configurations:
	InputFloatRef
	CommandParser

InputUInt Configurations:
	InputUIntRef

OutputVoid Configurations:
	TimedOutputBool
	CommandExecuter
	DigitalOutputPinRaspberryPi

OutputBool Configurations:
	OutputBoolToFloat
	TimedOutputBool
	CommandExecuterSwitch
	DigitalOutputPinRaspberryPi

OutputFloat Configurations:
	PwmOutput
	ServoMotor

OutputString Configurations:

NetworkReceiver Configurations:
	NetworkReceiverHttpLib

NetworkSender Configurations:
	NetworkSenderHttpLib

############# DEVICES ##############
Devices:
	name=Door 0 type=Switch constantRun=1
	name=Door 1 type=Switch constantRun=1
	name=Door 2 type=Switch constantRun=1

############# TRIGGERS ##############
Triggers:

############# SUBSCRIPTIONS ##############
Subscriptions:

Initializing devices...
Starting http server thread...
Starting http server...
{"name": "Door 0", "type": "Switch", "switch": "on"}
{"name": "Door 1", "type": "Switch", "switch": "off"}
{"name": "Door 2", "type": "Switch", "switch": "on"}
Initializing scheduler...
Closing Door
Opening Door
Closing Door
Failed to operate door 0
Sending json: {"updates": [{"name": "Door 0", "type": "Switch", "switch": "on"},{"name": "Door 1", "type": "Switch", "switch": "off"},{"name": "Door 2", "type": "Switch", "switch": "on"}]}
Return value: 202
Detected switch Door 1 change to state=on
{"name": "Door 1", "type": "Switch", "switch": "on"}
emitting event=changed deviceName=Door 1
emitting event=on deviceName=Door 1
Detected switch Door 2 change to state=off
{"name": "Door 2", "type": "Switch", "switch": "off"}
emitting event=changed deviceName=Door 2
emitting event=off deviceName=Door 2
Sending json: {"updates": [{"name": "Door 1", "type": "Switch", "switch": "on"},{"name": "Door 2", "type": "Switch", "switch": "off"}]}
Return value: 202
No status data could be sent: $NOTIFY_SOCKET was not set
No status data could be sent: $NOTIFY_SOCKET was not set
No status data could be sent: $NOTIFY_SOCKET was not set

process returned: 0

process returned: 0

process returned: 0

CommandExecuterSwitch parameter passing

If I have a script that takes a numeric value as a parameter 0-255 such as for a dimmer switch or fan controller, is it possible to get this parameter via ST into OmniThing and onto the command line parameter for a switch output?

I'm working on a tuya smartlife script for my devices that I would like to use with omnithing as i can't get ty-connector to work for me and my devices are too new to be able to load tasmota through tuya ota.

Failed install of omni-parent-hubitat.groovy

I'm a super guinea pig for this project Dan - kind of new to this... :) I am going thru the install steps on this page:
https://github.com/DanielOgorchock/OmniThing

I set up the GitHubRepository, selected all Parent and Child DHs, and got an error:
error

All but two uploaded:
error3

I selected these two to try again and then only one remained:
error4

Then I went to the GitHub repository and tried to manually create the uncreated DH and got this error upon saving the code:
Org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: script_dth_metadata_a7d2ca93_2b8b_4721_a01c_deae2a6cdcfd: 185: unable to resolve class hubitat.device.HubAction @ line 185, column 24. sendHubCommand(new hubitat.device.HubAction( ^ 1 error

I hope this is helpful!
Mark

Can't get hubitat to create child devices

I created the parent device for an ESP8266 configuration and set everything up the way I thought it was supposed to be but nothing happens in Hubitat.

{
    "NetworkReceiver": {
        "type": "NetworkManagerEsp8266",
        "port": 8090,
        "ssid": "SSID",
        "password": "PWD"
    },
    "NetworkSender": {
        "type": "NetworkManagerEsp8266",
        "port": 39501,
        "ip": "192.168.1.12",
        "ssid": "SSID",
        "password": "PWD"
    },
    "CompositePeriphs": [],
    "Devices": [
        {
            "triggers": [],
            "subscriptions": [],
            "type": "SwitchLevel",
            "name": "Servo",
            "output": {
                "type": "ServoMotor",
                "pin": 12,
                "revertTime": null,
                "shutoffTime": 200,
                "initialPercent": 100,
                "noStartup": false,
                "minPulse": null,
                "maxPulse": null
            },
            "initial": 100
        }
    ]
}

The only thing I changes was my ssid and password.

DHT11 Humidity not showing up in Google Home

So Omnithing works beautifully. Nice! Google home will pull in the temp from a DHT11 but the other child device humidity will not. I can see the values in ST. Is this just a limitation of Google Home?

ESP8266 startup failure

Arduino IDE 1.8.9, ESP Board Mgr v2.5.0

Created & downloaded full sketch from web site.
Beside Network Sender/Receiver, only single ContactSensor configured (snippet):
"Devices": [
{
"triggers": [
{
"interval": 12000,
"offset": 0,
"command": "poll"
}
],
"subscriptions": [],
"type": "ContactSensor",
"name": "MyContact",
"input": {
"type": "DigitalInputPinArduino",
"pin": 1,
"invert": false,
"pullup": false
},
"invert": false,
"constantPoll": true
}
]

On startup, the initial log output of loadJsonConfig truncates when it gets to this device - sometimes an odd character is at the end of string output, as if the terminating null is not present. I did add a log output of buffer in configWithProgmem before calling loadJsonConfig and it output fine.
Is there a different proven combination of IDE/Board Mgr I should try (or what other steps would you recommend to troubleshoot)?

Fail to connect to hub

I am trying to run your software on a SparkFun ESP32 Thing, but ran into an issue that I can not solve. I took the ZIP file that your site created and opened the INO file, compiled it and ran it. It appears that everything ran, but it failed to connect to the Smarthings hub. It says the Network Receiver connected. I have the correct IP address, but it continues to fail when trying to connect. Is there a specific port you have to connect too? I have used 8090 and 39501 with no luck. My hub is actually hard wired and does not use WiFi. However, the WiFi does have access to the wired port so other devices do not have an issue connecting to the hub from WiFi. Would this make a difference?

I have gone thru your instructions and added the device and configured the IP, port and MAC address in the ST app and that seemed to work.

I have configured an input and when that code is executed it tries to connect to the hub and it fails as well. Any ideas where I might be going wrong with the configuration/setup?

CommandReturnCode for TemperatureMeasurement?

First, Your work is art! Thank you.

I wanted to use the TemperatureMeasurement device to monitor my RaspberryPi CPU temperature by running a script, something like this:

#!/bin/bash
CPU_TEMP=$(</sys/class/thermal/thermal_zone0/temp)
echo "$((CPU_TEMP/1000))"

But I don't see the CommandReturnCode as an input option, only InputFloatRef.

will CommandReturnCode be available in the future for TemperatureMeasurement device?

Thanks,
Gil :)

Child devices constantly "checking status" in new Smartthings app

I managed to get things mostly working, however it looks like there are some issues with the new smartthings app. I created a parent device and a couple temperature and humidity sensors. The parent device shows "Connected" but the temp/humidity sensors continuously show "Checking Status". Each device's history shows updated values and if I look in the Smartthings Classic app everything appears as expected, however I also can't create any new automations with these devices in the new app.

how to add relay

I have a 8 relay board.
How do I add it to OmniThing using ESP8266?
The board l'm using a wemos d1 ESP8266.

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.